debian/0000755000000000000000000000000012435432733007174 5ustar debian/control0000644000000000000000000000221012315036770010570 0ustar Source: lttng-modules Section: kernel Priority: extra Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Jon Bernard Build-Depends: debhelper (>= 9), dkms (>= 2.1.0.0) Standards-Version: 3.9.5 Vcs-Git: git://anonscm.debian.org/collab-maint/lttng-modules.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/lttng-modules.git;a=summary Homepage: http://lttng.org Package: lttng-modules-dkms Architecture: all Depends: ${misc:Depends} Recommends: lttng-tools Description: Linux Trace Toolkit (LTTng) kernel modules (DKMS) The LTTng project aims at providing highly efficient tracing tools for Linux. Its tracers help tracking down performance issues and debugging problems involving multiple concurrent processes and threads. Tracing across multiple systems is also possible. . This package contains the LTTng kernel modules. These provide additional instrumentation (not found in the mainline kernel), the ring buffer library, the tracer itself, and some additional utilities. . Installing on kernel versions prior to 2.6.38 might be possible, but has not been tested. debian/watch0000644000000000000000000000020212310715006010204 0ustar version=3 opts=uversionmangle=s/-(rc\d|pre\d)/~$1/ \ http://lttng.org/files/lttng-modules/lttng-modules-(.*)\.tar\.(?:gz|bz2) debian/compat0000644000000000000000000000000212310715006010357 0ustar 9 debian/lttng-modules-dkms.dkms0000644000000000000000000001601312315036745013607 0ustar PACKAGE_NAME="lttng-modules" PACKAGE_VERSION="2.4.0" AUTOINSTALL="yes" i=0 # Pretty horrible hack ... KCONFIG=false if [ -f /boot/config-$kernelver ]; then . /boot/config-$kernelver KCONFIG=true fi MAKE[$i]="make -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build modules" BUILT_MODULE_NAME[$i]="lttng-lib-ring-buffer" BUILT_MODULE_LOCATION[$i]="lib/" DEST_MODULE_LOCATION[$i]="/extra/lib" i=$((i+1)) BUILT_MODULE_NAME[$i]="lttng-ring-buffer-client-discard" DEST_MODULE_LOCATION[$i]="/extra" i=$((i+1)) BUILT_MODULE_NAME[$i]="lttng-ring-buffer-client-mmap-discard" DEST_MODULE_LOCATION[$i]="/extra" i=$((i+1)) BUILT_MODULE_NAME[$i]="lttng-ring-buffer-client-mmap-overwrite" DEST_MODULE_LOCATION[$i]="/extra" i=$((i+1)) BUILT_MODULE_NAME[$i]="lttng-ring-buffer-client-overwrite" DEST_MODULE_LOCATION[$i]="/extra" i=$((i+1)) BUILT_MODULE_NAME[$i]="lttng-ring-buffer-metadata-client" DEST_MODULE_LOCATION[$i]="/extra" i=$((i+1)) BUILT_MODULE_NAME[$i]="lttng-ring-buffer-metadata-mmap-client" DEST_MODULE_LOCATION[$i]="/extra" i=$((i+1)) BUILT_MODULE_NAME[$i]="lttng-statedump" DEST_MODULE_LOCATION[$i]="/extra" i=$((i+1)) BUILT_MODULE_NAME[$i]="lttng-tracer" DEST_MODULE_LOCATION[$i]="/extra" i=$((i+1)) if [ "$KCONFIG" = "true" ] && [ -n "$CONFIG_SND_SOC" ]; then BUILT_MODULE_NAME[$i]="lttng-probe-asoc" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) fi if [ "$KCONFIG" = "true" ] && [ -n "$CONFIG_BLOCK" ] && [ -n "$CONFIG_EVENT_TRACING" ]; then BUILT_MODULE_NAME[$i]="lttng-probe-block" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) fi BUILT_MODULE_NAME[$i]="lttng-probe-compaction" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) if [ "$KCONFIG" = "true" ] && [ -n "$CONFIG_GPIOLIB" ]; then BUILT_MODULE_NAME[$i]="lttng-probe-gpio" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) fi BUILT_MODULE_NAME[$i]="lttng-probe-irq" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) if [ "$KCONFIG" = "true" ] && [ -n "$CONFIG_JBD" ]; then BUILT_MODULE_NAME[$i]="lttng-probe-jbd" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) fi if [ "$KCONFIG" = "true" ] && [ -n "$CONFIG_JBD2" ]; then BUILT_MODULE_NAME[$i]="lttng-probe-jbd2" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) fi BUILT_MODULE_NAME[$i]="lttng-probe-kmem" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) if [ "$KCONFIG" = "true" ] && [ -n "$CONFIG_KVM" ]; then BUILT_MODULE_NAME[$i]="lttng-probe-kvm" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) fi BUILT_MODULE_NAME[$i]="lttng-probe-module" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) if [ "$KCONFIG" = "true" ] && [ -n "$CONFIG_NET" ]; then BUILT_MODULE_NAME[$i]="lttng-probe-napi" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) BUILT_MODULE_NAME[$i]="lttng-probe-net" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) BUILT_MODULE_NAME[$i]="lttng-probe-skb" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) BUILT_MODULE_NAME[$i]="lttng-probe-sock" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) BUILT_MODULE_NAME[$i]="lttng-probe-udp" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) fi BUILT_MODULE_NAME[$i]="lttng-probe-power" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) BUILT_MODULE_NAME[$i]="lttng-probe-printk" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) BUILT_MODULE_NAME[$i]="lttng-probe-random" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) BUILT_MODULE_NAME[$i]="lttng-probe-rcu" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) if [ "$KCONFIG" = "true" ] && [ -n "$CONFIG_REGMAP" ]; then BUILT_MODULE_NAME[$i]="lttng-probe-regmap" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) fi if [ "$KCONFIG" = "true" ] && [ -n "$CONFIG_REGULATOR" ]; then BUILT_MODULE_NAME[$i]="lttng-probe-regulator" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) fi if [ "$KCONFIG" = "true" ] && [ -n "$CONFIG_PM_RUNTIME" ]; then BUILT_MODULE_NAME[$i]="lttng-probe-rpm" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) fi BUILT_MODULE_NAME[$i]="lttng-probe-sched" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) if [ "$KCONFIG" = "true" ] && [ -n "$CONFIG_SCSI" ]; then BUILT_MODULE_NAME[$i]="lttng-probe-scsi" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) fi BUILT_MODULE_NAME[$i]="lttng-probe-signal" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) BUILT_MODULE_NAME[$i]="lttng-probe-statedump" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) if [ "$KCONFIG" = "true" ] && [ -n "$CONFIG_SUNRPC" ]; then BUILT_MODULE_NAME[$i]="lttng-probe-sunrpc" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) fi BUILT_MODULE_NAME[$i]="lttng-probe-timer" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) BUILT_MODULE_NAME[$i]="lttng-probe-vmscan" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) BUILT_MODULE_NAME[$i]="lttng-probe-workqueue" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) if [ "$KCONFIG" = "true" ] && [ -n "$CONFIG_KALLSYMS_ALL" ]; then BUILT_MODULE_NAME[$i]="lttng-probe-writeback" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) fi if [ "$KCONFIG" = "true" ] && [ -n "$CONFIG_KPROBES" ]; then BUILT_MODULE_NAME[$i]="lttng-kprobes" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) fi if [ "$KCONFIG" = "true" ] && [ -n "$CONFIG_KRETPROBES" ]; then BUILT_MODULE_NAME[$i]="lttng-kretprobes" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) fi if [ "$KCONFIG" = "true" ] && [ -n "$CONFIG_DYNAMIC_FTRACE" ]; then BUILT_MODULE_NAME[$i]="lttng-ftrace" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) fi BUILT_MODULE_NAME[$i]="lttng-types" BUILT_MODULE_LOCATION[$i]="probes/" DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) debian/rules0000755000000000000000000000122312310715006010237 0ustar #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 upstreamversion := $(shell dpkg-parsechangelog | sed -n 's/^Version: *\([^-]\+\)-.\+/\1/p') %: dh $@ --with dkms override_dh_dkms: dh_dkms -V $(upstreamversion) override_dh_auto_install: # Build install files for the dkms'ified sources sed -e 's/CVERSION/$(upstreamversion)/g' < debian/lttng-modules-dkms.install.in > debian/lttng-modules-dkms.install dh_auto_install override_dh_install: dh_install -Xdebian override_dh_auto_clean: exit 0 override_dh_auto_build: exit 0 override_dh_clean: rm -f debian/lttng-modules-dkms.install dh_clean debian/lttng-modules-dkms.install.in0000644000000000000000000000004312310715006014705 0ustar * /usr/src/lttng-modules-CVERSION/ debian/copyright0000644000000000000000000000666212310715006011126 0ustar Format: http://dep.debian.net/deps/dep5 Upstream-Name: lttng-modules Source: http://lttng.org Files: * Copyright: 2005-2011 Mathieu Desnoyers License: LGPL-2.1 or GPL-2 Files: lib/prio_heap/lttng_prio_heap.c lib/prio_heap/lttng_prio_heap.h lib/bitfield.h Copyright: 2010-2011 Mathieu Desnoyers mathieu.desnoyers@polymtl.ca License: Expat Files: lib/ringbuffer/ring_buffer_splice.c lib/ringbuffer/ring_buffer_mmap.c instrumentation/events/mainline/*.h instrumentation/events/lttng-modules/*.h Copyright: 2002-2005 Tom Zanussi , IBM Corp 1999-2005 Karim Yaghmour 2008-2010 Mathieu Desnoyers License: GPL-2 Files: debian/* Copyright: 2011 Michael Jeanson 2011 Stéphane Graber 2012 Jon Bernard License: GPL-2 License: LGPL-2.1 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. . 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 . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/LGPL-2.1". License: GPL-2 This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. . This package 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 General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". License: Expat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. debian/source/0000755000000000000000000000000012310715006010461 5ustar debian/source/format0000644000000000000000000000001412310715006011667 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000000561512435432707011056 0ustar lttng-modules (2.4.0-1ubuntu1.1) trusty; urgency=medium * Fix dkms build failure with updated kernels (LP: #1396758) -- Michael Jeanson Wed, 26 Nov 2014 21:08:51 +0100 lttng-modules (2.4.0-1ubuntu1) trusty; urgency=medium * Fix installation failure due to invalid version string... -- Stéphane Graber Thu, 27 Mar 2014 11:04:27 -0400 lttng-modules (2.4.0-1) unstable; urgency=low * [8764991] New upstream version 2.4.0 (Closes: #734305) -- Jon Bernard Fri, 14 Mar 2014 20:07:40 -0400 lttng-modules (2.4.0~rc3-1) experimental; urgency=low * [9fe0e76] New upstream version 2.4.0~rc3 * [a111ad6] Bump Standards-Version to 3.9.5, no changes necessary * [9565704] Update VCS fields * [943a589] Update watch file to only uversionmangle * [ce07d9b] Update module version number in dkms config -- Jon Bernard Thu, 13 Feb 2014 17:44:35 -0500 lttng-modules (2.3.2-1) unstable; urgency=low * [0e22097] New upstream version 2.3.2 * [6e282fe] Correct module version number in dkms config * [f5c5d38] Include missing modules in dkms config. Thanks to Vincent Bernat (Closes: #723850) -- Jon Bernard Sat, 19 Oct 2013 18:55:20 -0400 lttng-modules (2.3.0-1) unstable; urgency=low * [d8209ca] New upstream version 2.3.0 -- Jon Bernard Tue, 03 Sep 2013 22:10:20 -0400 lttng-modules (2.3.0~rc2-1) unstable; urgency=low * [df00912] New upstream version 2.3.0~rc2 -- Jon Bernard Mon, 02 Sep 2013 13:09:19 -0400 lttng-modules (2.3.0~rc1-2) unstable; urgency=low * [ee85460] Update dkms config to match last upstream release (Closes: #717165) -- Jon Bernard Mon, 26 Aug 2013 12:45:41 -0400 lttng-modules (2.3.0~rc1-1) unstable; urgency=low * [e0f821c] New upstream version 2.3.0~rc1 (Closes: #717165) * [ef3a22d] Correct Section from misc to kernel * [46de1ab] Bump Standards-Version to 3.9.4, no changes necessary * [1cbff65] Remove bashism patch, included upstream -- Jon Bernard Fri, 02 Aug 2013 13:03:29 -0400 lttng-modules (2.1.0-2) unstable; urgency=low * [cc76040] Include upstream fix to remove bashims (Closes: #690718) -- Jon Bernard Mon, 13 May 2013 14:06:56 -0400 lttng-modules (2.1.0-1) unstable; urgency=low * [2c7eeb2] New upstream version 2.1.0 -- Jon Bernard Tue, 29 Jan 2013 11:08:50 -0500 lttng-modules (2.1.0~rc1-1) unstable; urgency=low * [74fbff0] Improve short description * [ad5fb86] Update watchfile to handle upstream RC releases * [3eae7ff] New upstream version 2.1.0~rc1 -- Jon Bernard Tue, 11 Sep 2012 15:20:24 -0400 lttng-modules (2.0.4-1) unstable; urgency=low * Initial release (Closes: #680788) -- Jon Bernard Sun, 08 Jul 2012 14:15:43 -0400 debian/patches/0000755000000000000000000000000012435432707010624 5ustar debian/patches/fix-build-on-ubuntu-kernels.patch0000644000000000000000000001547012435432707017132 0ustar From: Mathieu Desnoyers Because of the backport of multiple mainline patches without changing the kernel version, we need new macros to fix the compilation of some probes. This patch includes the following lttng-modules mainline commits: 40ed2a65086bdebb79fe92ff5b04a69ce7ac1ffc 1c53e689434a6bdd7dc3f54c07bfb72750d1d24c cf0b616277b7be6950243bc6cdad172af073ff0a bba0442a9e5b4460fdfc5bb3ed95f323e52c0909 cc3b2f068dfea4b893aedddaab19afb3851c17f2 3e5941df26200eccb6319ab765d53d00661e7c84 f64d76a51b5e20a8c402d1eca921c63fdc5ce9ec e1d0406d1314c8c62aaea6619249150be8b1c4b7 2260bfdd2ee4ba82ae61cbfaf4e9c88717886b09 Signed-off-by: Julien Desfossez --- instrumentation/events/lttng-module/block.h | 58 ++++++++++++++++++++++++++++ instrumentation/events/lttng-module/module.h | 4 -- lttng-kernel-version.h | 15 +++++++ lttng-statedump-impl.c | 17 ++++++++ probes/lttng-probe-block.c | 2 + 5 files changed, 92 insertions(+), 4 deletions(-) diff --git a/instrumentation/events/lttng-module/block.h b/instrumentation/events/lttng-module/block.h index f3b8bff..0a1a683 100644 --- a/instrumentation/events/lttng-module/block.h +++ b/instrumentation/events/lttng-module/block.h @@ -221,6 +221,62 @@ DEFINE_EVENT(block_rq_with_error, block_rq_requeue, TP_ARGS(q, rq) ) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,5) \ + || LTTNG_KERNEL_RANGE(3,12,21, 3,13,0) \ + || LTTNG_KERNEL_RANGE(3,10,41, 3,11,0) \ + || LTTNG_KERNEL_RANGE(3,4,91, 3,5,0) \ + || LTTNG_KERNEL_RANGE(3,2,58, 3,3,0) \ + || LTTNG_UBUNTU_KERNEL_RANGE(3,13,11,31, 3,14,0,0)) + +/** + * block_rq_complete - block IO operation completed by device driver + * @q: queue containing the block operation request + * @rq: block operations request + * @nr_bytes: number of completed bytes + * + * The block_rq_complete tracepoint event indicates that some portion + * of operation request has been completed by the device driver. If + * the @rq->bio is %NULL, then there is absolutely no additional work to + * do for the request. If @rq->bio is non-NULL then there is + * additional work required to complete the request. + */ +TRACE_EVENT(block_rq_complete, + + TP_PROTO(struct request_queue *q, struct request *rq, + unsigned int nr_bytes), + + TP_ARGS(q, rq, nr_bytes), + + TP_STRUCT__entry( + __field( dev_t, dev ) + __field( sector_t, sector ) + __field( unsigned int, nr_sector ) + __field( int, errors ) + __field( unsigned int, rwbs ) + __dynamic_array_hex( unsigned char, cmd, + (rq->cmd_type == REQ_TYPE_BLOCK_PC) ? + rq->cmd_len : 0) + ), + + TP_fast_assign( + tp_assign(dev, rq->rq_disk ? disk_devt(rq->rq_disk) : 0) + tp_assign(sector, blk_rq_pos(rq)) + tp_assign(nr_sector, nr_bytes >> 9) + tp_assign(errors, rq->errors) + blk_fill_rwbs(rwbs, rq->cmd_flags, nr_bytes) + tp_memcpy_dyn(cmd, (rq->cmd_type == REQ_TYPE_BLOCK_PC) ? + rq->cmd : NULL) + ), + + TP_printk("%d,%d %s (%s) %llu + %u [%d]", + MAJOR(__entry->dev), MINOR(__entry->dev), + __entry->rwbs, __get_str(cmd), + (unsigned long long)__entry->sector, + __entry->nr_sector, __entry->errors) +) + +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */ + /** * block_rq_complete - block IO operation completed by device driver * @q: queue containing the block operation request @@ -239,6 +295,8 @@ DEFINE_EVENT(block_rq_with_error, block_rq_complete, TP_ARGS(q, rq) ) +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */ + DECLARE_EVENT_CLASS(block_rq, TP_PROTO(struct request_queue *q, struct request *rq), diff --git a/instrumentation/events/lttng-module/module.h b/instrumentation/events/lttng-module/module.h index c63f866..c2d1ad7 100644 --- a/instrumentation/events/lttng-module/module.h +++ b/instrumentation/events/lttng-module/module.h @@ -23,10 +23,6 @@ #define _TRACE_MODULE_DEF struct module; -#define show_module_flags(flags) __print_flags(flags, "", \ - { (1UL << TAINT_PROPRIETARY_MODULE), "P" }, \ - { (1UL << TAINT_FORCED_MODULE), "F" }, \ - { (1UL << TAINT_CRAP), "C" }) #endif TRACE_EVENT(module_load, diff --git a/lttng-kernel-version.h b/lttng-kernel-version.h index 0eb56b3..8fad8b0 100644 --- a/lttng-kernel-version.h +++ b/lttng-kernel-version.h @@ -24,6 +24,7 @@ */ #include +#include /* * This macro checks if the kernel version is between the two specified @@ -33,4 +34,18 @@ (LINUX_VERSION_CODE >= KERNEL_VERSION(a_low, b_low, c_low) && \ LINUX_VERSION_CODE < KERNEL_VERSION(a_high, b_high, c_high)) +#define LTTNG_UBUNTU_KERNEL_VERSION(a, b, c, d) \ + (((a) << 24) + ((b) << 16) + (c << 8) + (d)) + +#define LTTNG_UBUNTU_VERSION_CODE \ + ((LINUX_VERSION_CODE << 8) + UTS_UBUNTU_RELEASE_ABI) + +#define LTTNG_UBUNTU_KERNEL_RANGE(a_low, b_low, c_low, d_low, \ + a_high, b_high, c_high, d_high) \ + (defined(UTS_UBUNTU_RELEASE_ABI) && \ + LTTNG_UBUNTU_VERSION_CODE >= \ + LTTNG_UBUNTU_KERNEL_VERSION(a_low, b_low, c_low, d_low) && \ + LTTNG_UBUNTU_VERSION_CODE < \ + LTTNG_UBUNTU_KERNEL_VERSION(a_high, b_high, c_high, d_high)) + #endif /* _LTTNG_KERNEL_VERSION_H */ diff --git a/lttng-statedump-impl.c b/lttng-statedump-impl.c index a633657..899bcf7 100755 --- a/lttng-statedump-impl.c +++ b/lttng-statedump-impl.c @@ -47,6 +47,7 @@ #include #include "lttng-events.h" +#include "lttng-kernel-version.h" #include "wrapper/irqdesc.h" #include "wrapper/spinlock.h" #include "wrapper/fdtable.h" @@ -295,8 +296,19 @@ void lttng_statedump_process_ns(struct lttng_session *session, 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)) + proxy = p->nsproxy; +#else rcu_read_lock(); proxy = task_nsproxy(p); +#endif if (proxy) { pid_ns = lttng_get_proxy_pid_ns(proxy); do { @@ -308,7 +320,12 @@ void lttng_statedump_process_ns(struct lttng_session *session, 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)) + /* (nothing) */ +#else rcu_read_unlock(); +#endif } static diff --git a/probes/lttng-probe-block.c b/probes/lttng-probe-block.c index 3eb668f..aed45fb 100644 --- a/probes/lttng-probe-block.c +++ b/probes/lttng-probe-block.c @@ -22,6 +22,8 @@ #include #include +#include "../lttng-tracer.h" +#include "../lttng-kernel-version.h" /* * Create the tracepoint static inlines from the kernel to validate that our -- 1.9.1 debian/patches/series0000644000000000000000000000004212435432707012035 0ustar fix-build-on-ubuntu-kernels.patch