Hello community, here is the log from the commit of package lttng-modules for openSUSE:Factory checked in at 2018-06-20 15:33:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/lttng-modules (Old) and /work/SRC/openSUSE:Factory/.lttng-modules.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lttng-modules" Wed Jun 20 15:33:19 2018 rev:6 rq:617807 version:2.10.6 Changes: -------- --- /work/SRC/openSUSE:Factory/lttng-modules/lttng-modules.changes 2018-04-11 14:02:27.497790556 +0200 +++ /work/SRC/openSUSE:Factory/.lttng-modules.new/lttng-modules.changes 2018-06-20 15:33:50.012684710 +0200 @@ -1,0 +2,30 @@ +Sun Jun 17 18:47:02 UTC 2018 - [email protected] + +- Update to version 2.10.6: + * Fix: Update RCU instrumentation for 4.17. + * Fix: sunrpc instrumentation for 4.17. + * Fix: Use struct reclaim_stat in mm_vmscan_lru_shrink_inactive + for 4.17. + * Fix: Add gfp_flags arg to mm_vmscan_kswapd_wake for 4.17. + * Update: KVM instrumentation for ubuntu 4.13.0-38. + * Fix: Update KVM instrumentation for Ubuntu 3.13.0-144. + * Fix: btrfs instrumentation namespacing. + * Cleanup: Comment about CONFIG_HOTPLUG_CPU ifdef. + * Fix: Do not use CONFIG_HOTPLUG_CPU for the new hotplug API. + * Fix: Update kvm instrumentation for 4.1.50+. + * Use the memory pool instead of kmalloc. + * Create a memory pool for temporary tracepoint probes storage. + * Fix: Use proper pid_ns in the process statedump. + * Fix: Add variable quoting to shell scripts. + * Update: KVM instrumentation for fedora 4.14.13-300. + * Fix: Add Fedora version macros. + * Fix: Update btrfs instrumentation for SuSE 4.4.114-92. + * Fix: Update block instrumentation for SuSE 4.4.114-92. + * Fix: Update rcu instrumentation for v4.16. + * Fix: Update vmscan instrumentation for v4.16. + * Fix: Update timer instrumentation on 4.16 and 4.14-rt. + * Update kvm instrumentation for debian kernel 4.14.0-3. +- Remove + lttng-modules-2.10.5-update-instrumentation-for-linux-4.16.patch. + +------------------------------------------------------------------- Old: ---- lttng-modules-2.10.5-update-instrumentation-for-linux-4.16.patch lttng-modules-2.10.5.tar.bz2 lttng-modules-2.10.5.tar.bz2.asc New: ---- lttng-modules-2.10.6.tar.bz2 lttng-modules-2.10.6.tar.bz2.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lttng-modules.spec ++++++ --- /var/tmp/diff_new_pack.Iq8sLj/_old 2018-06-20 15:33:51.256639573 +0200 +++ /var/tmp/diff_new_pack.Iq8sLj/_new 2018-06-20 15:33:51.260639429 +0200 @@ -23,7 +23,7 @@ %endif %endif Name: lttng-modules -Version: 2.10.5 +Version: 2.10.6 Release: 0 Summary: Licensing information for package lttng-modules License: GPL-2.0-only AND LGPL-2.1-only AND MIT @@ -36,8 +36,6 @@ Source4: Module.supported # PATCH-FIX-SLE btrfs-constify-tracepoint-arguments.patch bsc#1044912 [email protected] Patch0: btrfs-constify-tracepoint-arguments.patch -# PATCH-FIX-UPSTREAM lttng-modules-2.10.5-update-instrumentation-for-linux-4.16.patch -- Update instrumentation on Linux 4.16 (commits 562860a, 9cf057f). -Patch1: lttng-modules-2.10.5-update-instrumentation-for-linux-4.16.patch BuildRequires: kernel-devel BuildRequires: kernel-source BuildRequires: kernel-syms @@ -65,7 +63,6 @@ %if (0%{?suse_version} < 1320 || 0%{?suse_version} >= 1500) && !0%{?is_opensuse} %patch0 -p1 %endif -%patch1 -p1 set -- * mkdir source @@ -96,6 +93,6 @@ done %files -%doc LICENSE lgpl-2.1.txt gpl-2.0.txt mit-license.txt +%license LICENSE lgpl-2.1.txt gpl-2.0.txt mit-license.txt %changelog ++++++ lttng-modules-2.10.5.tar.bz2 -> lttng-modules-2.10.6.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttng-modules-2.10.5/ChangeLog new/lttng-modules-2.10.6/ChangeLog --- old/lttng-modules-2.10.5/ChangeLog 2018-01-30 21:56:03.000000000 +0100 +++ new/lttng-modules-2.10.6/ChangeLog 2018-05-09 20:07:59.000000000 +0200 @@ -1,3 +1,27 @@ +2018-05-09 (Lost Sock Memorial Day) LTTng modules 2.10.6 + * Fix: update RCU instrumentation for 4.17 + * Fix: sunrpc instrumentation for 4.17 + * Fix: use struct reclaim_stat in mm_vmscan_lru_shrink_inactive for 4.17 + * Fix: Add gfp_flags arg to mm_vmscan_kswapd_wake for 4.17 + * Update: kvm instrumentation for ubuntu 4.13.0-38 + * Fix: update kvm instrumentation for Ubuntu 3.13.0-144 + * Fix: btrfs instrumentation namespacing + * Cleanup: comment about CONFIG_HOTPLUG_CPU ifdef + * Fix: do not use CONFIG_HOTPLUG_CPU for the new hotplug API + * Fix: update kvm instrumentation for 4.1.50+ + * Use the memory pool instead of kmalloc + * Create a memory pool for temporary tracepoint probes storage + * Fix: use proper pid_ns in the process statedump + * Fix: add variable quoting to shell scripts + * Update: kvm instrumentation for fedora 4.14.13-300 + * Fix: Add Fedora version macros + * Fix: update btrfs instrumentation for SuSE 4.4.114-92 + * Fix: update block instrumentation for SuSE 4.4.114-92 + * Fix: update rcu instrumentation for v4.16 + * Fix: update vmscan instrumentation for v4.16 + * Fix: update timer instrumentation on 4.16 and 4.14-rt + * Update kvm instrumentation for debian kernel 4.14.0-3 + 2018-01-30 (National Croissant Day) LTTng modules 2.10.5 * Fix: network instrumentation protocol enum * Fix: update btrfs instrumentation for SuSE 4.4.103-6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttng-modules-2.10.5/Makefile new/lttng-modules-2.10.6/Makefile --- old/lttng-modules-2.10.5/Makefile 2018-01-30 21:55:17.000000000 +0100 +++ new/lttng-modules-2.10.6/Makefile 2018-05-09 20:00:20.000000000 +0200 @@ -59,7 +59,8 @@ lttng-filter.o lttng-filter-interpreter.o \ lttng-filter-specialize.o \ lttng-filter-validator.o \ - probes/lttng-probe-user.o + probes/lttng-probe-user.o \ + lttng-tp-mempool.o ifneq ($(CONFIG_HAVE_SYSCALL_TRACEPOINTS),) lttng-tracer-objs += lttng-syscalls.o diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttng-modules-2.10.5/Makefile.ABI.workarounds new/lttng-modules-2.10.6/Makefile.ABI.workarounds --- old/lttng-modules-2.10.5/Makefile.ABI.workarounds 2018-01-30 21:50:34.000000000 +0100 +++ new/lttng-modules-2.10.6/Makefile.ABI.workarounds 2018-05-09 20:00:20.000000000 +0200 @@ -22,6 +22,12 @@ ccflags-y += -DSLE_API_VERSION=$(SLE_API_VERSION) endif +FEDORA_REVISION_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-fedora-version.sh $(CURDIR)) + +ifneq ($(FEDORA_REVISION_VERSION), 0) + ccflags-y += -DFEDORA_REVISION_VERSION=$(FEDORA_REVISION_VERSION) +endif + RT_PATCH_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/rt-patch-version.sh $(CURDIR)) ifneq ($(RT_PATCH_VERSION), 0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttng-modules-2.10.5/abi-debian-version.sh new/lttng-modules-2.10.6/abi-debian-version.sh --- old/lttng-modules-2.10.5/abi-debian-version.sh 2018-01-30 21:50:41.000000000 +0100 +++ new/lttng-modules-2.10.6/abi-debian-version.sh 2018-03-20 16:51:26.000000000 +0100 @@ -1,9 +1,9 @@ #!/bin/sh # First argument is the path to the kernel headers. -KPATH=$1 +KPATH="$1" -if [ ! -f ${KPATH}/include/generated/package.h ]; then +if [ ! -f "${KPATH}/include/generated/package.h" ]; then echo 0 exit 0 fi @@ -11,10 +11,10 @@ # Debian snippet courtesy of Ben Hutchings # Assuming KPATH is the target kernel headers directory -DEB_PACKAGE_VERSION=$(sed -rn 's/^#define LINUX_PACKAGE_ID " Debian (.*)"/\1/p' ${KPATH}/include/generated/package.h) +DEB_PACKAGE_VERSION=$(sed -rn 's/^#define LINUX_PACKAGE_ID " Debian (.*)"/\1/p' "${KPATH}/include/generated/package.h") # Ignore backports part -DEB_PACKAGE_VERSION=$(echo ${DEB_PACKAGE_VERSION} | sed -r 's/~(bpo|deb).*//') +DEB_PACKAGE_VERSION=$(echo "${DEB_PACKAGE_VERSION}" | sed -r 's/~(bpo|deb).*//') # ckt (Canonical Kernel Team) kernels were used for a while during the jessie # cycle, their versionning is a bit different. They track the upstream vanilla @@ -23,15 +23,15 @@ # switched back to upstream style at 3.16.36. # Get -ckt update number, if present -KERNEL_CKT_UPDATE=$(echo ${DEB_PACKAGE_VERSION} | sed -rn 's/^[0-9]+\.[0-9]+\.[0-9]+-ckt([0-9]+).*/\1/p') +KERNEL_CKT_UPDATE=$(echo "${DEB_PACKAGE_VERSION}" | sed -rn 's/^[0-9]+\.[0-9]+\.[0-9]+-ckt([0-9]+).*/\1/p') test -n "${KERNEL_CKT_UPDATE}" || KERNEL_CKT_UPDATE=0 # Get package revision -DEB_PACKAGE_REVISION=$(echo ${DEB_PACKAGE_VERSION} | sed -r 's/.*-([^-]+)$/\1/') +DEB_PACKAGE_REVISION=$(echo "${DEB_PACKAGE_VERSION}" | sed -r 's/.*-([^-]+)$/\1/') # Get non-sec update number -DEB_PACKAGE_REVISION_BASE=$(echo ${DEB_PACKAGE_REVISION} | sed -r 's/^([0-9]+).*/\1/') +DEB_PACKAGE_REVISION_BASE=$(echo "${DEB_PACKAGE_REVISION}" | sed -r 's/^([0-9]+).*/\1/') # Get security update number, if present -DEB_PACKAGE_REVISION_SECURITY=$(echo ${DEB_PACKAGE_REVISION} | sed -rn 's/.*\+(squeeze|deb[0-9]+)+u([0-9]+)$/\2/p') +DEB_PACKAGE_REVISION_SECURITY=$(echo "${DEB_PACKAGE_REVISION}" | sed -rn 's/.*\+(squeeze|deb[0-9]+)+u([0-9]+)$/\2/p') test -n "${DEB_PACKAGE_REVISION_SECURITY}" || DEB_PACKAGE_REVISION_SECURITY=0 # Combine all update numbers into one DEB_API_VERSION=$((KERNEL_CKT_UPDATE * 10000 + DEB_PACKAGE_REVISION_BASE * 100 + DEB_PACKAGE_REVISION_SECURITY)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttng-modules-2.10.5/abi-fedora-version.sh new/lttng-modules-2.10.6/abi-fedora-version.sh --- old/lttng-modules-2.10.5/abi-fedora-version.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/lttng-modules-2.10.6/abi-fedora-version.sh 2018-03-20 16:51:26.000000000 +0100 @@ -0,0 +1,21 @@ +#!/bin/sh + +# First argument is the path to the kernel headers. +KPATH="$1" + +if [ ! -f "${KPATH}/include/generated/utsrelease.h" ]; then + echo 0 + exit 0 +fi + +# Assuming KPATH is the target kernel headers directory +UTS_RELEASE=$(sed -rn 's/^#define UTS_RELEASE "(.*)"/\1/p' "${KPATH}/include/generated/utsrelease.h") +FEDORA_VERSION=$(echo "${UTS_RELEASE}" | sed -n 's/.*\.fc\([0-9]*\)\..*/\1/p') + +if [ "x${FEDORA_VERSION}" = "x" ]; then + echo 0 + exit 0 +fi + +FEDORA_REVISION_VERSION=$(echo "${UTS_RELEASE}" | sed -n 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)\-\([0-9]*\).*/\4/p') +echo "${FEDORA_REVISION_VERSION}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttng-modules-2.10.5/abi-rhel-version.sh new/lttng-modules-2.10.6/abi-rhel-version.sh --- old/lttng-modules-2.10.5/abi-rhel-version.sh 2018-01-17 17:10:54.000000000 +0100 +++ new/lttng-modules-2.10.6/abi-rhel-version.sh 2018-03-20 16:51:26.000000000 +0100 @@ -1,19 +1,19 @@ #!/bin/sh # First argument is the path to the kernel headers. -KPATH=$1 +KPATH="$1" -if [ ! -f ${KPATH}/include/generated/uapi/linux/version.h ]; then +if [ ! -f "${KPATH}/include/generated/uapi/linux/version.h" ]; then echo 0 exit 0 fi # Assuming KPATH is the target kernel headers directory -RHEL_RELEASE=$(sed -rn 's/^#define RHEL_RELEASE "(.*)"/\1/p' ${KPATH}/include/generated/uapi/linux/version.h) +RHEL_RELEASE=$(sed -rn 's/^#define RHEL_RELEASE "(.*)"/\1/p' "${KPATH}/include/generated/uapi/linux/version.h") -RHEL_RELEASE_MAJOR=$(echo ${RHEL_RELEASE} | sed -r 's/^([0-9]+)\.([0-9]+)\.([0-9]+)/\1/') -RHEL_RELEASE_MINOR=$(echo ${RHEL_RELEASE} | sed -r 's/^([0-9]+)\.([0-9]+)\.([0-9]+)/\2/') -RHEL_RELEASE_PATCH=$(echo ${RHEL_RELEASE} | sed -r 's/^([0-9]+)\.([0-9]+)\.([0-9]+)/\3/') +RHEL_RELEASE_MAJOR=$(echo "${RHEL_RELEASE}" | sed -r 's/^([0-9]+)\.([0-9]+)\.([0-9]+)/\1/') +RHEL_RELEASE_MINOR=$(echo "${RHEL_RELEASE}" | sed -r 's/^([0-9]+)\.([0-9]+)\.([0-9]+)/\2/') +RHEL_RELEASE_PATCH=$(echo "${RHEL_RELEASE}" | sed -r 's/^([0-9]+)\.([0-9]+)\.([0-9]+)/\3/') # Combine all update numbers into one RHEL_API_VERSION=$((RHEL_RELEASE_MAJOR * 10000 + RHEL_RELEASE_MINOR * 100 + RHEL_RELEASE_PATCH)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttng-modules-2.10.5/instrumentation/events/lttng-module/block.h new/lttng-modules-2.10.6/instrumentation/events/lttng-module/block.h --- old/lttng-modules-2.10.5/instrumentation/events/lttng-module/block.h 2018-01-30 21:50:41.000000000 +0100 +++ new/lttng-modules-2.10.6/instrumentation/events/lttng-module/block.h 2018-03-20 16:51:26.000000000 +0100 @@ -34,7 +34,7 @@ #endif /* _TRACE_BLOCK_DEF_ */ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0) || \ - LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,5,0,0,0,0)) + LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,114,92,0,0)) #define lttng_req_op(rq) req_op(rq) #define lttng_req_rw(rq) ((rq)->cmd_flags) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttng-modules-2.10.5/instrumentation/events/lttng-module/btrfs.h new/lttng-modules-2.10.6/instrumentation/events/lttng-module/btrfs.h --- old/lttng-modules-2.10.5/instrumentation/events/lttng-module/btrfs.h 2018-01-30 21:50:41.000000000 +0100 +++ new/lttng-modules-2.10.6/instrumentation/events/lttng-module/btrfs.h 2018-03-22 22:35:09.000000000 +0100 @@ -563,7 +563,7 @@ #endif #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \ - LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) + LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,114,92,0,0)) LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs, TP_PROTO(const struct btrfs_fs_info *fs_info, int wait), @@ -743,7 +743,11 @@ ) ) -LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_ref_head, add_delayed_ref_head, +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, + + add_delayed_ref_head, + + btrfs_add_delayed_ref_head, TP_PROTO(const struct btrfs_fs_info *fs_info, const struct btrfs_delayed_ref_head *head_ref, @@ -752,7 +756,11 @@ TP_ARGS(fs_info, head_ref, action) ) -LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_ref_head, run_delayed_ref_head, +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, + + run_delayed_ref_head, + + btrfs_run_delayed_ref_head, TP_PROTO(const struct btrfs_fs_info *fs_info, const struct btrfs_delayed_ref_head *head_ref, @@ -762,7 +770,7 @@ ) #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \ - LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0)) + LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,114,92,0,0)) LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head, TP_PROTO(const struct btrfs_fs_info *fs_info, @@ -780,7 +788,11 @@ ) ) -LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_ref_head, add_delayed_ref_head, +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, + + add_delayed_ref_head, + + btrfs_add_delayed_ref_head, TP_PROTO(const struct btrfs_fs_info *fs_info, const struct btrfs_delayed_ref_node *ref, @@ -790,7 +802,11 @@ TP_ARGS(fs_info, ref, head_ref, action) ) -LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_ref_head, run_delayed_ref_head, +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, + + run_delayed_ref_head, + + btrfs_run_delayed_ref_head, TP_PROTO(const struct btrfs_fs_info *fs_info, const struct btrfs_delayed_ref_node *ref, @@ -818,7 +834,11 @@ ) ) -LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_ref_head, add_delayed_ref_head, +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, + + add_delayed_ref_head, + + btrfs_add_delayed_ref_head, TP_PROTO(struct btrfs_fs_info *fs_info, struct btrfs_delayed_ref_node *ref, @@ -828,7 +848,11 @@ TP_ARGS(fs_info, ref, head_ref, action) ) -LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_ref_head, run_delayed_ref_head, +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, + + run_delayed_ref_head, + + btrfs_run_delayed_ref_head, TP_PROTO(struct btrfs_fs_info *fs_info, struct btrfs_delayed_ref_node *ref, @@ -838,6 +862,49 @@ TP_ARGS(fs_info, ref, head_ref, action) ) +#elif (LTTNG_SLE_KERNEL_RANGE(4,4,114,92,0,0, 4,5,0,0,0,0)) +LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head, + + TP_PROTO(const struct btrfs_delayed_ref_node *ref, + const struct btrfs_delayed_ref_head *head_ref, + int action), + + TP_ARGS(ref, head_ref, action), + + TP_FIELDS( + ctf_integer(u64, bytenr, ref->bytenr) + ctf_integer(u64, num_bytes, ref->num_bytes) + ctf_integer(int, action, action) + ctf_integer(int, is_data, head_ref->is_data) + ) +) + +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, + + add_delayed_ref_head, + + btrfs_add_delayed_ref_head, + + TP_PROTO(const struct btrfs_delayed_ref_node *ref, + const struct btrfs_delayed_ref_head *head_ref, + int action), + + TP_ARGS(ref, head_ref, action) +) + +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, + + run_delayed_ref_head, + + btrfs_run_delayed_ref_head, + + TP_PROTO(const struct btrfs_delayed_ref_node *ref, + const struct btrfs_delayed_ref_head *head_ref, + int action), + + TP_ARGS(ref, head_ref, action) +) + #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head, @@ -855,7 +922,11 @@ ) ) -LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_ref_head, add_delayed_ref_head, +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, + + add_delayed_ref_head, + + btrfs_add_delayed_ref_head, TP_PROTO(struct btrfs_delayed_ref_node *ref, struct btrfs_delayed_ref_head *head_ref, @@ -864,7 +935,11 @@ TP_ARGS(ref, head_ref, action) ) -LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_ref_head, run_delayed_ref_head, +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head, + + run_delayed_ref_head, + + btrfs_run_delayed_ref_head, TP_PROTO(struct btrfs_delayed_ref_node *ref, struct btrfs_delayed_ref_head *head_ref, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttng-modules-2.10.5/instrumentation/events/lttng-module/kvm.h new/lttng-modules-2.10.6/instrumentation/events/lttng-module/kvm.h --- old/lttng-modules-2.10.5/instrumentation/events/lttng-module/kvm.h 2018-01-30 21:50:41.000000000 +0100 +++ new/lttng-modules-2.10.6/instrumentation/events/lttng-module/kvm.h 2018-03-25 17:07:15.000000000 +0200 @@ -86,11 +86,16 @@ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) \ || LTTNG_KERNEL_RANGE(4,14,14, 4,15,0) \ + || LTTNG_DEBIAN_KERNEL_RANGE(4,14,13,0,1,0, 4,15,0,0,0,0) \ || LTTNG_KERNEL_RANGE(4,9,77, 4,10,0) \ || LTTNG_KERNEL_RANGE(4,4,112, 4,5,0) \ + || LTTNG_KERNEL_RANGE(4,1,50, 4,2,0) \ || LTTNG_KERNEL_RANGE(3,16,52, 3,17,0) \ + || LTTNG_UBUNTU_KERNEL_RANGE(3,13,11,144, 3,14,0,0) \ || LTTNG_KERNEL_RANGE(3,2,97, 3,3,0) \ - || LTTNG_DEBIAN_KERNEL_RANGE(4,9,65,0,3,0, 4,10,0,0,0,0)) + || LTTNG_UBUNTU_KERNEL_RANGE(4,13,16,38, 4,14,0,0) \ + || LTTNG_DEBIAN_KERNEL_RANGE(4,9,65,0,3,0, 4,10,0,0,0,0) \ + || LTTNG_FEDORA_KERNEL_RANGE(4,14,13,300, 4,15,0,0)) LTTNG_TRACEPOINT_EVENT(kvm_mmio, TP_PROTO(int type, int len, u64 gpa, void *val), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttng-modules-2.10.5/instrumentation/events/lttng-module/mm_vmscan.h new/lttng-modules-2.10.6/instrumentation/events/lttng-module/mm_vmscan.h --- old/lttng-modules-2.10.5/instrumentation/events/lttng-module/mm_vmscan.h 2018-01-17 17:10:54.000000000 +0100 +++ new/lttng-modules-2.10.6/instrumentation/events/lttng-module/mm_vmscan.h 2018-05-01 22:43:50.000000000 +0200 @@ -84,6 +84,21 @@ #endif +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0)) +LTTNG_TRACEPOINT_EVENT(mm_vmscan_wakeup_kswapd, + + TP_PROTO(int nid, int zid, int order, gfp_t gfp_flags), + + TP_ARGS(nid, zid, order, gfp_flags), + + TP_FIELDS( + ctf_integer(int, nid, nid) + ctf_integer(int, zid, zid) + ctf_integer(int, order, order) + ctf_integer(gfp_t, gfp_flags, gfp_flags) + ) +) +#else LTTNG_TRACEPOINT_EVENT(mm_vmscan_wakeup_kswapd, TP_PROTO(int nid, int zid, int order), @@ -96,6 +111,7 @@ ctf_integer(int, order, order) ) ) +#endif #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)) @@ -204,7 +220,32 @@ TP_ARGS(nr_reclaimed) ) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,16,0)) +LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_start, + + mm_vmscan_shrink_slab_start, + + TP_PROTO(struct shrinker *shr, struct shrink_control *sc, + long nr_objects_to_shrink, unsigned long cache_items, + unsigned long long delta, unsigned long total_scan, + int priority), + + TP_ARGS(shr, sc, nr_objects_to_shrink, cache_items, delta, total_scan, + priority), + + TP_FIELDS( + ctf_integer_hex(struct shrinker *, shr, shr) + ctf_integer_hex(void *, shrink, shr->scan_objects) + ctf_integer(int, nid, sc->nid) + ctf_integer(long, nr_objects_to_shrink, nr_objects_to_shrink) + ctf_integer(gfp_t, gfp_flags, sc->gfp_mask) + ctf_integer(unsigned long, cache_items, cache_items) + ctf_integer(unsigned long long, delta, delta) + ctf_integer(unsigned long, total_scan, total_scan) + ctf_integer(int, priority, priority) + ) +) +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_start, mm_vmscan_shrink_slab_start, @@ -233,6 +274,7 @@ ctf_integer(unsigned long, total_scan, total_scan) ) ) +#endif #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_end, @@ -255,7 +297,7 @@ ctf_integer(long, total_scan, total_scan) ) ) -#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */ +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_end, mm_vmscan_shrink_slab_end, @@ -278,7 +320,6 @@ ctf_integer(long, total_scan, new_scan_cnt - unused_scan_cnt) ) ) -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */ #endif #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) @@ -509,7 +550,31 @@ ) #endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0)) +LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive, + + TP_PROTO(int nid, + unsigned long nr_scanned, unsigned long nr_reclaimed, + struct reclaim_stat *stat, int priority, int file), + + TP_ARGS(nid, nr_scanned, nr_reclaimed, stat, priority, file), + + TP_FIELDS( + ctf_integer(int, nid, nid) + ctf_integer(unsigned long, nr_scanned, nr_scanned) + ctf_integer(unsigned long, nr_reclaimed, nr_reclaimed) + ctf_integer(unsigned long, nr_dirty, stat->nr_dirty) + ctf_integer(unsigned long, nr_writeback, stat->nr_writeback) + ctf_integer(unsigned long, nr_congested, stat->nr_congested) + ctf_integer(unsigned long, nr_immediate, stat->nr_immediate) + ctf_integer(unsigned long, nr_activate, stat->nr_activate) + ctf_integer(unsigned long, nr_ref_keep, stat->nr_ref_keep) + ctf_integer(unsigned long, nr_unmap_fail, stat->nr_unmap_fail) + ctf_integer(int, priority, priority) + ctf_integer(int, reclaim_flags, trace_shrink_flags(file)) + ) +) +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive, TP_PROTO(int nid, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttng-modules-2.10.5/instrumentation/events/lttng-module/rcu.h new/lttng-modules-2.10.6/instrumentation/events/lttng-module/rcu.h --- old/lttng-modules-2.10.5/instrumentation/events/lttng-module/rcu.h 2018-01-17 17:10:54.000000000 +0100 +++ new/lttng-modules-2.10.6/instrumentation/events/lttng-module/rcu.h 2018-05-01 22:43:50.000000000 +0200 @@ -220,31 +220,60 @@ * events use the upper bits of each number, while interrupt-related * events use the lower bits. */ +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,16,0)) LTTNG_TRACEPOINT_EVENT(rcu_dyntick, + TP_PROTO(const char *polarity, long oldnesting, long newnesting, atomic_t dynticks), + + TP_ARGS(polarity, oldnesting, newnesting, dynticks), + + TP_FIELDS( + ctf_string(polarity, polarity) + ctf_integer(long, oldnesting, oldnesting) + ctf_integer(long, newnesting, newnesting) + ctf_integer(int, dynticks, atomic_read(&dynticks)) + ) +) + +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) +LTTNG_TRACEPOINT_EVENT(rcu_dyntick, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) TP_PROTO(const char *polarity, long long oldnesting, long long newnesting), TP_ARGS(polarity, oldnesting, newnesting), + + TP_FIELDS( + ctf_string(polarity, polarity) + ctf_integer(long long, oldnesting, oldnesting) + ctf_integer(long long, newnesting, newnesting) + ) +) #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) +LTTNG_TRACEPOINT_EVENT(rcu_dyntick, + TP_PROTO(char *polarity, long long oldnesting, long long newnesting), TP_ARGS(polarity, oldnesting, newnesting), + + TP_FIELDS( + ctf_string(polarity, polarity) + ctf_integer(long long, oldnesting, oldnesting) + ctf_integer(long long, newnesting, newnesting) + ) +) #else +LTTNG_TRACEPOINT_EVENT(rcu_dyntick, + TP_PROTO(char *polarity), TP_ARGS(polarity), -#endif TP_FIELDS( ctf_string(polarity, polarity) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) - ctf_integer(long long, oldnesting, oldnesting) - ctf_integer(long long, newnesting, newnesting) -#endif ) ) +#endif + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) /* @@ -583,7 +612,9 @@ grplo, grphi, gp_tasks) do { } \ while (0) #define trace_rcu_fqs(rcuname, gpnum, cpu, qsevent) do { } while (0) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0)) +#define trace_rcu_dyntick(polarity, oldnesting, newnesting, dyntick) do { } while (0) +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) #define trace_rcu_dyntick(polarity, oldnesting, newnesting) do { } while (0) #else #define trace_rcu_dyntick(polarity) do { } while (0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttng-modules-2.10.5/instrumentation/events/lttng-module/rpc.h new/lttng-modules-2.10.6/instrumentation/events/lttng-module/rpc.h --- old/lttng-modules-2.10.5/instrumentation/events/lttng-module/rpc.h 2018-01-17 17:10:54.000000000 +0100 +++ new/lttng-modules-2.10.6/instrumentation/events/lttng-module/rpc.h 2018-05-01 22:43:50.000000000 +0200 @@ -33,6 +33,88 @@ TP_ARGS(task) ) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0)) +LTTNG_TRACEPOINT_EVENT(rpc_connect_status, + TP_PROTO(const struct rpc_task *task), + + TP_ARGS(task), + + TP_FIELDS( + ctf_integer_hex(const struct rpc_task *, task, task) + ctf_integer_hex(const struct rpc_clnt *, clnt, task->tk_client) + ctf_integer(int, status, task->tk_status) + ) +) + +LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running, + + TP_PROTO(const struct rpc_task *task, const void *action), + + TP_ARGS(task, action), + + TP_FIELDS( + ctf_integer_hex(const struct rpc_clnt *, clnt, task->tk_client) + ctf_integer_hex(const struct rpc_task *, task, task) + ctf_integer_hex(const void *, action, action) + ctf_integer(unsigned long, runstate, task->tk_runstate) + ctf_integer(int, status, task->tk_status) + ctf_integer(unsigned short, flags, task->tk_flags) + ) +) + +LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_begin, + + TP_PROTO(const struct rpc_task *task, const void *action), + + TP_ARGS(task, action) +) + +LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_run_action, + + TP_PROTO(const struct rpc_task *task, const void *action), + + TP_ARGS(task, action) +) + +LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_complete, + + TP_PROTO(const struct rpc_task *task, const void *action), + + TP_ARGS(task, action) +) + +LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued, + + TP_PROTO(const struct rpc_task *task, const struct rpc_wait_queue *q), + + TP_ARGS(task, q), + + TP_FIELDS( + ctf_integer_hex(const struct rpc_clnt *, clnt, task->tk_client) + ctf_integer_hex(const struct rpc_task *, task, task) + ctf_integer(unsigned long, timeout, task->tk_timeout) + ctf_integer(unsigned long, runstate, task->tk_runstate) + ctf_integer(int, status, task->tk_status) + ctf_integer(unsigned short, flags, task->tk_flags) + ctf_string(q_name, rpc_qname(q)) + ) +) + +LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_sleep, + + TP_PROTO(const struct rpc_task *task, const struct rpc_wait_queue *q), + + TP_ARGS(task, q) +) + +LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_wakeup, + + TP_PROTO(const struct rpc_task *task, const struct rpc_wait_queue *q), + + TP_ARGS(task, q) +) + +#else LTTNG_TRACEPOINT_EVENT(rpc_connect_status, TP_PROTO(struct rpc_task *task, int status), @@ -66,7 +148,6 @@ TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action), TP_ARGS(clnt, task, action) - ) LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_run_action, @@ -74,7 +155,6 @@ TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action), TP_ARGS(clnt, task, action) - ) LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_complete, @@ -82,7 +162,6 @@ TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action), TP_ARGS(clnt, task, action) - ) LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued, @@ -107,7 +186,6 @@ TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q), TP_ARGS(clnt, task, q) - ) LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_wakeup, @@ -115,8 +193,8 @@ TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q), TP_ARGS(clnt, task, q) - ) +#endif #endif /* LTTNG_TRACE_RPC_H */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttng-modules-2.10.5/instrumentation/events/lttng-module/timer.h new/lttng-modules-2.10.6/instrumentation/events/lttng-module/timer.h --- old/lttng-modules-2.10.5/instrumentation/events/lttng-module/timer.h 2018-01-17 17:10:54.000000000 +0100 +++ new/lttng-modules-2.10.6/instrumentation/events/lttng-module/timer.h 2018-03-20 16:51:26.000000000 +0100 @@ -160,6 +160,27 @@ * hrtimer_start - called when the hrtimer is started * @timer: pointer to struct hrtimer */ +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,16,0) || \ + LTTNG_RT_KERNEL_RANGE(4,14,0,0, 4,15,0,0)) +LTTNG_TRACEPOINT_EVENT_MAP(hrtimer_start, + + timer_hrtimer_start, + + TP_PROTO(struct hrtimer *hrtimer, enum hrtimer_mode mode), + + TP_ARGS(hrtimer, mode), + + TP_FIELDS( + ctf_integer_hex(void *, hrtimer, hrtimer) + ctf_integer_hex(void *, function, hrtimer->function) + ctf_integer(s64, expires, + lttng_ktime_get_tv64(hrtimer_get_expires(hrtimer))) + ctf_integer(s64, softexpires, + lttng_ktime_get_tv64(hrtimer_get_softexpires(hrtimer))) + ctf_integer(enum hrtimer_mode, mode, mode) + ) +) +#else LTTNG_TRACEPOINT_EVENT_MAP(hrtimer_start, timer_hrtimer_start, @@ -177,6 +198,7 @@ lttng_ktime_get_tv64(hrtimer_get_softexpires(hrtimer))) ) ) +#endif /** * htimmer_expire_entry - called immediately before the hrtimer callback diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttng-modules-2.10.5/instrumentation/syscalls/headers/syscalls_pointers_override.h new/lttng-modules-2.10.6/instrumentation/syscalls/headers/syscalls_pointers_override.h --- old/lttng-modules-2.10.5/instrumentation/syscalls/headers/syscalls_pointers_override.h 2018-01-30 21:55:17.000000000 +0100 +++ new/lttng-modules-2.10.6/instrumentation/syscalls/headers/syscalls_pointers_override.h 2018-05-09 20:00:20.000000000 +0200 @@ -100,9 +100,8 @@ } \ \ if (inp) { \ - tp_locvar->fds_in = kmalloc( \ - tp_locvar->nr_ulong * sizeof(unsigned long), \ - GFP_ATOMIC | GFP_NOWAIT); \ + tp_locvar->fds_in = lttng_tp_mempool_alloc( \ + tp_locvar->nr_ulong * sizeof(unsigned long)); \ if (!tp_locvar->fds_in) \ goto error; \ \ @@ -113,9 +112,8 @@ goto error; \ } \ if (outp) { \ - tp_locvar->fds_out = kmalloc( \ - tp_locvar->nr_ulong * sizeof(unsigned long), \ - GFP_ATOMIC | GFP_NOWAIT); \ + tp_locvar->fds_out = lttng_tp_mempool_alloc( \ + tp_locvar->nr_ulong * sizeof(unsigned long)); \ if (!tp_locvar->fds_out) \ goto error; \ \ @@ -126,9 +124,8 @@ goto error; \ } \ if (exp) { \ - tp_locvar->fds_ex = kmalloc( \ - tp_locvar->nr_ulong * sizeof(unsigned long), \ - GFP_ATOMIC | GFP_NOWAIT); \ + tp_locvar->fds_ex = lttng_tp_mempool_alloc( \ + tp_locvar->nr_ulong * sizeof(unsigned long)); \ if (!tp_locvar->fds_ex) \ goto error; \ \ @@ -221,9 +218,9 @@ ) #define LTTNG_SYSCALL_SELECT_code_post \ - kfree(tp_locvar->fds_in); \ - kfree(tp_locvar->fds_out); \ - kfree(tp_locvar->fds_ex); + lttng_tp_mempool_free(tp_locvar->fds_in); \ + lttng_tp_mempool_free(tp_locvar->fds_out); \ + lttng_tp_mempool_free(tp_locvar->fds_ex); #if defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM) #define OVERRIDE_32_select @@ -413,8 +410,7 @@ { \ int err; \ \ - tp_locvar->fds = kmalloc(tp_locvar->alloc_fds, \ - GFP_ATOMIC | GFP_NOWAIT); \ + tp_locvar->fds = lttng_tp_mempool_alloc(tp_locvar->alloc_fds); \ if (!tp_locvar->fds) \ goto error; \ err = lib_ring_buffer_copy_from_user_check_nofault( \ @@ -494,7 +490,7 @@ ) #define LTTNG_SYSCALL_POLL_code_post \ - kfree(tp_locvar->fds); + lttng_tp_mempool_free(tp_locvar->fds); #if defined(CONFIG_X86_32) || defined(CONFIG_X86_64) || defined(CONFIG_ARM) #define OVERRIDE_32_poll @@ -761,9 +757,8 @@ tp_locvar->fds_length = ret; \ } \ \ - tp_locvar->events = kmalloc( \ - maxalloc * sizeof(struct epoll_event), \ - GFP_ATOMIC | GFP_NOWAIT); \ + tp_locvar->events = lttng_tp_mempool_alloc( \ + maxalloc * sizeof(struct epoll_event)); \ if (!tp_locvar->events) { \ tp_locvar->fds_length = 0; \ goto skip_code; \ @@ -805,7 +800,7 @@ #define LTTNG_SYSCALL_EPOLL_WAIT_code_post \ sc_out( \ - kfree(tp_locvar->events); \ + lttng_tp_mempool_free(tp_locvar->events); \ ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttng-modules-2.10.5/lttng-abi.c new/lttng-modules-2.10.6/lttng-abi.c --- old/lttng-modules-2.10.5/lttng-abi.c 2018-01-30 21:55:17.000000000 +0100 +++ new/lttng-modules-2.10.6/lttng-abi.c 2018-05-09 20:00:20.000000000 +0200 @@ -56,6 +56,7 @@ #include <lttng-abi-old.h> #include <lttng-events.h> #include <lttng-tracer.h> +#include <lttng-tp-mempool.h> #include <lib/ringbuffer/frontend_types.h> /* @@ -1727,6 +1728,12 @@ wrapper_vmalloc_sync_all(); lttng_clock_ref(); + + ret = lttng_tp_mempool_init(); + if (ret) { + goto error; + } + lttng_proc_dentry = proc_create_data("lttng", S_IRUSR | S_IWUSR, NULL, <tng_fops, NULL); @@ -1739,6 +1746,7 @@ return 0; error: + lttng_tp_mempool_destroy(); lttng_clock_unref(); return ret; } @@ -1746,6 +1754,7 @@ /* No __exit annotation because used by init error path too. */ void lttng_abi_exit(void) { + lttng_tp_mempool_destroy(); lttng_clock_unref(); if (lttng_proc_dentry) remove_proc_entry("lttng", NULL); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttng-modules-2.10.5/lttng-events.c new/lttng-modules-2.10.6/lttng-events.c --- old/lttng-modules-2.10.5/lttng-events.c 2018-01-30 21:55:17.000000000 +0100 +++ new/lttng-modules-2.10.6/lttng-events.c 2018-05-09 20:00:20.000000000 +0200 @@ -2646,7 +2646,7 @@ } EXPORT_SYMBOL_GPL(lttng_transport_unregister); -#if (defined(CONFIG_HOTPLUG_CPU) && (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) enum cpuhp_state lttng_hp_prepare; enum cpuhp_state lttng_hp_online; @@ -2762,7 +2762,7 @@ cpuhp_remove_multi_state(lttng_hp_prepare); } -#else /* #if (CONFIG_HOTPLUG_CPU && (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))) */ +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */ static int lttng_init_cpu_hotplug(void) { return 0; @@ -2770,7 +2770,7 @@ static void lttng_exit_cpu_hotplug(void) { } -#endif /* #else #if (CONFIG_HOTPLUG_CPU && (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))) */ +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */ static int __init lttng_events_init(void) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttng-modules-2.10.5/lttng-kernel-version.h new/lttng-modules-2.10.6/lttng-kernel-version.h --- old/lttng-modules-2.10.5/lttng-kernel-version.h 2018-01-17 17:10:54.000000000 +0100 +++ new/lttng-modules-2.10.6/lttng-kernel-version.h 2018-03-20 16:51:26.000000000 +0100 @@ -115,6 +115,25 @@ LTTNG_SLE_VERSION_CODE < \ LTTNG_SLE_KERNEL_VERSION(a_high, b_high, c_high, d_high, e_high, f_high)) +/* Fedora */ + +#define LTTNG_FEDORA_KERNEL_VERSION(a, b, c, d) \ + (((((a) << 16) + ((b) << 8) + (c)) * 10000ULL) + (d)) + +#ifdef FEDORA_REVISION_VERSION +#define LTTNG_FEDORA_VERSION_CODE \ + ((LINUX_VERSION_CODE * 10000ULL) + FEDORA_REVISION_VERSION) +#else +#define LTTNG_FEDORA_VERSION_CODE 0 +#endif + +#define LTTNG_FEDORA_KERNEL_RANGE(a_low, b_low, c_low, d_low, \ + a_high, b_high, c_high, d_high) \ + (LTTNG_FEDORA_VERSION_CODE >= \ + LTTNG_FEDORA_KERNEL_VERSION(a_low, b_low, c_low, d_low) && \ + LTTNG_FEDORA_VERSION_CODE < \ + LTTNG_FEDORA_KERNEL_VERSION(a_high, b_high, c_high, d_high)) + /* RT patch */ #define LTTNG_RT_KERNEL_VERSION(a, b, c, d) \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttng-modules-2.10.5/lttng-statedump-impl.c new/lttng-modules-2.10.6/lttng-statedump-impl.c --- old/lttng-modules-2.10.5/lttng-statedump-impl.c 2018-01-17 17:10:54.000000000 +0100 +++ new/lttng-modules-2.10.6/lttng-statedump-impl.c 2018-03-20 16:51:26.000000000 +0100 @@ -52,7 +52,6 @@ #include <wrapper/irqdesc.h> #include <wrapper/spinlock.h> #include <wrapper/fdtable.h> -#include <wrapper/nsproxy.h> #include <wrapper/irq.h> #include <wrapper/tracepoint.h> #include <wrapper/genhd.h> @@ -392,43 +391,14 @@ enum lttng_execution_submode submode, enum lttng_process_status status) { - struct nsproxy *proxy; struct pid_namespace *pid_ns; - /* - * Back and forth on locking strategy within Linux upstream for nsproxy. - * See Linux upstream commit 728dba3a39c66b3d8ac889ddbe38b5b1c264aec3 - * "namespaces: Use task_lock and not rcu to protect nsproxy" - * for details. - */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0) || \ - LTTNG_UBUNTU_KERNEL_RANGE(3,13,11,36, 3,14,0,0) || \ - LTTNG_UBUNTU_KERNEL_RANGE(3,16,1,11, 3,17,0,0) || \ - LTTNG_RHEL_KERNEL_RANGE(3,10,0,229,13,0, 3,11,0,0,0,0)) - proxy = p->nsproxy; -#else - rcu_read_lock(); - proxy = task_nsproxy(p); -#endif - if (proxy) { - pid_ns = lttng_get_proxy_pid_ns(proxy); - do { - trace_lttng_statedump_process_state(session, - p, type, mode, submode, status, pid_ns); - pid_ns = pid_ns->parent; - } while (pid_ns); - } else { + pid_ns = task_active_pid_ns(p); + do { trace_lttng_statedump_process_state(session, - p, type, mode, submode, status, NULL); - } -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0) || \ - LTTNG_UBUNTU_KERNEL_RANGE(3,13,11,36, 3,14,0,0) || \ - LTTNG_UBUNTU_KERNEL_RANGE(3,16,1,11, 3,17,0,0) || \ - LTTNG_RHEL_KERNEL_RANGE(3,10,0,229,13,0, 3,11,0,0,0,0)) - /* (nothing) */ -#else - rcu_read_unlock(); -#endif + p, type, mode, submode, status, pid_ns); + pid_ns = pid_ns->parent; + } while (pid_ns); } static diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttng-modules-2.10.5/lttng-tp-mempool.c new/lttng-modules-2.10.6/lttng-tp-mempool.c --- old/lttng-modules-2.10.5/lttng-tp-mempool.c 1970-01-01 01:00:00.000000000 +0100 +++ new/lttng-modules-2.10.6/lttng-tp-mempool.c 2018-05-09 20:00:20.000000000 +0200 @@ -0,0 +1,172 @@ +/* + * lttng-tp-mempool.c + * + * Copyright (C) 2018 Julien Desfossez <[email protected]> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; only + * version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include <linux/slab.h> +#include <linux/percpu.h> + +#include <lttng-tp-mempool.h> + +struct lttng_tp_buf_entry { + int cpu; /* To make sure we return the entry to the right pool. */ + char buf[LTTNG_TP_MEMPOOL_BUF_SIZE]; + struct list_head list; +}; + +/* + * No exclusive access strategy for now, this memory pool is currently only + * used from a non-preemptible context, and the interrupt tracepoint probes do + * not use this facility. + */ +struct per_cpu_buf { + struct list_head free_list; /* Free struct lttng_tp_buf_entry. */ +}; + +static struct per_cpu_buf __percpu *pool; /* Per-cpu buffer. */ + +int lttng_tp_mempool_init(void) +{ + int ret, cpu; + + /* The pool is only supposed to be allocated once. */ + if (pool) { + WARN_ON_ONCE(1); + ret = -1; + goto end; + } + + pool = alloc_percpu(struct per_cpu_buf); + if (!pool) { + ret = -ENOMEM; + goto end; + } + + for_each_possible_cpu(cpu) { + struct per_cpu_buf *cpu_buf = per_cpu_ptr(pool, cpu); + + INIT_LIST_HEAD(&cpu_buf->free_list); + } + + for_each_possible_cpu(cpu) { + int i; + struct per_cpu_buf *cpu_buf = per_cpu_ptr(pool, cpu); + + for (i = 0; i < LTTNG_TP_MEMPOOL_NR_BUF_PER_CPU; i++) { + struct lttng_tp_buf_entry *entry; + + entry = kzalloc(sizeof(struct lttng_tp_buf_entry), + GFP_KERNEL); + if (!entry) { + ret = -ENOMEM; + goto error_free_pool; + } + entry->cpu = cpu; + list_add_tail(&entry->list, &cpu_buf->free_list); + } + } + + ret = 0; + goto end; + +error_free_pool: + lttng_tp_mempool_destroy(); +end: + return ret; +} + +void lttng_tp_mempool_destroy(void) +{ + int cpu; + + if (!pool) { + return; + } + + for_each_possible_cpu(cpu) { + struct per_cpu_buf *cpu_buf = per_cpu_ptr(pool, cpu); + struct lttng_tp_buf_entry *entry, *tmp; + int i = 0; + + list_for_each_entry_safe(entry, tmp, &cpu_buf->free_list, list) { + list_del(&entry->list); + kfree(entry); + i++; + } + if (i < LTTNG_TP_MEMPOOL_NR_BUF_PER_CPU) { + printk(KERN_WARNING "Leak detected in tp-mempool\n"); + } + } + free_percpu(pool); + pool = NULL; +} + +void *lttng_tp_mempool_alloc(size_t size) +{ + void *ret; + struct lttng_tp_buf_entry *entry; + struct per_cpu_buf *cpu_buf; + int cpu = smp_processor_id(); + + if (size > LTTNG_TP_MEMPOOL_BUF_SIZE) { + ret = NULL; + goto end; + } + + cpu_buf = per_cpu_ptr(pool, cpu); + if (list_empty(&cpu_buf->free_list)) { + ret = NULL; + goto end; + } + + entry = list_first_entry(&cpu_buf->free_list, struct lttng_tp_buf_entry, list); + /* Remove the entry from the free list. */ + list_del(&entry->list); + + memset(entry->buf, 0, LTTNG_TP_MEMPOOL_BUF_SIZE); + + ret = (void *) entry->buf; + +end: + return ret; +} + +void lttng_tp_mempool_free(void *ptr) +{ + struct lttng_tp_buf_entry *entry; + struct per_cpu_buf *cpu_buf; + + if (!ptr) { + goto end; + } + + entry = container_of(ptr, struct lttng_tp_buf_entry, buf); + if (!entry) { + goto end; + } + + cpu_buf = per_cpu_ptr(pool, entry->cpu); + if (!cpu_buf) { + goto end; + } + /* Add it to the free list. */ + list_add_tail(&entry->list, &cpu_buf->free_list); + +end: + return; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttng-modules-2.10.5/lttng-tp-mempool.h new/lttng-modules-2.10.6/lttng-tp-mempool.h --- old/lttng-modules-2.10.5/lttng-tp-mempool.h 1970-01-01 01:00:00.000000000 +0100 +++ new/lttng-modules-2.10.6/lttng-tp-mempool.h 2018-03-20 16:51:26.000000000 +0100 @@ -0,0 +1,63 @@ +#ifndef LTTNG_TP_MEMPOOL_H +#define LTTNG_TP_MEMPOOL_H + +/* + * lttng-tp-mempool.h + * + * Copyright (C) 2018 Julien Desfossez <[email protected]> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; only + * version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include <linux/percpu.h> + +#define LTTNG_TP_MEMPOOL_NR_BUF_PER_CPU 4 +#define LTTNG_TP_MEMPOOL_BUF_SIZE 4096 + +/* + * Initialize the pool, only performed once. The pool is a set of + * LTTNG_TP_MEMPOOL_NR_BUF_PER_CPU buffers of size LTTNG_TP_MEMPOOL_BUF_SIZE + * per-cpu. + * + * Returns 0 on success, a negative value on error. + */ +int lttng_tp_mempool_init(void); + +/* + * Destroy the pool and free all the memory allocated. + */ +void lttng_tp_mempool_destroy(void); + +/* + * Ask for a buffer on the current cpu. + * + * The pool is per-cpu, but there is no exclusive access guarantee on the + * per-cpu free-list, the caller needs to ensure it cannot get preempted or + * interrupted while performing the allocation. + * + * The maximum size that can be allocated is LTTNG_TP_MEMPOOL_BUF_SIZE, and the + * maximum number of buffers allocated simultaneously on the same CPU is + * LTTNG_TP_MEMPOOL_NR_BUF_PER_CPU. + * + * Return a pointer to a buffer on success, NULL on error. + */ +void *lttng_tp_mempool_alloc(size_t size); + +/* + * Release the memory reserved. Same concurrency limitations as the allocation. + */ +void lttng_tp_mempool_free(void *ptr); + +#endif /* LTTNG_TP_MEMPOOL_H */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttng-modules-2.10.5/lttng-tracer.h new/lttng-modules-2.10.6/lttng-tracer.h --- old/lttng-modules-2.10.5/lttng-tracer.h 2018-01-30 21:56:09.000000000 +0100 +++ new/lttng-modules-2.10.6/lttng-tracer.h 2018-05-09 20:05:40.000000000 +0200 @@ -42,7 +42,7 @@ #define LTTNG_MODULES_MAJOR_VERSION 2 #define LTTNG_MODULES_MINOR_VERSION 10 -#define LTTNG_MODULES_PATCHLEVEL_VERSION 5 +#define LTTNG_MODULES_PATCHLEVEL_VERSION 6 #define LTTNG_MODULES_EXTRAVERSION "" #define LTTNG_VERSION_NAME "KeKriek" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttng-modules-2.10.5/probes/lttng-tracepoint-event-impl.h new/lttng-modules-2.10.6/probes/lttng-tracepoint-event-impl.h --- old/lttng-modules-2.10.5/probes/lttng-tracepoint-event-impl.h 2018-01-30 21:50:41.000000000 +0100 +++ new/lttng-modules-2.10.6/probes/lttng-tracepoint-event-impl.h 2018-03-20 16:51:26.000000000 +0100 @@ -34,6 +34,7 @@ #include <wrapper/rcu.h> #include <lttng-events.h> #include <lttng-tracer-core.h> +#include <lttng-tp-mempool.h> #define __LTTNG_NULL_STRING "(null)" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttng-modules-2.10.5/rt-patch-version.sh new/lttng-modules-2.10.6/rt-patch-version.sh --- old/lttng-modules-2.10.5/rt-patch-version.sh 2018-01-17 17:10:54.000000000 +0100 +++ new/lttng-modules-2.10.6/rt-patch-version.sh 2018-03-20 16:51:26.000000000 +0100 @@ -1,7 +1,7 @@ #!/bin/sh # First argument is the path to the kernel headers. -KPATH=$1 +KPATH="$1" VERSIONFILE="" @@ -22,4 +22,4 @@ exit 0 fi -echo ${RT_PATCH_VERSION} +echo "${RT_PATCH_VERSION}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttng-modules-2.10.5/wrapper/nsproxy.h new/lttng-modules-2.10.6/wrapper/nsproxy.h --- old/lttng-modules-2.10.5/wrapper/nsproxy.h 2018-01-17 17:10:54.000000000 +0100 +++ new/lttng-modules-2.10.6/wrapper/nsproxy.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,42 +0,0 @@ -#ifndef _LTTNG_WRAPPER_NSPROXY_H -#define _LTTNG_WRAPPER_NSPROXY_H - -/* - * wrapper/nsproxy.h - * - * Copyright (C) 2011-2012 Mathieu Desnoyers <[email protected]> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; only - * version 2.1 of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include <linux/version.h> -#include <linux/nsproxy.h> - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) -static inline -struct pid_namespace *lttng_get_proxy_pid_ns(struct nsproxy *proxy) -{ - return proxy->pid_ns_for_children; -} -#else -static inline -struct pid_namespace *lttng_get_proxy_pid_ns(struct nsproxy *proxy) -{ - return proxy->pid_ns; -} -#endif - - -#endif /* _LTTNG_WRAPPER_NSPROXY_H */
