diff -Nru lttng-modules-2.7.1/abi-rhel-version.sh lttng-modules-2.8.0/abi-rhel-version.sh --- lttng-modules-2.7.1/abi-rhel-version.sh 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/abi-rhel-version.sh 2016-05-20 01:34:50.000000000 +0000 @@ -0,0 +1,21 @@ +#!/bin/sh + +# First argument is the path to the kernel headers. +KPATH=$1 + +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_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)) + +echo ${RHEL_API_VERSION} diff -Nru lttng-modules-2.7.1/built-in.sh lttng-modules-2.8.0/built-in.sh --- lttng-modules-2.7.1/built-in.sh 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/built-in.sh 2016-05-20 01:34:54.000000000 +0000 @@ -0,0 +1,24 @@ +#!/bin/bash + +set -e + +usage() { + echo "usage: $0 " >&2 + exit 1 +} + +[ "$#" -eq 1 ] || usage +KERNEL_DIR="$(readlink --canonicalize-existing "$1")" + +# Symlink the lttng-modules directory in the kernel source +ln -sf "$(pwd)" "${KERNEL_DIR}/lttng" + +# Graft ourself to the kernel build system +echo 'source "lttng/Kconfig"' >> "${KERNEL_DIR}/Kconfig" +sed -i 's#+= kernel/#+= kernel/ lttng/#' "${KERNEL_DIR}/Makefile" + +echo >&2 +echo " $0: done." >&2 +echo " $0: now you can build the kernel with LTTng support." >&2 +echo " $0: make sure you enable it (CONFIG_LTTNG) before building." >&2 +echo >&2 diff -Nru lttng-modules-2.7.1/ChangeLog lttng-modules-2.8.0/ChangeLog --- lttng-modules-2.7.1/ChangeLog 2016-01-05 18:34:29.000000000 +0000 +++ lttng-modules-2.8.0/ChangeLog 2016-05-20 20:06:29.000000000 +0000 @@ -1,17 +1,114 @@ -2016-01-05 LTTng modules 2.7.1 +2016-05-20 (Bike-to-Work Day) LTTng modules 2.8.0 + * Fix: ring buffer: honor switch parameter type in remote switch + * Fix: only flush non-metadata channels + * Fix: don't perform extra flush on metadata channel + * Fix: flush empty packets on snapshot channel + * Fix: do not generate packet at destroy after stop + * Fix: compat ioctl for flush/get metadata version + * Fix: ctf_string() should handle NULL pointers + * Fix: portability: no arith on void pointer + * Fix: add missing tests/Kbuild + * Test clock override plugin + * Fix: add modules target to base Makefile + * Fix: make clean does not include dot-config + * Fix: trigger build error if CONFIG_TRACEPOINTS is not set + * Documentation: document that CONFIG_MODULES not required when builtin + * Fix: mm_page_alloc_extfrag instrumentation for kernel 3.16.35 + * Fix: integer endianness metadata generation + * Fix: endianness of integers received by filter + +2016-04-26 LTTng modules 2.8.0-rc2 + * Fix: writeback probe on RHEL >= 3.10.0-327.10.1 + * Fix: RHEL kernel 3.10.0-327.13.1 compat + * Fix: ctf_user_integer should not trigger page fault + * Fix: lib_ring_buffer_copy_from_user_inatomic error handling + * Add comment describing ioctl number duplication + * Fix: remove unused gfpflags.h from btrfs and compaction instrumentation + * Fix: Remove dead code from filter interpreter + * Fix: x86 kvm mmutrace instrumentation for kernel < 3.6 + * Fix: mm_vmscan instrumentation: remove unused gfpflags.h include + * Fix: use of uninitialized ret value in lttng_abi_create_event + * Fix: kmem instrumentation: remove unused gfpflags.h include + * Fix: 4.6 kernel: use in_compat_syscall + * Fix: use BUG_ON instead of accessing array subscript above array bounds + * Fix: Add granularity to RHEL kernel version checks + +2016-03-18 (Awkward Moments Day) LTTng modules 2.8.0-rc1 + * Bump minor tracer ABI version + * Fix: build against out-of-tree kernel build + * probes/Kbuild: remove upper level header path + * Move leftover relative include paths to system paths + * syscall instrumentation: use system headers + * tracepoint event instrumentation: use system headers + * Use system include path in wrappers + * libs: use system include paths + * Use system header paths in core implementation files + * Use system include paths in root directory headers + * Use system include paths in probes + * Update gitignore + * Use system include paths in lttng-types.h + * Use system include paths in lttng-tracepoint-event-impl.h + * Use system include path in probes/define_trace.h + * Use system include paths in probes/lttng-tracepoint-event-impl.h + * Rename probes/lttng-events.h to probes/lttng-tracepoint-event-impl.h + * Add makefile directory to include path + * Fix: event ctx get size should be after chan ctx + * Fix: filter interpreter with userspace strings + * Fix: rename kvm x86 TRACE_SYSTEM to avoid name clash + * Fix: format address fields as hexadecimal + * PowerPC-64 ABIv1: add build error if KALLSYMS_ALL is missing + * Fix: system call instrumentation overrides + * Fix: page_alloc wrapper incorrect parenthesis + * Fix: system call tracing for arm-64 compat !CONFIG_UID16 + * Fix: add struct user_msghdr forward declaration for older kernels + * Cleanup: Remove unused lttng-types module + * Fix: add missing versions and init call for page_alloc wrapper + * Fix: Define lttng-tracer metadata only once + * Fix: Add CONFIG_LTTNG to modules_install target + * Fix: Use kbuild env instead of a custom var KERNELDIR + * Update clock offset comment + * clock offset: print negative value in metadata + * Fix: handle negative clock offset + * Fix: sched instrumentation for 4.1-rt11 + * Add RT patch version macros + * Expect filter context identifiers starting with $ctx. + * ARM64: wire up compat system calls + * Add support for arm64 syscalls + * Fix: Ubuntu kernel range for block_rq_complete + * Fix: Ubuntu kernel range for mm_page_alloc_extfrag + * Fix: update vmscan instrumentation for kernel 4.5 + * Fix: check reference counts for overflow + * Fix: RHEL 7.2 scsi instrumentation + * Fix: RHEL 7.2 kvm instrumentation + * Kconfig: describe both module and in-kernel compilation options + * Add comments and indentation to Makefile + * Add support for built-in kernel build + * Rename sub makefiles to Kbuild + * Cleanup sub makefiles + * Make goals configurable with CONFIG_LTTNG + * Fix: Use generic raw_irqs_disabled_flags * Fix: Use MAX_RT_PRIO offset in sched_wakeup_template * Fix: update sched instrumentation for kernel 4.4.0 + * Bump version number for development branch + * Fix: interruptible context: reversed logic + * Contexts for RT debugging * Fix: instrumentation: v4lv2 missing include * Fix: header size larger than 256 bytes + * Instrument x86 page faults + * Fix: irq_vectors TRACE_SYSTEM name + * Instrument x86_irq_vectors * Fix: tracepoint listing misses last loaded probe * Fix: lttng trace-clock needs to disable preemption - -2015-09-24 LTTng modules 2.7.0 + * Tracepoint event: add "TP_code_post()" + * Implement array and sequence bitfields + * Fix: kmem: add mm.h include + * Add page frame number (pfn) to kmem page events + * Use pfn rather than struct page in ring buffer array + * Implement clock plugin support + * Command to regenerate the metadata of a session * Fix: writeback instrumentation update for 4.3 Linux kernel * Fix: update sched wakeup instrumentation for 4.3 kernel * Fix: lttng-test build failure for kernels < 3.0 - -2015-09-09 LTTng modules 2.7.0-rc2 * Use 3.18 syscall instrumentation for MIPS32 * Update the MIPS32 syscall instrumentation to 3.18 * Fix: Move pipe override to the arch specific pointers_override.h @@ -23,15 +120,17 @@ * Fix: build failure on 2.6.36 * Cleanup: split bdi_dirty_ratelimit with ifdef into separate macros * Fix: writeback instrumentation for 4.2 kernels + * Fix: mm_page_alloc_extfrag instrumentation for kernel 3.18.10 + * Add stream instance id to the packet header + * Add a packet sequence number * Fix: kmem probe with Ubuntu 3.13 kernels * Fix: disable kvm probe if lapic.h isn't found * Fix: timer instrumentation for 4.2 kernels * Fix: ext4 instrumentation for 4.2 kernels * Fix: kvm instrumentation for 4.2 kernels - * Fix: mm_page_alloc_extfrag instrumentation for kernel 3.18.10 * Fix: allow LTTng to be built within kernel tree -2015-07-15 LTTng modules 2.7.0-rc1 +2015-07-15 (Pet Fire Safety Day) LTTng modules 2.7.0-rc1 * Fix: Building the event list fails on fragmented memory * Fix: use after free on metadata cache reallocation * Fix: version checks for kernel 4.0 diff -Nru lttng-modules-2.7.1/debian/changelog lttng-modules-2.8.0/debian/changelog --- lttng-modules-2.7.1/debian/changelog 2016-01-11 12:54:59.000000000 +0000 +++ lttng-modules-2.8.0/debian/changelog 2017-02-08 10:18:53.000000000 +0000 @@ -1,3 +1,44 @@ +lttng-modules (2.8.0-1ubuntu1~16.04.1) xenial; urgency=medium + + * Backport into 16.04/Xenial to fix build with 4.8 kernels (LP: #1662114). + + -- Stefan Bader Wed, 08 Feb 2017 11:16:36 +0100 + +lttng-modules (2.8.0-1ubuntu1) yakkety; urgency=medium + + * Backport upstream stable commits from 2.8.1 to allow compiling on 4.8 + kernels. (LP: #1625072) + 0001-Fix-Add-support-for-4.6.4-rt8-kernel.patch + 0002-Fix-timer-wrapper-support-kernels-4.8.patch + 0003-Fix-update-block-instrumentation-to-compile-on-4.8-k.patch + 0004-Fix-napi-instrumentation-for-4.8-kernels.patch + 0005-Fix-update-mm_vmscan-instrumentation-for-kernel-4.8.patch + 0006-Fix-btrfs-instrumentation-for-4.8-kernel.patch + + -- Robert Hooker Thu, 01 Dec 2016 09:51:38 -0500 + +lttng-modules (2.8.0-1) unstable; urgency=medium + + [ Michael Jeanson ] + * [0b58135] New upstream version 2.8.0 + * [393b9dc] Update dkms.conf for 2.8.0 + * [d4a093e] Bump standards version to 3.9.8, no changes necessary + * [8536e31] Updated debian copyright file + + -- Jon Bernard Tue, 24 May 2016 21:38:18 -0400 + +lttng-modules (2.7.2-1) unstable; urgency=medium + + [ Michael Jeanson ] + * [a0e9036] Add pgpsigurlmangle to watch file + * [0bace1e] New upstream version 2.7.2 + * [eb429d3] Update vcs fields to use secure uri + * [a1b3812] Bump standards version to 3.9.7, no changes necessary + * [19a1783] Updated copyright file + * [7afae37] Do not install vim swp files + + -- Jon Bernard Sat, 12 Mar 2016 06:43:08 -0500 + lttng-modules (2.7.1-1) unstable; urgency=medium [ Michael Jeanson ] diff -Nru lttng-modules-2.7.1/debian/control lttng-modules-2.8.0/debian/control --- lttng-modules-2.7.1/debian/control 2016-01-11 12:54:59.000000000 +0000 +++ lttng-modules-2.8.0/debian/control 2016-12-01 18:15:50.000000000 +0000 @@ -1,12 +1,13 @@ Source: lttng-modules Section: kernel Priority: extra -Maintainer: Jon Bernard +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Jon Bernard Build-Depends: debhelper (>= 9), dkms (>= 2.1.0.0) -Standards-Version: 3.9.6 -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 +Standards-Version: 3.9.8 +Vcs-Git: https://anonscm.debian.org/git/collab-maint/lttng-modules.git +Vcs-Browser: https://anonscm.debian.org/gitweb/?p=collab-maint/lttng-modules.git;a=summary +Homepage: https://lttng.org Package: lttng-modules-dkms Architecture: all diff -Nru lttng-modules-2.7.1/debian/copyright lttng-modules-2.8.0/debian/copyright --- lttng-modules-2.7.1/debian/copyright 2016-01-11 12:54:59.000000000 +0000 +++ lttng-modules-2.8.0/debian/copyright 2016-05-25 01:38:38.000000000 +0000 @@ -1,59 +1,134 @@ -Format: http://dep.debian.net/deps/dep5 +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: lttng-modules -Source: http://lttng.org +Source: https://lttng.org Files: * -Copyright: 2005-2011 Mathieu Desnoyers -License: LGPL-2.1 or GPL-2 +Copyright: 2005-2016 Mathieu Desnoyers +License: LGPL-2.1 -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: ChangeLog + CodingStyle + Kconfig + Makefile + TODO + abi-debian-version.sh + abi-rhel-version.sh + built-in.sh + rt-patch-version.sh +Copyright: 2005-2015 Mathieu Desnoyers +License: LGPL-2.1 -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 +Files: debian/* +Copyright: 2011-2016 Michael Jeanson + 2011 Stéphane Graber + 2012-2016 Jon Bernard License: GPL-2 -Files: debian/* -Copyright: 2011 Michael Jeanson - 2011 Stéphane Graber - 2012 Jon Bernard +Files: filter-bytecode.h +Copyright: 2012 Mathieu Desnoyers +License: LGPL-2.1 + +Files: instrumentation/* +Copyright: 2005-2015 Mathieu Desnoyers +License: LGPL-2.1 + +Files: instrumentation/syscalls/lttng-syscalls-extractor/lttng-syscalls-extractor.c +Copyright: 2011 Mathieu Desnoyers + 2011 Julien Desfossez +License: GPL-2+ + +Files: lib/Kbuild +Copyright: 2005-2015 Mathieu Desnoyers +License: LGPL-2.1 + +Files: lib/bitfield.h +Copyright: 2010 Mathieu Desnoyers +License: Expat + +Files: lib/prio_heap/* +Copyright: 2011 Mathieu Desnoyers +License: Expat + +Files: lib/ringbuffer/ring_buffer_mmap.c +Copyright: 2008-2012 Mathieu Desnoyers + 2002-2005 Tom Zanussi , IBM Corp + 1999-2005 Karim Yaghmour License: GPL-2 +Files: lib/ringbuffer/ring_buffer_splice.c +Copyright: 2008-2012 Mathieu Desnoyers + 2002-2005 Tom Zanussi , IBM Corp + 1999-2005 Karim Yaghmour 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". +Files: lttng-statedump-impl.c +Copyright: 2006-2012 Mathieu Desnoyers + 2005 Jean-Hugues Deschenes +License: LGPL-2.1 + +Files: probes/* +Copyright: 2012, 2013, Mentor Graphics Corp + 2010-2012 Mathieu Desnoyers +License: LGPL-2.1 + +Files: probes/define_trace.h + probes/lttng-tracepoint-event-impl.h +Copyright: 2009-2014 Mathieu Desnoyers + 2009 Steven Rostedt +License: LGPL-2.1 + +Files: probes/lttng-events-nowrite.h + probes/lttng-events-reset.h + probes/lttng-events-write.h + probes/lttng-ftrace.c + probes/lttng-kprobes.c + probes/lttng-kretprobes.c + probes/lttng-probe-block.c + probes/lttng-probe-irq.c + probes/lttng-probe-kvm-x86-mmu.c + probes/lttng-probe-kvm-x86.c + probes/lttng-probe-kvm.c + probes/lttng-probe-sched.c + probes/lttng-probe-signal.c + probes/lttng-probe-statedump.c + probes/lttng-probe-timer.c + probes/lttng-probe-user.c + probes/lttng-probe-user.h + probes/lttng-probe-x86-exceptions.c + probes/lttng-probe-x86-irq-vectors.c + probes/lttng-tracepoint-event.h + probes/lttng-types.h + probes/lttng.c + probes/lttng.h +Copyright: 2005-2016 Mathieu Desnoyers +License: LGPL-2.1 + +Files: tests/Kbuild +Copyright: 2005-2015 Mathieu Desnoyers +License: LGPL-2.1 + +Files: wrapper/kallsyms.h +Copyright: 2011 Avik Sil (avik.sil@linaro.org) + 2011-2012 Mathieu Desnoyers +License: LGPL-2.1 + +Files: wrapper/kref.h + wrapper/list.h +Copyright: 2015-2016 Mathieu Desnoyers 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". + +Files: wrapper/kstrtox.h + wrapper/vzalloc.h +Copyright: 2015 Michael Jeanson +License: LGPL-2.1 + +Files: wrapper/ringbuffer/* +Copyright: 2005-2015 Mathieu Desnoyers +License: LGPL-2.1 + +Files: wrapper/writeback.h +Copyright: 2013, Mentor Graphics Corp +License: LGPL-2.1 License: Expat Permission is hereby granted, free of charge, to any person obtaining @@ -74,3 +149,45 @@ 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. + +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: GPL-2+ + This program 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; version 2 dated June, 1991, or (at + your option) any later version. + . + On Debian systems, the complete text of version 2 of the GNU General + Public License can be found in '/usr/share/common-licenses/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". diff -Nru lttng-modules-2.7.1/debian/lttng-modules-dkms.dkms.in lttng-modules-2.8.0/debian/lttng-modules-dkms.dkms.in --- lttng-modules-2.7.1/debian/lttng-modules-dkms.dkms.in 2016-01-11 12:54:59.000000000 +0000 +++ lttng-modules-2.8.0/debian/lttng-modules-dkms.dkms.in 2016-05-25 01:38:38.000000000 +0000 @@ -15,7 +15,7 @@ SUBLEVEL=$(echo $kernelver | sed -ne 's/\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\)\-\(.\+\)/\3/p') -MAKE[$i]="make -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build modules" +MAKE[$i]="make -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build modules CONFIG_LTTNG=m" BUILT_MODULE_NAME[$i]="lttng-lib-ring-buffer" BUILT_MODULE_LOCATION[$i]="lib/" @@ -46,6 +46,10 @@ DEST_MODULE_LOCATION[$i]="/extra" i=$((i+1)) +BUILT_MODULE_NAME[$i]="lttng-clock" +DEST_MODULE_LOCATION[$i]="/extra" +i=$((i+1)) + BUILT_MODULE_NAME[$i]="lttng-statedump" DEST_MODULE_LOCATION[$i]="/extra" i=$((i+1)) @@ -249,11 +253,6 @@ i=$((i+1)) fi -BUILT_MODULE_NAME[$i]="lttng-types" -BUILT_MODULE_LOCATION[$i]="probes/" -DEST_MODULE_LOCATION[$i]="/extra/probes" -i=$((i+1)) - if [ "$KCONFIG" = "true" ] && [ -n "$CONFIG_VIDEO_V4L2" ] && \ ( [ "$VERSION" -ge 3 -a "$PATCHLEVEL" -ge 14 ] || [ "$VERSION" -ge 4 ] ); then BUILT_MODULE_NAME[$i]="lttng-probe-v4l2" @@ -263,6 +262,11 @@ fi BUILT_MODULE_NAME[$i]="lttng-test" -BUILT_MODULE_LOCATION[$i]="probes/" -DEST_MODULE_LOCATION[$i]="/extra/probes" +BUILT_MODULE_LOCATION[$i]="tests/probes/" +DEST_MODULE_LOCATION[$i]="/extra/tests/probes" +i=$((i+1)) + +BUILT_MODULE_NAME[$i]="lttng-clock-plugin-test" +BUILT_MODULE_LOCATION[$i]="tests/clock-plugin/" +DEST_MODULE_LOCATION[$i]="/extra/tests/clock-plugin" i=$((i+1)) diff -Nru lttng-modules-2.7.1/debian/patches/0001-Fix-Add-support-for-4.6.4-rt8-kernel.patch lttng-modules-2.8.0/debian/patches/0001-Fix-Add-support-for-4.6.4-rt8-kernel.patch --- lttng-modules-2.7.1/debian/patches/0001-Fix-Add-support-for-4.6.4-rt8-kernel.patch 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/debian/patches/0001-Fix-Add-support-for-4.6.4-rt8-kernel.patch 2016-12-01 18:15:50.000000000 +0000 @@ -0,0 +1,134 @@ +From 47da52acb585cedb3a130d7c8af5db2d2f208265 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson +Date: Fri, 29 Jul 2016 10:52:47 -0400 +Subject: [PATCH 1/6] Fix: Add support for 4.6.4-rt8 kernel + +Signed-off-by: Michael Jeanson +Signed-off-by: Mathieu Desnoyers +--- + lib/ringbuffer/ring_buffer_frontend.c | 18 +++++++++--- + wrapper/timer.h | 55 +++++++++++++++++++++++++++++++++++ + 2 files changed, 69 insertions(+), 4 deletions(-) + create mode 100644 wrapper/timer.h + +diff --git a/lib/ringbuffer/ring_buffer_frontend.c b/lib/ringbuffer/ring_buffer_frontend.c +index 1e4b98b..74af7c6 100644 +--- a/lib/ringbuffer/ring_buffer_frontend.c ++++ b/lib/ringbuffer/ring_buffer_frontend.c +@@ -63,6 +63,7 @@ + #include + #include + #include ++#include + + /* + * Internal structure representing offsets to use at a sub-buffer switch. +@@ -281,7 +282,7 @@ static void switch_buffer_timer(unsigned long data) + lib_ring_buffer_switch_slow(buf, SWITCH_ACTIVE); + + if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) +- mod_timer_pinned(&buf->switch_timer, ++ lttng_mod_timer_pinned(&buf->switch_timer, + jiffies + chan->switch_timer_interval); + else + mod_timer(&buf->switch_timer, +@@ -298,7 +299,12 @@ static void lib_ring_buffer_start_switch_timer(struct lib_ring_buffer *buf) + + if (!chan->switch_timer_interval || buf->switch_timer_enabled) + return; +- init_timer(&buf->switch_timer); ++ ++ if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) ++ lttng_init_timer_pinned(&buf->switch_timer); ++ else ++ init_timer(&buf->switch_timer); ++ + buf->switch_timer.function = switch_buffer_timer; + buf->switch_timer.expires = jiffies + chan->switch_timer_interval; + buf->switch_timer.data = (unsigned long)buf; +@@ -341,7 +347,7 @@ static void read_buffer_timer(unsigned long data) + } + + if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) +- mod_timer_pinned(&buf->read_timer, ++ lttng_mod_timer_pinned(&buf->read_timer, + jiffies + chan->read_timer_interval); + else + mod_timer(&buf->read_timer, +@@ -361,7 +367,11 @@ static void lib_ring_buffer_start_read_timer(struct lib_ring_buffer *buf) + || buf->read_timer_enabled) + return; + +- init_timer(&buf->read_timer); ++ if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) ++ lttng_init_timer_pinned(&buf->read_timer); ++ else ++ init_timer(&buf->read_timer); ++ + buf->read_timer.function = read_buffer_timer; + buf->read_timer.expires = jiffies + chan->read_timer_interval; + buf->read_timer.data = (unsigned long)buf; +diff --git a/wrapper/timer.h b/wrapper/timer.h +new file mode 100644 +index 0000000..441a017 +--- /dev/null ++++ b/wrapper/timer.h +@@ -0,0 +1,55 @@ ++#ifndef _LTTNG_WRAPPER_TIMER_H ++#define _LTTNG_WRAPPER_TIMER_H ++ ++/* ++ * wrapper/timer.h ++ * ++ * wrapper around linux/timer.h. ++ * ++ * Copyright (C) 2016 Michael Jeanson ++ * ++ * 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 ++#include ++#include ++ ++ ++#if (LTTNG_RT_VERSION_CODE >= LTTNG_RT_KERNEL_VERSION(4,6,4,8)) ++ ++#define lttng_init_timer_pinned(timer) \ ++ init_timer_pinned(timer) ++ ++static inline int lttng_mod_timer_pinned(struct timer_list *timer, ++ unsigned long expires) ++{ ++ return mod_timer(timer, expires); ++} ++ ++#else /* #if (LTTNG_RT_VERSION_CODE >= LTTNG_RT_KERNEL_VERSION(4,6,4,8)) */ ++ ++#define lttng_init_timer_pinned(timer) \ ++ init_timer(timer) ++ ++static inline int lttng_mod_timer_pinned(struct timer_list *timer, ++ unsigned long expires) ++{ ++ return mod_timer_pinned(timer, expires); ++} ++ ++#endif /* #else #if (LTTNG_RT_VERSION_CODE >= LTTNG_RT_KERNEL_VERSION(4,6,4,8)) */ ++ ++#endif /* _LTTNG_WRAPPER_TIMER_H */ +-- +2.7.4 + diff -Nru lttng-modules-2.7.1/debian/patches/0002-Fix-timer-wrapper-support-kernels-4.8.patch lttng-modules-2.8.0/debian/patches/0002-Fix-timer-wrapper-support-kernels-4.8.patch --- lttng-modules-2.7.1/debian/patches/0002-Fix-timer-wrapper-support-kernels-4.8.patch 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/debian/patches/0002-Fix-timer-wrapper-support-kernels-4.8.patch 2016-12-01 18:15:50.000000000 +0000 @@ -0,0 +1,44 @@ +From 9889a003260b4fd46caba76c21be985f7205ac8f Mon Sep 17 00:00:00 2001 +From: Mathieu Desnoyers +Date: Thu, 25 Aug 2016 17:39:47 -0400 +Subject: [PATCH 2/6] Fix: timer wrapper: support kernels >= 4.8 + +Signed-off-by: Mathieu Desnoyers +--- + wrapper/timer.h | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/wrapper/timer.h b/wrapper/timer.h +index 441a017..c1c0c95 100644 +--- a/wrapper/timer.h ++++ b/wrapper/timer.h +@@ -28,7 +28,8 @@ + #include + + +-#if (LTTNG_RT_VERSION_CODE >= LTTNG_RT_KERNEL_VERSION(4,6,4,8)) ++#if (LTTNG_RT_VERSION_CODE >= LTTNG_RT_KERNEL_VERSION(4,6,4,8) \ ++ || LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)) + + #define lttng_init_timer_pinned(timer) \ + init_timer_pinned(timer) +@@ -39,7 +40,7 @@ static inline int lttng_mod_timer_pinned(struct timer_list *timer, + return mod_timer(timer, expires); + } + +-#else /* #if (LTTNG_RT_VERSION_CODE >= LTTNG_RT_KERNEL_VERSION(4,6,4,8)) */ ++#else + + #define lttng_init_timer_pinned(timer) \ + init_timer(timer) +@@ -50,6 +51,6 @@ static inline int lttng_mod_timer_pinned(struct timer_list *timer, + return mod_timer_pinned(timer, expires); + } + +-#endif /* #else #if (LTTNG_RT_VERSION_CODE >= LTTNG_RT_KERNEL_VERSION(4,6,4,8)) */ ++#endif + + #endif /* _LTTNG_WRAPPER_TIMER_H */ +-- +2.7.4 + diff -Nru lttng-modules-2.7.1/debian/patches/0003-Fix-update-block-instrumentation-to-compile-on-4.8-k.patch lttng-modules-2.8.0/debian/patches/0003-Fix-update-block-instrumentation-to-compile-on-4.8-k.patch --- lttng-modules-2.7.1/debian/patches/0003-Fix-update-block-instrumentation-to-compile-on-4.8-k.patch 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/debian/patches/0003-Fix-update-block-instrumentation-to-compile-on-4.8-k.patch 2016-12-01 18:15:50.000000000 +0000 @@ -0,0 +1,284 @@ +From 283b1c890496023649b4d37d3f88e60c9cd959cd Mon Sep 17 00:00:00 2001 +From: Mathieu Desnoyers +Date: Tue, 30 Aug 2016 16:59:13 -0400 +Subject: [PATCH 3/6] Fix: update block instrumentation to compile on 4.8 + kernels +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +These 2 upstream Linux commits break the block instrumentation in lttng +modules master: + +https://github.com/torvalds/linux/commit/4e1b2d52a80d79296a5d899d73249748dea71a53 + +https://github.com/torvalds/linux/commit/288dab8a35a0bde426a09870943c8d3ee3a50dab + +The errors are : + +lttng-modules/probes/../instrumentation/events/lttng-module/block.h:35:13: +error: ‘REQ_DISCARD’ undeclared (first use in this function) + +lttng-modules/probes/../instrumentation/events/lttng-module/block.h:41:14: +error: ‘REQ_SECURE’ undeclared (first use in this function) + +Signed-off-by: Mathieu Desnoyers +--- + instrumentation/events/lttng-module/block.h | 99 ++++++++++++++++++++++------- + 1 file changed, 75 insertions(+), 24 deletions(-) + +diff --git a/instrumentation/events/lttng-module/block.h b/instrumentation/events/lttng-module/block.h +index 75cb11b..4373edf 100644 +--- a/instrumentation/events/lttng-module/block.h ++++ b/instrumentation/events/lttng-module/block.h +@@ -24,13 +24,40 @@ enum { + RWBS_FLAG_SECURE = (1 << 7), + RWBS_FLAG_FLUSH = (1 << 8), + RWBS_FLAG_FUA = (1 << 9), ++ RWBS_FLAG_PREFLUSH = (1 << 10), + }; + + #endif /* _TRACE_BLOCK_DEF_ */ + +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)) ++ ++#define lttng_req_op(rq) req_op(rq) ++#define lttng_req_rw(rq) ((rq)->cmd_flags) ++#define lttng_bio_op(bio) bio_op(bio) ++#define lttng_bio_rw(bio) ((bio)->bi_opf) ++ ++#define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \ ++ ctf_integer(type, rwbs, \ ++ (((op) == REQ_OP_WRITE || (op) == REQ_OP_WRITE_SAME) ? RWBS_FLAG_WRITE : \ ++ ( (op) == REQ_OP_DISCARD ? RWBS_FLAG_DISCARD : \ ++ ( (op) == REQ_OP_SECURE_ERASE ? (RWBS_FLAG_DISCARD | RWBS_FLAG_SECURE) : \ ++ ( (op) == REQ_OP_FLUSH ? RWBS_FLAG_FLUSH : \ ++ ( (op) == REQ_OP_READ ? RWBS_FLAG_READ : \ ++ ( 0 )))))) \ ++ | ((rw) & REQ_RAHEAD ? RWBS_FLAG_RAHEAD : 0) \ ++ | ((rw) & REQ_SYNC ? RWBS_FLAG_SYNC : 0) \ ++ | ((rw) & REQ_META ? RWBS_FLAG_META : 0) \ ++ | ((rw) & REQ_PREFLUSH ? RWBS_FLAG_PREFLUSH : 0) \ ++ | ((rw) & REQ_FUA ? RWBS_FLAG_FUA : 0)) ++ ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) + +-#define blk_rwbs_ctf_integer(type, rwbs, rw, bytes) \ ++#define lttng_req_op(rq) ++#define lttng_req_rw(rq) ((rq)->cmd_flags) ++#define lttng_bio_op(bio) ++#define lttng_bio_rw(bio) ((bio)->bi_rw) ++ ++#define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \ + ctf_integer(type, rwbs, ((rw) & WRITE ? RWBS_FLAG_WRITE : \ + ( (rw) & REQ_DISCARD ? RWBS_FLAG_DISCARD : \ + ( (bytes) ? RWBS_FLAG_READ : \ +@@ -44,7 +71,12 @@ enum { + + #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + +-#define blk_rwbs_ctf_integer(type, rwbs, rw, bytes) \ ++#define lttng_req_op(rq) ++#define lttng_req_rw(rq) ((rq)->cmd_flags) ++#define lttng_bio_op(bio) ++#define lttng_bio_rw(bio) ((bio)->bi_rw) ++ ++#define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \ + ctf_integer(type, rwbs, ((rw) & WRITE ? RWBS_FLAG_WRITE : \ + ( (rw) & REQ_DISCARD ? RWBS_FLAG_DISCARD : \ + ( (bytes) ? RWBS_FLAG_READ : \ +@@ -56,7 +88,12 @@ enum { + + #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) + +-#define blk_rwbs_ctf_integer(type, rwbs, rw, bytes) \ ++#define lttng_req_op(rq) ++#define lttng_req_rw(rq) ((rq)->cmd_flags) ++#define lttng_bio_op(bio) ++#define lttng_bio_rw(bio) ((bio)->bi_rw) ++ ++#define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \ + ctf_integer(type, rwbs, ((rw) & WRITE ? RWBS_FLAG_WRITE : \ + ( (rw) & REQ_DISCARD ? RWBS_FLAG_DISCARD : \ + ( (bytes) ? RWBS_FLAG_READ : \ +@@ -69,7 +106,12 @@ enum { + + #else + +-#define blk_rwbs_ctf_integer(type, rwbs, rw, bytes) \ ++#define lttng_req_op(rq) ++#define lttng_req_rw(rq) ((rq)->cmd_flags) ++#define lttng_bio_op(bio) ++#define lttng_bio_rw(bio) ((bio)->bi_rw) ++ ++#define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes) \ + ctf_integer(type, rwbs, ((rw) & WRITE ? RWBS_FLAG_WRITE : \ + ( (rw) & (1 << BIO_RW_DISCARD) ? RWBS_FLAG_DISCARD : \ + ( (bytes) ? RWBS_FLAG_READ : \ +@@ -156,7 +198,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq_with_error, + ctf_integer(unsigned int, nr_sector, tp_locvar->nr_sector) + ctf_integer(int, errors, rq->errors) + blk_rwbs_ctf_integer(unsigned int, rwbs, +- rq->cmd_flags, blk_rq_bytes(rq)) ++ lttng_req_op(rq), lttng_req_rw(rq), blk_rq_bytes(rq)) + ctf_sequence_hex(unsigned char, cmd, + tp_locvar->cmd, size_t, tp_locvar->cmd_len) + ), +@@ -246,7 +288,7 @@ LTTNG_TRACEPOINT_EVENT_CODE(block_rq_complete, + ctf_integer(unsigned int, nr_sector, nr_bytes >> 9) + ctf_integer(int, errors, rq->errors) + blk_rwbs_ctf_integer(unsigned int, rwbs, +- rq->cmd_flags, nr_bytes) ++ lttng_req_op(rq), lttng_req_rw(rq), nr_bytes) + ctf_sequence_hex(unsigned char, cmd, + tp_locvar->cmd, size_t, tp_locvar->cmd_len) + ), +@@ -314,7 +356,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq, + ctf_integer(unsigned int, bytes, tp_locvar->bytes) + ctf_integer(pid_t, tid, current->pid) + blk_rwbs_ctf_integer(unsigned int, rwbs, +- rq->cmd_flags, blk_rq_bytes(rq)) ++ lttng_req_op(rq), lttng_req_rw(rq), blk_rq_bytes(rq)) + ctf_sequence_hex(unsigned char, cmd, + tp_locvar->cmd, size_t, tp_locvar->cmd_len) + ctf_array_text(char, comm, current->comm, TASK_COMM_LEN) +@@ -378,12 +420,14 @@ LTTNG_TRACEPOINT_EVENT(block_bio_bounce, + ctf_integer(sector_t, sector, bio->bi_iter.bi_sector) + ctf_integer(unsigned int, nr_sector, bio_sectors(bio)) + blk_rwbs_ctf_integer(unsigned int, rwbs, +- bio->bi_rw, bio->bi_iter.bi_size) ++ lttng_bio_op(bio), lttng_bio_rw(bio), ++ bio->bi_iter.bi_size) + #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + ctf_integer(sector_t, sector, bio->bi_sector) + ctf_integer(unsigned int, nr_sector, bio->bi_size >> 9) + blk_rwbs_ctf_integer(unsigned int, rwbs, +- bio->bi_rw, bio->bi_size) ++ lttng_bio_op(bio), lttng_bio_rw(bio), ++ bio->bi_size) + #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + ctf_integer(pid_t, tid, current->pid) + ctf_array_text(char, comm, current->comm, TASK_COMM_LEN) +@@ -418,7 +462,8 @@ LTTNG_TRACEPOINT_EVENT(block_bio_complete, + ctf_integer(unsigned int, nr_sector, bio_sectors(bio)) + ctf_integer(int, error, error) + blk_rwbs_ctf_integer(unsigned int, rwbs, +- bio->bi_rw, bio->bi_iter.bi_size) ++ lttng_bio_op(bio), lttng_bio_rw(bio), ++ bio->bi_iter.bi_size) + #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + ctf_integer(sector_t, sector, bio->bi_sector) + ctf_integer(unsigned int, nr_sector, bio->bi_size >> 9) +@@ -428,7 +473,7 @@ LTTNG_TRACEPOINT_EVENT(block_bio_complete, + ctf_integer(int, error, 0) + #endif + blk_rwbs_ctf_integer(unsigned int, rwbs, +- bio->bi_rw, bio->bi_size) ++ lttng_bio_op(bio), lttng_bio_rw(bio), bio->bi_size) + #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + ) + ) +@@ -446,12 +491,13 @@ LTTNG_TRACEPOINT_EVENT_CLASS(block_bio_merge, + ctf_integer(sector_t, sector, bio->bi_iter.bi_sector) + ctf_integer(unsigned int, nr_sector, bio_sectors(bio)) + blk_rwbs_ctf_integer(unsigned int, rwbs, +- bio->bi_rw, bio->bi_iter.bi_size) ++ lttng_bio_op(bio), lttng_bio_rw(bio), ++ bio->bi_iter.bi_size) + #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + ctf_integer(sector_t, sector, bio->bi_sector) + ctf_integer(unsigned int, nr_sector, bio->bi_size >> 9) + blk_rwbs_ctf_integer(unsigned int, rwbs, +- bio->bi_rw, bio->bi_size) ++ lttng_bio_op(bio), lttng_bio_rw(bio), bio->bi_size) + #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + ctf_integer(pid_t, tid, current->pid) + ctf_array_text(char, comm, current->comm, TASK_COMM_LEN) +@@ -507,12 +553,13 @@ LTTNG_TRACEPOINT_EVENT(block_bio_queue, + ctf_integer(sector_t, sector, bio->bi_iter.bi_sector) + ctf_integer(unsigned int, nr_sector, bio_sectors(bio)) + blk_rwbs_ctf_integer(unsigned int, rwbs, +- bio->bi_rw, bio->bi_iter.bi_size) ++ lttng_bio_op(bio), lttng_bio_rw(bio), ++ bio->bi_iter.bi_size) + #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + ctf_integer(sector_t, sector, bio->bi_sector) + ctf_integer(unsigned int, nr_sector, bio->bi_size >> 9) + blk_rwbs_ctf_integer(unsigned int, rwbs, +- bio->bi_rw, bio->bi_size) ++ lttng_bio_op(bio), lttng_bio_rw(bio), bio->bi_size) + #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + ctf_integer(pid_t, tid, current->pid) + ctf_array_text(char, comm, current->comm, TASK_COMM_LEN) +@@ -530,7 +577,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(block_bio, + ctf_integer(sector_t, sector, bio->bi_sector) + ctf_integer(unsigned int, nr_sector, bio->bi_size >> 9) + blk_rwbs_ctf_integer(unsigned int, rwbs, +- bio->bi_rw, bio->bi_size) ++ lttng_bio_op(bio), lttng_bio_rw(bio), bio->bi_size) + ctf_integer(pid_t, tid, current->pid) + ctf_array_text(char, comm, current->comm, TASK_COMM_LEN) + ) +@@ -594,14 +641,16 @@ LTTNG_TRACEPOINT_EVENT_CLASS(block_get_rq, + ctf_integer(unsigned int, nr_sector, + bio ? bio_sectors(bio) : 0) + blk_rwbs_ctf_integer(unsigned int, rwbs, +- bio ? bio->bi_rw : 0, ++ bio ? lttng_bio_op(bio) : 0, ++ bio ? lttng_bio_rw(bio) : 0, + bio ? bio->bi_iter.bi_size : 0) + #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + ctf_integer(sector_t, sector, bio ? bio->bi_sector : 0) + ctf_integer(unsigned int, nr_sector, + bio ? bio->bi_size >> 9 : 0) + blk_rwbs_ctf_integer(unsigned int, rwbs, +- bio ? bio->bi_rw : 0, ++ bio ? lttng_bio_op(bio) : 0, ++ bio ? lttng_bio_rw(bio) : 0, + bio ? bio->bi_size : 0) + #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + ctf_integer(pid_t, tid, current->pid) +@@ -751,11 +800,12 @@ LTTNG_TRACEPOINT_EVENT(block_split, + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) + ctf_integer(sector_t, sector, bio->bi_iter.bi_sector) + blk_rwbs_ctf_integer(unsigned int, rwbs, +- bio->bi_rw, bio->bi_iter.bi_size) ++ lttng_bio_op(bio), lttng_bio_rw(bio), ++ bio->bi_iter.bi_size) + #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + ctf_integer(sector_t, sector, bio->bi_sector) + blk_rwbs_ctf_integer(unsigned int, rwbs, +- bio->bi_rw, bio->bi_size) ++ lttng_bio_op(bio), lttng_bio_rw(bio), bio->bi_size) + #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + ctf_integer(sector_t, new_sector, new_sector) + ctf_integer(pid_t, tid, current->pid) +@@ -790,12 +840,13 @@ LTTNG_TRACEPOINT_EVENT(block_remap, + ctf_integer(sector_t, sector, bio->bi_iter.bi_sector) + ctf_integer(unsigned int, nr_sector, bio_sectors(bio)) + blk_rwbs_ctf_integer(unsigned int, rwbs, +- bio->bi_rw, bio->bi_iter.bi_size) ++ lttng_bio_op(bio), lttng_bio_rw(bio), ++ bio->bi_iter.bi_size) + #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + ctf_integer(sector_t, sector, bio->bi_sector) + ctf_integer(unsigned int, nr_sector, bio->bi_size >> 9) + blk_rwbs_ctf_integer(unsigned int, rwbs, +- bio->bi_rw, bio->bi_size) ++ lttng_bio_op(bio), lttng_bio_rw(bio), bio->bi_size) + #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */ + ctf_integer(dev_t, old_dev, dev) + ctf_integer(sector_t, old_sector, from) +@@ -828,7 +879,7 @@ LTTNG_TRACEPOINT_EVENT(block_rq_remap, + ctf_integer(dev_t, old_dev, dev) + ctf_integer(sector_t, old_sector, from) + blk_rwbs_ctf_integer(unsigned int, rwbs, +- rq->cmd_flags, blk_rq_bytes(rq)) ++ lttng_req_op(rq), lttng_req_rw(rq), blk_rq_bytes(rq)) + ) + ) + #endif +-- +2.7.4 + diff -Nru lttng-modules-2.7.1/debian/patches/0004-Fix-napi-instrumentation-for-4.8-kernels.patch lttng-modules-2.8.0/debian/patches/0004-Fix-napi-instrumentation-for-4.8-kernels.patch --- lttng-modules-2.7.1/debian/patches/0004-Fix-napi-instrumentation-for-4.8-kernels.patch 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/debian/patches/0004-Fix-napi-instrumentation-for-4.8-kernels.patch 2016-12-01 18:15:50.000000000 +0000 @@ -0,0 +1,51 @@ +From c1dacd91afb9874948d9e469496620a1aa27f0a9 Mon Sep 17 00:00:00 2001 +From: Mathieu Desnoyers +Date: Tue, 30 Aug 2016 17:02:09 -0400 +Subject: [PATCH 4/6] Fix: napi instrumentation for 4.8 kernels + +Signed-off-by: Mathieu Desnoyers +--- + instrumentation/events/lttng-module/napi.h | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +diff --git a/instrumentation/events/lttng-module/napi.h b/instrumentation/events/lttng-module/napi.h +index 1126dd4..7b5ecfc 100644 +--- a/instrumentation/events/lttng-module/napi.h ++++ b/instrumentation/events/lttng-module/napi.h +@@ -10,6 +10,24 @@ + + #define NO_DEV "(no_device)" + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)) ++ ++LTTNG_TRACEPOINT_EVENT(napi_poll, ++ ++ TP_PROTO(struct napi_struct *napi, int work, int budget), ++ ++ TP_ARGS(napi, work, budget), ++ ++ TP_FIELDS( ++ ctf_integer_hex(struct napi_struct *, napi, napi) ++ ctf_string(dev_name, napi->dev ? napi->dev->name : NO_DEV) ++ ctf_integer(int, work, work) ++ ctf_integer(int, budget, budget) ++ ) ++) ++ ++#else ++ + LTTNG_TRACEPOINT_EVENT(napi_poll, + + TP_PROTO(struct napi_struct *napi), +@@ -22,6 +40,8 @@ LTTNG_TRACEPOINT_EVENT(napi_poll, + ) + ) + ++#endif ++ + #undef NO_DEV + + #endif /* LTTNG_TRACE_NAPI_H */ +-- +2.7.4 + diff -Nru lttng-modules-2.7.1/debian/patches/0005-Fix-update-mm_vmscan-instrumentation-for-kernel-4.8.patch lttng-modules-2.8.0/debian/patches/0005-Fix-update-mm_vmscan-instrumentation-for-kernel-4.8.patch --- lttng-modules-2.7.1/debian/patches/0005-Fix-update-mm_vmscan-instrumentation-for-kernel-4.8.patch 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/debian/patches/0005-Fix-update-mm_vmscan-instrumentation-for-kernel-4.8.patch 2016-12-01 18:15:50.000000000 +0000 @@ -0,0 +1,211 @@ +From 026909ddb03f43b871561dcc3ad150e02423df81 Mon Sep 17 00:00:00 2001 +From: Mathieu Desnoyers +Date: Tue, 30 Aug 2016 17:13:37 -0400 +Subject: [PATCH 5/6] Fix: update mm_vmscan instrumentation for kernel 4.8 + +Signed-off-by: Mathieu Desnoyers +--- + instrumentation/events/lttng-module/mm_vmscan.h | 145 +++++++++++++++++++++++- + 1 file changed, 144 insertions(+), 1 deletion(-) + +diff --git a/instrumentation/events/lttng-module/mm_vmscan.h b/instrumentation/events/lttng-module/mm_vmscan.h +index 56f020e..36ebd5c 100644 +--- a/instrumentation/events/lttng-module/mm_vmscan.h ++++ b/instrumentation/events/lttng-module/mm_vmscan.h +@@ -53,6 +53,23 @@ LTTNG_TRACEPOINT_EVENT(mm_vmscan_kswapd_sleep, + ) + ) + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)) ++ ++LTTNG_TRACEPOINT_EVENT(mm_vmscan_kswapd_wake, ++ ++ TP_PROTO(int nid, int zid, int order), ++ ++ TP_ARGS(nid, zid, order), ++ ++ TP_FIELDS( ++ ctf_integer(int, nid, nid) ++ ctf_integer(int, zid, zid) ++ ctf_integer(int, order, order) ++ ) ++) ++ ++#else ++ + LTTNG_TRACEPOINT_EVENT(mm_vmscan_kswapd_wake, + + TP_PROTO(int nid, int order), +@@ -65,6 +82,8 @@ LTTNG_TRACEPOINT_EVENT(mm_vmscan_kswapd_wake, + ) + ) + ++#endif ++ + LTTNG_TRACEPOINT_EVENT(mm_vmscan_wakeup_kswapd, + + TP_PROTO(int nid, int zid, int order), +@@ -78,6 +97,45 @@ LTTNG_TRACEPOINT_EVENT(mm_vmscan_wakeup_kswapd, + ) + ) + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)) ++ ++LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_direct_reclaim_begin_template, ++ ++ TP_PROTO(int order, int may_writepage, gfp_t gfp_flags, int classzone_idx), ++ ++ TP_ARGS(order, may_writepage, gfp_flags, classzone_idx), ++ ++ TP_FIELDS( ++ ctf_integer(int, order, order) ++ ctf_integer(int, may_writepage, may_writepage) ++ ctf_integer(gfp_t, gfp_flags, gfp_flags) ++ ctf_integer(int, classzone_idx, classzone_idx) ++ ) ++) ++ ++LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_direct_reclaim_begin, ++ ++ TP_PROTO(int order, int may_writepage, gfp_t gfp_flags, int classzone_idx), ++ ++ TP_ARGS(order, may_writepage, gfp_flags, classzone_idx) ++) ++ ++LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_memcg_reclaim_begin, ++ ++ TP_PROTO(int order, int may_writepage, gfp_t gfp_flags, int classzone_idx), ++ ++ TP_ARGS(order, may_writepage, gfp_flags, classzone_idx) ++) ++ ++LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_memcg_softlimit_reclaim_begin, ++ ++ TP_PROTO(int order, int may_writepage, gfp_t gfp_flags, int classzone_idx), ++ ++ TP_ARGS(order, may_writepage, gfp_flags, classzone_idx) ++) ++ ++#else ++ + LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_direct_reclaim_begin_template, + + TP_PROTO(int order, int may_writepage, gfp_t gfp_flags), +@@ -112,6 +170,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_begin_template, mm_vmsc + TP_ARGS(order, may_writepage, gfp_flags) + ) + ++#endif ++ + LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_direct_reclaim_end_template, + + TP_PROTO(unsigned long nr_reclaimed), +@@ -221,6 +281,70 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_end, + #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */ + #endif + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)) ++ ++LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_lru_isolate_template, ++ ++ TP_PROTO(int classzone_idx, ++ int order, ++ unsigned long nr_requested, ++ unsigned long nr_scanned, ++ unsigned long nr_taken, ++ isolate_mode_t isolate_mode, ++ int file ++ ), ++ ++ TP_ARGS(classzone_idx, order, nr_requested, nr_scanned, nr_taken, ++ isolate_mode, file ++ ), ++ ++ ++ TP_FIELDS( ++ ctf_integer(int, classzone_idx, classzone_idx) ++ ctf_integer(int, order, order) ++ ctf_integer(unsigned long, nr_requested, nr_requested) ++ ctf_integer(unsigned long, nr_scanned, nr_scanned) ++ ctf_integer(unsigned long, nr_taken, nr_taken) ++ ctf_integer(isolate_mode_t, isolate_mode, isolate_mode) ++ ctf_integer(int, file, file) ++ ) ++) ++ ++LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_lru_isolate_template, mm_vmscan_lru_isolate, ++ ++ TP_PROTO(int classzone_idx, ++ int order, ++ unsigned long nr_requested, ++ unsigned long nr_scanned, ++ unsigned long nr_taken, ++ isolate_mode_t isolate_mode, ++ int file ++ ), ++ ++ TP_ARGS(classzone_idx, order, nr_requested, nr_scanned, nr_taken, ++ isolate_mode, file ++ ) ++ ++) ++ ++LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_lru_isolate_template, mm_vmscan_memcg_isolate, ++ ++ TP_PROTO(int classzone_idx, ++ int order, ++ unsigned long nr_requested, ++ unsigned long nr_scanned, ++ unsigned long nr_taken, ++ isolate_mode_t isolate_mode, ++ int file ++ ), ++ ++ TP_ARGS(classzone_idx, order, nr_requested, nr_scanned, nr_taken, ++ isolate_mode, file ++ ) ++) ++ ++#else ++ + LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_lru_isolate_template, + + TP_PROTO(int order, +@@ -332,6 +456,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_lru_isolate_template, mm_vmscan_memcg_ + ) + ) + ++#endif ++ + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0)) + LTTNG_TRACEPOINT_EVENT(mm_vmscan_writepage, + +@@ -359,7 +485,24 @@ LTTNG_TRACEPOINT_EVENT(mm_vmscan_writepage, + ) + #endif + +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)) ++LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive, ++ ++ TP_PROTO(int nid, ++ unsigned long nr_scanned, unsigned long nr_reclaimed, ++ int priority, int file), ++ ++ TP_ARGS(nid, nr_scanned, nr_reclaimed, 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(int, priority, priority) ++ ctf_integer(int, reclaim_flags, trace_shrink_flags(file)) ++ ) ++) ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0)) + LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive, + + TP_PROTO(struct zone *zone, +-- +2.7.4 + diff -Nru lttng-modules-2.7.1/debian/patches/0006-Fix-btrfs-instrumentation-for-4.8-kernel.patch lttng-modules-2.8.0/debian/patches/0006-Fix-btrfs-instrumentation-for-4.8-kernel.patch --- lttng-modules-2.7.1/debian/patches/0006-Fix-btrfs-instrumentation-for-4.8-kernel.patch 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/debian/patches/0006-Fix-btrfs-instrumentation-for-4.8-kernel.patch 2016-12-01 18:15:50.000000000 +0000 @@ -0,0 +1,129 @@ +From 518d405eb97936c084abed4542b9e62d99d7ff75 Mon Sep 17 00:00:00 2001 +From: Mathieu Desnoyers +Date: Tue, 30 Aug 2016 17:32:35 -0400 +Subject: [PATCH 6/6] Fix: btrfs instrumentation for 4.8 kernel + +Note: there are missing events. + +Signed-off-by: Mathieu Desnoyers +--- + instrumentation/events/lttng-module/btrfs.h | 74 +++++++++++++++++++++++++++++ + 1 file changed, 74 insertions(+) + +diff --git a/instrumentation/events/lttng-module/btrfs.h b/instrumentation/events/lttng-module/btrfs.h +index 38c66c1..ea6710f 100644 +--- a/instrumentation/events/lttng-module/btrfs.h ++++ b/instrumentation/events/lttng-module/btrfs.h +@@ -222,6 +222,18 @@ LTTNG_TRACEPOINT_EVENT(btrfs_sync_file, + ) + ) + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)) ++LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs, ++ ++ TP_PROTO(struct btrfs_fs_info *fs_info, int wait), ++ ++ TP_ARGS(fs_info, wait), ++ ++ TP_FIELDS( ++ ctf_integer(int, wait, wait) ++ ) ++) ++#else + LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs, + + TP_PROTO(int wait), +@@ -232,7 +244,48 @@ LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs, + ctf_integer(int, wait, wait) + ) + ) ++#endif ++ ++LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group, ++ ++ TP_PROTO(struct btrfs_fs_info *fs_info, ++ struct btrfs_block_group_cache *block_group, int create), ++ ++ TP_ARGS(fs_info, block_group, create), ++ ++ TP_FIELDS( ++ ctf_array(u8, fsid, fs_info->fsid, BTRFS_UUID_SIZE) ++ ctf_integer(u64, offset, block_group->key.objectid) ++ ctf_integer(u64, size, block_group->key.offset) ++ ctf_integer(u64, flags, block_group->flags) ++ ctf_integer(u64, bytes_used, btrfs_block_group_used(&block_group->item)) ++ ctf_integer(u64, bytes_super, block_group->bytes_super) ++ ctf_integer(int, create, create) ++ ) ++) + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)) ++LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref, ++ ++ TP_PROTO(struct btrfs_fs_info *fs_info, ++ struct btrfs_delayed_ref_node *ref, ++ struct btrfs_delayed_tree_ref *full_ref, ++ int action), ++ ++ TP_ARGS(fs_info, ref, full_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(u64, parent, full_ref->parent) ++ ctf_integer(u64, ref_root, full_ref->root) ++ ctf_integer(int, level, full_ref->level) ++ ctf_integer(int, type, ref->type) ++ ctf_integer(u64, seq, ref->seq) ++ ) ++) ++#else + LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref, + + TP_PROTO(struct btrfs_delayed_ref_node *ref, +@@ -254,6 +307,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref, + #endif + ) + ) ++#endif + + LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref, + +@@ -278,6 +332,25 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref, + ) + ) + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)) ++LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head, ++ ++ TP_PROTO(struct btrfs_fs_info *fs_info, ++ struct btrfs_delayed_ref_node *ref, ++ struct btrfs_delayed_ref_head *head_ref, ++ int action), ++ ++ TP_ARGS(fs_info, 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) ++ ) ++) ++ ++#else + LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head, + + TP_PROTO(struct btrfs_delayed_ref_node *ref, +@@ -293,6 +366,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head, + ctf_integer(int, is_data, head_ref->is_data) + ) + ) ++#endif + + LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk, + +-- +2.7.4 + diff -Nru lttng-modules-2.7.1/debian/patches/series lttng-modules-2.8.0/debian/patches/series --- lttng-modules-2.7.1/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/debian/patches/series 2016-12-01 18:15:50.000000000 +0000 @@ -0,0 +1,6 @@ +0001-Fix-Add-support-for-4.6.4-rt8-kernel.patch +0002-Fix-timer-wrapper-support-kernels-4.8.patch +0003-Fix-update-block-instrumentation-to-compile-on-4.8-k.patch +0004-Fix-napi-instrumentation-for-4.8-kernels.patch +0005-Fix-update-mm_vmscan-instrumentation-for-kernel-4.8.patch +0006-Fix-btrfs-instrumentation-for-4.8-kernel.patch diff -Nru lttng-modules-2.7.1/debian/rules lttng-modules-2.8.0/debian/rules --- lttng-modules-2.7.1/debian/rules 2016-01-11 12:54:59.000000000 +0000 +++ lttng-modules-2.8.0/debian/rules 2016-05-25 01:38:38.000000000 +0000 @@ -19,7 +19,7 @@ dh_auto_install override_dh_install: - dh_install -Xdebian/ -XLICENSE -Xgpl-2.0.txt -Xlgpl-2.1.txt + dh_install -Xdebian/ -XLICENSE -Xgpl-2.0.txt -Xlgpl-2.1.txt -X.swp override_dh_auto_clean: exit 0 diff -Nru lttng-modules-2.7.1/debian/upstream/signing-key.asc lttng-modules-2.8.0/debian/upstream/signing-key.asc --- lttng-modules-2.7.1/debian/upstream/signing-key.asc 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/debian/upstream/signing-key.asc 2016-05-25 01:38:38.000000000 +0000 @@ -0,0 +1,37 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1 +Comment: GPGTools - https://gpgtools.org + +mQENBE6pYisBCADA4mfFmRUVnXSKGbfN8dNyT/xLMSsn2/DyA15dN0emwTZBF2Ec +E5nRSSu6mzX2lbBMIliyIjKM3RYOHh7DCLEYTecl+6400yMXQkZG8KQRnuKPqthp +mb7A/EhlV5rDm0q4QKWgPPZnQ6aHWKlQINrJlV1NX1Z+xM7i9cwnazeuHXwsBIlo +7la/AVGSAt57pvhx40uZiaqJ8WwFdWha/AgDLy7yg7wkbYFgDRJ4SmwMA9ARsQJe +0SR5k1IR/S7wkjY0S8xTJ14Fq3G5iZ4okIkSuAoq8oiQiGXKB5FX20vXYBS7ENYn +lQ40YQJL3OyM7HGM+T290Me0pQUKnw3tW7afABEBAAG0Mk1hdGhpZXUgRGVzbm95 +ZXJzIDxtYXRoaWV1LmRlc25veWVyc0BlZmZpY2lvcy5jb20+iQE+BBMBAgAoBQJO +qWIrAhsDBQkJZgGABgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRAXKAqXgRhq +zxmKCACMVhBiFvukRjXpn3JqGDZw7dduHa1UCZZcUBqn6PpbHPumGsmKn2iQu9NR +EzlUgN7ze4aAImH8UzBylJiXf6vyOaTs2fkP8CIDcLj9xBQ9ktNipA4g83TQJT0M +v0O9+hI5QK1STHF/v4yHL8Z/5h547jK4PAXgQTk2GNCQ461zurhl1/4eKQfIkDr2 +8Gp4jo2KG6rybYW52TU4AyDp7fBocD2ltC2xCB9nSYSj2KdIvfZkPKnazt6jkmKv +JdqGjyQWPpr7qic6gLRcWHQYCkdZiy17OrKaUCnF1rommF42Fpxaim6M13l13Roa +ANMCUpsodQOxbPotpeUAHld2ZDFDuQINBE6pYqsBEADeW67Pq0y4VGZCmz8nyQua +3zVyJ2h8LFBUNWU6+cMd1reyoiIlLp4oJBr6XzNk0/ESuzcUZA+xLEqkXRrh8M2n +fWyXH1own4vZsixwIdyGErq4gu1LQT5uNRli04b00BrFSmN/vxEKMyNCxwPKeaEc +xUArAjRn6DKl5tvAH1/SLG21jDwDVpUJ0KpicD6+iKG6Jr5oDw5khAeWZSHBz/up +4QJFhZR9iL5kZ96LznGyxFzHsdAjNsXtC8I2pqeSEOtfJybInQIWQPyfh0CBtAoV +XDYAXNzU21bAeItZQBmEoe2QCy4uiEjvGu678Z+YYz+Cf1gwMdYOeKp8sUueATnG +wvhDHaPKjlRsZDN1jzgiHuwVoyDuaxFSkhlWjbulJbKCcMEpqB9jwdo2G3bYEZoC +PN2yEuDFVb+G7Lstds7IxZ7yK3JbAbRV+WhmhZ3gOkIEJvuTm3Jsag0Egp0RcnDK +qkvCyt9h1VOuDz7CyP/vygrogzswDjpLQy8SGhbeeNsfhZeq9mZ62Iawhu+RqywV +6LZ9vp3hbXD7NH+T1WjAZe0SSAf5OKq5QXE4Pnszl/5i0G2s7s8QeVQrgcutYmT6 +2yxWhF+ckCDLBka29Nlv8VUnDMsSGHbEvLGVXdCwML6h2Iad8VVwZKPzlpFxKtXq +Q0TY/IglHmLWCgfTPqDjOQARAQABiQEfBBgBAgAJBQJOqWKrAhsMAAoJEBcoCpeB +GGrPtGsH/2nDo3YPJR8uVF+o7dr6ca6MwfSwTQsZSM3LYXbK0Bgxk8FsCmeQaqaZ +8rMv4ruq49C1haPriKnev/f3o4wpNCxRs91KYjtWCgOGQxRRNRwC4stemgOcbp4j +0QsJ3tEQ05AhaE+w+536mFdPrJ9EWzUoRfZpSmTj6jiDNvrh6hakNO89tLv97Dpz +g39TWGTCCpaSa6awJ29w63UxXL7RWa0sc52H6zafYyDpouSMbemyt8odWYpDdihW +dECEgbbZ8NBdjxH2Td7Q/dys6fH8Gcwx+S1wafwF+43I6jqNM9rUtXPdztU2P1ht +0S2GksYNb+mX2DxhbP/d6MpEalKqisY= +=c+Nv +-----END PGP PUBLIC KEY BLOCK----- diff -Nru lttng-modules-2.7.1/debian/watch lttng-modules-2.8.0/debian/watch --- lttng-modules-2.7.1/debian/watch 2016-01-11 12:54:59.000000000 +0000 +++ lttng-modules-2.8.0/debian/watch 2016-05-25 01:38:38.000000000 +0000 @@ -1,3 +1,3 @@ version=3 -opts=uversionmangle=s/-(rc\d|pre\d)/~$1/ \ +opts=uversionmangle=s/-(rc\d|pre\d)/~$1/,pgpsigurlmangle=s/$/.asc/ \ http://lttng.org/files/lttng-modules/lttng-modules-(.*)\.tar\.(?:gz|bz2) diff -Nru lttng-modules-2.7.1/.gitignore lttng-modules-2.8.0/.gitignore --- lttng-modules-2.7.1/.gitignore 2015-09-24 20:47:34.000000000 +0000 +++ lttng-modules-2.8.0/.gitignore 2016-05-20 01:34:54.000000000 +0000 @@ -42,7 +42,9 @@ /vmlinuz /System.map /Module.markers -/Module.symvers + +# ignore across tree +Module.symvers # # git files that we don't want to ignore even it they are dot-files diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/arch/x86/exceptions.h lttng-modules-2.8.0/instrumentation/events/lttng-module/arch/x86/exceptions.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/arch/x86/exceptions.h 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/arch/x86/exceptions.h 2016-05-20 01:34:54.000000000 +0000 @@ -0,0 +1,52 @@ +#if !defined(LTTNG_TRACE_EXCEPTIONS_H) || defined(TRACE_HEADER_MULTI_READ) +#define LTTNG_TRACE_EXCEPTIONS_H + +#include +#include + +#undef TRACE_SYSTEM +#define TRACE_SYSTEM x86_exceptions + +LTTNG_TRACEPOINT_EVENT_CLASS(x86_exceptions_class, + + TP_PROTO(unsigned long address, struct pt_regs *regs, + unsigned long error_code), + + TP_ARGS(address, regs, error_code), + + TP_FIELDS( + ctf_integer_hex(unsigned long, address, address) + ctf_integer_hex(unsigned long, ip, regs->ip) + /* + * Note: we cast error_code from unsigned long + * to unsigned char to save space in the trace. + * Currently, only 5 low bits are used. Should be made + * larger if error codes are added to the kernel. + */ + ctf_integer_hex(unsigned char, error_code, error_code) + ) +) + +#define LTTNG_EXCEPTIONS_TRACEPOINT_EVENT_INSTANCE_MAP(name, map) \ +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(x86_exceptions_class, \ + name, \ + map, \ + TP_PROTO(unsigned long address, struct pt_regs *regs, \ + unsigned long error_code), \ + TP_ARGS(address, regs, error_code) \ +) + +LTTNG_EXCEPTIONS_TRACEPOINT_EVENT_INSTANCE_MAP(page_fault_user, + x86_exceptions_page_fault_user) +LTTNG_EXCEPTIONS_TRACEPOINT_EVENT_INSTANCE_MAP(page_fault_kernel, + x86_exceptions_page_fault_kernel) + +#endif /* LTTNG_TRACE_EXCEPTIONS_H */ + +#undef TRACE_INCLUDE_PATH +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module/arch/x86 +#undef TRACE_INCLUDE_FILE +#define TRACE_INCLUDE_FILE exceptions + +/* This part must be outside protection */ +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/arch/x86/irq_vectors.h lttng-modules-2.8.0/instrumentation/events/lttng-module/arch/x86/irq_vectors.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/arch/x86/irq_vectors.h 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/arch/x86/irq_vectors.h 2016-05-20 01:34:54.000000000 +0000 @@ -0,0 +1,115 @@ +#if !defined(LTTNG_TRACE_IRQ_VECTORS_H) || defined(TRACE_HEADER_MULTI_READ) +#define LTTNG_TRACE_IRQ_VECTORS_H + +#include +#include + +#undef TRACE_SYSTEM +#define TRACE_SYSTEM x86_irq_vectors + +LTTNG_TRACEPOINT_EVENT_CLASS(x86_irq_vectors_vector_class, + TP_PROTO(int vector), + TP_ARGS(vector), + + TP_FIELDS( + ctf_integer(int, vector, vector) + ) +) + +#define LTTNG_IRQ_VECTOR_TRACEPOINT_EVENT_INSTANCE_MAP(name, map) \ +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(x86_irq_vectors_vector_class, \ + name##_entry, \ + map##_entry, \ + TP_PROTO(int vector), \ + TP_ARGS(vector) \ +) \ +LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(x86_irq_vectors_vector_class, \ + name##_exit, \ + map##_exit, \ + TP_PROTO(int vector), \ + TP_ARGS(vector) \ +) + +/* + * local_timer - called when entering/exiting a local timer interrupt + * vector handler + */ +LTTNG_IRQ_VECTOR_TRACEPOINT_EVENT_INSTANCE_MAP(local_timer, + x86_irq_vectors_local_timer) + +/* + * reschedule - called when entering/exiting a reschedule vector handler + */ +LTTNG_IRQ_VECTOR_TRACEPOINT_EVENT_INSTANCE_MAP(reschedule, + x86_irq_vectors_reschedule) + +/* + * spurious_apic - called when entering/exiting a spurious apic vector handler + */ +LTTNG_IRQ_VECTOR_TRACEPOINT_EVENT_INSTANCE_MAP(spurious_apic, + x86_irq_vectors_spurious_apic) + +/* + * error_apic - called when entering/exiting an error apic vector handler + */ +LTTNG_IRQ_VECTOR_TRACEPOINT_EVENT_INSTANCE_MAP(error_apic, + x86_irq_vectors_error_apic) + +/* + * x86_platform_ipi - called when entering/exiting a x86 platform ipi interrupt + * vector handler + */ +LTTNG_IRQ_VECTOR_TRACEPOINT_EVENT_INSTANCE_MAP(x86_platform_ipi, + x86_irq_vectors_ipi) + +/* + * irq_work - called when entering/exiting a irq work interrupt + * vector handler + */ +LTTNG_IRQ_VECTOR_TRACEPOINT_EVENT_INSTANCE_MAP(irq_work, + x86_irq_vectors_irq_work) + +/* + * call_function - called when entering/exiting a call function interrupt + * vector handler + */ +LTTNG_IRQ_VECTOR_TRACEPOINT_EVENT_INSTANCE_MAP(call_function, + x86_irq_vectors_call_function) + +/* + * call_function_single - called when entering/exiting a call function + * single interrupt vector handler + */ +LTTNG_IRQ_VECTOR_TRACEPOINT_EVENT_INSTANCE_MAP(call_function_single, + x86_irq_vectors_call_function_single) + +/* + * threshold_apic - called when entering/exiting a threshold apic interrupt + * vector handler + */ +LTTNG_IRQ_VECTOR_TRACEPOINT_EVENT_INSTANCE_MAP(threshold_apic, + x86_irq_vectors_threshold_apic) + +/* + * deferred_error_apic - called when entering/exiting a deferred apic interrupt + * vector handler + */ +LTTNG_IRQ_VECTOR_TRACEPOINT_EVENT_INSTANCE_MAP(deferred_error_apic, + x86_irq_vectors_deferred_error_apic) + +/* + * thermal_apic - called when entering/exiting a thermal apic interrupt + * vector handler + */ +LTTNG_IRQ_VECTOR_TRACEPOINT_EVENT_INSTANCE_MAP(thermal_apic, + x86_irq_vectors_thermal_apic) + +#endif /* LTTNG_TRACE_IRQ_VECTORS_H */ + +#undef TRACE_INCLUDE_PATH +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module/arch/x86 +#undef TRACE_INCLUDE_FILE +#define TRACE_INCLUDE_FILE irq_vectors + +/* This part must be outside protection */ +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h lttng-modules-2.8.0/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h 2016-05-20 01:34:54.000000000 +0000 @@ -1,7 +1,7 @@ #if !defined(LTTNG_TRACE_KVM_MMU_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_KVM_MMU_H -#include "../../../../../../probes/lttng-tracepoint-event.h" +#include #include #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)) @@ -32,6 +32,7 @@ #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) */ +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) /* * A pagetable walk has started */ @@ -45,7 +46,23 @@ ctf_integer(__u32, pferr, pferr) ) ) +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) */ +/* + * A pagetable walk has started + */ +LTTNG_TRACEPOINT_EVENT( + kvm_mmu_pagetable_walk, + TP_PROTO(u64 addr, int write_fault, int user_fault, int fetch_fault), + TP_ARGS(addr, write_fault, user_fault, fetch_fault), + TP_FIELDS( + ctf_integer(__u64, addr, addr) + ctf_integer(__u32, pferr, + (!!write_fault << 1) | (!!user_fault << 2) + | (!!fetch_fault << 4)) + ) +) +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) */ /* We just walked a paging element */ LTTNG_TRACEPOINT_EVENT( @@ -147,7 +164,7 @@ TP_ARGS(sptep, gfn, access, gen), TP_FIELDS( - ctf_integer(void *, sptep, sptep) + ctf_integer_hex(void *, sptep, sptep) ctf_integer(gfn_t, gfn, gfn) ctf_integer(unsigned, access, access) ctf_integer(unsigned int, gen, gen) @@ -165,7 +182,7 @@ TP_ARGS(sptep, gfn, access), TP_FIELDS( - ctf_integer(void *, sptep, sptep) + ctf_integer_hex(void *, sptep, sptep) ctf_integer(gfn_t, gfn, gfn) ctf_integer(unsigned, access, access) ) @@ -201,7 +218,7 @@ ctf_integer(int, vcpu_id, vcpu->vcpu_id) ctf_integer(gva_t, gva, gva) ctf_integer(u32, error_code, error_code) - ctf_integer(u64 *, sptep, sptep) + ctf_integer_hex(u64 *, sptep, sptep) ctf_integer(u64, old_spte, old_spte) ctf_integer(u64, new_spte, *sptep) ctf_integer(bool, retry, retry) @@ -210,9 +227,9 @@ #endif /* LTTNG_TRACE_KVM_MMU_H */ #undef TRACE_INCLUDE_PATH -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module/arch/x86/kvm +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module/arch/x86/kvm #undef TRACE_INCLUDE_FILE #define TRACE_INCLUDE_FILE mmutrace /* This part must be outside protection */ -#include "../../../../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/arch/x86/kvm/trace.h lttng-modules-2.8.0/instrumentation/events/lttng-module/arch/x86/kvm/trace.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/arch/x86/kvm/trace.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/arch/x86/kvm/trace.h 2016-05-20 01:34:54.000000000 +0000 @@ -1,7 +1,7 @@ #if !defined(LTTNG_TRACE_KVM_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_KVM_H -#include "../../../../../../probes/lttng-tracepoint-event.h" +#include #include #include #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) @@ -12,12 +12,12 @@ #include <../arch/x86/kvm/kvm_cache_regs.h> #undef TRACE_SYSTEM -#define TRACE_SYSTEM kvm +#define TRACE_SYSTEM kvm_x86 /* * Tracepoint for guest mode entry. */ -LTTNG_TRACEPOINT_EVENT(kvm_entry, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_entry, kvm_x86_entry, TP_PROTO(unsigned int vcpu_id), TP_ARGS(vcpu_id), @@ -29,7 +29,7 @@ /* * Tracepoint for hypercall. */ -LTTNG_TRACEPOINT_EVENT(kvm_hypercall, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_hypercall, kvm_x86_hypercall, TP_PROTO(unsigned long nr, unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3), TP_ARGS(nr, a0, a1, a2, a3), @@ -46,7 +46,7 @@ /* * Tracepoint for hypercall. */ -LTTNG_TRACEPOINT_EVENT(kvm_hv_hypercall, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_hv_hypercall, kvm_x86_hv_hypercall, TP_PROTO(__u16 code, bool fast, __u16 rep_cnt, __u16 rep_idx, __u64 ingpa, __u64 outgpa), TP_ARGS(code, fast, rep_cnt, rep_idx, ingpa, outgpa), @@ -64,7 +64,7 @@ /* * Tracepoint for PIO. */ -LTTNG_TRACEPOINT_EVENT(kvm_pio, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_pio, kvm_x86_pio, TP_PROTO(unsigned int rw, unsigned int port, unsigned int size, unsigned int count), TP_ARGS(rw, port, size, count), @@ -80,7 +80,7 @@ /* * Tracepoint for cpuid. */ -LTTNG_TRACEPOINT_EVENT(kvm_cpuid, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_cpuid, kvm_x86_cpuid, TP_PROTO(unsigned int function, unsigned long rax, unsigned long rbx, unsigned long rcx, unsigned long rdx), TP_ARGS(function, rax, rbx, rcx, rdx), @@ -97,7 +97,7 @@ /* * Tracepoint for apic access. */ -LTTNG_TRACEPOINT_EVENT(kvm_apic, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_apic, kvm_x86_apic, TP_PROTO(unsigned int rw, unsigned int reg, unsigned int val), TP_ARGS(rw, reg, val), @@ -114,7 +114,7 @@ /* * Tracepoint for kvm guest exit: */ -LTTNG_TRACEPOINT_EVENT_CODE(kvm_exit, +LTTNG_TRACEPOINT_EVENT_CODE_MAP(kvm_exit, kvm_x86_exit, TP_PROTO(unsigned int exit_reason, struct kvm_vcpu *vcpu, u32 isa), TP_ARGS(exit_reason, vcpu, isa), @@ -122,7 +122,7 @@ u64 info1, info2; ), - TP_code( + TP_code_pre( kvm_x86_ops->get_exit_info(vcpu, &tp_locvar->info1, &tp_locvar->info2); ), @@ -133,13 +133,15 @@ ctf_integer(u32, isa, isa) ctf_integer(u64, info1, tp_locvar->info1) ctf_integer(u64, info2, tp_locvar->info2) - ) + ), + + TP_code_post() ) /* * Tracepoint for kvm interrupt injection: */ -LTTNG_TRACEPOINT_EVENT(kvm_inj_virq, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_inj_virq, kvm_x86_inj_virq, TP_PROTO(unsigned int irq), TP_ARGS(irq), @@ -151,7 +153,7 @@ /* * Tracepoint for kvm interrupt injection: */ -LTTNG_TRACEPOINT_EVENT(kvm_inj_exception, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_inj_exception, kvm_x86_inj_exception, TP_PROTO(unsigned exception, bool has_error, unsigned error_code), TP_ARGS(exception, has_error, error_code), @@ -165,7 +167,7 @@ /* * Tracepoint for page fault. */ -LTTNG_TRACEPOINT_EVENT(kvm_page_fault, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_page_fault, kvm_x86_page_fault, TP_PROTO(unsigned long fault_address, unsigned int error_code), TP_ARGS(fault_address, error_code), @@ -178,7 +180,7 @@ /* * Tracepoint for guest MSR access. */ -LTTNG_TRACEPOINT_EVENT(kvm_msr, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_msr, kvm_x86_msr, TP_PROTO(unsigned write, u32 ecx, u64 data, bool exception), TP_ARGS(write, ecx, data, exception), @@ -198,7 +200,7 @@ /* * Tracepoint for guest CR access. */ -LTTNG_TRACEPOINT_EVENT(kvm_cr, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_cr, kvm_x86_cr, TP_PROTO(unsigned int rw, unsigned int cr, unsigned long val), TP_ARGS(rw, cr, val), @@ -212,7 +214,7 @@ #define trace_kvm_cr_read(cr, val) trace_kvm_cr(0, cr, val) #define trace_kvm_cr_write(cr, val) trace_kvm_cr(1, cr, val) -LTTNG_TRACEPOINT_EVENT(kvm_pic_set_irq, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_pic_set_irq, kvm_x86_pic_set_irq, TP_PROTO(__u8 chip, __u8 pin, __u8 elcr, __u8 imr, bool coalesced), TP_ARGS(chip, pin, elcr, imr, coalesced), @@ -225,7 +227,7 @@ ) ) -LTTNG_TRACEPOINT_EVENT(kvm_apic_ipi, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_apic_ipi, kvm_x86_apic_ipi, TP_PROTO(__u32 icr_low, __u32 dest_id), TP_ARGS(icr_low, dest_id), @@ -235,7 +237,7 @@ ) ) -LTTNG_TRACEPOINT_EVENT(kvm_apic_accept_irq, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_apic_accept_irq, kvm_x86_apic_accept_irq, TP_PROTO(__u32 apicid, __u16 dm, __u8 tm, __u8 vec, bool coalesced), TP_ARGS(apicid, dm, tm, vec, coalesced), @@ -248,7 +250,7 @@ ) ) -LTTNG_TRACEPOINT_EVENT(kvm_eoi, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_eoi, kvm_x86_eoi, TP_PROTO(struct kvm_lapic *apic, int vector), TP_ARGS(apic, vector), @@ -258,7 +260,7 @@ ) ) -LTTNG_TRACEPOINT_EVENT(kvm_pv_eoi, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_pv_eoi, kvm_x86_pv_eoi, TP_PROTO(struct kvm_lapic *apic, int vector), TP_ARGS(apic, vector), @@ -271,7 +273,7 @@ /* * Tracepoint for nested VMRUN */ -LTTNG_TRACEPOINT_EVENT(kvm_nested_vmrun, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_nested_vmrun, kvm_x86_nested_vmrun, TP_PROTO(__u64 rip, __u64 vmcb, __u64 nested_rip, __u32 int_ctl, __u32 event_inj, bool npt), TP_ARGS(rip, vmcb, nested_rip, int_ctl, event_inj, npt), @@ -286,7 +288,7 @@ ) ) -LTTNG_TRACEPOINT_EVENT(kvm_nested_intercepts, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_nested_intercepts, kvm_x86_nested_intercepts, TP_PROTO(__u16 cr_read, __u16 cr_write, __u32 exceptions, __u64 intercept), TP_ARGS(cr_read, cr_write, exceptions, intercept), @@ -300,7 +302,7 @@ /* * Tracepoint for #VMEXIT while nested */ -LTTNG_TRACEPOINT_EVENT(kvm_nested_vmexit, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_nested_vmexit, kvm_x86_nested_vmexit, TP_PROTO(__u64 rip, __u32 exit_code, __u64 exit_info1, __u64 exit_info2, __u32 exit_int_info, __u32 exit_int_info_err, __u32 isa), @@ -321,7 +323,7 @@ /* * Tracepoint for #VMEXIT reinjected to the guest */ -LTTNG_TRACEPOINT_EVENT(kvm_nested_vmexit_inject, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_nested_vmexit_inject, kvm_x86_nested_vmexit_inject, TP_PROTO(__u32 exit_code, __u64 exit_info1, __u64 exit_info2, __u32 exit_int_info, __u32 exit_int_info_err, __u32 isa), @@ -341,7 +343,7 @@ /* * Tracepoint for nested #vmexit because of interrupt pending */ -LTTNG_TRACEPOINT_EVENT(kvm_nested_intr_vmexit, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_nested_intr_vmexit, kvm_x86_nested_intr_vmexit, TP_PROTO(__u64 rip), TP_ARGS(rip), @@ -353,7 +355,7 @@ /* * Tracepoint for nested #vmexit because of interrupt pending */ -LTTNG_TRACEPOINT_EVENT(kvm_invlpga, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_invlpga, kvm_x86_invlpga, TP_PROTO(__u64 rip, int asid, u64 address), TP_ARGS(rip, asid, address), @@ -367,7 +369,7 @@ /* * Tracepoint for nested #vmexit because of interrupt pending */ -LTTNG_TRACEPOINT_EVENT(kvm_skinit, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_skinit, kvm_x86_skinit, TP_PROTO(__u64 rip, __u32 slb), TP_ARGS(rip, slb), @@ -416,7 +418,7 @@ flags; \ }) -LTTNG_TRACEPOINT_EVENT(kvm_emulate_insn, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_emulate_insn, kvm_x86_emulate_insn, TP_PROTO(struct kvm_vcpu *vcpu, __u8 failed), TP_ARGS(vcpu, failed), @@ -450,8 +452,8 @@ #define trace_kvm_emulate_insn_start(vcpu) trace_kvm_emulate_insn(vcpu, 0) #define trace_kvm_emulate_insn_failed(vcpu) trace_kvm_emulate_insn(vcpu, 1) -LTTNG_TRACEPOINT_EVENT( - vcpu_match_mmio, +LTTNG_TRACEPOINT_EVENT_MAP( + vcpu_match_mmio, kvm_x86_vcpu_match_mmio, TP_PROTO(gva_t gva, gpa_t gpa, bool write, bool gpa_match), TP_ARGS(gva, gpa, write, gpa_match), @@ -464,7 +466,7 @@ ) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) -LTTNG_TRACEPOINT_EVENT(kvm_write_tsc_offset, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_write_tsc_offset, kvm_x86_write_tsc_offset, TP_PROTO(unsigned int vcpu_id, __u64 previous_tsc_offset, __u64 next_tsc_offset), TP_ARGS(vcpu_id, previous_tsc_offset, next_tsc_offset), @@ -480,7 +482,7 @@ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) #ifdef CONFIG_X86_64 -LTTNG_TRACEPOINT_EVENT(kvm_update_master_clock, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_update_master_clock, kvm_x86_update_master_clock, TP_PROTO(bool use_master_clock, unsigned int host_clock, bool offset_matched), TP_ARGS(use_master_clock, host_clock, offset_matched), @@ -491,7 +493,7 @@ ) ) -LTTNG_TRACEPOINT_EVENT(kvm_track_tsc, +LTTNG_TRACEPOINT_EVENT_MAP(kvm_track_tsc, kvm_x86_track_tsc, TP_PROTO(unsigned int vcpu_id, unsigned int nr_matched, unsigned int online_vcpus, bool use_master_clock, unsigned int host_clock), @@ -513,9 +515,9 @@ #endif /* LTTNG_TRACE_KVM_H */ #undef TRACE_INCLUDE_PATH -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module/arch/x86/kvm +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module/arch/x86/kvm #undef TRACE_INCLUDE_FILE #define TRACE_INCLUDE_FILE trace /* This part must be outside protection */ -#include "../../../../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/asoc.h lttng-modules-2.8.0/instrumentation/events/lttng-module/asoc.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/asoc.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/asoc.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_ASOC_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_ASOC_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include @@ -345,4 +345,4 @@ #endif /* LTTNG_TRACE_ASOC_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/block.h lttng-modules-2.8.0/instrumentation/events/lttng-module/block.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/block.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/block.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_BLOCK_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_BLOCK_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include #include @@ -135,7 +135,7 @@ size_t cmd_len; ), - TP_code( + TP_code_pre( if (rq->cmd_type == REQ_TYPE_BLOCK_PC) { tp_locvar->sector = 0; tp_locvar->nr_sector = 0; @@ -159,7 +159,9 @@ rq->cmd_flags, blk_rq_bytes(rq)) ctf_sequence_hex(unsigned char, cmd, tp_locvar->cmd, size_t, tp_locvar->cmd_len) - ) + ), + + TP_code_post() ) /** @@ -200,8 +202,8 @@ || 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) \ - || LTTNG_RHEL_KERNEL_RANGE(3,10,0,7,1, 3,11,0,0,0)) + || LTTNG_UBUNTU_KERNEL_RANGE(3,13,11,28, 3,14,0,0) \ + || LTTNG_RHEL_KERNEL_RANGE(3,10,0,229,0,0, 3,11,0,0,0,0)) /** * block_rq_complete - block IO operation completed by device driver @@ -227,7 +229,7 @@ size_t cmd_len; ), - TP_code( + TP_code_pre( if (rq->cmd_type == REQ_TYPE_BLOCK_PC) { tp_locvar->cmd = rq->cmd; tp_locvar->cmd_len = rq->cmd_len; @@ -247,7 +249,9 @@ rq->cmd_flags, nr_bytes) ctf_sequence_hex(unsigned char, cmd, tp_locvar->cmd, size_t, tp_locvar->cmd_len) - ) + ), + + TP_code_post() ) #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */ @@ -286,7 +290,7 @@ size_t cmd_len; ), - TP_code( + TP_code_pre( if (rq->cmd_type == REQ_TYPE_BLOCK_PC) { tp_locvar->sector = 0; tp_locvar->nr_sector = 0; @@ -314,7 +318,9 @@ ctf_sequence_hex(unsigned char, cmd, tp_locvar->cmd, size_t, tp_locvar->cmd_len) ctf_array_text(char, comm, current->comm, TASK_COMM_LEN) - ) + ), + + TP_code_post() ) /** @@ -833,5 +839,4 @@ #endif /* LTTNG_TRACE_BLOCK_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" - +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/btrfs.h lttng-modules-2.8.0/instrumentation/events/lttng-module/btrfs.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/btrfs.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/btrfs.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,9 +4,8 @@ #if !defined(LTTNG_TRACE_BTRFS_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_BTRFS_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include -#include #include #ifndef _TRACE_BTRFS_DEF_ @@ -499,7 +498,7 @@ TP_ARGS(state, mask, IP), TP_FIELDS( - ctf_integer(struct extent_state *, state, state) + ctf_integer_hex(struct extent_state *, state, state) ctf_integer(gfp_t, mask, mask) ctf_integer(unsigned long, ip, IP) ) @@ -514,7 +513,7 @@ TP_ARGS(state, IP), TP_FIELDS( - ctf_integer(struct extent_state *, state, state) + ctf_integer_hex(struct extent_state *, state, state) ctf_integer(unsigned long, ip, IP) ) ) @@ -523,4 +522,4 @@ #endif /* LTTNG_TRACE_BTRFS_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/compaction.h lttng-modules-2.8.0/instrumentation/events/lttng-module/compaction.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/compaction.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/compaction.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,10 +4,9 @@ #if !defined(LTTNG_TRACE_COMPACTION_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_COMPACTION_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include -#include #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0) @@ -114,7 +113,7 @@ unsigned long nr_failed; ), - TP_code( + TP_code_pre( tp_locvar->nr_failed = 0; { @@ -131,7 +130,9 @@ TP_FIELDS( ctf_integer(unsigned long, nr_migrated, nr_all - tp_locvar->nr_failed) ctf_integer(unsigned long, nr_failed, tp_locvar->nr_failed) - ) + ), + + TP_code_post() ) #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */ LTTNG_TRACEPOINT_EVENT_MAP(mm_compaction_migratepages, @@ -153,4 +154,4 @@ #endif /* LTTNG_TRACE_COMPACTION_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/ext3.h lttng-modules-2.8.0/instrumentation/events/lttng-module/ext3.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/ext3.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/ext3.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_EXT3_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_EXT3_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include LTTNG_TRACEPOINT_EVENT(ext3_free_inode, @@ -518,4 +518,4 @@ #endif /* LTTNG_TRACE_EXT3_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/ext4.h lttng-modules-2.8.0/instrumentation/events/lttng-module/ext4.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/ext4.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/ext4.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_EXT4_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include @@ -1842,4 +1842,4 @@ #endif /* LTTNG_TRACE_EXT4_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/gpio.h lttng-modules-2.8.0/instrumentation/events/lttng-module/gpio.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/gpio.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/gpio.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_GPIO_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_GPIO_H -#include "../../../probes/lttng-tracepoint-event.h" +#include LTTNG_TRACEPOINT_EVENT(gpio_direction, @@ -35,4 +35,4 @@ #endif /* if !defined(LTTNG_TRACE_GPIO_H) || defined(TRACE_HEADER_MULTI_READ) */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/irq.h lttng-modules-2.8.0/instrumentation/events/lttng-module/irq.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/irq.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/irq.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_IRQ_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #ifndef _TRACE_IRQ_DEF_ #define _TRACE_IRQ_DEF_ @@ -186,4 +186,4 @@ #endif /* LTTNG_TRACE_IRQ_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/jbd2.h lttng-modules-2.8.0/instrumentation/events/lttng-module/jbd2.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/jbd2.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/jbd2.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_JBD2_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_JBD2_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include @@ -179,4 +179,4 @@ #endif /* LTTNG_TRACE_JBD2_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/jbd.h lttng-modules-2.8.0/instrumentation/events/lttng-module/jbd.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/jbd.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/jbd.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_JBD_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_JBD_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include @@ -153,4 +153,4 @@ #endif /* LTTNG_TRACE_JBD_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/kmem.h lttng-modules-2.8.0/instrumentation/events/lttng-module/kmem.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/kmem.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/kmem.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,12 +4,9 @@ #if !defined(LTTNG_TRACE_KMEM_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_KMEM_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) -#include -#endif LTTNG_TRACEPOINT_EVENT_CLASS(kmem_alloc, @@ -130,6 +127,7 @@ TP_FIELDS( ctf_integer_hex(struct page *, page, page) + ctf_integer(unsigned long, pfn, page_to_pfn(page)) ctf_integer(unsigned int, order, order) ) ) @@ -146,6 +144,7 @@ TP_FIELDS( ctf_integer_hex(struct page *, page, page) + ctf_integer(unsigned long, pfn, page_to_pfn(page)) ctf_integer(int, cold, cold) ) ) @@ -159,6 +158,8 @@ TP_FIELDS( ctf_integer_hex(struct page *, page, page) + ctf_integer(unsigned long, pfn, + page ? page_to_pfn(page) : -1UL) ctf_integer(unsigned int, order, order) ctf_integer(gfp_t, gfp_flags, gfp_flags) ctf_integer(int, migratetype, migratetype) @@ -173,6 +174,8 @@ TP_FIELDS( ctf_integer_hex(struct page *, page, page) + ctf_integer(unsigned long, pfn, + page ? page_to_pfn(page) : -1UL) ctf_integer(unsigned int, order, order) ctf_integer(int, migratetype, migratetype) ) @@ -202,10 +205,11 @@ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,2) \ || LTTNG_KERNEL_RANGE(3,14,36, 3,15,0) \ + || LTTNG_KERNEL_RANGE(3,16,35, 3,17,0) \ || LTTNG_KERNEL_RANGE(3,18,10, 3,19,0) \ || LTTNG_DEBIAN_KERNEL_RANGE(3,16,7,9,0,0, 3,17,0,0,0,0) \ || LTTNG_UBUNTU_KERNEL_RANGE(3,13,11,50, 3,14,0,0) \ - || LTTNG_UBUNTU_KERNEL_RANGE(3,16,7,38, 3,17,0,0)) + || LTTNG_UBUNTU_KERNEL_RANGE(3,16,7,34, 3,17,0,0)) LTTNG_TRACEPOINT_EVENT_MAP(mm_page_alloc_extfrag, @@ -221,6 +225,7 @@ TP_FIELDS( ctf_integer_hex(struct page *, page, page) + ctf_integer(unsigned long, pfn, page_to_pfn(page)) ctf_integer(int, alloc_order, alloc_order) ctf_integer(int, fallback_order, fallback_order) ctf_integer(int, alloc_migratetype, alloc_migratetype) @@ -246,6 +251,7 @@ TP_FIELDS( ctf_integer_hex(struct page *, page, page) + ctf_integer(unsigned long, pfn, page_to_pfn(page)) ctf_integer(int, alloc_order, alloc_order) ctf_integer(int, fallback_order, fallback_order) ctf_integer(int, alloc_migratetype, alloc_migratetype) @@ -272,6 +278,7 @@ TP_FIELDS( ctf_integer_hex(struct page *, page, page) + ctf_integer(unsigned long, pfn, page_to_pfn(page)) ctf_integer(int, alloc_order, alloc_order) ctf_integer(int, fallback_order, fallback_order) ctf_integer(int, alloc_migratetype, alloc_migratetype) @@ -296,6 +303,7 @@ TP_FIELDS( ctf_integer_hex(struct page *, page, page) + ctf_integer(unsigned long, pfn, page_to_pfn(page)) ctf_integer(int, alloc_order, alloc_order) ctf_integer(int, fallback_order, fallback_order) ctf_integer(int, alloc_migratetype, alloc_migratetype) @@ -310,4 +318,4 @@ #endif /* LTTNG_TRACE_KMEM_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/kvm.h lttng-modules-2.8.0/instrumentation/events/lttng-module/kvm.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/kvm.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/kvm.h 2016-05-20 01:34:54.000000000 +0000 @@ -1,7 +1,7 @@ #if !defined(LTTNG_TRACE_KVM_MAIN_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_KVM_MAIN_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #undef TRACE_SYSTEM @@ -111,7 +111,8 @@ ) ) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0) \ + || LTTNG_RHEL_KERNEL_RANGE(3,10,0,327,0,0, 3,11,0,0,0,0)) LTTNG_TRACEPOINT_EVENT(kvm_age_page, TP_PROTO(ulong gfn, int level, struct kvm_memory_slot *slot, int ref), @@ -198,7 +199,7 @@ ) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0) \ - || LTTNG_RHEL_KERNEL_RANGE(3,10,0,7,1, 3,11,0,0,0)) + || LTTNG_RHEL_KERNEL_RANGE(3,10,0,229,0,0, 3,11,0,0,0,0)) LTTNG_TRACEPOINT_EVENT( kvm_async_pf_completed, @@ -234,4 +235,4 @@ #endif /* LTTNG_TRACE_KVM_MAIN_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/lock.h lttng-modules-2.8.0/instrumentation/events/lttng-module/lock.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/lock.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/lock.h 2016-05-20 01:34:54.000000000 +0000 @@ -15,7 +15,7 @@ #define LTTNG_TRACE_LOCK_H #include -#include "../../../probes/lttng-tracepoint-event.h" +#include #ifdef CONFIG_LOCKDEP @@ -31,7 +31,7 @@ ctf_integer(unsigned int, flags, (trylock ? 1 : 0) | (read ? 2 : 0)) ctf_string(name, lock->name) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) - ctf_integer(void *, lockdep_addr, lock) + ctf_integer_hex(void *, lockdep_addr, lock) #endif ) ) @@ -46,7 +46,7 @@ TP_FIELDS( ctf_string(name, lock->name) - ctf_integer(void *, lockdep_addr, lock) + ctf_integer_hex(void *, lockdep_addr, lock) ) ) @@ -86,7 +86,7 @@ TP_FIELDS( ctf_string(name, lock->name) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) - ctf_integer(void *, lockdep_addr, lock) + ctf_integer_hex(void *, lockdep_addr, lock) #endif ) ) @@ -102,7 +102,7 @@ TP_FIELDS( ctf_string(name, lock->name) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) - ctf_integer(void *, lockdep_addr, lock) + ctf_integer_hex(void *, lockdep_addr, lock) #endif ) ) @@ -117,7 +117,7 @@ ctf_string(name, lock->name) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) ctf_integer(s64, wait_nsec, wait_nsec) - ctf_integer(void *, lockdep_addr, lock) + ctf_integer_hex(void *, lockdep_addr, lock) #else ctf_integer(unsigned long, wait_usec, (unsigned long) waittime) ctf_integer(unsigned long, wait_nsec_rem, do_div(waittime, NSEC_PER_USEC)) @@ -134,4 +134,4 @@ #endif /* LTTNG_TRACE_LOCK_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/lttng.h lttng-modules-2.8.0/instrumentation/events/lttng-module/lttng.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/lttng.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/lttng.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_LTTNG_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_LTTNG_H -#include "../../../probes/lttng-tracepoint-event.h" +#include LTTNG_TRACEPOINT_EVENT(lttng_logger, TP_PROTO(const char __user *text, size_t len), @@ -17,4 +17,4 @@ #endif /* LTTNG_TRACE_LTTNG_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/lttng-statedump.h lttng-modules-2.8.0/instrumentation/events/lttng-module/lttng-statedump.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/lttng-statedump.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/lttng-statedump.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_LTTNG_STATEDUMP_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_LTTNG_STATEDUMP_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include #include @@ -140,4 +140,4 @@ #endif /* LTTNG_TRACE_LTTNG_STATEDUMP_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/lttng-test.h lttng-modules-2.8.0/instrumentation/events/lttng-module/lttng-test.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/lttng-test.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/lttng-test.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_LTTNG_TEST_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_LTTNG_TEST_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include @@ -25,10 +25,12 @@ ctf_sequence_text(char, seqfield2, text, size_t, textlen) ctf_string(stringfield, text) ctf_string(stringfield2, etext) + ctf_sequence_bitfield(long, bitfield_seq, values, uint8_t, 3) + ctf_array_bitfield(long, bitfield_array, values, 3) ) ) #endif /* LTTNG_TRACE_LTTNG_TEST_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/mm_vmscan.h lttng-modules-2.8.0/instrumentation/events/lttng-module/mm_vmscan.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/mm_vmscan.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/mm_vmscan.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,11 +4,10 @@ #if !defined(LTTNG_TRACE_MM_VMSCAN_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_MM_VMSCAN_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include #include -#include #include #ifndef _TRACE_VMSCAN_DEF @@ -26,6 +25,23 @@ #endif +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0)) + +#include + +#define trace_reclaim_flags(page) ( \ + (page_is_file_cache(page) ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \ + (RECLAIM_WB_ASYNC) \ + ) + +#define trace_shrink_flags(file) \ + ( \ + (file ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \ + (RECLAIM_WB_ASYNC) \ + ) + +#endif + LTTNG_TRACEPOINT_EVENT(mm_vmscan_kswapd_sleep, TP_PROTO(int nid), @@ -142,11 +158,11 @@ cache_items, delta, total_scan), TP_FIELDS( - ctf_integer(struct shrinker *, shr, shr) + ctf_integer_hex(struct shrinker *, shr, shr) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) - ctf_integer(void *, shrink, shr->scan_objects) + ctf_integer_hex(void *, shrink, shr->scan_objects) #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ - ctf_integer(void *, shrink, shr->shrink) + ctf_integer_hex(void *, shrink, shr->shrink) #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ ctf_integer(long, nr_objects_to_shrink, nr_objects_to_shrink) ctf_integer(gfp_t, gfp_flags, sc->gfp_mask) @@ -170,9 +186,9 @@ total_scan), TP_FIELDS( - ctf_integer(struct shrinker *, shr, shr) + ctf_integer_hex(struct shrinker *, shr, shr) ctf_integer(int, nid, nid) - ctf_integer(void *, shrink, shr->scan_objects) + ctf_integer_hex(void *, shrink, shr->scan_objects) ctf_integer(long, unused_scan, unused_scan_cnt) ctf_integer(long, new_scan, new_scan_cnt) ctf_integer(int, retval, shrinker_retval) @@ -190,11 +206,11 @@ TP_ARGS(shr, shrinker_retval, unused_scan_cnt, new_scan_cnt), TP_FIELDS( - ctf_integer(struct shrinker *, shr, shr) + ctf_integer_hex(struct shrinker *, shr, shr) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) - ctf_integer(void *, shrink, shr->scan_objects) + ctf_integer_hex(void *, shrink, shr->scan_objects) #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ - ctf_integer(void *, shrink, shr->shrink) + ctf_integer_hex(void *, shrink, shr->shrink) #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */ ctf_integer(long, unused_scan, unused_scan_cnt) ctf_integer(long, new_scan, new_scan_cnt) @@ -316,6 +332,19 @@ ) ) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0)) +LTTNG_TRACEPOINT_EVENT(mm_vmscan_writepage, + + TP_PROTO(struct page *page), + + TP_ARGS(page), + + TP_FIELDS( + ctf_integer_hex(struct page *, page, page) + ctf_integer(int, reclaim_flags, trace_reclaim_flags(page)) + ) +) +#else LTTNG_TRACEPOINT_EVENT(mm_vmscan_writepage, TP_PROTO(struct page *page, @@ -324,12 +353,31 @@ TP_ARGS(page, reclaim_flags), TP_FIELDS( - ctf_integer(struct page *, page, page) + ctf_integer_hex(struct page *, page, page) ctf_integer(int, reclaim_flags, reclaim_flags) ) ) +#endif + +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0)) +LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive, + + TP_PROTO(struct zone *zone, + unsigned long nr_scanned, unsigned long nr_reclaimed, + int priority, int file), + + TP_ARGS(zone, nr_scanned, nr_reclaimed, priority, file), -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + TP_FIELDS( + ctf_integer(int, nid, zone_to_nid(zone)) + ctf_integer(int, zid, zone_idx(zone)) + ctf_integer(unsigned long, nr_scanned, nr_scanned) + ctf_integer(unsigned long, nr_reclaimed, nr_reclaimed) + ctf_integer(int, priority, priority) + ctf_integer(int, reclaim_flags, trace_shrink_flags(file)) + ) +) +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive, TP_PROTO(int nid, int zid, @@ -360,9 +408,9 @@ TP_ARGS(old_mm, new_mm), TP_FIELDS( - ctf_integer(struct mm_struct *, old_mm, old_mm) + ctf_integer_hex(struct mm_struct *, old_mm, old_mm) ctf_integer(unsigned int, old_prio, old_mm ? old_mm->token_priority : 0) - ctf_integer(struct mm_struct *, new_mm, new_mm) + ctf_integer_hex(struct mm_struct *, new_mm, new_mm) ctf_integer(unsigned int, new_prio, new_mm->token_priority) ) ) @@ -373,7 +421,7 @@ TP_ARGS(swap_token_mm), TP_FIELDS( - ctf_integer(struct mm_struct*, swap_token_mm, swap_token_mm) + ctf_integer_hex(struct mm_struct*, swap_token_mm, swap_token_mm) ) ) @@ -404,10 +452,10 @@ TP_ARGS(mm, old_prio, swap_token_mm), TP_FIELDS( - ctf_integer(struct mm_struct*, mm, mm) + ctf_integer_hex(struct mm_struct *, mm, mm) ctf_integer(unsigned int, old_prio, old_prio) ctf_integer(unsigned int, new_prio, mm->token_priority) - ctf_integer(struct mm_struct*, swap_token_mm, swap_token_mm) + ctf_integer_hex(struct mm_struct *, swap_token_mm, swap_token_mm) ctf_integer(unsigned int, swap_token_prio, swap_token_mm ? swap_token_mm->token_priority : 0) ) ) @@ -416,4 +464,4 @@ #endif /* LTTNG_TRACE_MM_VMSCAN_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/module.h lttng-modules-2.8.0/instrumentation/events/lttng-module/module.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/module.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/module.h 2016-05-20 01:34:54.000000000 +0000 @@ -14,7 +14,7 @@ #if !defined(LTTNG_TRACE_MODULE_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_MODULE_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #ifdef CONFIG_MODULES @@ -121,4 +121,4 @@ #endif /* LTTNG_TRACE_MODULE_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/napi.h lttng-modules-2.8.0/instrumentation/events/lttng-module/napi.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/napi.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/napi.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_NAPI_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_NAPI_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include @@ -17,7 +17,7 @@ TP_ARGS(napi), TP_FIELDS( - ctf_integer(struct napi_struct *, napi, napi) + ctf_integer_hex(struct napi_struct *, napi, napi) ctf_string(dev_name, napi->dev ? napi->dev->name : NO_DEV) ) ) @@ -27,4 +27,4 @@ #endif /* LTTNG_TRACE_NAPI_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/net.h lttng-modules-2.8.0/instrumentation/events/lttng-module/net.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/net.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/net.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_NET_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_NET_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include #include @@ -27,7 +27,7 @@ #endif TP_FIELDS( - ctf_integer(void *, skbaddr, skb) + ctf_integer_hex(void *, skbaddr, skb) ctf_integer(int, rc, rc) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40)) ctf_integer(unsigned int, len, skb_len) @@ -46,7 +46,7 @@ TP_ARGS(skb), TP_FIELDS( - ctf_integer(void *, skbaddr, skb) + ctf_integer_hex(void *, skbaddr, skb) ctf_integer(unsigned int, len, skb->len) ctf_string(name, skb->dev->name) ) @@ -83,4 +83,4 @@ #endif /* LTTNG_TRACE_NET_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/power.h lttng-modules-2.8.0/instrumentation/events/lttng-module/power.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/power.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/power.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_POWER_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_POWER_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include @@ -278,4 +278,4 @@ #endif /* LTTNG_TRACE_POWER_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/printk.h lttng-modules-2.8.0/instrumentation/events/lttng-module/printk.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/printk.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/printk.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_PRINTK_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_PRINTK_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)) @@ -72,4 +72,4 @@ #endif /* LTTNG_TRACE_PRINTK_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/random.h lttng-modules-2.8.0/instrumentation/events/lttng-module/random.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/random.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/random.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_RANDOM_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_RANDOM_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include LTTNG_TRACEPOINT_EVENT_CLASS(random__mix_pool_bytes, @@ -109,4 +109,4 @@ #endif /* LTTNG_TRACE_RANDOM_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/rcu.h lttng-modules-2.8.0/instrumentation/events/lttng-module/rcu.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/rcu.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/rcu.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_RCU_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_RCU_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include /* @@ -312,8 +312,8 @@ TP_FIELDS( ctf_string(rcuname, rcuname) - ctf_integer(void *, rhp, rhp) - ctf_integer(void *, func, rhp->func) + ctf_integer_hex(void *, rhp, rhp) + ctf_integer_hex(void *, func, rhp->func) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) ctf_integer(long, qlen_lazy, qlen_lazy) #endif @@ -351,8 +351,8 @@ TP_FIELDS( ctf_string(rcuname, rcuname) - ctf_integer(void *, rhp, rhp) - ctf_integer(unsigned long, offset, offset) + ctf_integer_hex(void *, rhp, rhp) + ctf_integer_hex(unsigned long, offset, offset) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) ctf_integer(long, qlen_lazy, qlen_lazy) #endif @@ -418,8 +418,8 @@ TP_FIELDS( ctf_string(rcuname, rcuname) - ctf_integer(void *, rhp, rhp) - ctf_integer(void *, func, rhp->func) + ctf_integer_hex(void *, rhp, rhp) + ctf_integer_hex(void *, func, rhp->func) ) ) @@ -442,7 +442,7 @@ TP_FIELDS( ctf_string(rcuname, rcuname) - ctf_integer(void *, rhp, rhp) + ctf_integer_hex(void *, rhp, rhp) ctf_integer(unsigned long, offset, offset) ) ) @@ -524,7 +524,7 @@ TP_FIELDS( ctf_string(rcutorturename, rcutorturename) - ctf_integer(struct rcu_head *, rhp, rhp) + ctf_integer_hex(struct rcu_head *, rhp, rhp) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) ctf_integer(unsigned long, secs, secs) ctf_integer(unsigned long, c_old, c_old) @@ -624,4 +624,4 @@ #endif /* LTTNG_TRACE_RCU_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/regmap.h lttng-modules-2.8.0/instrumentation/events/lttng-module/regmap.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/regmap.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/regmap.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_REGMAP_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_REGMAP_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include @@ -141,4 +141,4 @@ #endif /* LTTNG_TRACE_REGMAP_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/regulator.h lttng-modules-2.8.0/instrumentation/events/lttng-module/regulator.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/regulator.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/regulator.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_REGULATOR_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_REGULATOR_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include /* @@ -114,4 +114,4 @@ #endif /* _TRACE_POWER_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/rpc.h lttng-modules-2.8.0/instrumentation/events/lttng-module/rpc.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/rpc.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/rpc.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_RPC_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_RPC_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include @@ -15,8 +15,8 @@ TP_ARGS(task), TP_FIELDS( - ctf_integer(const struct rpc_task *, task, task) - ctf_integer(const struct rpc_clnt *, clnt, task->tk_client) + 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) ) ) @@ -39,8 +39,8 @@ TP_ARGS(task, status), TP_FIELDS( - ctf_integer(const struct rpc_task *, task, task) - ctf_integer(const struct rpc_clnt *, clnt, task->tk_client) + ctf_integer_hex(const struct rpc_task *, task, task) + ctf_integer_hex(const struct rpc_clnt *, clnt, task->tk_client) ctf_integer(int, status, status) ) ) @@ -52,9 +52,9 @@ TP_ARGS(clnt, task, action), TP_FIELDS( - ctf_integer(const struct rpc_clnt *, clnt, clnt) - ctf_integer(const struct rpc_task *, task, task) - ctf_integer(const void *, action, action) + ctf_integer_hex(const struct rpc_clnt *, clnt, clnt) + 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) @@ -92,8 +92,8 @@ TP_ARGS(clnt, task, q), TP_FIELDS( - ctf_integer(const struct rpc_clnt *, clnt, clnt) - ctf_integer(const struct rpc_task *, task, task) + ctf_integer_hex(const struct rpc_clnt *, clnt, clnt) + 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) @@ -120,4 +120,4 @@ #endif /* LTTNG_TRACE_RPC_H */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/rpm.h lttng-modules-2.8.0/instrumentation/events/lttng-module/rpm.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/rpm.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/rpm.h 2016-05-20 01:34:54.000000000 +0000 @@ -5,7 +5,7 @@ #if !defined(LTTNG_TRACE_RUNTIME_POWER_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_RUNTIME_POWER_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #ifndef _TRACE_RPM_DEF_ @@ -70,4 +70,4 @@ #endif /* LTTNG_TRACE_RUNTIME_POWER_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/sched.h lttng-modules-2.8.0/instrumentation/events/lttng-module/sched.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/sched.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/sched.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_SCHED_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_SCHED_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include #include @@ -145,7 +145,8 @@ /* * Tracepoint for waking up a task: */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0) || \ + LTTNG_RT_KERNEL_RANGE(4,1,10,11, 4,2,0,0)) LTTNG_TRACEPOINT_EVENT_CLASS(sched_wakeup_template, TP_PROTO(struct task_struct *p), @@ -184,7 +185,8 @@ ) #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0) || \ + LTTNG_RT_KERNEL_RANGE(4,1,10,11, 4,2,0,0)) /* * Tracepoint called when waking a task; this tracepoint is guaranteed to be @@ -371,7 +373,7 @@ unsigned int ns_level; ), - TP_code( + TP_code_pre( if (child) { struct pid *child_pid; unsigned int i; @@ -425,7 +427,9 @@ child_ns_inum; })) #endif - ) + ), + + TP_code_post() ) #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) @@ -559,4 +563,4 @@ #endif /* LTTNG_TRACE_SCHED_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/scsi.h lttng-modules-2.8.0/instrumentation/events/lttng-module/scsi.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/scsi.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/scsi.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_SCSI_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_SCSI_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include #include @@ -15,7 +15,8 @@ #define scsi_opcode_name(opcode) { opcode, #opcode } -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) \ + || LTTNG_RHEL_KERNEL_RANGE(3,10,0,327,0,0, 3,11,0,0,0,0)) #define show_opcode_name(val) \ __print_symbolic(val, \ @@ -397,4 +398,4 @@ #endif /* LTTNG_TRACE_SCSI_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/signal.h lttng-modules-2.8.0/instrumentation/events/lttng-module/signal.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/signal.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/signal.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_SIGNAL_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_SIGNAL_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #ifndef _TRACE_SIGNAL_DEF @@ -150,4 +150,4 @@ #endif /* LTTNG_TRACE_SIGNAL_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/skb.h lttng-modules-2.8.0/instrumentation/events/lttng-module/skb.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/skb.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/skb.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_SKB_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include #include @@ -21,8 +21,8 @@ TP_ARGS(skb, location), TP_FIELDS( - ctf_integer(void *, skbaddr, skb) - ctf_integer(void *, location, location) + ctf_integer_hex(void *, skbaddr, skb) + ctf_integer_hex(void *, location, location) ctf_integer_network(unsigned short, protocol, skb->protocol) ) ) @@ -37,7 +37,7 @@ TP_ARGS(skb), TP_FIELDS( - ctf_integer(void *, skbaddr, skb) + ctf_integer_hex(void *, skbaddr, skb) ) ) #endif @@ -50,7 +50,7 @@ TP_ARGS(skb, len), TP_FIELDS( - ctf_integer(const void *, skbaddr, skb) + ctf_integer_hex(const void *, skbaddr, skb) ctf_integer(int, len, len) ) ) @@ -59,4 +59,4 @@ #endif /* LTTNG_TRACE_SKB_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/sock.h lttng-modules-2.8.0/instrumentation/events/lttng-module/sock.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/sock.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/sock.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_SOCK_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_SOCK_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include LTTNG_TRACEPOINT_EVENT(sock_rcvqueue_full, @@ -38,4 +38,4 @@ #endif /* LTTNG_TRACE_SOCK_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/timer.h lttng-modules-2.8.0/instrumentation/events/lttng-module/timer.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/timer.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/timer.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_TIMER_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_TIMER_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #ifndef _TRACE_TIMER_DEF_ #define _TRACE_TIMER_DEF_ @@ -23,7 +23,7 @@ TP_ARGS(timer), TP_FIELDS( - ctf_integer(void *, timer, timer) + ctf_integer_hex(void *, timer, timer) ) ) @@ -53,8 +53,8 @@ TP_ARGS(timer, expires, flags), TP_FIELDS( - ctf_integer(void *, timer, timer) - ctf_integer(void *, function, timer->function) + ctf_integer_hex(void *, timer, timer) + ctf_integer_hex(void *, function, timer->function) ctf_integer(unsigned long, expires, expires) ctf_integer(unsigned long, now, jiffies) ctf_integer(unsigned int, flags, flags) @@ -73,8 +73,8 @@ TP_ARGS(timer, expires), TP_FIELDS( - ctf_integer(void *, timer, timer) - ctf_integer(void *, function, timer->function) + ctf_integer_hex(void *, timer, timer) + ctf_integer_hex(void *, function, timer->function) ctf_integer(unsigned long, expires, expires) ctf_integer(unsigned long, now, jiffies) ) @@ -94,9 +94,9 @@ TP_ARGS(timer), TP_FIELDS( - ctf_integer(void *, timer, timer) + ctf_integer_hex(void *, timer, timer) ctf_integer(unsigned long, now, jiffies) - ctf_integer(void *, function, timer->function) + ctf_integer_hex(void *, function, timer->function) ) ) @@ -144,7 +144,7 @@ TP_ARGS(hrtimer, clockid, mode), TP_FIELDS( - ctf_integer(void *, hrtimer, hrtimer) + ctf_integer_hex(void *, hrtimer, hrtimer) ctf_integer(clockid_t, clockid, clockid) ctf_integer(enum hrtimer_mode, mode, mode) ) @@ -163,8 +163,8 @@ TP_ARGS(hrtimer), TP_FIELDS( - ctf_integer(void *, hrtimer, hrtimer) - ctf_integer(void *, function, hrtimer->function) + ctf_integer_hex(void *, hrtimer, hrtimer) + ctf_integer_hex(void *, function, hrtimer->function) ctf_integer(s64, expires, hrtimer_get_expires(hrtimer).tv64) ctf_integer(s64, softexpires, hrtimer_get_softexpires(hrtimer).tv64) ) @@ -187,9 +187,9 @@ TP_ARGS(hrtimer, now), TP_FIELDS( - ctf_integer(void *, hrtimer, hrtimer) + ctf_integer_hex(void *, hrtimer, hrtimer) ctf_integer(s64, now, now->tv64) - ctf_integer(void *, function, hrtimer->function) + ctf_integer_hex(void *, function, hrtimer->function) ) ) @@ -200,7 +200,7 @@ TP_ARGS(hrtimer), TP_FIELDS( - ctf_integer(void *, hrtimer, hrtimer) + ctf_integer_hex(void *, hrtimer, hrtimer) ) ) @@ -283,4 +283,4 @@ #endif /* LTTNG_TRACE_TIMER_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/udp.h lttng-modules-2.8.0/instrumentation/events/lttng-module/udp.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/udp.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/udp.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_UDP_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_UDP_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include LTTNG_TRACEPOINT_EVENT(udp_fail_queue_rcv_skb, @@ -22,4 +22,4 @@ #endif /* LTTNG_TRACE_UDP_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/v4l2.h lttng-modules-2.8.0/instrumentation/events/lttng-module/v4l2.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/v4l2.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/v4l2.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_V4L2_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_V4L2_H -#include "../../../probes/lttng-tracepoint-event.h" +#include LTTNG_TRACEPOINT_EVENT_CLASS(v4l2_class, @@ -51,4 +51,4 @@ #endif /* if !defined(LTTNG_TRACE_V4L2_H) || defined(TRACE_HEADER_MULTI_READ) */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/workqueue.h lttng-modules-2.8.0/instrumentation/events/lttng-module/workqueue.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/workqueue.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/workqueue.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_WORKQUEUE_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_WORKQUEUE_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include @@ -25,7 +25,7 @@ TP_ARGS(work), TP_FIELDS( - ctf_integer(void *, work, work) + ctf_integer_hex(void *, work, work) ) ) @@ -55,8 +55,8 @@ #endif TP_FIELDS( - ctf_integer(void *, work, work) - ctf_integer(void *, function, work->func) + ctf_integer_hex(void *, work, work) + ctf_integer_hex(void *, function, work->func) ctf_integer(unsigned int, req_cpu, req_cpu) ) ) @@ -90,8 +90,8 @@ TP_ARGS(work), TP_FIELDS( - ctf_integer(void *, work, work) - ctf_integer(void *, function, work->func) + ctf_integer_hex(void *, work, work) + ctf_integer_hex(void *, function, work->func) ) ) @@ -119,7 +119,7 @@ TP_FIELDS( ctf_array(char, thread_comm, wq_thread->comm, TASK_COMM_LEN) ctf_integer(pid_t, thread_pid, wq_thread->pid) - ctf_integer(work_func_t, func, work->func) + ctf_integer_hex(work_func_t, func, work->func) ) ) @@ -168,4 +168,4 @@ #endif /* LTTNG_TRACE_WORKQUEUE_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/events/lttng-module/writeback.h lttng-modules-2.8.0/instrumentation/events/lttng-module/writeback.h --- lttng-modules-2.7.1/instrumentation/events/lttng-module/writeback.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/events/lttng-module/writeback.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_WRITEBACK_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_WRITEBACK_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include #include @@ -13,16 +13,34 @@ #ifndef _TRACE_WRITEBACK_DEF_ #define _TRACE_WRITEBACK_DEF_ +/* + * Vanilla kernels before 4.0 do not implement inode_to_bdi + * RHEL kernels before 3.10.0-327.10.1 do not implement inode_to_bdi + * RHEL kernel 3.10.0-327.10.1 has inode_to_bdi + * RHEL kernel 3.10.0-327.13.1 includes a partial merge of upstream + * commit a212b105b07d75b48b1a166378282e8a77fbf53d which inlines + * inode_to_bdi but not sb_is_blkdev_sb making it unusable by modules. + */ #if (LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)) -static inline struct backing_dev_info *inode_to_bdi(struct inode *inode) +static inline struct backing_dev_info *lttng_inode_to_bdi(struct inode *inode) { - struct super_block *sb = inode->i_sb; + struct super_block *sb; + + if (!inode) + return &noop_backing_dev_info; + + sb = inode->i_sb; if (strcmp(sb->s_type->name, "bdev") == 0) return inode->i_mapping->backing_dev_info; return sb->s_bdi; } +#else +static inline struct backing_dev_info *lttng_inode_to_bdi(struct inode *inode) +{ + return inode_to_bdi(inode); +} #endif /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)) */ #endif @@ -64,7 +82,7 @@ TP_ARGS(page, mapping), TP_FIELDS( ctf_array_text(char, name, - mapping ? dev_name(inode_to_bdi(mapping->host)->dev) : "(unknown)", 32) + mapping ? dev_name(lttng_inode_to_bdi(mapping->host)->dev) : "(unknown)", 32) ctf_integer(unsigned long, ino, mapping ? mapping->host->i_ino : 0) ctf_integer(pgoff_t, index, page->index) ) @@ -76,8 +94,8 @@ TP_FIELDS( /* may be called for files on pseudo FSes w/ unregistered bdi */ ctf_array_text(char, name, - inode_to_bdi(inode)->dev ? - dev_name(inode_to_bdi(inode)->dev) : "(unknown)", 32) + lttng_inode_to_bdi(inode)->dev ? + dev_name(lttng_inode_to_bdi(inode)->dev) : "(unknown)", 32) ctf_integer(unsigned long, ino, inode->i_ino) ctf_integer(unsigned long, state, inode->i_state) ctf_integer(unsigned long, flags, flags) @@ -96,7 +114,7 @@ TP_ARGS(inode, wbc), TP_FIELDS( ctf_array_text(char, name, - dev_name(inode_to_bdi(inode)->dev), 32) + dev_name(lttng_inode_to_bdi(inode)->dev), 32) ctf_integer(unsigned long, ino, inode->i_ino) ctf_integer(int, sync_mode, wbc->sync_mode) ) @@ -608,7 +626,7 @@ TP_FIELDS( ctf_array_text(char, name, - dev_name(inode_to_bdi(inode)->dev), 32) + dev_name(lttng_inode_to_bdi(inode)->dev), 32) ctf_integer(unsigned long, ino, inode->i_ino) ctf_integer(unsigned long, state, inode->i_state) ctf_integer(unsigned long, dirtied_when, inode->dirtied_when) @@ -656,7 +674,7 @@ TP_FIELDS( ctf_array_text(char, name, - dev_name(inode_to_bdi(inode)->dev), 32) + dev_name(lttng_inode_to_bdi(inode)->dev), 32) ctf_integer(unsigned long, ino, inode->i_ino) ctf_integer(unsigned long, state, inode->i_state) ctf_integer(unsigned long, dirtied_when, inode->dirtied_when) @@ -688,4 +706,4 @@ #endif /* LTTNG_TRACE_WRITEBACK_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/4.4.0/arm-64-syscalls-4.4.0 lttng-modules-2.8.0/instrumentation/syscalls/4.4.0/arm-64-syscalls-4.4.0 --- lttng-modules-2.7.1/instrumentation/syscalls/4.4.0/arm-64-syscalls-4.4.0 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/4.4.0/arm-64-syscalls-4.4.0 2016-05-20 01:34:54.000000000 +0000 @@ -0,0 +1,256 @@ +syscall sys_io_setup nr 0 nbargs 2 types: (unsigned, aio_context_t *) args: (nr_events, ctxp) +syscall sys_io_destroy nr 1 nbargs 1 types: (aio_context_t) args: (ctx) +syscall sys_io_submit nr 2 nbargs 3 types: (aio_context_t, long, struct iocb * *) args: (ctx_id, nr, iocbpp) +syscall sys_io_cancel nr 3 nbargs 3 types: (aio_context_t, struct iocb *, struct io_event *) args: (ctx_id, iocb, result) +syscall sys_io_getevents nr 4 nbargs 5 types: (aio_context_t, long, long, struct io_event *, struct timespec *) args: (ctx_id, min_nr, nr, events, timeout) +syscall sys_setxattr nr 5 nbargs 5 types: (const char *, const char *, const void *, size_t, int) args: (pathname, name, value, size, flags) +syscall sys_lsetxattr nr 6 nbargs 5 types: (const char *, const char *, const void *, size_t, int) args: (pathname, name, value, size, flags) +syscall sys_fsetxattr nr 7 nbargs 5 types: (int, const char *, const void *, size_t, int) args: (fd, name, value, size, flags) +syscall sys_getxattr nr 8 nbargs 4 types: (const char *, const char *, void *, size_t) args: (pathname, name, value, size) +syscall sys_lgetxattr nr 9 nbargs 4 types: (const char *, const char *, void *, size_t) args: (pathname, name, value, size) +syscall sys_fgetxattr nr 10 nbargs 4 types: (int, const char *, void *, size_t) args: (fd, name, value, size) +syscall sys_listxattr nr 11 nbargs 3 types: (const char *, char *, size_t) args: (pathname, list, size) +syscall sys_llistxattr nr 12 nbargs 3 types: (const char *, char *, size_t) args: (pathname, list, size) +syscall sys_flistxattr nr 13 nbargs 3 types: (int, char *, size_t) args: (fd, list, size) +syscall sys_removexattr nr 14 nbargs 2 types: (const char *, const char *) args: (pathname, name) +syscall sys_lremovexattr nr 15 nbargs 2 types: (const char *, const char *) args: (pathname, name) +syscall sys_fremovexattr nr 16 nbargs 2 types: (int, const char *) args: (fd, name) +syscall sys_getcwd nr 17 nbargs 2 types: (char *, unsigned long) args: (buf, size) +syscall sys_lookup_dcookie nr 18 nbargs 3 types: (u64, char *, size_t) args: (cookie64, buf, len) +syscall sys_eventfd2 nr 19 nbargs 2 types: (unsigned int, int) args: (count, flags) +syscall sys_epoll_create1 nr 20 nbargs 1 types: (int) args: (flags) +syscall sys_epoll_ctl nr 21 nbargs 4 types: (int, int, int, struct epoll_event *) args: (epfd, op, fd, event) +syscall sys_epoll_pwait nr 22 nbargs 6 types: (int, struct epoll_event *, int, int, const sigset_t *, size_t) args: (epfd, events, maxevents, timeout, sigmask, sigsetsize) +syscall sys_dup nr 23 nbargs 1 types: (unsigned int) args: (fildes) +syscall sys_dup3 nr 24 nbargs 3 types: (unsigned int, unsigned int, int) args: (oldfd, newfd, flags) +syscall sys_fcntl nr 25 nbargs 3 types: (unsigned int, unsigned int, unsigned long) args: (fd, cmd, arg) +syscall sys_inotify_init1 nr 26 nbargs 1 types: (int) args: (flags) +syscall sys_inotify_add_watch nr 27 nbargs 3 types: (int, const char *, u32) args: (fd, pathname, mask) +syscall sys_inotify_rm_watch nr 28 nbargs 2 types: (int, __s32) args: (fd, wd) +syscall sys_ioctl nr 29 nbargs 3 types: (unsigned int, unsigned int, unsigned long) args: (fd, cmd, arg) +syscall sys_ioprio_set nr 30 nbargs 3 types: (int, int, int) args: (which, who, ioprio) +syscall sys_ioprio_get nr 31 nbargs 2 types: (int, int) args: (which, who) +syscall sys_flock nr 32 nbargs 2 types: (unsigned int, unsigned int) args: (fd, cmd) +syscall sys_mknodat nr 33 nbargs 4 types: (int, const char *, umode_t, unsigned) args: (dfd, filename, mode, dev) +syscall sys_mkdirat nr 34 nbargs 3 types: (int, const char *, umode_t) args: (dfd, pathname, mode) +syscall sys_unlinkat nr 35 nbargs 3 types: (int, const char *, int) args: (dfd, pathname, flag) +syscall sys_symlinkat nr 36 nbargs 3 types: (const char *, int, const char *) args: (oldname, newdfd, newname) +syscall sys_linkat nr 37 nbargs 5 types: (int, const char *, int, const char *, int) args: (olddfd, oldname, newdfd, newname, flags) +syscall sys_renameat nr 38 nbargs 4 types: (int, const char *, int, const char *) args: (olddfd, oldname, newdfd, newname) +syscall sys_umount nr 39 nbargs 2 types: (char *, int) args: (name, flags) +syscall sys_mount nr 40 nbargs 5 types: (char *, char *, char *, unsigned long, void *) args: (dev_name, dir_name, type, flags, data) +syscall sys_pivot_root nr 41 nbargs 2 types: (const char *, const char *) args: (new_root, put_old) +syscall sys_statfs nr 43 nbargs 2 types: (const char *, struct statfs *) args: (pathname, buf) +syscall sys_fstatfs nr 44 nbargs 2 types: (unsigned int, struct statfs *) args: (fd, buf) +syscall sys_truncate nr 45 nbargs 2 types: (const char *, long) args: (path, length) +syscall sys_ftruncate nr 46 nbargs 2 types: (unsigned int, unsigned long) args: (fd, length) +syscall sys_fallocate nr 47 nbargs 4 types: (int, int, loff_t, loff_t) args: (fd, mode, offset, len) +syscall sys_faccessat nr 48 nbargs 3 types: (int, const char *, int) args: (dfd, filename, mode) +syscall sys_chdir nr 49 nbargs 1 types: (const char *) args: (filename) +syscall sys_fchdir nr 50 nbargs 1 types: (unsigned int) args: (fd) +syscall sys_chroot nr 51 nbargs 1 types: (const char *) args: (filename) +syscall sys_fchmod nr 52 nbargs 2 types: (unsigned int, umode_t) args: (fd, mode) +syscall sys_fchmodat nr 53 nbargs 3 types: (int, const char *, umode_t) args: (dfd, filename, mode) +syscall sys_fchownat nr 54 nbargs 5 types: (int, const char *, uid_t, gid_t, int) args: (dfd, filename, user, group, flag) +syscall sys_fchown nr 55 nbargs 3 types: (unsigned int, uid_t, gid_t) args: (fd, user, group) +syscall sys_openat nr 56 nbargs 4 types: (int, const char *, int, umode_t) args: (dfd, filename, flags, mode) +syscall sys_close nr 57 nbargs 1 types: (unsigned int) args: (fd) +syscall sys_vhangup nr 58 nbargs 0 types: () args: () +syscall sys_pipe2 nr 59 nbargs 2 types: (int *, int) args: (fildes, flags) +syscall sys_quotactl nr 60 nbargs 4 types: (unsigned int, const char *, qid_t, void *) args: (cmd, special, id, addr) +syscall sys_getdents64 nr 61 nbargs 3 types: (unsigned int, struct linux_dirent64 *, unsigned int) args: (fd, dirent, count) +syscall sys_lseek nr 62 nbargs 3 types: (unsigned int, off_t, unsigned int) args: (fd, offset, whence) +syscall sys_read nr 63 nbargs 3 types: (unsigned int, char *, size_t) args: (fd, buf, count) +syscall sys_write nr 64 nbargs 3 types: (unsigned int, const char *, size_t) args: (fd, buf, count) +syscall sys_readv nr 65 nbargs 3 types: (unsigned long, const struct iovec *, unsigned long) args: (fd, vec, vlen) +syscall sys_writev nr 66 nbargs 3 types: (unsigned long, const struct iovec *, unsigned long) args: (fd, vec, vlen) +syscall sys_pread64 nr 67 nbargs 4 types: (unsigned int, char *, size_t, loff_t) args: (fd, buf, count, pos) +syscall sys_pwrite64 nr 68 nbargs 4 types: (unsigned int, const char *, size_t, loff_t) args: (fd, buf, count, pos) +syscall sys_preadv nr 69 nbargs 5 types: (unsigned long, const struct iovec *, unsigned long, unsigned long, unsigned long) args: (fd, vec, vlen, pos_l, pos_h) +syscall sys_pwritev nr 70 nbargs 5 types: (unsigned long, const struct iovec *, unsigned long, unsigned long, unsigned long) args: (fd, vec, vlen, pos_l, pos_h) +syscall sys_sendfile64 nr 71 nbargs 4 types: (int, int, loff_t *, size_t) args: (out_fd, in_fd, offset, count) +syscall sys_pselect6 nr 72 nbargs 6 types: (int, fd_set *, fd_set *, fd_set *, struct timespec *, void *) args: (n, inp, outp, exp, tsp, sig) +syscall sys_ppoll nr 73 nbargs 5 types: (struct pollfd *, unsigned int, struct timespec *, const sigset_t *, size_t) args: (ufds, nfds, tsp, sigmask, sigsetsize) +syscall sys_signalfd4 nr 74 nbargs 4 types: (int, sigset_t *, size_t, int) args: (ufd, user_mask, sizemask, flags) +syscall sys_vmsplice nr 75 nbargs 4 types: (int, const struct iovec *, unsigned long, unsigned int) args: (fd, iov, nr_segs, flags) +syscall sys_splice nr 76 nbargs 6 types: (int, loff_t *, int, loff_t *, size_t, unsigned int) args: (fd_in, off_in, fd_out, off_out, len, flags) +syscall sys_tee nr 77 nbargs 4 types: (int, int, size_t, unsigned int) args: (fdin, fdout, len, flags) +syscall sys_readlinkat nr 78 nbargs 4 types: (int, const char *, char *, int) args: (dfd, pathname, buf, bufsiz) +syscall sys_newfstatat nr 79 nbargs 4 types: (int, const char *, struct stat *, int) args: (dfd, filename, statbuf, flag) +syscall sys_newfstat nr 80 nbargs 2 types: (unsigned int, struct stat *) args: (fd, statbuf) +syscall sys_sync nr 81 nbargs 0 types: () args: () +syscall sys_fsync nr 82 nbargs 1 types: (unsigned int) args: (fd) +syscall sys_fdatasync nr 83 nbargs 1 types: (unsigned int) args: (fd) +syscall sys_sync_file_range nr 84 nbargs 4 types: (int, loff_t, loff_t, unsigned int) args: (fd, offset, nbytes, flags) +syscall sys_timerfd_create nr 85 nbargs 2 types: (int, int) args: (clockid, flags) +syscall sys_timerfd_settime nr 86 nbargs 4 types: (int, int, const struct itimerspec *, struct itimerspec *) args: (ufd, flags, utmr, otmr) +syscall sys_timerfd_gettime nr 87 nbargs 2 types: (int, struct itimerspec *) args: (ufd, otmr) +syscall sys_utimensat nr 88 nbargs 4 types: (int, const char *, struct timespec *, int) args: (dfd, filename, utimes, flags) +syscall sys_acct nr 89 nbargs 1 types: (const char *) args: (name) +syscall sys_capget nr 90 nbargs 2 types: (cap_user_header_t, cap_user_data_t) args: (header, dataptr) +syscall sys_capset nr 91 nbargs 2 types: (cap_user_header_t, const cap_user_data_t) args: (header, data) +syscall sys_personality nr 92 nbargs 1 types: (unsigned int) args: (personality) +syscall sys_exit nr 93 nbargs 1 types: (int) args: (error_code) +syscall sys_exit_group nr 94 nbargs 1 types: (int) args: (error_code) +syscall sys_waitid nr 95 nbargs 5 types: (int, pid_t, struct siginfo *, int, struct rusage *) args: (which, upid, infop, options, ru) +syscall sys_set_tid_address nr 96 nbargs 1 types: (int *) args: (tidptr) +syscall sys_unshare nr 97 nbargs 1 types: (unsigned long) args: (unshare_flags) +syscall sys_futex nr 98 nbargs 6 types: (u32 *, int, u32, struct timespec *, u32 *, u32) args: (uaddr, op, val, utime, uaddr2, val3) +syscall sys_set_robust_list nr 99 nbargs 2 types: (struct robust_list_head *, size_t) args: (head, len) +syscall sys_get_robust_list nr 100 nbargs 3 types: (int, struct robust_list_head * *, size_t *) args: (pid, head_ptr, len_ptr) +syscall sys_nanosleep nr 101 nbargs 2 types: (struct timespec *, struct timespec *) args: (rqtp, rmtp) +syscall sys_getitimer nr 102 nbargs 2 types: (int, struct itimerval *) args: (which, value) +syscall sys_setitimer nr 103 nbargs 3 types: (int, struct itimerval *, struct itimerval *) args: (which, value, ovalue) +syscall sys_init_module nr 105 nbargs 3 types: (void *, unsigned long, const char *) args: (umod, len, uargs) +syscall sys_delete_module nr 106 nbargs 2 types: (const char *, unsigned int) args: (name_user, flags) +syscall sys_timer_create nr 107 nbargs 3 types: (const clockid_t, struct sigevent *, timer_t *) args: (which_clock, timer_event_spec, created_timer_id) +syscall sys_timer_gettime nr 108 nbargs 2 types: (timer_t, struct itimerspec *) args: (timer_id, setting) +syscall sys_timer_getoverrun nr 109 nbargs 1 types: (timer_t) args: (timer_id) +syscall sys_timer_settime nr 110 nbargs 4 types: (timer_t, int, const struct itimerspec *, struct itimerspec *) args: (timer_id, flags, new_setting, old_setting) +syscall sys_timer_delete nr 111 nbargs 1 types: (timer_t) args: (timer_id) +syscall sys_clock_settime nr 112 nbargs 2 types: (const clockid_t, const struct timespec *) args: (which_clock, tp) +syscall sys_clock_gettime nr 113 nbargs 2 types: (const clockid_t, struct timespec *) args: (which_clock, tp) +syscall sys_clock_getres nr 114 nbargs 2 types: (const clockid_t, struct timespec *) args: (which_clock, tp) +syscall sys_clock_nanosleep nr 115 nbargs 4 types: (const clockid_t, int, const struct timespec *, struct timespec *) args: (which_clock, flags, rqtp, rmtp) +syscall sys_syslog nr 116 nbargs 3 types: (int, char *, int) args: (type, buf, len) +syscall sys_ptrace nr 117 nbargs 4 types: (long, long, unsigned long, unsigned long) args: (request, pid, addr, data) +syscall sys_sched_setparam nr 118 nbargs 2 types: (pid_t, struct sched_param *) args: (pid, param) +syscall sys_sched_setscheduler nr 119 nbargs 3 types: (pid_t, int, struct sched_param *) args: (pid, policy, param) +syscall sys_sched_getscheduler nr 120 nbargs 1 types: (pid_t) args: (pid) +syscall sys_sched_getparam nr 121 nbargs 2 types: (pid_t, struct sched_param *) args: (pid, param) +syscall sys_sched_setaffinity nr 122 nbargs 3 types: (pid_t, unsigned int, unsigned long *) args: (pid, len, user_mask_ptr) +syscall sys_sched_getaffinity nr 123 nbargs 3 types: (pid_t, unsigned int, unsigned long *) args: (pid, len, user_mask_ptr) +syscall sys_sched_yield nr 124 nbargs 0 types: () args: () +syscall sys_sched_get_priority_max nr 125 nbargs 1 types: (int) args: (policy) +syscall sys_sched_get_priority_min nr 126 nbargs 1 types: (int) args: (policy) +syscall sys_sched_rr_get_interval nr 127 nbargs 2 types: (pid_t, struct timespec *) args: (pid, interval) +syscall sys_restart_syscall nr 128 nbargs 0 types: () args: () +syscall sys_kill nr 129 nbargs 2 types: (pid_t, int) args: (pid, sig) +syscall sys_tkill nr 130 nbargs 2 types: (pid_t, int) args: (pid, sig) +syscall sys_tgkill nr 131 nbargs 3 types: (pid_t, pid_t, int) args: (tgid, pid, sig) +syscall sys_sigaltstack nr 132 nbargs 2 types: (const stack_t *, stack_t *) args: (uss, uoss) +syscall sys_rt_sigsuspend nr 133 nbargs 2 types: (sigset_t *, size_t) args: (unewset, sigsetsize) +syscall sys_rt_sigaction nr 134 nbargs 4 types: (int, const struct sigaction *, struct sigaction *, size_t) args: (sig, act, oact, sigsetsize) +syscall sys_rt_sigprocmask nr 135 nbargs 4 types: (int, sigset_t *, sigset_t *, size_t) args: (how, nset, oset, sigsetsize) +syscall sys_rt_sigpending nr 136 nbargs 2 types: (sigset_t *, size_t) args: (uset, sigsetsize) +syscall sys_rt_sigtimedwait nr 137 nbargs 4 types: (const sigset_t *, siginfo_t *, const struct timespec *, size_t) args: (uthese, uinfo, uts, sigsetsize) +syscall sys_rt_sigqueueinfo nr 138 nbargs 3 types: (pid_t, int, siginfo_t *) args: (pid, sig, uinfo) +syscall sys_setpriority nr 140 nbargs 3 types: (int, int, int) args: (which, who, niceval) +syscall sys_getpriority nr 141 nbargs 2 types: (int, int) args: (which, who) +syscall sys_reboot nr 142 nbargs 4 types: (int, int, unsigned int, void *) args: (magic1, magic2, cmd, arg) +syscall sys_setregid nr 143 nbargs 2 types: (gid_t, gid_t) args: (rgid, egid) +syscall sys_setgid nr 144 nbargs 1 types: (gid_t) args: (gid) +syscall sys_setreuid nr 145 nbargs 2 types: (uid_t, uid_t) args: (ruid, euid) +syscall sys_setuid nr 146 nbargs 1 types: (uid_t) args: (uid) +syscall sys_setresuid nr 147 nbargs 3 types: (uid_t, uid_t, uid_t) args: (ruid, euid, suid) +syscall sys_getresuid nr 148 nbargs 3 types: (uid_t *, uid_t *, uid_t *) args: (ruidp, euidp, suidp) +syscall sys_setresgid nr 149 nbargs 3 types: (gid_t, gid_t, gid_t) args: (rgid, egid, sgid) +syscall sys_getresgid nr 150 nbargs 3 types: (gid_t *, gid_t *, gid_t *) args: (rgidp, egidp, sgidp) +syscall sys_setfsuid nr 151 nbargs 1 types: (uid_t) args: (uid) +syscall sys_setfsgid nr 152 nbargs 1 types: (gid_t) args: (gid) +syscall sys_times nr 153 nbargs 1 types: (struct tms *) args: (tbuf) +syscall sys_setpgid nr 154 nbargs 2 types: (pid_t, pid_t) args: (pid, pgid) +syscall sys_getpgid nr 155 nbargs 1 types: (pid_t) args: (pid) +syscall sys_getsid nr 156 nbargs 1 types: (pid_t) args: (pid) +syscall sys_setsid nr 157 nbargs 0 types: () args: () +syscall sys_getgroups nr 158 nbargs 2 types: (int, gid_t *) args: (gidsetsize, grouplist) +syscall sys_setgroups nr 159 nbargs 2 types: (int, gid_t *) args: (gidsetsize, grouplist) +syscall sys_newuname nr 160 nbargs 1 types: (struct new_utsname *) args: (name) +syscall sys_sethostname nr 161 nbargs 2 types: (char *, int) args: (name, len) +syscall sys_setdomainname nr 162 nbargs 2 types: (char *, int) args: (name, len) +syscall sys_getrlimit nr 163 nbargs 2 types: (unsigned int, struct rlimit *) args: (resource, rlim) +syscall sys_setrlimit nr 164 nbargs 2 types: (unsigned int, struct rlimit *) args: (resource, rlim) +syscall sys_getrusage nr 165 nbargs 2 types: (int, struct rusage *) args: (who, ru) +syscall sys_umask nr 166 nbargs 1 types: (int) args: (mask) +syscall sys_prctl nr 167 nbargs 5 types: (int, unsigned long, unsigned long, unsigned long, unsigned long) args: (option, arg2, arg3, arg4, arg5) +syscall sys_getcpu nr 168 nbargs 3 types: (unsigned *, unsigned *, struct getcpu_cache *) args: (cpup, nodep, unused) +syscall sys_gettimeofday nr 169 nbargs 2 types: (struct timeval *, struct timezone *) args: (tv, tz) +syscall sys_settimeofday nr 170 nbargs 2 types: (struct timeval *, struct timezone *) args: (tv, tz) +syscall sys_adjtimex nr 171 nbargs 1 types: (struct timex *) args: (txc_p) +syscall sys_getpid nr 172 nbargs 0 types: () args: () +syscall sys_getppid nr 173 nbargs 0 types: () args: () +syscall sys_getuid nr 174 nbargs 0 types: () args: () +syscall sys_geteuid nr 175 nbargs 0 types: () args: () +syscall sys_getgid nr 176 nbargs 0 types: () args: () +syscall sys_getegid nr 177 nbargs 0 types: () args: () +syscall sys_gettid nr 178 nbargs 0 types: () args: () +syscall sys_sysinfo nr 179 nbargs 1 types: (struct sysinfo *) args: (info) +syscall sys_mq_open nr 180 nbargs 4 types: (const char *, int, umode_t, struct mq_attr *) args: (u_name, oflag, mode, u_attr) +syscall sys_mq_unlink nr 181 nbargs 1 types: (const char *) args: (u_name) +syscall sys_mq_timedsend nr 182 nbargs 5 types: (mqd_t, const char *, size_t, unsigned int, const struct timespec *) args: (mqdes, u_msg_ptr, msg_len, msg_prio, u_abs_timeout) +syscall sys_mq_timedreceive nr 183 nbargs 5 types: (mqd_t, char *, size_t, unsigned int *, const struct timespec *) args: (mqdes, u_msg_ptr, msg_len, u_msg_prio, u_abs_timeout) +syscall sys_mq_notify nr 184 nbargs 2 types: (mqd_t, const struct sigevent *) args: (mqdes, u_notification) +syscall sys_mq_getsetattr nr 185 nbargs 3 types: (mqd_t, const struct mq_attr *, struct mq_attr *) args: (mqdes, u_mqstat, u_omqstat) +syscall sys_msgget nr 186 nbargs 2 types: (key_t, int) args: (key, msgflg) +syscall sys_msgctl nr 187 nbargs 3 types: (int, int, struct msqid_ds *) args: (msqid, cmd, buf) +syscall sys_msgrcv nr 188 nbargs 5 types: (int, struct msgbuf *, size_t, long, int) args: (msqid, msgp, msgsz, msgtyp, msgflg) +syscall sys_msgsnd nr 189 nbargs 4 types: (int, struct msgbuf *, size_t, int) args: (msqid, msgp, msgsz, msgflg) +syscall sys_semget nr 190 nbargs 3 types: (key_t, int, int) args: (key, nsems, semflg) +syscall sys_semctl nr 191 nbargs 4 types: (int, int, int, unsigned long) args: (semid, semnum, cmd, arg) +syscall sys_semtimedop nr 192 nbargs 4 types: (int, struct sembuf *, unsigned, const struct timespec *) args: (semid, tsops, nsops, timeout) +syscall sys_semop nr 193 nbargs 3 types: (int, struct sembuf *, unsigned) args: (semid, tsops, nsops) +syscall sys_shmget nr 194 nbargs 3 types: (key_t, size_t, int) args: (key, size, shmflg) +syscall sys_shmctl nr 195 nbargs 3 types: (int, int, struct shmid_ds *) args: (shmid, cmd, buf) +syscall sys_shmat nr 196 nbargs 3 types: (int, char *, int) args: (shmid, shmaddr, shmflg) +syscall sys_shmdt nr 197 nbargs 1 types: (char *) args: (shmaddr) +syscall sys_socket nr 198 nbargs 3 types: (int, int, int) args: (family, type, protocol) +syscall sys_socketpair nr 199 nbargs 4 types: (int, int, int, int *) args: (family, type, protocol, usockvec) +syscall sys_bind nr 200 nbargs 3 types: (int, struct sockaddr *, int) args: (fd, umyaddr, addrlen) +syscall sys_listen nr 201 nbargs 2 types: (int, int) args: (fd, backlog) +syscall sys_accept nr 202 nbargs 3 types: (int, struct sockaddr *, int *) args: (fd, upeer_sockaddr, upeer_addrlen) +syscall sys_connect nr 203 nbargs 3 types: (int, struct sockaddr *, int) args: (fd, uservaddr, addrlen) +syscall sys_getsockname nr 204 nbargs 3 types: (int, struct sockaddr *, int *) args: (fd, usockaddr, usockaddr_len) +syscall sys_getpeername nr 205 nbargs 3 types: (int, struct sockaddr *, int *) args: (fd, usockaddr, usockaddr_len) +syscall sys_sendto nr 206 nbargs 6 types: (int, void *, size_t, unsigned int, struct sockaddr *, int) args: (fd, buff, len, flags, addr, addr_len) +syscall sys_recvfrom nr 207 nbargs 6 types: (int, void *, size_t, unsigned int, struct sockaddr *, int *) args: (fd, ubuf, size, flags, addr, addr_len) +syscall sys_setsockopt nr 208 nbargs 5 types: (int, int, int, char *, int) args: (fd, level, optname, optval, optlen) +syscall sys_getsockopt nr 209 nbargs 5 types: (int, int, int, char *, int *) args: (fd, level, optname, optval, optlen) +syscall sys_shutdown nr 210 nbargs 2 types: (int, int) args: (fd, how) +syscall sys_sendmsg nr 211 nbargs 3 types: (int, struct user_msghdr *, unsigned int) args: (fd, msg, flags) +syscall sys_recvmsg nr 212 nbargs 3 types: (int, struct user_msghdr *, unsigned int) args: (fd, msg, flags) +syscall sys_readahead nr 213 nbargs 3 types: (int, loff_t, size_t) args: (fd, offset, count) +syscall sys_brk nr 214 nbargs 1 types: (unsigned long) args: (brk) +syscall sys_munmap nr 215 nbargs 2 types: (unsigned long, size_t) args: (addr, len) +syscall sys_mremap nr 216 nbargs 5 types: (unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) args: (addr, old_len, new_len, flags, new_addr) +syscall sys_add_key nr 217 nbargs 5 types: (const char *, const char *, const void *, size_t, key_serial_t) args: (_type, _description, _payload, plen, ringid) +syscall sys_request_key nr 218 nbargs 4 types: (const char *, const char *, const char *, key_serial_t) args: (_type, _description, _callout_info, destringid) +syscall sys_keyctl nr 219 nbargs 5 types: (int, unsigned long, unsigned long, unsigned long, unsigned long) args: (option, arg2, arg3, arg4, arg5) +syscall sys_execve nr 221 nbargs 3 types: (const char *, const char *const *, const char *const *) args: (filename, argv, envp) +syscall sys_fadvise64_64 nr 223 nbargs 4 types: (int, loff_t, loff_t, int) args: (fd, offset, len, advice) +syscall sys_swapon nr 224 nbargs 2 types: (const char *, int) args: (specialfile, swap_flags) +syscall sys_swapoff nr 225 nbargs 1 types: (const char *) args: (specialfile) +syscall sys_mprotect nr 226 nbargs 3 types: (unsigned long, size_t, unsigned long) args: (start, len, prot) +syscall sys_msync nr 227 nbargs 3 types: (unsigned long, size_t, int) args: (start, len, flags) +syscall sys_mlock nr 228 nbargs 2 types: (unsigned long, size_t) args: (start, len) +syscall sys_munlock nr 229 nbargs 2 types: (unsigned long, size_t) args: (start, len) +syscall sys_mlockall nr 230 nbargs 1 types: (int) args: (flags) +syscall sys_munlockall nr 231 nbargs 0 types: () args: () +syscall sys_mincore nr 232 nbargs 3 types: (unsigned long, size_t, unsigned char *) args: (start, len, vec) +syscall sys_madvise nr 233 nbargs 3 types: (unsigned long, size_t, int) args: (start, len_in, behavior) +syscall sys_remap_file_pages nr 234 nbargs 5 types: (unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) args: (start, size, prot, pgoff, flags) +syscall sys_rt_tgsigqueueinfo nr 240 nbargs 4 types: (pid_t, pid_t, int, siginfo_t *) args: (tgid, pid, sig, uinfo) +syscall sys_perf_event_open nr 241 nbargs 5 types: (struct perf_event_attr *, pid_t, int, int, unsigned long) args: (attr_uptr, pid, cpu, group_fd, flags) +syscall sys_accept4 nr 242 nbargs 4 types: (int, struct sockaddr *, int *, int) args: (fd, upeer_sockaddr, upeer_addrlen, flags) +syscall sys_recvmmsg nr 243 nbargs 5 types: (int, struct mmsghdr *, unsigned int, unsigned int, struct timespec *) args: (fd, mmsg, vlen, flags, timeout) +syscall sys_wait4 nr 260 nbargs 4 types: (pid_t, int *, int, struct rusage *) args: (upid, stat_addr, options, ru) +syscall sys_prlimit64 nr 261 nbargs 4 types: (pid_t, unsigned int, const struct rlimit64 *, struct rlimit64 *) args: (pid, resource, new_rlim, old_rlim) +syscall sys_fanotify_init nr 262 nbargs 2 types: (unsigned int, unsigned int) args: (flags, event_f_flags) +syscall sys_fanotify_mark nr 263 nbargs 5 types: (int, unsigned int, __u64, int, const char *) args: (fanotify_fd, flags, mask, dfd, pathname) +syscall sys_name_to_handle_at nr 264 nbargs 5 types: (int, const char *, struct file_handle *, int *, int) args: (dfd, name, handle, mnt_id, flag) +syscall sys_open_by_handle_at nr 265 nbargs 3 types: (int, struct file_handle *, int) args: (mountdirfd, handle, flags) +syscall sys_clock_adjtime nr 266 nbargs 2 types: (const clockid_t, struct timex *) args: (which_clock, utx) +syscall sys_syncfs nr 267 nbargs 1 types: (int) args: (fd) +syscall sys_setns nr 268 nbargs 2 types: (int, int) args: (fd, nstype) +syscall sys_sendmmsg nr 269 nbargs 4 types: (int, struct mmsghdr *, unsigned int, unsigned int) args: (fd, mmsg, vlen, flags) +syscall sys_process_vm_readv nr 270 nbargs 6 types: (pid_t, const struct iovec *, unsigned long, const struct iovec *, unsigned long, unsigned long) args: (pid, lvec, liovcnt, rvec, riovcnt, flags) +syscall sys_process_vm_writev nr 271 nbargs 6 types: (pid_t, const struct iovec *, unsigned long, const struct iovec *, unsigned long, unsigned long) args: (pid, lvec, liovcnt, rvec, riovcnt, flags) +syscall sys_finit_module nr 273 nbargs 3 types: (int, const char *, int) args: (fd, uargs, flags) +syscall sys_sched_setattr nr 274 nbargs 3 types: (pid_t, struct sched_attr *, unsigned int) args: (pid, uattr, flags) +syscall sys_sched_getattr nr 275 nbargs 4 types: (pid_t, struct sched_attr *, unsigned int, unsigned int) args: (pid, uattr, size, flags) +syscall sys_renameat2 nr 276 nbargs 5 types: (int, const char *, int, const char *, unsigned int) args: (olddfd, oldname, newdfd, newname, flags) +syscall sys_seccomp nr 277 nbargs 3 types: (unsigned int, unsigned int, const char *) args: (op, flags, uargs) +syscall sys_getrandom nr 278 nbargs 3 types: (char *, size_t, unsigned int) args: (buf, count, flags) +syscall sys_memfd_create nr 279 nbargs 2 types: (const char *, unsigned int) args: (uname, flags) +syscall sys_execveat nr 281 nbargs 5 types: (int, const char *, const char *const *, const char *const *, int) args: (fd, filename, argv, envp, flags) +syscall sys_membarrier nr 283 nbargs 2 types: (int, int) args: (cmd, flags) +syscall sys_mlock2 nr 284 nbargs 3 types: (unsigned long, size_t, int) args: (start, len, flags) \ No newline at end of file diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/arm-32-syscalls-3.4.25_integers.h lttng-modules-2.8.0/instrumentation/syscalls/headers/arm-32-syscalls-3.4.25_integers.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/arm-32-syscalls-3.4.25_integers.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/arm-32-syscalls-3.4.25_integers.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(_TRACE_SYSCALLS_INTEGERS_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_SYSCALLS_INTEGERS_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include "arm-32-syscalls-3.4.25_integers_override.h" #include "syscalls_integers_override.h" @@ -821,7 +821,7 @@ #endif /* _TRACE_SYSCALLS_INTEGERS_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include #else /* CREATE_SYSCALL_TABLE */ diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/arm-32-syscalls-3.4.25_integers_override.h lttng-modules-2.8.0/instrumentation/syscalls/headers/arm-32-syscalls-3.4.25_integers_override.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/arm-32-syscalls-3.4.25_integers_override.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/arm-32-syscalls-3.4.25_integers_override.h 2016-05-20 01:34:54.000000000 +0000 @@ -1,29 +1,127 @@ +#ifndef CONFIG_UID16 +#define OVERRIDE_32_getuid16 +#define OVERRIDE_32_getgid16 +#define OVERRIDE_32_geteuid16 +#define OVERRIDE_32_getegid16 +#define OVERRIDE_32_setuid16 +#define OVERRIDE_32_setgid16 +#define OVERRIDE_32_setfsuid16 +#define OVERRIDE_32_setfsgid16 +#define OVERRIDE_32_setreuid16 +#define OVERRIDE_32_setregid16 +#define OVERRIDE_32_fchown16 +#define OVERRIDE_32_setresuid16 +#define OVERRIDE_32_setresgid16 + +#define OVERRIDE_TABLE_32_getuid16 +#define OVERRIDE_TABLE_32_getgid16 +#define OVERRIDE_TABLE_32_geteuid16 +#define OVERRIDE_TABLE_32_getegid16 +#define OVERRIDE_TABLE_32_setuid16 +#define OVERRIDE_TABLE_32_setgid16 +#define OVERRIDE_TABLE_32_setreuid16 +#define OVERRIDE_TABLE_32_setregid16 +#define OVERRIDE_TABLE_32_fchown16 +#define OVERRIDE_TABLE_32_setfsuid16 +#define OVERRIDE_TABLE_32_setfsgid16 +#define OVERRIDE_TABLE_32_setresuid16 +#define OVERRIDE_TABLE_32_setresgid16 -#define OVERRIDE_TABLE_32_arm_fadvise64_64 -#define OVERRIDE_TABLE_32_sync_file_range2 +#endif #ifndef CREATE_SYSCALL_TABLE +#if (__BYTE_ORDER == __LITTLE_ENDIAN) + +#define OVERRIDE_32_arm_fadvise64_64 SC_LTTNG_TRACEPOINT_EVENT(arm_fadvise64_64, - TP_PROTO(int fd, int advice, loff_t offset, loff_t len), - TP_ARGS(fd, advice, offset, len), - TP_FIELDS( - ctf_integer_hex(int, fd, fd) - ctf_integer_hex(int, advice, advice) - ctf_integer_hex(loff_t, offset, offset) - ctf_integer_hex(loff_t, len, len) + TP_PROTO(sc_exit(long ret,) int fd, int advice, + int32_t offset_low, int32_t offset_high, + int32_t len_low, int32_t len_high), + TP_ARGS(sc_exit(ret,) fd, advice, offset_low, offset_high, + len_low, len_high), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) + sc_in(ctf_integer(int, fd, fd)) + sc_in(ctf_integer(int, advice, advice)) + sc_in(ctf_integer(loff_t, offset, + ((loff_t) offset_high << 32) | offset_low)) + sc_in(ctf_integer(loff_t, len, + ((loff_t) len_high << 32) | len_low)) ) ) +#define OVERRIDE_32_sync_file_range2 SC_LTTNG_TRACEPOINT_EVENT(sync_file_range2, - TP_PROTO(int fd, loff_t offset, loff_t nbytes, unsigned int flags), - TP_ARGS(fd, offset, nbytes, flags), - TP_FIELDS( - ctf_integer_hex(int, fd, fd) - ctf_integer_hex(loff_t, offset, offset) - ctf_integer_hex(loff_t, nbytes, nbytes) - ctf_integer_hex(unsigned int, flags, flags) + TP_PROTO(sc_exit(long ret,) int fd, + unsigned int flags, + int32_t offset_low, int32_t offset_high, + int32_t nbytes_low, int32_t nbytes_high), + TP_ARGS(sc_exit(ret,) fd, flags, offset_low, offset_high, + nbytes_low, nbytes_high), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) + sc_in(ctf_integer(int, fd, fd)) + sc_in(ctf_integer(unsigned int, flags, flags)) + sc_in(ctf_integer(loff_t, offset, + ((loff_t) offset_high << 32) | offset_low)) + sc_in(ctf_integer(loff_t, nbytes, + ((loff_t) nbytes_high << 32) | nbytes_low)) + ) +) + +#else /* __BIG_ENDIAN */ + +#define OVERRIDE_32_arm_fadvise64_64 +SC_LTTNG_TRACEPOINT_EVENT(arm_fadvise64_64, + TP_PROTO(sc_exit(long ret,) int fd, int advice, + int32_t offset_high, int32_t offset_low, + int32_t len_high, int32_t len_low), + TP_ARGS(sc_exit(ret,) fd, advice, offset_high, offset_low, + len_high, len_low), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) + sc_in(ctf_integer(int, fd, fd)) + sc_in(ctf_integer(int, advice, advice)) + sc_in(ctf_integer(loff_t, offset, + ((loff_t) offset_high << 32) | offset_low)) + sc_in(ctf_integer(loff_t, len, + ((loff_t) len_high << 32) | len_low)) + ) +) + +#define OVERRIDE_32_sync_file_range2 +SC_LTTNG_TRACEPOINT_EVENT(sync_file_range2, + TP_PROTO(sc_exit(long ret,) int fd, + unsigned int flags, + int32_t offset_high, int32_t offset_low, + int32_t nbytes_high, int32_t nbytes_low), + TP_ARGS(sc_exit(ret,) fd, flags, offset_high, offset_low, + nbytes_high, nbytes_low), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) + sc_in(ctf_integer(int, fd, fd)) + sc_in(ctf_integer(unsigned int, flags, flags)) + sc_in(ctf_integer(loff_t, offset, + ((loff_t) offset_high << 32) | offset_low)) + sc_in(ctf_integer(loff_t, nbytes, + ((loff_t) nbytes_high << 32) | nbytes_low)) + ) +) + +#endif + +#define OVERRIDE_32_mmap2 +SC_LTTNG_TRACEPOINT_EVENT(mmap2, + TP_PROTO(sc_exit(unsigned long ret,) + unsigned long addr, unsigned long len, + unsigned long prot, unsigned long flags, + unsigned long fd, unsigned long pgoff), + TP_ARGS(sc_exit(ret,) addr, len, prot, flags, fd, pgoff), + TP_FIELDS(sc_exit(ctf_integer_hex(unsigned long, ret, ret)) + sc_in(ctf_integer_hex(unsigned long, addr, addr)) + sc_in(ctf_integer(size_t, len, len)) + sc_in(ctf_integer(int, prot, prot)) + sc_in(ctf_integer(int, flags, flags)) + sc_in(ctf_integer(int, fd, fd)) + sc_in(ctf_integer(off_t, pgoff, pgoff)) ) ) @@ -31,11 +129,12 @@ #define OVERRIDE_TABLE_32_mmap TRACE_SYSCALL_TABLE(mmap, mmap, 90, 6) - +#define OVERRIDE_TABLE_32_mmap2 +TRACE_SYSCALL_TABLE(mmap2, mmap2, 192, 6) #define OVERRIDE_TABLE_32_arm_fadvise64_64 -TRACE_SYSCALL_TABLE(arm_fadvise64_64, arm_fadvise64_64, 270, 4) +TRACE_SYSCALL_TABLE(arm_fadvise64_64, arm_fadvise64_64, 270, 6) #define OVERRIDE_TABLE_32_sync_file_range2 -TRACE_SYSCALL_TABLE(sync_file_range2, sync_file_range2, 341, 4) +TRACE_SYSCALL_TABLE(sync_file_range2, sync_file_range2, 341, 6) #endif /* CREATE_SYSCALL_TABLE */ diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/arm-32-syscalls-3.4.25_pointers.h lttng-modules-2.8.0/instrumentation/syscalls/headers/arm-32-syscalls-3.4.25_pointers.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/arm-32-syscalls-3.4.25_pointers.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/arm-32-syscalls-3.4.25_pointers.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(_TRACE_SYSCALLS_POINTERS_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_SYSCALLS_POINTERS_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include "arm-32-syscalls-3.4.25_pointers_override.h" #include "syscalls_pointers_override.h" @@ -1350,7 +1350,7 @@ #endif /* _TRACE_SYSCALLS_POINTERS_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include #else /* CREATE_SYSCALL_TABLE */ diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/arm-32-syscalls-3.4.25_pointers_override.h lttng-modules-2.8.0/instrumentation/syscalls/headers/arm-32-syscalls-3.4.25_pointers_override.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/arm-32-syscalls-3.4.25_pointers_override.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/arm-32-syscalls-3.4.25_pointers_override.h 2016-05-20 01:34:54.000000000 +0000 @@ -1,23 +1,17 @@ #define OVERRIDE_TABLE_32_mmap2 +# ifndef CONFIG_UID16 +# define OVERRIDE_32_getgroups16 +# define OVERRIDE_32_setgroups16 +# define OVERRIDE_32_lchown16 +# define OVERRIDE_32_getresuid16 +# define OVERRIDE_32_getresgid16 +# define OVERRIDE_32_chown16 +# endif #ifndef CREATE_SYSCALL_TABLE -SC_LTTNG_TRACEPOINT_EVENT(mmap2, - TP_PROTO(void *addr, size_t len, int prot, - int flags, int fd, off_t pgoff), - TP_ARGS(addr, len, prot, flags, fd, pgoff), - TP_FIELDS( - ctf_integer_hex(void *, addr, addr) - ctf_integer(size_t, len, len) - ctf_integer(int, prot, prot) - ctf_integer(int, flags, flags) - ctf_integer(int, fd, fd) - ctf_integer(off_t, pgoff, pgoff) - ) -) - #define OVERRIDE_32_pipe SC_LTTNG_TRACEPOINT_EVENT(pipe, TP_PROTO(sc_exit(long ret,) int * fildes), @@ -29,12 +23,19 @@ #else /* CREATE_SYSCALL_TABLE */ +# ifndef CONFIG_UID16 +# define OVERRIDE_TABLE_32_getgroups16 +# define OVERRIDE_TABLE_32_setgroups16 +# define OVERRIDE_TABLE_32_lchown16 +# define OVERRIDE_TABLE_32_getresuid16 +# define OVERRIDE_TABLE_32_getresgid16 +# define OVERRIDE_TABLE_32_chown16 +# endif + #define OVERRIDE_TABLE_32_execve TRACE_SYSCALL_TABLE(execve, execve, 11, 3) #define OVERRIDE_TABLE_32_clone TRACE_SYSCALL_TABLE(clone, clone, 120, 5) -#define OVERRIDE_TABLE_32_mmap2 -TRACE_SYSCALL_TABLE(mmap2, mmap2, 192, 6) #endif /* CREATE_SYSCALL_TABLE */ diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/arm-64-syscalls-4.4.0_integers.h lttng-modules-2.8.0/instrumentation/syscalls/headers/arm-64-syscalls-4.4.0_integers.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/arm-64-syscalls-4.4.0_integers.h 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/arm-64-syscalls-4.4.0_integers.h 2016-05-20 01:34:54.000000000 +0000 @@ -0,0 +1,1011 @@ +/* THIS FILE IS AUTO-GENERATED. DO NOT EDIT */ +#ifndef CREATE_SYSCALL_TABLE + +#if !defined(_TRACE_SYSCALLS_INTEGERS_H) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACE_SYSCALLS_INTEGERS_H + +#include +#include +#include "arm-64-syscalls-4.4.0_integers_override.h" +#include "syscalls_integers_override.h" + +#ifdef SC_ENTER +SC_LTTNG_TRACEPOINT_EVENT_CLASS_NOARGS(syscalls_noargs, + TP_FIELDS() +) +#ifndef OVERRIDE_64_vhangup +SC_LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(syscalls_noargs, vhangup) +#endif +#ifndef OVERRIDE_64_sync +SC_LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(syscalls_noargs, sync) +#endif +#ifndef OVERRIDE_64_sched_yield +SC_LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(syscalls_noargs, sched_yield) +#endif +#ifndef OVERRIDE_64_restart_syscall +SC_LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(syscalls_noargs, restart_syscall) +#endif +#ifndef OVERRIDE_64_setsid +SC_LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(syscalls_noargs, setsid) +#endif +#ifndef OVERRIDE_64_getpid +SC_LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(syscalls_noargs, getpid) +#endif +#ifndef OVERRIDE_64_getppid +SC_LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(syscalls_noargs, getppid) +#endif +#ifndef OVERRIDE_64_getuid +SC_LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(syscalls_noargs, getuid) +#endif +#ifndef OVERRIDE_64_geteuid +SC_LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(syscalls_noargs, geteuid) +#endif +#ifndef OVERRIDE_64_getgid +SC_LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(syscalls_noargs, getgid) +#endif +#ifndef OVERRIDE_64_getegid +SC_LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(syscalls_noargs, getegid) +#endif +#ifndef OVERRIDE_64_gettid +SC_LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(syscalls_noargs, gettid) +#endif +#ifndef OVERRIDE_64_munlockall +SC_LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(syscalls_noargs, munlockall) +#endif +#else /* #ifdef SC_ENTER */ +#ifndef OVERRIDE_64_vhangup +SC_LTTNG_TRACEPOINT_EVENT(vhangup, + TP_PROTO(sc_exit(long ret)), + TP_ARGS(sc_exit(ret)), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret))) +) +#endif +#ifndef OVERRIDE_64_sync +SC_LTTNG_TRACEPOINT_EVENT(sync, + TP_PROTO(sc_exit(long ret)), + TP_ARGS(sc_exit(ret)), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret))) +) +#endif +#ifndef OVERRIDE_64_sched_yield +SC_LTTNG_TRACEPOINT_EVENT(sched_yield, + TP_PROTO(sc_exit(long ret)), + TP_ARGS(sc_exit(ret)), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret))) +) +#endif +#ifndef OVERRIDE_64_restart_syscall +SC_LTTNG_TRACEPOINT_EVENT(restart_syscall, + TP_PROTO(sc_exit(long ret)), + TP_ARGS(sc_exit(ret)), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret))) +) +#endif +#ifndef OVERRIDE_64_setsid +SC_LTTNG_TRACEPOINT_EVENT(setsid, + TP_PROTO(sc_exit(long ret)), + TP_ARGS(sc_exit(ret)), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret))) +) +#endif +#ifndef OVERRIDE_64_getpid +SC_LTTNG_TRACEPOINT_EVENT(getpid, + TP_PROTO(sc_exit(long ret)), + TP_ARGS(sc_exit(ret)), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret))) +) +#endif +#ifndef OVERRIDE_64_getppid +SC_LTTNG_TRACEPOINT_EVENT(getppid, + TP_PROTO(sc_exit(long ret)), + TP_ARGS(sc_exit(ret)), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret))) +) +#endif +#ifndef OVERRIDE_64_getuid +SC_LTTNG_TRACEPOINT_EVENT(getuid, + TP_PROTO(sc_exit(long ret)), + TP_ARGS(sc_exit(ret)), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret))) +) +#endif +#ifndef OVERRIDE_64_geteuid +SC_LTTNG_TRACEPOINT_EVENT(geteuid, + TP_PROTO(sc_exit(long ret)), + TP_ARGS(sc_exit(ret)), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret))) +) +#endif +#ifndef OVERRIDE_64_getgid +SC_LTTNG_TRACEPOINT_EVENT(getgid, + TP_PROTO(sc_exit(long ret)), + TP_ARGS(sc_exit(ret)), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret))) +) +#endif +#ifndef OVERRIDE_64_getegid +SC_LTTNG_TRACEPOINT_EVENT(getegid, + TP_PROTO(sc_exit(long ret)), + TP_ARGS(sc_exit(ret)), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret))) +) +#endif +#ifndef OVERRIDE_64_gettid +SC_LTTNG_TRACEPOINT_EVENT(gettid, + TP_PROTO(sc_exit(long ret)), + TP_ARGS(sc_exit(ret)), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret))) +) +#endif +#ifndef OVERRIDE_64_munlockall +SC_LTTNG_TRACEPOINT_EVENT(munlockall, + TP_PROTO(sc_exit(long ret)), + TP_ARGS(sc_exit(ret)), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret))) +) +#endif +#endif /* else #ifdef SC_ENTER */ +#ifndef OVERRIDE_64_io_destroy +SC_LTTNG_TRACEPOINT_EVENT(io_destroy, + TP_PROTO(sc_exit(long ret,) aio_context_t ctx), + TP_ARGS(sc_exit(ret,) ctx), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(aio_context_t, ctx, ctx))) +) +#endif +#ifndef OVERRIDE_64_epoll_create1 +SC_LTTNG_TRACEPOINT_EVENT(epoll_create1, + TP_PROTO(sc_exit(long ret,) int flags), + TP_ARGS(sc_exit(ret,) flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_dup +SC_LTTNG_TRACEPOINT_EVENT(dup, + TP_PROTO(sc_exit(long ret,) unsigned int fildes), + TP_ARGS(sc_exit(ret,) fildes), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, fildes, fildes))) +) +#endif +#ifndef OVERRIDE_64_inotify_init1 +SC_LTTNG_TRACEPOINT_EVENT(inotify_init1, + TP_PROTO(sc_exit(long ret,) int flags), + TP_ARGS(sc_exit(ret,) flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_fchdir +SC_LTTNG_TRACEPOINT_EVENT(fchdir, + TP_PROTO(sc_exit(long ret,) unsigned int fd), + TP_ARGS(sc_exit(ret,) fd), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, fd, fd))) +) +#endif +#ifndef OVERRIDE_64_close +SC_LTTNG_TRACEPOINT_EVENT(close, + TP_PROTO(sc_exit(long ret,) unsigned int fd), + TP_ARGS(sc_exit(ret,) fd), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, fd, fd))) +) +#endif +#ifndef OVERRIDE_64_fsync +SC_LTTNG_TRACEPOINT_EVENT(fsync, + TP_PROTO(sc_exit(long ret,) unsigned int fd), + TP_ARGS(sc_exit(ret,) fd), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, fd, fd))) +) +#endif +#ifndef OVERRIDE_64_fdatasync +SC_LTTNG_TRACEPOINT_EVENT(fdatasync, + TP_PROTO(sc_exit(long ret,) unsigned int fd), + TP_ARGS(sc_exit(ret,) fd), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, fd, fd))) +) +#endif +#ifndef OVERRIDE_64_personality +SC_LTTNG_TRACEPOINT_EVENT(personality, + TP_PROTO(sc_exit(long ret,) unsigned int personality), + TP_ARGS(sc_exit(ret,) personality), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, personality, personality))) +) +#endif +#ifndef OVERRIDE_64_exit +SC_LTTNG_TRACEPOINT_EVENT(exit, + TP_PROTO(sc_exit(long ret,) int error_code), + TP_ARGS(sc_exit(ret,) error_code), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, error_code, error_code))) +) +#endif +#ifndef OVERRIDE_64_exit_group +SC_LTTNG_TRACEPOINT_EVENT(exit_group, + TP_PROTO(sc_exit(long ret,) int error_code), + TP_ARGS(sc_exit(ret,) error_code), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, error_code, error_code))) +) +#endif +#ifndef OVERRIDE_64_unshare +SC_LTTNG_TRACEPOINT_EVENT(unshare, + TP_PROTO(sc_exit(long ret,) unsigned long unshare_flags), + TP_ARGS(sc_exit(ret,) unshare_flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned long, unshare_flags, unshare_flags))) +) +#endif +#ifndef OVERRIDE_64_timer_getoverrun +SC_LTTNG_TRACEPOINT_EVENT(timer_getoverrun, + TP_PROTO(sc_exit(long ret,) timer_t timer_id), + TP_ARGS(sc_exit(ret,) timer_id), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(timer_t, timer_id, timer_id))) +) +#endif +#ifndef OVERRIDE_64_timer_delete +SC_LTTNG_TRACEPOINT_EVENT(timer_delete, + TP_PROTO(sc_exit(long ret,) timer_t timer_id), + TP_ARGS(sc_exit(ret,) timer_id), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(timer_t, timer_id, timer_id))) +) +#endif +#ifndef OVERRIDE_64_sched_getscheduler +SC_LTTNG_TRACEPOINT_EVENT(sched_getscheduler, + TP_PROTO(sc_exit(long ret,) pid_t pid), + TP_ARGS(sc_exit(ret,) pid), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(pid_t, pid, pid))) +) +#endif +#ifndef OVERRIDE_64_sched_get_priority_max +SC_LTTNG_TRACEPOINT_EVENT(sched_get_priority_max, + TP_PROTO(sc_exit(long ret,) int policy), + TP_ARGS(sc_exit(ret,) policy), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, policy, policy))) +) +#endif +#ifndef OVERRIDE_64_sched_get_priority_min +SC_LTTNG_TRACEPOINT_EVENT(sched_get_priority_min, + TP_PROTO(sc_exit(long ret,) int policy), + TP_ARGS(sc_exit(ret,) policy), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, policy, policy))) +) +#endif +#ifndef OVERRIDE_64_setgid +SC_LTTNG_TRACEPOINT_EVENT(setgid, + TP_PROTO(sc_exit(long ret,) gid_t gid), + TP_ARGS(sc_exit(ret,) gid), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(gid_t, gid, gid))) +) +#endif +#ifndef OVERRIDE_64_setuid +SC_LTTNG_TRACEPOINT_EVENT(setuid, + TP_PROTO(sc_exit(long ret,) uid_t uid), + TP_ARGS(sc_exit(ret,) uid), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(uid_t, uid, uid))) +) +#endif +#ifndef OVERRIDE_64_setfsuid +SC_LTTNG_TRACEPOINT_EVENT(setfsuid, + TP_PROTO(sc_exit(long ret,) uid_t uid), + TP_ARGS(sc_exit(ret,) uid), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(uid_t, uid, uid))) +) +#endif +#ifndef OVERRIDE_64_setfsgid +SC_LTTNG_TRACEPOINT_EVENT(setfsgid, + TP_PROTO(sc_exit(long ret,) gid_t gid), + TP_ARGS(sc_exit(ret,) gid), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(gid_t, gid, gid))) +) +#endif +#ifndef OVERRIDE_64_getpgid +SC_LTTNG_TRACEPOINT_EVENT(getpgid, + TP_PROTO(sc_exit(long ret,) pid_t pid), + TP_ARGS(sc_exit(ret,) pid), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(pid_t, pid, pid))) +) +#endif +#ifndef OVERRIDE_64_getsid +SC_LTTNG_TRACEPOINT_EVENT(getsid, + TP_PROTO(sc_exit(long ret,) pid_t pid), + TP_ARGS(sc_exit(ret,) pid), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(pid_t, pid, pid))) +) +#endif +#ifndef OVERRIDE_64_umask +SC_LTTNG_TRACEPOINT_EVENT(umask, + TP_PROTO(sc_exit(long ret,) int mask), + TP_ARGS(sc_exit(ret,) mask), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, mask, mask))) +) +#endif +#ifndef OVERRIDE_64_brk +SC_LTTNG_TRACEPOINT_EVENT(brk, + TP_PROTO(sc_exit(long ret,) unsigned long brk), + TP_ARGS(sc_exit(ret,) brk), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned long, brk, brk))) +) +#endif +#ifndef OVERRIDE_64_mlockall +SC_LTTNG_TRACEPOINT_EVENT(mlockall, + TP_PROTO(sc_exit(long ret,) int flags), + TP_ARGS(sc_exit(ret,) flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_syncfs +SC_LTTNG_TRACEPOINT_EVENT(syncfs, + TP_PROTO(sc_exit(long ret,) int fd), + TP_ARGS(sc_exit(ret,) fd), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd))) +) +#endif +#ifndef OVERRIDE_64_eventfd2 +SC_LTTNG_TRACEPOINT_EVENT(eventfd2, + TP_PROTO(sc_exit(long ret,) unsigned int count, int flags), + TP_ARGS(sc_exit(ret,) count, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, count, count)) sc_in(ctf_integer(int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_inotify_rm_watch +SC_LTTNG_TRACEPOINT_EVENT(inotify_rm_watch, + TP_PROTO(sc_exit(long ret,) int fd, __s32 wd), + TP_ARGS(sc_exit(ret,) fd, wd), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_in(ctf_integer(__s32, wd, wd))) +) +#endif +#ifndef OVERRIDE_64_ioprio_get +SC_LTTNG_TRACEPOINT_EVENT(ioprio_get, + TP_PROTO(sc_exit(long ret,) int which, int who), + TP_ARGS(sc_exit(ret,) which, who), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, which, which)) sc_in(ctf_integer(int, who, who))) +) +#endif +#ifndef OVERRIDE_64_flock +SC_LTTNG_TRACEPOINT_EVENT(flock, + TP_PROTO(sc_exit(long ret,) unsigned int fd, unsigned int cmd), + TP_ARGS(sc_exit(ret,) fd, cmd), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, fd, fd)) sc_in(ctf_integer(unsigned int, cmd, cmd))) +) +#endif +#ifndef OVERRIDE_64_ftruncate +SC_LTTNG_TRACEPOINT_EVENT(ftruncate, + TP_PROTO(sc_exit(long ret,) unsigned int fd, unsigned long length), + TP_ARGS(sc_exit(ret,) fd, length), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, fd, fd)) sc_in(ctf_integer(unsigned long, length, length))) +) +#endif +#ifndef OVERRIDE_64_fchmod +SC_LTTNG_TRACEPOINT_EVENT(fchmod, + TP_PROTO(sc_exit(long ret,) unsigned int fd, umode_t mode), + TP_ARGS(sc_exit(ret,) fd, mode), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, fd, fd)) sc_in(ctf_integer(umode_t, mode, mode))) +) +#endif +#ifndef OVERRIDE_64_timerfd_create +SC_LTTNG_TRACEPOINT_EVENT(timerfd_create, + TP_PROTO(sc_exit(long ret,) int clockid, int flags), + TP_ARGS(sc_exit(ret,) clockid, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, clockid, clockid)) sc_in(ctf_integer(int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_kill +SC_LTTNG_TRACEPOINT_EVENT(kill, + TP_PROTO(sc_exit(long ret,) pid_t pid, int sig), + TP_ARGS(sc_exit(ret,) pid, sig), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(pid_t, pid, pid)) sc_in(ctf_integer(int, sig, sig))) +) +#endif +#ifndef OVERRIDE_64_tkill +SC_LTTNG_TRACEPOINT_EVENT(tkill, + TP_PROTO(sc_exit(long ret,) pid_t pid, int sig), + TP_ARGS(sc_exit(ret,) pid, sig), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(pid_t, pid, pid)) sc_in(ctf_integer(int, sig, sig))) +) +#endif +#ifndef OVERRIDE_64_getpriority +SC_LTTNG_TRACEPOINT_EVENT(getpriority, + TP_PROTO(sc_exit(long ret,) int which, int who), + TP_ARGS(sc_exit(ret,) which, who), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, which, which)) sc_in(ctf_integer(int, who, who))) +) +#endif +#ifndef OVERRIDE_64_setregid +SC_LTTNG_TRACEPOINT_EVENT(setregid, + TP_PROTO(sc_exit(long ret,) gid_t rgid, gid_t egid), + TP_ARGS(sc_exit(ret,) rgid, egid), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(gid_t, rgid, rgid)) sc_in(ctf_integer(gid_t, egid, egid))) +) +#endif +#ifndef OVERRIDE_64_setreuid +SC_LTTNG_TRACEPOINT_EVENT(setreuid, + TP_PROTO(sc_exit(long ret,) uid_t ruid, uid_t euid), + TP_ARGS(sc_exit(ret,) ruid, euid), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(uid_t, ruid, ruid)) sc_in(ctf_integer(uid_t, euid, euid))) +) +#endif +#ifndef OVERRIDE_64_setpgid +SC_LTTNG_TRACEPOINT_EVENT(setpgid, + TP_PROTO(sc_exit(long ret,) pid_t pid, pid_t pgid), + TP_ARGS(sc_exit(ret,) pid, pgid), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(pid_t, pid, pid)) sc_in(ctf_integer(pid_t, pgid, pgid))) +) +#endif +#ifndef OVERRIDE_64_msgget +SC_LTTNG_TRACEPOINT_EVENT(msgget, + TP_PROTO(sc_exit(long ret,) key_t key, int msgflg), + TP_ARGS(sc_exit(ret,) key, msgflg), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(key_t, key, key)) sc_in(ctf_integer(int, msgflg, msgflg))) +) +#endif +#ifndef OVERRIDE_64_listen +SC_LTTNG_TRACEPOINT_EVENT(listen, + TP_PROTO(sc_exit(long ret,) int fd, int backlog), + TP_ARGS(sc_exit(ret,) fd, backlog), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_in(ctf_integer(int, backlog, backlog))) +) +#endif +#ifndef OVERRIDE_64_shutdown +SC_LTTNG_TRACEPOINT_EVENT(shutdown, + TP_PROTO(sc_exit(long ret,) int fd, int how), + TP_ARGS(sc_exit(ret,) fd, how), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_in(ctf_integer(int, how, how))) +) +#endif +#ifndef OVERRIDE_64_munmap +SC_LTTNG_TRACEPOINT_EVENT(munmap, + TP_PROTO(sc_exit(long ret,) unsigned long addr, size_t len), + TP_ARGS(sc_exit(ret,) addr, len), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned long, addr, addr)) sc_in(ctf_integer(size_t, len, len))) +) +#endif +#ifndef OVERRIDE_64_mlock +SC_LTTNG_TRACEPOINT_EVENT(mlock, + TP_PROTO(sc_exit(long ret,) unsigned long start, size_t len), + TP_ARGS(sc_exit(ret,) start, len), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned long, start, start)) sc_in(ctf_integer(size_t, len, len))) +) +#endif +#ifndef OVERRIDE_64_munlock +SC_LTTNG_TRACEPOINT_EVENT(munlock, + TP_PROTO(sc_exit(long ret,) unsigned long start, size_t len), + TP_ARGS(sc_exit(ret,) start, len), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned long, start, start)) sc_in(ctf_integer(size_t, len, len))) +) +#endif +#ifndef OVERRIDE_64_fanotify_init +SC_LTTNG_TRACEPOINT_EVENT(fanotify_init, + TP_PROTO(sc_exit(long ret,) unsigned int flags, unsigned int event_f_flags), + TP_ARGS(sc_exit(ret,) flags, event_f_flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, flags, flags)) sc_in(ctf_integer(unsigned int, event_f_flags, event_f_flags))) +) +#endif +#ifndef OVERRIDE_64_setns +SC_LTTNG_TRACEPOINT_EVENT(setns, + TP_PROTO(sc_exit(long ret,) int fd, int nstype), + TP_ARGS(sc_exit(ret,) fd, nstype), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_in(ctf_integer(int, nstype, nstype))) +) +#endif +#ifndef OVERRIDE_64_membarrier +SC_LTTNG_TRACEPOINT_EVENT(membarrier, + TP_PROTO(sc_exit(long ret,) int cmd, int flags), + TP_ARGS(sc_exit(ret,) cmd, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_inout(ctf_integer(int, cmd, cmd)) sc_inout(ctf_integer(int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_dup3 +SC_LTTNG_TRACEPOINT_EVENT(dup3, + TP_PROTO(sc_exit(long ret,) unsigned int oldfd, unsigned int newfd, int flags), + TP_ARGS(sc_exit(ret,) oldfd, newfd, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, oldfd, oldfd)) sc_in(ctf_integer(unsigned int, newfd, newfd)) sc_in(ctf_integer(int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_fcntl +SC_LTTNG_TRACEPOINT_EVENT(fcntl, + TP_PROTO(sc_exit(long ret,) unsigned int fd, unsigned int cmd, unsigned long arg), + TP_ARGS(sc_exit(ret,) fd, cmd, arg), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, fd, fd)) sc_in(ctf_integer(unsigned int, cmd, cmd)) sc_inout(ctf_integer(unsigned long, arg, arg))) +) +#endif +#ifndef OVERRIDE_64_ioctl +SC_LTTNG_TRACEPOINT_EVENT(ioctl, + TP_PROTO(sc_exit(long ret,) unsigned int fd, unsigned int cmd, unsigned long arg), + TP_ARGS(sc_exit(ret,) fd, cmd, arg), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, fd, fd)) sc_in(ctf_integer(unsigned int, cmd, cmd)) sc_inout(ctf_integer(unsigned long, arg, arg))) +) +#endif +#ifndef OVERRIDE_64_ioprio_set +SC_LTTNG_TRACEPOINT_EVENT(ioprio_set, + TP_PROTO(sc_exit(long ret,) int which, int who, int ioprio), + TP_ARGS(sc_exit(ret,) which, who, ioprio), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, which, which)) sc_in(ctf_integer(int, who, who)) sc_in(ctf_integer(int, ioprio, ioprio))) +) +#endif +#ifndef OVERRIDE_64_fchown +SC_LTTNG_TRACEPOINT_EVENT(fchown, + TP_PROTO(sc_exit(long ret,) unsigned int fd, uid_t user, gid_t group), + TP_ARGS(sc_exit(ret,) fd, user, group), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, fd, fd)) sc_in(ctf_integer(uid_t, user, user)) sc_in(ctf_integer(gid_t, group, group))) +) +#endif +#ifndef OVERRIDE_64_lseek +SC_LTTNG_TRACEPOINT_EVENT(lseek, + TP_PROTO(sc_exit(long ret,) unsigned int fd, off_t offset, unsigned int whence), + TP_ARGS(sc_exit(ret,) fd, offset, whence), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, fd, fd)) sc_in(ctf_integer(off_t, offset, offset)) sc_in(ctf_integer(unsigned int, whence, whence))) +) +#endif +#ifndef OVERRIDE_64_tgkill +SC_LTTNG_TRACEPOINT_EVENT(tgkill, + TP_PROTO(sc_exit(long ret,) pid_t tgid, pid_t pid, int sig), + TP_ARGS(sc_exit(ret,) tgid, pid, sig), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(pid_t, tgid, tgid)) sc_in(ctf_integer(pid_t, pid, pid)) sc_in(ctf_integer(int, sig, sig))) +) +#endif +#ifndef OVERRIDE_64_setpriority +SC_LTTNG_TRACEPOINT_EVENT(setpriority, + TP_PROTO(sc_exit(long ret,) int which, int who, int niceval), + TP_ARGS(sc_exit(ret,) which, who, niceval), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, which, which)) sc_in(ctf_integer(int, who, who)) sc_in(ctf_integer(int, niceval, niceval))) +) +#endif +#ifndef OVERRIDE_64_setresuid +SC_LTTNG_TRACEPOINT_EVENT(setresuid, + TP_PROTO(sc_exit(long ret,) uid_t ruid, uid_t euid, uid_t suid), + TP_ARGS(sc_exit(ret,) ruid, euid, suid), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(uid_t, ruid, ruid)) sc_in(ctf_integer(uid_t, euid, euid)) sc_in(ctf_integer(uid_t, suid, suid))) +) +#endif +#ifndef OVERRIDE_64_setresgid +SC_LTTNG_TRACEPOINT_EVENT(setresgid, + TP_PROTO(sc_exit(long ret,) gid_t rgid, gid_t egid, gid_t sgid), + TP_ARGS(sc_exit(ret,) rgid, egid, sgid), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(gid_t, rgid, rgid)) sc_in(ctf_integer(gid_t, egid, egid)) sc_in(ctf_integer(gid_t, sgid, sgid))) +) +#endif +#ifndef OVERRIDE_64_semget +SC_LTTNG_TRACEPOINT_EVENT(semget, + TP_PROTO(sc_exit(long ret,) key_t key, int nsems, int semflg), + TP_ARGS(sc_exit(ret,) key, nsems, semflg), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(key_t, key, key)) sc_in(ctf_integer(int, nsems, nsems)) sc_in(ctf_integer(int, semflg, semflg))) +) +#endif +#ifndef OVERRIDE_64_shmget +SC_LTTNG_TRACEPOINT_EVENT(shmget, + TP_PROTO(sc_exit(long ret,) key_t key, size_t size, int shmflg), + TP_ARGS(sc_exit(ret,) key, size, shmflg), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(key_t, key, key)) sc_in(ctf_integer(size_t, size, size)) sc_in(ctf_integer(int, shmflg, shmflg))) +) +#endif +#ifndef OVERRIDE_64_socket +SC_LTTNG_TRACEPOINT_EVENT(socket, + TP_PROTO(sc_exit(long ret,) int family, int type, int protocol), + TP_ARGS(sc_exit(ret,) family, type, protocol), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, family, family)) sc_in(ctf_integer(int, type, type)) sc_in(ctf_integer(int, protocol, protocol))) +) +#endif +#ifndef OVERRIDE_64_readahead +SC_LTTNG_TRACEPOINT_EVENT(readahead, + TP_PROTO(sc_exit(long ret,) int fd, loff_t offset, size_t count), + TP_ARGS(sc_exit(ret,) fd, offset, count), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_in(ctf_integer(loff_t, offset, offset)) sc_in(ctf_integer(size_t, count, count))) +) +#endif +#ifndef OVERRIDE_64_mprotect +SC_LTTNG_TRACEPOINT_EVENT(mprotect, + TP_PROTO(sc_exit(long ret,) unsigned long start, size_t len, unsigned long prot), + TP_ARGS(sc_exit(ret,) start, len, prot), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned long, start, start)) sc_in(ctf_integer(size_t, len, len)) sc_in(ctf_integer(unsigned long, prot, prot))) +) +#endif +#ifndef OVERRIDE_64_msync +SC_LTTNG_TRACEPOINT_EVENT(msync, + TP_PROTO(sc_exit(long ret,) unsigned long start, size_t len, int flags), + TP_ARGS(sc_exit(ret,) start, len, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned long, start, start)) sc_in(ctf_integer(size_t, len, len)) sc_in(ctf_integer(int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_madvise +SC_LTTNG_TRACEPOINT_EVENT(madvise, + TP_PROTO(sc_exit(long ret,) unsigned long start, size_t len_in, int behavior), + TP_ARGS(sc_exit(ret,) start, len_in, behavior), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned long, start, start)) sc_in(ctf_integer(size_t, len_in, len_in)) sc_in(ctf_integer(int, behavior, behavior))) +) +#endif +#ifndef OVERRIDE_64_mlock2 +SC_LTTNG_TRACEPOINT_EVENT(mlock2, + TP_PROTO(sc_exit(long ret,) unsigned long start, size_t len, int flags), + TP_ARGS(sc_exit(ret,) start, len, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_inout(ctf_integer(unsigned long, start, start)) sc_inout(ctf_integer(size_t, len, len)) sc_inout(ctf_integer(int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_fallocate +SC_LTTNG_TRACEPOINT_EVENT(fallocate, + TP_PROTO(sc_exit(long ret,) int fd, int mode, loff_t offset, loff_t len), + TP_ARGS(sc_exit(ret,) fd, mode, offset, len), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_in(ctf_integer(int, mode, mode)) sc_in(ctf_integer(loff_t, offset, offset)) sc_in(ctf_integer(loff_t, len, len))) +) +#endif +#ifndef OVERRIDE_64_tee +SC_LTTNG_TRACEPOINT_EVENT(tee, + TP_PROTO(sc_exit(long ret,) int fdin, int fdout, size_t len, unsigned int flags), + TP_ARGS(sc_exit(ret,) fdin, fdout, len, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fdin, fdin)) sc_in(ctf_integer(int, fdout, fdout)) sc_in(ctf_integer(size_t, len, len)) sc_in(ctf_integer(unsigned int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_sync_file_range +SC_LTTNG_TRACEPOINT_EVENT(sync_file_range, + TP_PROTO(sc_exit(long ret,) int fd, loff_t offset, loff_t nbytes, unsigned int flags), + TP_ARGS(sc_exit(ret,) fd, offset, nbytes, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_in(ctf_integer(loff_t, offset, offset)) sc_in(ctf_integer(loff_t, nbytes, nbytes)) sc_in(ctf_integer(unsigned int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_ptrace +SC_LTTNG_TRACEPOINT_EVENT(ptrace, + TP_PROTO(sc_exit(long ret,) long request, long pid, unsigned long addr, unsigned long data), + TP_ARGS(sc_exit(ret,) request, pid, addr, data), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(long, request, request)) sc_in(ctf_integer(long, pid, pid)) sc_inout(ctf_integer(unsigned long, addr, addr)) sc_inout(ctf_integer(unsigned long, data, data))) +) +#endif +#ifndef OVERRIDE_64_semctl +SC_LTTNG_TRACEPOINT_EVENT(semctl, + TP_PROTO(sc_exit(long ret,) int semid, int semnum, int cmd, unsigned long arg), + TP_ARGS(sc_exit(ret,) semid, semnum, cmd, arg), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, semid, semid)) sc_in(ctf_integer(int, semnum, semnum)) sc_in(ctf_integer(int, cmd, cmd)) sc_inout(ctf_integer(unsigned long, arg, arg))) +) +#endif +#ifndef OVERRIDE_64_fadvise64_64 +SC_LTTNG_TRACEPOINT_EVENT(fadvise64_64, + TP_PROTO(sc_exit(long ret,) int fd, loff_t offset, loff_t len, int advice), + TP_ARGS(sc_exit(ret,) fd, offset, len, advice), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_inout(ctf_integer(int, fd, fd)) sc_inout(ctf_integer(loff_t, offset, offset)) sc_inout(ctf_integer(loff_t, len, len)) sc_inout(ctf_integer(int, advice, advice))) +) +#endif +#ifndef OVERRIDE_64_prctl +SC_LTTNG_TRACEPOINT_EVENT(prctl, + TP_PROTO(sc_exit(long ret,) int option, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5), + TP_ARGS(sc_exit(ret,) option, arg2, arg3, arg4, arg5), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, option, option)) sc_inout(ctf_integer(unsigned long, arg2, arg2)) sc_in(ctf_integer(unsigned long, arg3, arg3)) sc_in(ctf_integer(unsigned long, arg4, arg4)) sc_in(ctf_integer(unsigned long, arg5, arg5))) +) +#endif +#ifndef OVERRIDE_64_mremap +SC_LTTNG_TRACEPOINT_EVENT(mremap, + TP_PROTO(sc_exit(long ret,) unsigned long addr, unsigned long old_len, unsigned long new_len, unsigned long flags, unsigned long new_addr), + TP_ARGS(sc_exit(ret,) addr, old_len, new_len, flags, new_addr), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned long, addr, addr)) sc_in(ctf_integer(unsigned long, old_len, old_len)) sc_in(ctf_integer(unsigned long, new_len, new_len)) sc_in(ctf_integer(unsigned long, flags, flags)) sc_in(ctf_integer(unsigned long, new_addr, new_addr))) +) +#endif +#ifndef OVERRIDE_64_keyctl +SC_LTTNG_TRACEPOINT_EVENT(keyctl, + TP_PROTO(sc_exit(long ret,) int option, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5), + TP_ARGS(sc_exit(ret,) option, arg2, arg3, arg4, arg5), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, option, option)) sc_inout(ctf_integer(unsigned long, arg2, arg2)) sc_inout(ctf_integer(unsigned long, arg3, arg3)) sc_inout(ctf_integer(unsigned long, arg4, arg4)) sc_inout(ctf_integer(unsigned long, arg5, arg5))) +) +#endif +#ifndef OVERRIDE_64_remap_file_pages +SC_LTTNG_TRACEPOINT_EVENT(remap_file_pages, + TP_PROTO(sc_exit(long ret,) unsigned long start, unsigned long size, unsigned long prot, unsigned long pgoff, unsigned long flags), + TP_ARGS(sc_exit(ret,) start, size, prot, pgoff, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned long, start, start)) sc_in(ctf_integer(unsigned long, size, size)) sc_in(ctf_integer(unsigned long, prot, prot)) sc_in(ctf_integer(unsigned long, pgoff, pgoff)) sc_in(ctf_integer(unsigned long, flags, flags))) +) +#endif + +#endif /* _TRACE_SYSCALLS_INTEGERS_H */ + +/* This part must be outside protection */ +#include + +#else /* CREATE_SYSCALL_TABLE */ + +#include "arm-64-syscalls-4.4.0_integers_override.h" +#include "syscalls_integers_override.h" + +#ifdef SC_ENTER +#ifndef OVERRIDE_TABLE_64_vhangup +TRACE_SYSCALL_TABLE(syscalls_noargs, vhangup, 58, 0) +#endif +#ifndef OVERRIDE_TABLE_64_sync +TRACE_SYSCALL_TABLE(syscalls_noargs, sync, 81, 0) +#endif +#ifndef OVERRIDE_TABLE_64_sched_yield +TRACE_SYSCALL_TABLE(syscalls_noargs, sched_yield, 124, 0) +#endif +#ifndef OVERRIDE_TABLE_64_restart_syscall +TRACE_SYSCALL_TABLE(syscalls_noargs, restart_syscall, 128, 0) +#endif +#ifndef OVERRIDE_TABLE_64_setsid +TRACE_SYSCALL_TABLE(syscalls_noargs, setsid, 157, 0) +#endif +#ifndef OVERRIDE_TABLE_64_getpid +TRACE_SYSCALL_TABLE(syscalls_noargs, getpid, 172, 0) +#endif +#ifndef OVERRIDE_TABLE_64_getppid +TRACE_SYSCALL_TABLE(syscalls_noargs, getppid, 173, 0) +#endif +#ifndef OVERRIDE_TABLE_64_getuid +TRACE_SYSCALL_TABLE(syscalls_noargs, getuid, 174, 0) +#endif +#ifndef OVERRIDE_TABLE_64_geteuid +TRACE_SYSCALL_TABLE(syscalls_noargs, geteuid, 175, 0) +#endif +#ifndef OVERRIDE_TABLE_64_getgid +TRACE_SYSCALL_TABLE(syscalls_noargs, getgid, 176, 0) +#endif +#ifndef OVERRIDE_TABLE_64_getegid +TRACE_SYSCALL_TABLE(syscalls_noargs, getegid, 177, 0) +#endif +#ifndef OVERRIDE_TABLE_64_gettid +TRACE_SYSCALL_TABLE(syscalls_noargs, gettid, 178, 0) +#endif +#ifndef OVERRIDE_TABLE_64_munlockall +TRACE_SYSCALL_TABLE(syscalls_noargs, munlockall, 231, 0) +#endif +#else /* #ifdef SC_ENTER */ +#ifndef OVERRIDE_TABLE_64_vhangup +TRACE_SYSCALL_TABLE(vhangup, vhangup, 58, 0) +#endif +#ifndef OVERRIDE_TABLE_64_sync +TRACE_SYSCALL_TABLE(sync, sync, 81, 0) +#endif +#ifndef OVERRIDE_TABLE_64_sched_yield +TRACE_SYSCALL_TABLE(sched_yield, sched_yield, 124, 0) +#endif +#ifndef OVERRIDE_TABLE_64_restart_syscall +TRACE_SYSCALL_TABLE(restart_syscall, restart_syscall, 128, 0) +#endif +#ifndef OVERRIDE_TABLE_64_setsid +TRACE_SYSCALL_TABLE(setsid, setsid, 157, 0) +#endif +#ifndef OVERRIDE_TABLE_64_getpid +TRACE_SYSCALL_TABLE(getpid, getpid, 172, 0) +#endif +#ifndef OVERRIDE_TABLE_64_getppid +TRACE_SYSCALL_TABLE(getppid, getppid, 173, 0) +#endif +#ifndef OVERRIDE_TABLE_64_getuid +TRACE_SYSCALL_TABLE(getuid, getuid, 174, 0) +#endif +#ifndef OVERRIDE_TABLE_64_geteuid +TRACE_SYSCALL_TABLE(geteuid, geteuid, 175, 0) +#endif +#ifndef OVERRIDE_TABLE_64_getgid +TRACE_SYSCALL_TABLE(getgid, getgid, 176, 0) +#endif +#ifndef OVERRIDE_TABLE_64_getegid +TRACE_SYSCALL_TABLE(getegid, getegid, 177, 0) +#endif +#ifndef OVERRIDE_TABLE_64_gettid +TRACE_SYSCALL_TABLE(gettid, gettid, 178, 0) +#endif +#ifndef OVERRIDE_TABLE_64_munlockall +TRACE_SYSCALL_TABLE(munlockall, munlockall, 231, 0) +#endif +#endif /* else #ifdef SC_ENTER */ +#ifndef OVERRIDE_TABLE_64_io_destroy +TRACE_SYSCALL_TABLE(io_destroy, io_destroy, 1, 1) +#endif +#ifndef OVERRIDE_TABLE_64_eventfd2 +TRACE_SYSCALL_TABLE(eventfd2, eventfd2, 19, 2) +#endif +#ifndef OVERRIDE_TABLE_64_epoll_create1 +TRACE_SYSCALL_TABLE(epoll_create1, epoll_create1, 20, 1) +#endif +#ifndef OVERRIDE_TABLE_64_dup +TRACE_SYSCALL_TABLE(dup, dup, 23, 1) +#endif +#ifndef OVERRIDE_TABLE_64_dup3 +TRACE_SYSCALL_TABLE(dup3, dup3, 24, 3) +#endif +#ifndef OVERRIDE_TABLE_64_fcntl +TRACE_SYSCALL_TABLE(fcntl, fcntl, 25, 3) +#endif +#ifndef OVERRIDE_TABLE_64_inotify_init1 +TRACE_SYSCALL_TABLE(inotify_init1, inotify_init1, 26, 1) +#endif +#ifndef OVERRIDE_TABLE_64_inotify_rm_watch +TRACE_SYSCALL_TABLE(inotify_rm_watch, inotify_rm_watch, 28, 2) +#endif +#ifndef OVERRIDE_TABLE_64_ioctl +TRACE_SYSCALL_TABLE(ioctl, ioctl, 29, 3) +#endif +#ifndef OVERRIDE_TABLE_64_ioprio_set +TRACE_SYSCALL_TABLE(ioprio_set, ioprio_set, 30, 3) +#endif +#ifndef OVERRIDE_TABLE_64_ioprio_get +TRACE_SYSCALL_TABLE(ioprio_get, ioprio_get, 31, 2) +#endif +#ifndef OVERRIDE_TABLE_64_flock +TRACE_SYSCALL_TABLE(flock, flock, 32, 2) +#endif +#ifndef OVERRIDE_TABLE_64_ftruncate +TRACE_SYSCALL_TABLE(ftruncate, ftruncate, 46, 2) +#endif +#ifndef OVERRIDE_TABLE_64_fallocate +TRACE_SYSCALL_TABLE(fallocate, fallocate, 47, 4) +#endif +#ifndef OVERRIDE_TABLE_64_fchdir +TRACE_SYSCALL_TABLE(fchdir, fchdir, 50, 1) +#endif +#ifndef OVERRIDE_TABLE_64_fchmod +TRACE_SYSCALL_TABLE(fchmod, fchmod, 52, 2) +#endif +#ifndef OVERRIDE_TABLE_64_fchown +TRACE_SYSCALL_TABLE(fchown, fchown, 55, 3) +#endif +#ifndef OVERRIDE_TABLE_64_close +TRACE_SYSCALL_TABLE(close, close, 57, 1) +#endif +#ifndef OVERRIDE_TABLE_64_lseek +TRACE_SYSCALL_TABLE(lseek, lseek, 62, 3) +#endif +#ifndef OVERRIDE_TABLE_64_tee +TRACE_SYSCALL_TABLE(tee, tee, 77, 4) +#endif +#ifndef OVERRIDE_TABLE_64_fsync +TRACE_SYSCALL_TABLE(fsync, fsync, 82, 1) +#endif +#ifndef OVERRIDE_TABLE_64_fdatasync +TRACE_SYSCALL_TABLE(fdatasync, fdatasync, 83, 1) +#endif +#ifndef OVERRIDE_TABLE_64_sync_file_range +TRACE_SYSCALL_TABLE(sync_file_range, sync_file_range, 84, 4) +#endif +#ifndef OVERRIDE_TABLE_64_timerfd_create +TRACE_SYSCALL_TABLE(timerfd_create, timerfd_create, 85, 2) +#endif +#ifndef OVERRIDE_TABLE_64_personality +TRACE_SYSCALL_TABLE(personality, personality, 92, 1) +#endif +#ifndef OVERRIDE_TABLE_64_exit +TRACE_SYSCALL_TABLE(exit, exit, 93, 1) +#endif +#ifndef OVERRIDE_TABLE_64_exit_group +TRACE_SYSCALL_TABLE(exit_group, exit_group, 94, 1) +#endif +#ifndef OVERRIDE_TABLE_64_unshare +TRACE_SYSCALL_TABLE(unshare, unshare, 97, 1) +#endif +#ifndef OVERRIDE_TABLE_64_timer_getoverrun +TRACE_SYSCALL_TABLE(timer_getoverrun, timer_getoverrun, 109, 1) +#endif +#ifndef OVERRIDE_TABLE_64_timer_delete +TRACE_SYSCALL_TABLE(timer_delete, timer_delete, 111, 1) +#endif +#ifndef OVERRIDE_TABLE_64_ptrace +TRACE_SYSCALL_TABLE(ptrace, ptrace, 117, 4) +#endif +#ifndef OVERRIDE_TABLE_64_sched_getscheduler +TRACE_SYSCALL_TABLE(sched_getscheduler, sched_getscheduler, 120, 1) +#endif +#ifndef OVERRIDE_TABLE_64_sched_get_priority_max +TRACE_SYSCALL_TABLE(sched_get_priority_max, sched_get_priority_max, 125, 1) +#endif +#ifndef OVERRIDE_TABLE_64_sched_get_priority_min +TRACE_SYSCALL_TABLE(sched_get_priority_min, sched_get_priority_min, 126, 1) +#endif +#ifndef OVERRIDE_TABLE_64_kill +TRACE_SYSCALL_TABLE(kill, kill, 129, 2) +#endif +#ifndef OVERRIDE_TABLE_64_tkill +TRACE_SYSCALL_TABLE(tkill, tkill, 130, 2) +#endif +#ifndef OVERRIDE_TABLE_64_tgkill +TRACE_SYSCALL_TABLE(tgkill, tgkill, 131, 3) +#endif +#ifndef OVERRIDE_TABLE_64_setpriority +TRACE_SYSCALL_TABLE(setpriority, setpriority, 140, 3) +#endif +#ifndef OVERRIDE_TABLE_64_getpriority +TRACE_SYSCALL_TABLE(getpriority, getpriority, 141, 2) +#endif +#ifndef OVERRIDE_TABLE_64_setregid +TRACE_SYSCALL_TABLE(setregid, setregid, 143, 2) +#endif +#ifndef OVERRIDE_TABLE_64_setgid +TRACE_SYSCALL_TABLE(setgid, setgid, 144, 1) +#endif +#ifndef OVERRIDE_TABLE_64_setreuid +TRACE_SYSCALL_TABLE(setreuid, setreuid, 145, 2) +#endif +#ifndef OVERRIDE_TABLE_64_setuid +TRACE_SYSCALL_TABLE(setuid, setuid, 146, 1) +#endif +#ifndef OVERRIDE_TABLE_64_setresuid +TRACE_SYSCALL_TABLE(setresuid, setresuid, 147, 3) +#endif +#ifndef OVERRIDE_TABLE_64_setresgid +TRACE_SYSCALL_TABLE(setresgid, setresgid, 149, 3) +#endif +#ifndef OVERRIDE_TABLE_64_setfsuid +TRACE_SYSCALL_TABLE(setfsuid, setfsuid, 151, 1) +#endif +#ifndef OVERRIDE_TABLE_64_setfsgid +TRACE_SYSCALL_TABLE(setfsgid, setfsgid, 152, 1) +#endif +#ifndef OVERRIDE_TABLE_64_setpgid +TRACE_SYSCALL_TABLE(setpgid, setpgid, 154, 2) +#endif +#ifndef OVERRIDE_TABLE_64_getpgid +TRACE_SYSCALL_TABLE(getpgid, getpgid, 155, 1) +#endif +#ifndef OVERRIDE_TABLE_64_getsid +TRACE_SYSCALL_TABLE(getsid, getsid, 156, 1) +#endif +#ifndef OVERRIDE_TABLE_64_umask +TRACE_SYSCALL_TABLE(umask, umask, 166, 1) +#endif +#ifndef OVERRIDE_TABLE_64_prctl +TRACE_SYSCALL_TABLE(prctl, prctl, 167, 5) +#endif +#ifndef OVERRIDE_TABLE_64_msgget +TRACE_SYSCALL_TABLE(msgget, msgget, 186, 2) +#endif +#ifndef OVERRIDE_TABLE_64_semget +TRACE_SYSCALL_TABLE(semget, semget, 190, 3) +#endif +#ifndef OVERRIDE_TABLE_64_semctl +TRACE_SYSCALL_TABLE(semctl, semctl, 191, 4) +#endif +#ifndef OVERRIDE_TABLE_64_shmget +TRACE_SYSCALL_TABLE(shmget, shmget, 194, 3) +#endif +#ifndef OVERRIDE_TABLE_64_socket +TRACE_SYSCALL_TABLE(socket, socket, 198, 3) +#endif +#ifndef OVERRIDE_TABLE_64_listen +TRACE_SYSCALL_TABLE(listen, listen, 201, 2) +#endif +#ifndef OVERRIDE_TABLE_64_shutdown +TRACE_SYSCALL_TABLE(shutdown, shutdown, 210, 2) +#endif +#ifndef OVERRIDE_TABLE_64_readahead +TRACE_SYSCALL_TABLE(readahead, readahead, 213, 3) +#endif +#ifndef OVERRIDE_TABLE_64_brk +TRACE_SYSCALL_TABLE(brk, brk, 214, 1) +#endif +#ifndef OVERRIDE_TABLE_64_munmap +TRACE_SYSCALL_TABLE(munmap, munmap, 215, 2) +#endif +#ifndef OVERRIDE_TABLE_64_mremap +TRACE_SYSCALL_TABLE(mremap, mremap, 216, 5) +#endif +#ifndef OVERRIDE_TABLE_64_keyctl +TRACE_SYSCALL_TABLE(keyctl, keyctl, 219, 5) +#endif +#ifndef OVERRIDE_TABLE_64_fadvise64_64 +TRACE_SYSCALL_TABLE(fadvise64_64, fadvise64_64, 223, 4) +#endif +#ifndef OVERRIDE_TABLE_64_mprotect +TRACE_SYSCALL_TABLE(mprotect, mprotect, 226, 3) +#endif +#ifndef OVERRIDE_TABLE_64_msync +TRACE_SYSCALL_TABLE(msync, msync, 227, 3) +#endif +#ifndef OVERRIDE_TABLE_64_mlock +TRACE_SYSCALL_TABLE(mlock, mlock, 228, 2) +#endif +#ifndef OVERRIDE_TABLE_64_munlock +TRACE_SYSCALL_TABLE(munlock, munlock, 229, 2) +#endif +#ifndef OVERRIDE_TABLE_64_mlockall +TRACE_SYSCALL_TABLE(mlockall, mlockall, 230, 1) +#endif +#ifndef OVERRIDE_TABLE_64_madvise +TRACE_SYSCALL_TABLE(madvise, madvise, 233, 3) +#endif +#ifndef OVERRIDE_TABLE_64_remap_file_pages +TRACE_SYSCALL_TABLE(remap_file_pages, remap_file_pages, 234, 5) +#endif +#ifndef OVERRIDE_TABLE_64_fanotify_init +TRACE_SYSCALL_TABLE(fanotify_init, fanotify_init, 262, 2) +#endif +#ifndef OVERRIDE_TABLE_64_syncfs +TRACE_SYSCALL_TABLE(syncfs, syncfs, 267, 1) +#endif +#ifndef OVERRIDE_TABLE_64_setns +TRACE_SYSCALL_TABLE(setns, setns, 268, 2) +#endif +#ifndef OVERRIDE_TABLE_64_membarrier +TRACE_SYSCALL_TABLE(membarrier, membarrier, 283, 2) +#endif +#ifndef OVERRIDE_TABLE_64_mlock2 +TRACE_SYSCALL_TABLE(mlock2, mlock2, 284, 3) +#endif + +#endif /* CREATE_SYSCALL_TABLE */ diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/arm-64-syscalls-4.4.0_integers_override.h lttng-modules-2.8.0/instrumentation/syscalls/headers/arm-64-syscalls-4.4.0_integers_override.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/arm-64-syscalls-4.4.0_integers_override.h 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/arm-64-syscalls-4.4.0_integers_override.h 2016-05-20 01:34:54.000000000 +0000 @@ -0,0 +1,8 @@ +/* + * this is a place-holder for arm64 integer syscall definition override. + */ +#ifndef CREATE_SYSCALL_TABLE +#else /* CREATE_SYSCALL_TABLE */ +#define OVERRIDE_TABLE_64_mmap +TRACE_SYSCALL_TABLE(mmap, mmap, 222, 6) +#endif /* CREATE_SYSCALL_TABLE */ diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/arm-64-syscalls-4.4.0_pointers.h lttng-modules-2.8.0/instrumentation/syscalls/headers/arm-64-syscalls-4.4.0_pointers.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/arm-64-syscalls-4.4.0_pointers.h 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/arm-64-syscalls-4.4.0_pointers.h 2016-05-20 01:34:54.000000000 +0000 @@ -0,0 +1,1664 @@ +/* THIS FILE IS AUTO-GENERATED. DO NOT EDIT */ +#ifndef CREATE_SYSCALL_TABLE + +#if !defined(_TRACE_SYSCALLS_POINTERS_H) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACE_SYSCALLS_POINTERS_H + +#include +#include +#include "arm-64-syscalls-4.4.0_pointers_override.h" +#include "syscalls_pointers_override.h" + +#ifndef OVERRIDE_64_chdir +SC_LTTNG_TRACEPOINT_EVENT(chdir, + TP_PROTO(sc_exit(long ret,) const char * filename), + TP_ARGS(sc_exit(ret,) filename), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(filename, filename))) +) +#endif +#ifndef OVERRIDE_64_chroot +SC_LTTNG_TRACEPOINT_EVENT(chroot, + TP_PROTO(sc_exit(long ret,) const char * filename), + TP_ARGS(sc_exit(ret,) filename), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(filename, filename))) +) +#endif +#ifndef OVERRIDE_64_acct +SC_LTTNG_TRACEPOINT_EVENT(acct, + TP_PROTO(sc_exit(long ret,) const char * name), + TP_ARGS(sc_exit(ret,) name), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(name, name))) +) +#endif +#ifndef OVERRIDE_64_set_tid_address +SC_LTTNG_TRACEPOINT_EVENT(set_tid_address, + TP_PROTO(sc_exit(long ret,) int * tidptr), + TP_ARGS(sc_exit(ret,) tidptr), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int *, tidptr, tidptr))) +) +#endif +#ifndef OVERRIDE_64_times +SC_LTTNG_TRACEPOINT_EVENT(times, + TP_PROTO(sc_exit(long ret,) struct tms * tbuf), + TP_ARGS(sc_exit(ret,) tbuf), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_out(ctf_integer(struct tms *, tbuf, tbuf))) +) +#endif +#ifndef OVERRIDE_64_newuname +SC_LTTNG_TRACEPOINT_EVENT(newuname, + TP_PROTO(sc_exit(long ret,) struct new_utsname * name), + TP_ARGS(sc_exit(ret,) name), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_out(ctf_integer(struct new_utsname *, name, name))) +) +#endif +#ifndef OVERRIDE_64_adjtimex +SC_LTTNG_TRACEPOINT_EVENT(adjtimex, + TP_PROTO(sc_exit(long ret,) struct timex * txc_p), + TP_ARGS(sc_exit(ret,) txc_p), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_inout(ctf_integer(struct timex *, txc_p, txc_p))) +) +#endif +#ifndef OVERRIDE_64_sysinfo +SC_LTTNG_TRACEPOINT_EVENT(sysinfo, + TP_PROTO(sc_exit(long ret,) struct sysinfo * info), + TP_ARGS(sc_exit(ret,) info), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_out(ctf_integer(struct sysinfo *, info, info))) +) +#endif +#ifndef OVERRIDE_64_mq_unlink +SC_LTTNG_TRACEPOINT_EVENT(mq_unlink, + TP_PROTO(sc_exit(long ret,) const char * u_name), + TP_ARGS(sc_exit(ret,) u_name), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(u_name, u_name))) +) +#endif +#ifndef OVERRIDE_64_shmdt +SC_LTTNG_TRACEPOINT_EVENT(shmdt, + TP_PROTO(sc_exit(long ret,) char * shmaddr), + TP_ARGS(sc_exit(ret,) shmaddr), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(char *, shmaddr, shmaddr))) +) +#endif +#ifndef OVERRIDE_64_swapoff +SC_LTTNG_TRACEPOINT_EVENT(swapoff, + TP_PROTO(sc_exit(long ret,) const char * specialfile), + TP_ARGS(sc_exit(ret,) specialfile), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(specialfile, specialfile))) +) +#endif +#ifndef OVERRIDE_64_io_setup +SC_LTTNG_TRACEPOINT_EVENT(io_setup, + TP_PROTO(sc_exit(long ret,) unsigned nr_events, aio_context_t * ctxp), + TP_ARGS(sc_exit(ret,) nr_events, ctxp), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned, nr_events, nr_events)) sc_in(ctf_integer(aio_context_t *, ctxp, ctxp))) +) +#endif +#ifndef OVERRIDE_64_removexattr +SC_LTTNG_TRACEPOINT_EVENT(removexattr, + TP_PROTO(sc_exit(long ret,) const char * pathname, const char * name), + TP_ARGS(sc_exit(ret,) pathname, name), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(pathname, pathname)) sc_in(ctf_user_string(name, name))) +) +#endif +#ifndef OVERRIDE_64_lremovexattr +SC_LTTNG_TRACEPOINT_EVENT(lremovexattr, + TP_PROTO(sc_exit(long ret,) const char * pathname, const char * name), + TP_ARGS(sc_exit(ret,) pathname, name), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(pathname, pathname)) sc_in(ctf_user_string(name, name))) +) +#endif +#ifndef OVERRIDE_64_fremovexattr +SC_LTTNG_TRACEPOINT_EVENT(fremovexattr, + TP_PROTO(sc_exit(long ret,) int fd, const char * name), + TP_ARGS(sc_exit(ret,) fd, name), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_in(ctf_user_string(name, name))) +) +#endif +#ifndef OVERRIDE_64_getcwd +SC_LTTNG_TRACEPOINT_EVENT(getcwd, + TP_PROTO(sc_exit(long ret,) char * buf, unsigned long size), + TP_ARGS(sc_exit(ret,) buf, size), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_out(ctf_integer(char *, buf, buf)) sc_in(ctf_integer(unsigned long, size, size))) +) +#endif +#ifndef OVERRIDE_64_umount +SC_LTTNG_TRACEPOINT_EVENT(umount, + TP_PROTO(sc_exit(long ret,) char * name, int flags), + TP_ARGS(sc_exit(ret,) name, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(name, name)) sc_in(ctf_integer(int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_pivot_root +SC_LTTNG_TRACEPOINT_EVENT(pivot_root, + TP_PROTO(sc_exit(long ret,) const char * new_root, const char * put_old), + TP_ARGS(sc_exit(ret,) new_root, put_old), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(new_root, new_root)) sc_in(ctf_user_string(put_old, put_old))) +) +#endif +#ifndef OVERRIDE_64_statfs +SC_LTTNG_TRACEPOINT_EVENT(statfs, + TP_PROTO(sc_exit(long ret,) const char * pathname, struct statfs * buf), + TP_ARGS(sc_exit(ret,) pathname, buf), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(pathname, pathname)) sc_out(ctf_integer(struct statfs *, buf, buf))) +) +#endif +#ifndef OVERRIDE_64_fstatfs +SC_LTTNG_TRACEPOINT_EVENT(fstatfs, + TP_PROTO(sc_exit(long ret,) unsigned int fd, struct statfs * buf), + TP_ARGS(sc_exit(ret,) fd, buf), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, fd, fd)) sc_out(ctf_integer(struct statfs *, buf, buf))) +) +#endif +#ifndef OVERRIDE_64_truncate +SC_LTTNG_TRACEPOINT_EVENT(truncate, + TP_PROTO(sc_exit(long ret,) const char * path, long length), + TP_ARGS(sc_exit(ret,) path, length), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(path, path)) sc_in(ctf_integer(long, length, length))) +) +#endif +#ifndef OVERRIDE_64_pipe2 +SC_LTTNG_TRACEPOINT_EVENT(pipe2, + TP_PROTO(sc_exit(long ret,) int * fildes, int flags), + TP_ARGS(sc_exit(ret,) fildes, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_out(ctf_integer(int *, fildes, fildes)) sc_in(ctf_integer(int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_newfstat +SC_LTTNG_TRACEPOINT_EVENT(newfstat, + TP_PROTO(sc_exit(long ret,) unsigned int fd, struct stat * statbuf), + TP_ARGS(sc_exit(ret,) fd, statbuf), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, fd, fd)) sc_out(ctf_integer(struct stat *, statbuf, statbuf))) +) +#endif +#ifndef OVERRIDE_64_timerfd_gettime +SC_LTTNG_TRACEPOINT_EVENT(timerfd_gettime, + TP_PROTO(sc_exit(long ret,) int ufd, struct itimerspec * otmr), + TP_ARGS(sc_exit(ret,) ufd, otmr), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, ufd, ufd)) sc_out(ctf_integer(struct itimerspec *, otmr, otmr))) +) +#endif +#ifndef OVERRIDE_64_set_robust_list +SC_LTTNG_TRACEPOINT_EVENT(set_robust_list, + TP_PROTO(sc_exit(long ret,) struct robust_list_head * head, size_t len), + TP_ARGS(sc_exit(ret,) head, len), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(struct robust_list_head *, head, head)) sc_in(ctf_integer(size_t, len, len))) +) +#endif +#ifndef OVERRIDE_64_nanosleep +SC_LTTNG_TRACEPOINT_EVENT(nanosleep, + TP_PROTO(sc_exit(long ret,) struct timespec * rqtp, struct timespec * rmtp), + TP_ARGS(sc_exit(ret,) rqtp, rmtp), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(struct timespec *, rqtp, rqtp)) sc_out(ctf_integer(struct timespec *, rmtp, rmtp))) +) +#endif +#ifndef OVERRIDE_64_getitimer +SC_LTTNG_TRACEPOINT_EVENT(getitimer, + TP_PROTO(sc_exit(long ret,) int which, struct itimerval * value), + TP_ARGS(sc_exit(ret,) which, value), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, which, which)) sc_out(ctf_integer(struct itimerval *, value, value))) +) +#endif +#ifndef OVERRIDE_64_delete_module +SC_LTTNG_TRACEPOINT_EVENT(delete_module, + TP_PROTO(sc_exit(long ret,) const char * name_user, unsigned int flags), + TP_ARGS(sc_exit(ret,) name_user, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(name_user, name_user)) sc_in(ctf_integer(unsigned int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_timer_gettime +SC_LTTNG_TRACEPOINT_EVENT(timer_gettime, + TP_PROTO(sc_exit(long ret,) timer_t timer_id, struct itimerspec * setting), + TP_ARGS(sc_exit(ret,) timer_id, setting), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(timer_t, timer_id, timer_id)) sc_out(ctf_integer(struct itimerspec *, setting, setting))) +) +#endif +#ifndef OVERRIDE_64_clock_settime +SC_LTTNG_TRACEPOINT_EVENT(clock_settime, + TP_PROTO(sc_exit(long ret,) const clockid_t which_clock, const struct timespec * tp), + TP_ARGS(sc_exit(ret,) which_clock, tp), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(const clockid_t, which_clock, which_clock)) sc_in(ctf_integer(const struct timespec *, tp, tp))) +) +#endif +#ifndef OVERRIDE_64_clock_gettime +SC_LTTNG_TRACEPOINT_EVENT(clock_gettime, + TP_PROTO(sc_exit(long ret,) const clockid_t which_clock, struct timespec * tp), + TP_ARGS(sc_exit(ret,) which_clock, tp), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(const clockid_t, which_clock, which_clock)) sc_out(ctf_integer(struct timespec *, tp, tp))) +) +#endif +#ifndef OVERRIDE_64_clock_getres +SC_LTTNG_TRACEPOINT_EVENT(clock_getres, + TP_PROTO(sc_exit(long ret,) const clockid_t which_clock, struct timespec * tp), + TP_ARGS(sc_exit(ret,) which_clock, tp), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(const clockid_t, which_clock, which_clock)) sc_out(ctf_integer(struct timespec *, tp, tp))) +) +#endif +#ifndef OVERRIDE_64_sched_setparam +SC_LTTNG_TRACEPOINT_EVENT(sched_setparam, + TP_PROTO(sc_exit(long ret,) pid_t pid, struct sched_param * param), + TP_ARGS(sc_exit(ret,) pid, param), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(pid_t, pid, pid)) sc_in(ctf_integer(struct sched_param *, param, param))) +) +#endif +#ifndef OVERRIDE_64_sched_getparam +SC_LTTNG_TRACEPOINT_EVENT(sched_getparam, + TP_PROTO(sc_exit(long ret,) pid_t pid, struct sched_param * param), + TP_ARGS(sc_exit(ret,) pid, param), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(pid_t, pid, pid)) sc_out(ctf_integer(struct sched_param *, param, param))) +) +#endif +#ifndef OVERRIDE_64_sched_rr_get_interval +SC_LTTNG_TRACEPOINT_EVENT(sched_rr_get_interval, + TP_PROTO(sc_exit(long ret,) pid_t pid, struct timespec * interval), + TP_ARGS(sc_exit(ret,) pid, interval), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(pid_t, pid, pid)) sc_out(ctf_integer(struct timespec *, interval, interval))) +) +#endif +#ifndef OVERRIDE_64_sigaltstack +SC_LTTNG_TRACEPOINT_EVENT(sigaltstack, + TP_PROTO(sc_exit(long ret,) const stack_t * uss, stack_t * uoss), + TP_ARGS(sc_exit(ret,) uss, uoss), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(const stack_t *, uss, uss)) sc_inout(ctf_integer(stack_t *, uoss, uoss))) +) +#endif +#ifndef OVERRIDE_64_rt_sigsuspend +SC_LTTNG_TRACEPOINT_EVENT(rt_sigsuspend, + TP_PROTO(sc_exit(long ret,) sigset_t * unewset, size_t sigsetsize), + TP_ARGS(sc_exit(ret,) unewset, sigsetsize), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(sigset_t *, unewset, unewset)) sc_in(ctf_integer(size_t, sigsetsize, sigsetsize))) +) +#endif +#ifndef OVERRIDE_64_rt_sigpending +SC_LTTNG_TRACEPOINT_EVENT(rt_sigpending, + TP_PROTO(sc_exit(long ret,) sigset_t * uset, size_t sigsetsize), + TP_ARGS(sc_exit(ret,) uset, sigsetsize), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_out(ctf_integer(sigset_t *, uset, uset)) sc_in(ctf_integer(size_t, sigsetsize, sigsetsize))) +) +#endif +#ifndef OVERRIDE_64_getgroups +SC_LTTNG_TRACEPOINT_EVENT(getgroups, + TP_PROTO(sc_exit(long ret,) int gidsetsize, gid_t * grouplist), + TP_ARGS(sc_exit(ret,) gidsetsize, grouplist), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, gidsetsize, gidsetsize)) sc_out(ctf_integer(gid_t *, grouplist, grouplist))) +) +#endif +#ifndef OVERRIDE_64_setgroups +SC_LTTNG_TRACEPOINT_EVENT(setgroups, + TP_PROTO(sc_exit(long ret,) int gidsetsize, gid_t * grouplist), + TP_ARGS(sc_exit(ret,) gidsetsize, grouplist), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, gidsetsize, gidsetsize)) sc_in(ctf_integer(gid_t *, grouplist, grouplist))) +) +#endif +#ifndef OVERRIDE_64_sethostname +SC_LTTNG_TRACEPOINT_EVENT(sethostname, + TP_PROTO(sc_exit(long ret,) char * name, int len), + TP_ARGS(sc_exit(ret,) name, len), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(name, name)) sc_in(ctf_integer(int, len, len))) +) +#endif +#ifndef OVERRIDE_64_setdomainname +SC_LTTNG_TRACEPOINT_EVENT(setdomainname, + TP_PROTO(sc_exit(long ret,) char * name, int len), + TP_ARGS(sc_exit(ret,) name, len), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(name, name)) sc_in(ctf_integer(int, len, len))) +) +#endif +#ifndef OVERRIDE_64_getrlimit +SC_LTTNG_TRACEPOINT_EVENT(getrlimit, + TP_PROTO(sc_exit(long ret,) unsigned int resource, struct rlimit * rlim), + TP_ARGS(sc_exit(ret,) resource, rlim), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, resource, resource)) sc_out(ctf_integer(struct rlimit *, rlim, rlim))) +) +#endif +#ifndef OVERRIDE_64_setrlimit +SC_LTTNG_TRACEPOINT_EVENT(setrlimit, + TP_PROTO(sc_exit(long ret,) unsigned int resource, struct rlimit * rlim), + TP_ARGS(sc_exit(ret,) resource, rlim), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, resource, resource)) sc_in(ctf_integer(struct rlimit *, rlim, rlim))) +) +#endif +#ifndef OVERRIDE_64_getrusage +SC_LTTNG_TRACEPOINT_EVENT(getrusage, + TP_PROTO(sc_exit(long ret,) int who, struct rusage * ru), + TP_ARGS(sc_exit(ret,) who, ru), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, who, who)) sc_out(ctf_integer(struct rusage *, ru, ru))) +) +#endif +#ifndef OVERRIDE_64_gettimeofday +SC_LTTNG_TRACEPOINT_EVENT(gettimeofday, + TP_PROTO(sc_exit(long ret,) struct timeval * tv, struct timezone * tz), + TP_ARGS(sc_exit(ret,) tv, tz), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_out(ctf_integer(struct timeval *, tv, tv)) sc_out(ctf_integer(struct timezone *, tz, tz))) +) +#endif +#ifndef OVERRIDE_64_settimeofday +SC_LTTNG_TRACEPOINT_EVENT(settimeofday, + TP_PROTO(sc_exit(long ret,) struct timeval * tv, struct timezone * tz), + TP_ARGS(sc_exit(ret,) tv, tz), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(struct timeval *, tv, tv)) sc_in(ctf_integer(struct timezone *, tz, tz))) +) +#endif +#ifndef OVERRIDE_64_mq_notify +SC_LTTNG_TRACEPOINT_EVENT(mq_notify, + TP_PROTO(sc_exit(long ret,) mqd_t mqdes, const struct sigevent * u_notification), + TP_ARGS(sc_exit(ret,) mqdes, u_notification), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(mqd_t, mqdes, mqdes)) sc_in(ctf_integer(const struct sigevent *, u_notification, u_notification))) +) +#endif +#ifndef OVERRIDE_64_swapon +SC_LTTNG_TRACEPOINT_EVENT(swapon, + TP_PROTO(sc_exit(long ret,) const char * specialfile, int swap_flags), + TP_ARGS(sc_exit(ret,) specialfile, swap_flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(specialfile, specialfile)) sc_in(ctf_integer(int, swap_flags, swap_flags))) +) +#endif +#ifndef OVERRIDE_64_clock_adjtime +SC_LTTNG_TRACEPOINT_EVENT(clock_adjtime, + TP_PROTO(sc_exit(long ret,) const clockid_t which_clock, struct timex * utx), + TP_ARGS(sc_exit(ret,) which_clock, utx), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(const clockid_t, which_clock, which_clock)) sc_inout(ctf_integer(struct timex *, utx, utx))) +) +#endif +#ifndef OVERRIDE_64_memfd_create +SC_LTTNG_TRACEPOINT_EVENT(memfd_create, + TP_PROTO(sc_exit(long ret,) const char * uname, unsigned int flags), + TP_ARGS(sc_exit(ret,) uname, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_inout(ctf_user_string(uname, uname)) sc_inout(ctf_integer(unsigned int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_io_submit +SC_LTTNG_TRACEPOINT_EVENT(io_submit, + TP_PROTO(sc_exit(long ret,) aio_context_t ctx_id, long nr, struct iocb * * iocbpp), + TP_ARGS(sc_exit(ret,) ctx_id, nr, iocbpp), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(aio_context_t, ctx_id, ctx_id)) sc_in(ctf_integer(long, nr, nr)) sc_in(ctf_integer(struct iocb * *, iocbpp, iocbpp))) +) +#endif +#ifndef OVERRIDE_64_io_cancel +SC_LTTNG_TRACEPOINT_EVENT(io_cancel, + TP_PROTO(sc_exit(long ret,) aio_context_t ctx_id, struct iocb * iocb, struct io_event * result), + TP_ARGS(sc_exit(ret,) ctx_id, iocb, result), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(aio_context_t, ctx_id, ctx_id)) sc_in(ctf_integer(struct iocb *, iocb, iocb)) sc_out(ctf_integer(struct io_event *, result, result))) +) +#endif +#ifndef OVERRIDE_64_listxattr +SC_LTTNG_TRACEPOINT_EVENT(listxattr, + TP_PROTO(sc_exit(long ret,) const char * pathname, char * list, size_t size), + TP_ARGS(sc_exit(ret,) pathname, list, size), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(pathname, pathname)) sc_out(ctf_integer(char *, list, list)) sc_in(ctf_integer(size_t, size, size))) +) +#endif +#ifndef OVERRIDE_64_llistxattr +SC_LTTNG_TRACEPOINT_EVENT(llistxattr, + TP_PROTO(sc_exit(long ret,) const char * pathname, char * list, size_t size), + TP_ARGS(sc_exit(ret,) pathname, list, size), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(pathname, pathname)) sc_out(ctf_integer(char *, list, list)) sc_in(ctf_integer(size_t, size, size))) +) +#endif +#ifndef OVERRIDE_64_flistxattr +SC_LTTNG_TRACEPOINT_EVENT(flistxattr, + TP_PROTO(sc_exit(long ret,) int fd, char * list, size_t size), + TP_ARGS(sc_exit(ret,) fd, list, size), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_out(ctf_integer(char *, list, list)) sc_in(ctf_integer(size_t, size, size))) +) +#endif +#ifndef OVERRIDE_64_lookup_dcookie +SC_LTTNG_TRACEPOINT_EVENT(lookup_dcookie, + TP_PROTO(sc_exit(long ret,) u64 cookie64, char * buf, size_t len), + TP_ARGS(sc_exit(ret,) cookie64, buf, len), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(u64, cookie64, cookie64)) sc_out(ctf_integer(char *, buf, buf)) sc_in(ctf_integer(size_t, len, len))) +) +#endif +#ifndef OVERRIDE_64_inotify_add_watch +SC_LTTNG_TRACEPOINT_EVENT(inotify_add_watch, + TP_PROTO(sc_exit(long ret,) int fd, const char * pathname, u32 mask), + TP_ARGS(sc_exit(ret,) fd, pathname, mask), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_in(ctf_user_string(pathname, pathname)) sc_in(ctf_integer(u32, mask, mask))) +) +#endif +#ifndef OVERRIDE_64_mkdirat +SC_LTTNG_TRACEPOINT_EVENT(mkdirat, + TP_PROTO(sc_exit(long ret,) int dfd, const char * pathname, umode_t mode), + TP_ARGS(sc_exit(ret,) dfd, pathname, mode), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, dfd, dfd)) sc_in(ctf_user_string(pathname, pathname)) sc_in(ctf_integer(umode_t, mode, mode))) +) +#endif +#ifndef OVERRIDE_64_unlinkat +SC_LTTNG_TRACEPOINT_EVENT(unlinkat, + TP_PROTO(sc_exit(long ret,) int dfd, const char * pathname, int flag), + TP_ARGS(sc_exit(ret,) dfd, pathname, flag), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, dfd, dfd)) sc_in(ctf_user_string(pathname, pathname)) sc_in(ctf_integer(int, flag, flag))) +) +#endif +#ifndef OVERRIDE_64_symlinkat +SC_LTTNG_TRACEPOINT_EVENT(symlinkat, + TP_PROTO(sc_exit(long ret,) const char * oldname, int newdfd, const char * newname), + TP_ARGS(sc_exit(ret,) oldname, newdfd, newname), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(oldname, oldname)) sc_in(ctf_integer(int, newdfd, newdfd)) sc_in(ctf_user_string(newname, newname))) +) +#endif +#ifndef OVERRIDE_64_faccessat +SC_LTTNG_TRACEPOINT_EVENT(faccessat, + TP_PROTO(sc_exit(long ret,) int dfd, const char * filename, int mode), + TP_ARGS(sc_exit(ret,) dfd, filename, mode), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, dfd, dfd)) sc_in(ctf_user_string(filename, filename)) sc_in(ctf_integer(int, mode, mode))) +) +#endif +#ifndef OVERRIDE_64_fchmodat +SC_LTTNG_TRACEPOINT_EVENT(fchmodat, + TP_PROTO(sc_exit(long ret,) int dfd, const char * filename, umode_t mode), + TP_ARGS(sc_exit(ret,) dfd, filename, mode), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, dfd, dfd)) sc_in(ctf_user_string(filename, filename)) sc_in(ctf_integer(umode_t, mode, mode))) +) +#endif +#ifndef OVERRIDE_64_getdents64 +SC_LTTNG_TRACEPOINT_EVENT(getdents64, + TP_PROTO(sc_exit(long ret,) unsigned int fd, struct linux_dirent64 * dirent, unsigned int count), + TP_ARGS(sc_exit(ret,) fd, dirent, count), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, fd, fd)) sc_out(ctf_integer(struct linux_dirent64 *, dirent, dirent)) sc_in(ctf_integer(unsigned int, count, count))) +) +#endif +#ifndef OVERRIDE_64_read +SC_LTTNG_TRACEPOINT_EVENT(read, + TP_PROTO(sc_exit(long ret,) unsigned int fd, char * buf, size_t count), + TP_ARGS(sc_exit(ret,) fd, buf, count), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, fd, fd)) sc_out(ctf_integer(char *, buf, buf)) sc_in(ctf_integer(size_t, count, count))) +) +#endif +#ifndef OVERRIDE_64_write +SC_LTTNG_TRACEPOINT_EVENT(write, + TP_PROTO(sc_exit(long ret,) unsigned int fd, const char * buf, size_t count), + TP_ARGS(sc_exit(ret,) fd, buf, count), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, fd, fd)) sc_in(ctf_integer(const char *, buf, buf)) sc_in(ctf_integer(size_t, count, count))) +) +#endif +#ifndef OVERRIDE_64_readv +SC_LTTNG_TRACEPOINT_EVENT(readv, + TP_PROTO(sc_exit(long ret,) unsigned long fd, const struct iovec * vec, unsigned long vlen), + TP_ARGS(sc_exit(ret,) fd, vec, vlen), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned long, fd, fd)) sc_inout(ctf_integer(const struct iovec *, vec, vec)) sc_in(ctf_integer(unsigned long, vlen, vlen))) +) +#endif +#ifndef OVERRIDE_64_writev +SC_LTTNG_TRACEPOINT_EVENT(writev, + TP_PROTO(sc_exit(long ret,) unsigned long fd, const struct iovec * vec, unsigned long vlen), + TP_ARGS(sc_exit(ret,) fd, vec, vlen), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned long, fd, fd)) sc_inout(ctf_integer(const struct iovec *, vec, vec)) sc_in(ctf_integer(unsigned long, vlen, vlen))) +) +#endif +#ifndef OVERRIDE_64_get_robust_list +SC_LTTNG_TRACEPOINT_EVENT(get_robust_list, + TP_PROTO(sc_exit(long ret,) int pid, struct robust_list_head * * head_ptr, size_t * len_ptr), + TP_ARGS(sc_exit(ret,) pid, head_ptr, len_ptr), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, pid, pid)) sc_out(ctf_integer(struct robust_list_head * *, head_ptr, head_ptr)) sc_out(ctf_integer(size_t *, len_ptr, len_ptr))) +) +#endif +#ifndef OVERRIDE_64_setitimer +SC_LTTNG_TRACEPOINT_EVENT(setitimer, + TP_PROTO(sc_exit(long ret,) int which, struct itimerval * value, struct itimerval * ovalue), + TP_ARGS(sc_exit(ret,) which, value, ovalue), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, which, which)) sc_in(ctf_integer(struct itimerval *, value, value)) sc_out(ctf_integer(struct itimerval *, ovalue, ovalue))) +) +#endif +#ifndef OVERRIDE_64_init_module +SC_LTTNG_TRACEPOINT_EVENT(init_module, + TP_PROTO(sc_exit(long ret,) void * umod, unsigned long len, const char * uargs), + TP_ARGS(sc_exit(ret,) umod, len, uargs), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(void *, umod, umod)) sc_in(ctf_integer(unsigned long, len, len)) sc_in(ctf_integer(const char *, uargs, uargs))) +) +#endif +#ifndef OVERRIDE_64_timer_create +SC_LTTNG_TRACEPOINT_EVENT(timer_create, + TP_PROTO(sc_exit(long ret,) const clockid_t which_clock, struct sigevent * timer_event_spec, timer_t * created_timer_id), + TP_ARGS(sc_exit(ret,) which_clock, timer_event_spec, created_timer_id), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(const clockid_t, which_clock, which_clock)) sc_in(ctf_integer(struct sigevent *, timer_event_spec, timer_event_spec)) sc_out(ctf_integer(timer_t *, created_timer_id, created_timer_id))) +) +#endif +#ifndef OVERRIDE_64_syslog +SC_LTTNG_TRACEPOINT_EVENT(syslog, + TP_PROTO(sc_exit(long ret,) int type, char * buf, int len), + TP_ARGS(sc_exit(ret,) type, buf, len), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, type, type)) sc_out(ctf_integer(char *, buf, buf)) sc_in(ctf_integer(int, len, len))) +) +#endif +#ifndef OVERRIDE_64_sched_setscheduler +SC_LTTNG_TRACEPOINT_EVENT(sched_setscheduler, + TP_PROTO(sc_exit(long ret,) pid_t pid, int policy, struct sched_param * param), + TP_ARGS(sc_exit(ret,) pid, policy, param), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(pid_t, pid, pid)) sc_in(ctf_integer(int, policy, policy)) sc_in(ctf_integer(struct sched_param *, param, param))) +) +#endif +#ifndef OVERRIDE_64_sched_setaffinity +SC_LTTNG_TRACEPOINT_EVENT(sched_setaffinity, + TP_PROTO(sc_exit(long ret,) pid_t pid, unsigned int len, unsigned long * user_mask_ptr), + TP_ARGS(sc_exit(ret,) pid, len, user_mask_ptr), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(pid_t, pid, pid)) sc_in(ctf_integer(unsigned int, len, len)) sc_in(ctf_integer(unsigned long *, user_mask_ptr, user_mask_ptr))) +) +#endif +#ifndef OVERRIDE_64_sched_getaffinity +SC_LTTNG_TRACEPOINT_EVENT(sched_getaffinity, + TP_PROTO(sc_exit(long ret,) pid_t pid, unsigned int len, unsigned long * user_mask_ptr), + TP_ARGS(sc_exit(ret,) pid, len, user_mask_ptr), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(pid_t, pid, pid)) sc_in(ctf_integer(unsigned int, len, len)) sc_out(ctf_integer(unsigned long *, user_mask_ptr, user_mask_ptr))) +) +#endif +#ifndef OVERRIDE_64_rt_sigqueueinfo +SC_LTTNG_TRACEPOINT_EVENT(rt_sigqueueinfo, + TP_PROTO(sc_exit(long ret,) pid_t pid, int sig, siginfo_t * uinfo), + TP_ARGS(sc_exit(ret,) pid, sig, uinfo), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(pid_t, pid, pid)) sc_in(ctf_integer(int, sig, sig)) sc_in(ctf_integer(siginfo_t *, uinfo, uinfo))) +) +#endif +#ifndef OVERRIDE_64_getresuid +SC_LTTNG_TRACEPOINT_EVENT(getresuid, + TP_PROTO(sc_exit(long ret,) uid_t * ruidp, uid_t * euidp, uid_t * suidp), + TP_ARGS(sc_exit(ret,) ruidp, euidp, suidp), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_out(ctf_integer(uid_t *, ruidp, ruidp)) sc_out(ctf_integer(uid_t *, euidp, euidp)) sc_out(ctf_integer(uid_t *, suidp, suidp))) +) +#endif +#ifndef OVERRIDE_64_getresgid +SC_LTTNG_TRACEPOINT_EVENT(getresgid, + TP_PROTO(sc_exit(long ret,) gid_t * rgidp, gid_t * egidp, gid_t * sgidp), + TP_ARGS(sc_exit(ret,) rgidp, egidp, sgidp), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_out(ctf_integer(gid_t *, rgidp, rgidp)) sc_out(ctf_integer(gid_t *, egidp, egidp)) sc_out(ctf_integer(gid_t *, sgidp, sgidp))) +) +#endif +#ifndef OVERRIDE_64_getcpu +SC_LTTNG_TRACEPOINT_EVENT(getcpu, + TP_PROTO(sc_exit(long ret,) unsigned * cpup, unsigned * nodep, struct getcpu_cache * unused), + TP_ARGS(sc_exit(ret,) cpup, nodep, unused), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_out(ctf_integer(unsigned *, cpup, cpup)) sc_out(ctf_integer(unsigned *, nodep, nodep)) sc_inout(ctf_integer(struct getcpu_cache *, unused, unused))) +) +#endif +#ifndef OVERRIDE_64_mq_getsetattr +SC_LTTNG_TRACEPOINT_EVENT(mq_getsetattr, + TP_PROTO(sc_exit(long ret,) mqd_t mqdes, const struct mq_attr * u_mqstat, struct mq_attr * u_omqstat), + TP_ARGS(sc_exit(ret,) mqdes, u_mqstat, u_omqstat), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(mqd_t, mqdes, mqdes)) sc_in(ctf_integer(const struct mq_attr *, u_mqstat, u_mqstat)) sc_out(ctf_integer(struct mq_attr *, u_omqstat, u_omqstat))) +) +#endif +#ifndef OVERRIDE_64_msgctl +SC_LTTNG_TRACEPOINT_EVENT(msgctl, + TP_PROTO(sc_exit(long ret,) int msqid, int cmd, struct msqid_ds * buf), + TP_ARGS(sc_exit(ret,) msqid, cmd, buf), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, msqid, msqid)) sc_in(ctf_integer(int, cmd, cmd)) sc_inout(ctf_integer(struct msqid_ds *, buf, buf))) +) +#endif +#ifndef OVERRIDE_64_semop +SC_LTTNG_TRACEPOINT_EVENT(semop, + TP_PROTO(sc_exit(long ret,) int semid, struct sembuf * tsops, unsigned nsops), + TP_ARGS(sc_exit(ret,) semid, tsops, nsops), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, semid, semid)) sc_in(ctf_integer(struct sembuf *, tsops, tsops)) sc_in(ctf_integer(unsigned, nsops, nsops))) +) +#endif +#ifndef OVERRIDE_64_shmctl +SC_LTTNG_TRACEPOINT_EVENT(shmctl, + TP_PROTO(sc_exit(long ret,) int shmid, int cmd, struct shmid_ds * buf), + TP_ARGS(sc_exit(ret,) shmid, cmd, buf), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, shmid, shmid)) sc_in(ctf_integer(int, cmd, cmd)) sc_inout(ctf_integer(struct shmid_ds *, buf, buf))) +) +#endif +#ifndef OVERRIDE_64_shmat +SC_LTTNG_TRACEPOINT_EVENT(shmat, + TP_PROTO(sc_exit(long ret,) int shmid, char * shmaddr, int shmflg), + TP_ARGS(sc_exit(ret,) shmid, shmaddr, shmflg), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, shmid, shmid)) sc_in(ctf_integer(char *, shmaddr, shmaddr)) sc_in(ctf_integer(int, shmflg, shmflg))) +) +#endif +#ifndef OVERRIDE_64_bind +SC_LTTNG_TRACEPOINT_EVENT(bind, + TP_PROTO(sc_exit(long ret,) int fd, struct sockaddr * umyaddr, int addrlen), + TP_ARGS(sc_exit(ret,) fd, umyaddr, addrlen), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_in(ctf_integer(struct sockaddr *, umyaddr, umyaddr)) sc_in(ctf_integer(int, addrlen, addrlen))) +) +#endif +#ifndef OVERRIDE_64_accept +SC_LTTNG_TRACEPOINT_EVENT(accept, + TP_PROTO(sc_exit(long ret,) int fd, struct sockaddr * upeer_sockaddr, int * upeer_addrlen), + TP_ARGS(sc_exit(ret,) fd, upeer_sockaddr, upeer_addrlen), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_out(ctf_integer(struct sockaddr *, upeer_sockaddr, upeer_sockaddr)) sc_inout(ctf_integer(int *, upeer_addrlen, upeer_addrlen))) +) +#endif +#ifndef OVERRIDE_64_connect +SC_LTTNG_TRACEPOINT_EVENT(connect, + TP_PROTO(sc_exit(long ret,) int fd, struct sockaddr * uservaddr, int addrlen), + TP_ARGS(sc_exit(ret,) fd, uservaddr, addrlen), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_in(ctf_integer(struct sockaddr *, uservaddr, uservaddr)) sc_in(ctf_integer(int, addrlen, addrlen))) +) +#endif +#ifndef OVERRIDE_64_getsockname +SC_LTTNG_TRACEPOINT_EVENT(getsockname, + TP_PROTO(sc_exit(long ret,) int fd, struct sockaddr * usockaddr, int * usockaddr_len), + TP_ARGS(sc_exit(ret,) fd, usockaddr, usockaddr_len), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_out(ctf_integer(struct sockaddr *, usockaddr, usockaddr)) sc_inout(ctf_integer(int *, usockaddr_len, usockaddr_len))) +) +#endif +#ifndef OVERRIDE_64_getpeername +SC_LTTNG_TRACEPOINT_EVENT(getpeername, + TP_PROTO(sc_exit(long ret,) int fd, struct sockaddr * usockaddr, int * usockaddr_len), + TP_ARGS(sc_exit(ret,) fd, usockaddr, usockaddr_len), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_out(ctf_integer(struct sockaddr *, usockaddr, usockaddr)) sc_inout(ctf_integer(int *, usockaddr_len, usockaddr_len))) +) +#endif +#ifndef OVERRIDE_64_sendmsg +SC_LTTNG_TRACEPOINT_EVENT(sendmsg, + TP_PROTO(sc_exit(long ret,) int fd, struct user_msghdr * msg, unsigned int flags), + TP_ARGS(sc_exit(ret,) fd, msg, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_in(ctf_integer(struct user_msghdr *, msg, msg)) sc_in(ctf_integer(unsigned int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_recvmsg +SC_LTTNG_TRACEPOINT_EVENT(recvmsg, + TP_PROTO(sc_exit(long ret,) int fd, struct user_msghdr * msg, unsigned int flags), + TP_ARGS(sc_exit(ret,) fd, msg, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_inout(ctf_integer(struct user_msghdr *, msg, msg)) sc_in(ctf_integer(unsigned int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_execve +SC_LTTNG_TRACEPOINT_EVENT(execve, + TP_PROTO(sc_exit(long ret,) const char * filename, const char *const * argv, const char *const * envp), + TP_ARGS(sc_exit(ret,) filename, argv, envp), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_inout(ctf_user_string(filename, filename)) sc_inout(ctf_integer(const char *const *, argv, argv)) sc_inout(ctf_integer(const char *const *, envp, envp))) +) +#endif +#ifndef OVERRIDE_64_mincore +SC_LTTNG_TRACEPOINT_EVENT(mincore, + TP_PROTO(sc_exit(long ret,) unsigned long start, size_t len, unsigned char * vec), + TP_ARGS(sc_exit(ret,) start, len, vec), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned long, start, start)) sc_in(ctf_integer(size_t, len, len)) sc_out(ctf_integer(unsigned char *, vec, vec))) +) +#endif +#ifndef OVERRIDE_64_open_by_handle_at +SC_LTTNG_TRACEPOINT_EVENT(open_by_handle_at, + TP_PROTO(sc_exit(long ret,) int mountdirfd, struct file_handle * handle, int flags), + TP_ARGS(sc_exit(ret,) mountdirfd, handle, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, mountdirfd, mountdirfd)) sc_in(ctf_integer(struct file_handle *, handle, handle)) sc_in(ctf_integer(int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_finit_module +SC_LTTNG_TRACEPOINT_EVENT(finit_module, + TP_PROTO(sc_exit(long ret,) int fd, const char * uargs, int flags), + TP_ARGS(sc_exit(ret,) fd, uargs, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_in(ctf_integer(const char *, uargs, uargs)) sc_in(ctf_integer(int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_sched_setattr +SC_LTTNG_TRACEPOINT_EVENT(sched_setattr, + TP_PROTO(sc_exit(long ret,) pid_t pid, struct sched_attr * uattr, unsigned int flags), + TP_ARGS(sc_exit(ret,) pid, uattr, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_inout(ctf_integer(pid_t, pid, pid)) sc_inout(ctf_integer(struct sched_attr *, uattr, uattr)) sc_inout(ctf_integer(unsigned int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_seccomp +SC_LTTNG_TRACEPOINT_EVENT(seccomp, + TP_PROTO(sc_exit(long ret,) unsigned int op, unsigned int flags, const char * uargs), + TP_ARGS(sc_exit(ret,) op, flags, uargs), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_inout(ctf_integer(unsigned int, op, op)) sc_inout(ctf_integer(unsigned int, flags, flags)) sc_inout(ctf_integer(const char *, uargs, uargs))) +) +#endif +#ifndef OVERRIDE_64_getrandom +SC_LTTNG_TRACEPOINT_EVENT(getrandom, + TP_PROTO(sc_exit(long ret,) char * buf, size_t count, unsigned int flags), + TP_ARGS(sc_exit(ret,) buf, count, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_inout(ctf_integer(char *, buf, buf)) sc_inout(ctf_integer(size_t, count, count)) sc_inout(ctf_integer(unsigned int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_getxattr +SC_LTTNG_TRACEPOINT_EVENT(getxattr, + TP_PROTO(sc_exit(long ret,) const char * pathname, const char * name, void * value, size_t size), + TP_ARGS(sc_exit(ret,) pathname, name, value, size), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(pathname, pathname)) sc_in(ctf_user_string(name, name)) sc_out(ctf_integer(void *, value, value)) sc_in(ctf_integer(size_t, size, size))) +) +#endif +#ifndef OVERRIDE_64_lgetxattr +SC_LTTNG_TRACEPOINT_EVENT(lgetxattr, + TP_PROTO(sc_exit(long ret,) const char * pathname, const char * name, void * value, size_t size), + TP_ARGS(sc_exit(ret,) pathname, name, value, size), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(pathname, pathname)) sc_in(ctf_user_string(name, name)) sc_out(ctf_integer(void *, value, value)) sc_in(ctf_integer(size_t, size, size))) +) +#endif +#ifndef OVERRIDE_64_fgetxattr +SC_LTTNG_TRACEPOINT_EVENT(fgetxattr, + TP_PROTO(sc_exit(long ret,) int fd, const char * name, void * value, size_t size), + TP_ARGS(sc_exit(ret,) fd, name, value, size), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_in(ctf_user_string(name, name)) sc_out(ctf_integer(void *, value, value)) sc_in(ctf_integer(size_t, size, size))) +) +#endif +#ifndef OVERRIDE_64_epoll_ctl +SC_LTTNG_TRACEPOINT_EVENT(epoll_ctl, + TP_PROTO(sc_exit(long ret,) int epfd, int op, int fd, struct epoll_event * event), + TP_ARGS(sc_exit(ret,) epfd, op, fd, event), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, epfd, epfd)) sc_in(ctf_integer(int, op, op)) sc_in(ctf_integer(int, fd, fd)) sc_in(ctf_integer(struct epoll_event *, event, event))) +) +#endif +#ifndef OVERRIDE_64_mknodat +SC_LTTNG_TRACEPOINT_EVENT(mknodat, + TP_PROTO(sc_exit(long ret,) int dfd, const char * filename, umode_t mode, unsigned dev), + TP_ARGS(sc_exit(ret,) dfd, filename, mode, dev), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, dfd, dfd)) sc_in(ctf_user_string(filename, filename)) sc_in(ctf_integer(umode_t, mode, mode)) sc_in(ctf_integer(unsigned, dev, dev))) +) +#endif +#ifndef OVERRIDE_64_renameat +SC_LTTNG_TRACEPOINT_EVENT(renameat, + TP_PROTO(sc_exit(long ret,) int olddfd, const char * oldname, int newdfd, const char * newname), + TP_ARGS(sc_exit(ret,) olddfd, oldname, newdfd, newname), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, olddfd, olddfd)) sc_in(ctf_user_string(oldname, oldname)) sc_in(ctf_integer(int, newdfd, newdfd)) sc_in(ctf_user_string(newname, newname))) +) +#endif +#ifndef OVERRIDE_64_openat +SC_LTTNG_TRACEPOINT_EVENT(openat, + TP_PROTO(sc_exit(long ret,) int dfd, const char * filename, int flags, umode_t mode), + TP_ARGS(sc_exit(ret,) dfd, filename, flags, mode), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, dfd, dfd)) sc_in(ctf_user_string(filename, filename)) sc_in(ctf_integer(int, flags, flags)) sc_in(ctf_integer(umode_t, mode, mode))) +) +#endif +#ifndef OVERRIDE_64_quotactl +SC_LTTNG_TRACEPOINT_EVENT(quotactl, + TP_PROTO(sc_exit(long ret,) unsigned int cmd, const char * special, qid_t id, void * addr), + TP_ARGS(sc_exit(ret,) cmd, special, id, addr), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, cmd, cmd)) sc_in(ctf_integer(const char *, special, special)) sc_in(ctf_integer(qid_t, id, id)) sc_inout(ctf_integer(void *, addr, addr))) +) +#endif +#ifndef OVERRIDE_64_pread64 +SC_LTTNG_TRACEPOINT_EVENT(pread64, + TP_PROTO(sc_exit(long ret,) unsigned int fd, char * buf, size_t count, loff_t pos), + TP_ARGS(sc_exit(ret,) fd, buf, count, pos), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, fd, fd)) sc_out(ctf_integer(char *, buf, buf)) sc_in(ctf_integer(size_t, count, count)) sc_in(ctf_integer(loff_t, pos, pos))) +) +#endif +#ifndef OVERRIDE_64_pwrite64 +SC_LTTNG_TRACEPOINT_EVENT(pwrite64, + TP_PROTO(sc_exit(long ret,) unsigned int fd, const char * buf, size_t count, loff_t pos), + TP_ARGS(sc_exit(ret,) fd, buf, count, pos), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned int, fd, fd)) sc_in(ctf_integer(const char *, buf, buf)) sc_in(ctf_integer(size_t, count, count)) sc_in(ctf_integer(loff_t, pos, pos))) +) +#endif +#ifndef OVERRIDE_64_sendfile64 +SC_LTTNG_TRACEPOINT_EVENT(sendfile64, + TP_PROTO(sc_exit(long ret,) int out_fd, int in_fd, loff_t * offset, size_t count), + TP_ARGS(sc_exit(ret,) out_fd, in_fd, offset, count), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, out_fd, out_fd)) sc_in(ctf_integer(int, in_fd, in_fd)) sc_inout(ctf_integer(loff_t *, offset, offset)) sc_in(ctf_integer(size_t, count, count))) +) +#endif +#ifndef OVERRIDE_64_signalfd4 +SC_LTTNG_TRACEPOINT_EVENT(signalfd4, + TP_PROTO(sc_exit(long ret,) int ufd, sigset_t * user_mask, size_t sizemask, int flags), + TP_ARGS(sc_exit(ret,) ufd, user_mask, sizemask, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, ufd, ufd)) sc_in(ctf_integer(sigset_t *, user_mask, user_mask)) sc_in(ctf_integer(size_t, sizemask, sizemask)) sc_in(ctf_integer(int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_vmsplice +SC_LTTNG_TRACEPOINT_EVENT(vmsplice, + TP_PROTO(sc_exit(long ret,) int fd, const struct iovec * iov, unsigned long nr_segs, unsigned int flags), + TP_ARGS(sc_exit(ret,) fd, iov, nr_segs, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_in(ctf_integer(const struct iovec *, iov, iov)) sc_in(ctf_integer(unsigned long, nr_segs, nr_segs)) sc_in(ctf_integer(unsigned int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_readlinkat +SC_LTTNG_TRACEPOINT_EVENT(readlinkat, + TP_PROTO(sc_exit(long ret,) int dfd, const char * pathname, char * buf, int bufsiz), + TP_ARGS(sc_exit(ret,) dfd, pathname, buf, bufsiz), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, dfd, dfd)) sc_in(ctf_user_string(pathname, pathname)) sc_out(ctf_integer(char *, buf, buf)) sc_in(ctf_integer(int, bufsiz, bufsiz))) +) +#endif +#ifndef OVERRIDE_64_newfstatat +SC_LTTNG_TRACEPOINT_EVENT(newfstatat, + TP_PROTO(sc_exit(long ret,) int dfd, const char * filename, struct stat * statbuf, int flag), + TP_ARGS(sc_exit(ret,) dfd, filename, statbuf, flag), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, dfd, dfd)) sc_in(ctf_user_string(filename, filename)) sc_out(ctf_integer(struct stat *, statbuf, statbuf)) sc_in(ctf_integer(int, flag, flag))) +) +#endif +#ifndef OVERRIDE_64_timerfd_settime +SC_LTTNG_TRACEPOINT_EVENT(timerfd_settime, + TP_PROTO(sc_exit(long ret,) int ufd, int flags, const struct itimerspec * utmr, struct itimerspec * otmr), + TP_ARGS(sc_exit(ret,) ufd, flags, utmr, otmr), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, ufd, ufd)) sc_in(ctf_integer(int, flags, flags)) sc_in(ctf_integer(const struct itimerspec *, utmr, utmr)) sc_out(ctf_integer(struct itimerspec *, otmr, otmr))) +) +#endif +#ifndef OVERRIDE_64_utimensat +SC_LTTNG_TRACEPOINT_EVENT(utimensat, + TP_PROTO(sc_exit(long ret,) int dfd, const char * filename, struct timespec * utimes, int flags), + TP_ARGS(sc_exit(ret,) dfd, filename, utimes, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, dfd, dfd)) sc_in(ctf_user_string(filename, filename)) sc_in(ctf_integer(struct timespec *, utimes, utimes)) sc_in(ctf_integer(int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_timer_settime +SC_LTTNG_TRACEPOINT_EVENT(timer_settime, + TP_PROTO(sc_exit(long ret,) timer_t timer_id, int flags, const struct itimerspec * new_setting, struct itimerspec * old_setting), + TP_ARGS(sc_exit(ret,) timer_id, flags, new_setting, old_setting), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(timer_t, timer_id, timer_id)) sc_in(ctf_integer(int, flags, flags)) sc_in(ctf_integer(const struct itimerspec *, new_setting, new_setting)) sc_out(ctf_integer(struct itimerspec *, old_setting, old_setting))) +) +#endif +#ifndef OVERRIDE_64_clock_nanosleep +SC_LTTNG_TRACEPOINT_EVENT(clock_nanosleep, + TP_PROTO(sc_exit(long ret,) const clockid_t which_clock, int flags, const struct timespec * rqtp, struct timespec * rmtp), + TP_ARGS(sc_exit(ret,) which_clock, flags, rqtp, rmtp), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(const clockid_t, which_clock, which_clock)) sc_in(ctf_integer(int, flags, flags)) sc_in(ctf_integer(const struct timespec *, rqtp, rqtp)) sc_out(ctf_integer(struct timespec *, rmtp, rmtp))) +) +#endif +#ifndef OVERRIDE_64_rt_sigaction +SC_LTTNG_TRACEPOINT_EVENT(rt_sigaction, + TP_PROTO(sc_exit(long ret,) int sig, const struct sigaction * act, struct sigaction * oact, size_t sigsetsize), + TP_ARGS(sc_exit(ret,) sig, act, oact, sigsetsize), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, sig, sig)) sc_in(ctf_integer(const struct sigaction *, act, act)) sc_out(ctf_integer(struct sigaction *, oact, oact)) sc_in(ctf_integer(size_t, sigsetsize, sigsetsize))) +) +#endif +#ifndef OVERRIDE_64_rt_sigprocmask +SC_LTTNG_TRACEPOINT_EVENT(rt_sigprocmask, + TP_PROTO(sc_exit(long ret,) int how, sigset_t * nset, sigset_t * oset, size_t sigsetsize), + TP_ARGS(sc_exit(ret,) how, nset, oset, sigsetsize), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, how, how)) sc_in(ctf_integer(sigset_t *, nset, nset)) sc_out(ctf_integer(sigset_t *, oset, oset)) sc_in(ctf_integer(size_t, sigsetsize, sigsetsize))) +) +#endif +#ifndef OVERRIDE_64_rt_sigtimedwait +SC_LTTNG_TRACEPOINT_EVENT(rt_sigtimedwait, + TP_PROTO(sc_exit(long ret,) const sigset_t * uthese, siginfo_t * uinfo, const struct timespec * uts, size_t sigsetsize), + TP_ARGS(sc_exit(ret,) uthese, uinfo, uts, sigsetsize), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_out(ctf_integer(const sigset_t *, uthese, uthese)) sc_out(ctf_integer(siginfo_t *, uinfo, uinfo)) sc_in(ctf_integer(const struct timespec *, uts, uts)) sc_in(ctf_integer(size_t, sigsetsize, sigsetsize))) +) +#endif +#ifndef OVERRIDE_64_reboot +SC_LTTNG_TRACEPOINT_EVENT(reboot, + TP_PROTO(sc_exit(long ret,) int magic1, int magic2, unsigned int cmd, void * arg), + TP_ARGS(sc_exit(ret,) magic1, magic2, cmd, arg), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, magic1, magic1)) sc_in(ctf_integer(int, magic2, magic2)) sc_in(ctf_integer(unsigned int, cmd, cmd)) sc_in(ctf_integer(void *, arg, arg))) +) +#endif +#ifndef OVERRIDE_64_mq_open +SC_LTTNG_TRACEPOINT_EVENT(mq_open, + TP_PROTO(sc_exit(long ret,) const char * u_name, int oflag, umode_t mode, struct mq_attr * u_attr), + TP_ARGS(sc_exit(ret,) u_name, oflag, mode, u_attr), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(u_name, u_name)) sc_in(ctf_integer(int, oflag, oflag)) sc_in(ctf_integer(umode_t, mode, mode)) sc_in(ctf_integer(struct mq_attr *, u_attr, u_attr))) +) +#endif +#ifndef OVERRIDE_64_msgsnd +SC_LTTNG_TRACEPOINT_EVENT(msgsnd, + TP_PROTO(sc_exit(long ret,) int msqid, struct msgbuf * msgp, size_t msgsz, int msgflg), + TP_ARGS(sc_exit(ret,) msqid, msgp, msgsz, msgflg), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, msqid, msqid)) sc_in(ctf_integer(struct msgbuf *, msgp, msgp)) sc_in(ctf_integer(size_t, msgsz, msgsz)) sc_in(ctf_integer(int, msgflg, msgflg))) +) +#endif +#ifndef OVERRIDE_64_semtimedop +SC_LTTNG_TRACEPOINT_EVENT(semtimedop, + TP_PROTO(sc_exit(long ret,) int semid, struct sembuf * tsops, unsigned nsops, const struct timespec * timeout), + TP_ARGS(sc_exit(ret,) semid, tsops, nsops, timeout), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, semid, semid)) sc_in(ctf_integer(struct sembuf *, tsops, tsops)) sc_in(ctf_integer(unsigned, nsops, nsops)) sc_inout(ctf_integer(const struct timespec *, timeout, timeout))) +) +#endif +#ifndef OVERRIDE_64_socketpair +SC_LTTNG_TRACEPOINT_EVENT(socketpair, + TP_PROTO(sc_exit(long ret,) int family, int type, int protocol, int * usockvec), + TP_ARGS(sc_exit(ret,) family, type, protocol, usockvec), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, family, family)) sc_in(ctf_integer(int, type, type)) sc_in(ctf_integer(int, protocol, protocol)) sc_out(ctf_integer(int *, usockvec, usockvec))) +) +#endif +#ifndef OVERRIDE_64_request_key +SC_LTTNG_TRACEPOINT_EVENT(request_key, + TP_PROTO(sc_exit(long ret,) const char * _type, const char * _description, const char * _callout_info, key_serial_t destringid), + TP_ARGS(sc_exit(ret,) _type, _description, _callout_info, destringid), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(_type, _type)) sc_in(ctf_integer(const char *, _description, _description)) sc_in(ctf_integer(const char *, _callout_info, _callout_info)) sc_in(ctf_integer(key_serial_t, destringid, destringid))) +) +#endif +#ifndef OVERRIDE_64_rt_tgsigqueueinfo +SC_LTTNG_TRACEPOINT_EVENT(rt_tgsigqueueinfo, + TP_PROTO(sc_exit(long ret,) pid_t tgid, pid_t pid, int sig, siginfo_t * uinfo), + TP_ARGS(sc_exit(ret,) tgid, pid, sig, uinfo), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(pid_t, tgid, tgid)) sc_in(ctf_integer(pid_t, pid, pid)) sc_in(ctf_integer(int, sig, sig)) sc_in(ctf_integer(siginfo_t *, uinfo, uinfo))) +) +#endif +#ifndef OVERRIDE_64_accept4 +SC_LTTNG_TRACEPOINT_EVENT(accept4, + TP_PROTO(sc_exit(long ret,) int fd, struct sockaddr * upeer_sockaddr, int * upeer_addrlen, int flags), + TP_ARGS(sc_exit(ret,) fd, upeer_sockaddr, upeer_addrlen, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_out(ctf_integer(struct sockaddr *, upeer_sockaddr, upeer_sockaddr)) sc_inout(ctf_integer(int *, upeer_addrlen, upeer_addrlen)) sc_in(ctf_integer(int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_wait4 +SC_LTTNG_TRACEPOINT_EVENT(wait4, + TP_PROTO(sc_exit(long ret,) pid_t upid, int * stat_addr, int options, struct rusage * ru), + TP_ARGS(sc_exit(ret,) upid, stat_addr, options, ru), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(pid_t, upid, upid)) sc_out(ctf_integer(int *, stat_addr, stat_addr)) sc_in(ctf_integer(int, options, options)) sc_out(ctf_integer(struct rusage *, ru, ru))) +) +#endif +#ifndef OVERRIDE_64_prlimit64 +SC_LTTNG_TRACEPOINT_EVENT(prlimit64, + TP_PROTO(sc_exit(long ret,) pid_t pid, unsigned int resource, const struct rlimit64 * new_rlim, struct rlimit64 * old_rlim), + TP_ARGS(sc_exit(ret,) pid, resource, new_rlim, old_rlim), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(pid_t, pid, pid)) sc_in(ctf_integer(unsigned int, resource, resource)) sc_in(ctf_integer(const struct rlimit64 *, new_rlim, new_rlim)) sc_out(ctf_integer(struct rlimit64 *, old_rlim, old_rlim))) +) +#endif +#ifndef OVERRIDE_64_sendmmsg +SC_LTTNG_TRACEPOINT_EVENT(sendmmsg, + TP_PROTO(sc_exit(long ret,) int fd, struct mmsghdr * mmsg, unsigned int vlen, unsigned int flags), + TP_ARGS(sc_exit(ret,) fd, mmsg, vlen, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_in(ctf_integer(struct mmsghdr *, mmsg, mmsg)) sc_in(ctf_integer(unsigned int, vlen, vlen)) sc_in(ctf_integer(unsigned int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_sched_getattr +SC_LTTNG_TRACEPOINT_EVENT(sched_getattr, + TP_PROTO(sc_exit(long ret,) pid_t pid, struct sched_attr * uattr, unsigned int size, unsigned int flags), + TP_ARGS(sc_exit(ret,) pid, uattr, size, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_inout(ctf_integer(pid_t, pid, pid)) sc_inout(ctf_integer(struct sched_attr *, uattr, uattr)) sc_inout(ctf_integer(unsigned int, size, size)) sc_inout(ctf_integer(unsigned int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_io_getevents +SC_LTTNG_TRACEPOINT_EVENT(io_getevents, + TP_PROTO(sc_exit(long ret,) aio_context_t ctx_id, long min_nr, long nr, struct io_event * events, struct timespec * timeout), + TP_ARGS(sc_exit(ret,) ctx_id, min_nr, nr, events, timeout), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(aio_context_t, ctx_id, ctx_id)) sc_in(ctf_integer(long, min_nr, min_nr)) sc_in(ctf_integer(long, nr, nr)) sc_out(ctf_integer(struct io_event *, events, events)) sc_inout(ctf_integer(struct timespec *, timeout, timeout))) +) +#endif +#ifndef OVERRIDE_64_setxattr +SC_LTTNG_TRACEPOINT_EVENT(setxattr, + TP_PROTO(sc_exit(long ret,) const char * pathname, const char * name, const void * value, size_t size, int flags), + TP_ARGS(sc_exit(ret,) pathname, name, value, size, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(pathname, pathname)) sc_in(ctf_user_string(name, name)) sc_in(ctf_integer(const void *, value, value)) sc_in(ctf_integer(size_t, size, size)) sc_in(ctf_integer(int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_lsetxattr +SC_LTTNG_TRACEPOINT_EVENT(lsetxattr, + TP_PROTO(sc_exit(long ret,) const char * pathname, const char * name, const void * value, size_t size, int flags), + TP_ARGS(sc_exit(ret,) pathname, name, value, size, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(pathname, pathname)) sc_in(ctf_user_string(name, name)) sc_in(ctf_integer(const void *, value, value)) sc_in(ctf_integer(size_t, size, size)) sc_in(ctf_integer(int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_fsetxattr +SC_LTTNG_TRACEPOINT_EVENT(fsetxattr, + TP_PROTO(sc_exit(long ret,) int fd, const char * name, const void * value, size_t size, int flags), + TP_ARGS(sc_exit(ret,) fd, name, value, size, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_in(ctf_user_string(name, name)) sc_in(ctf_integer(const void *, value, value)) sc_in(ctf_integer(size_t, size, size)) sc_in(ctf_integer(int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_linkat +SC_LTTNG_TRACEPOINT_EVENT(linkat, + TP_PROTO(sc_exit(long ret,) int olddfd, const char * oldname, int newdfd, const char * newname, int flags), + TP_ARGS(sc_exit(ret,) olddfd, oldname, newdfd, newname, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, olddfd, olddfd)) sc_in(ctf_user_string(oldname, oldname)) sc_in(ctf_integer(int, newdfd, newdfd)) sc_in(ctf_user_string(newname, newname)) sc_in(ctf_integer(int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_mount +SC_LTTNG_TRACEPOINT_EVENT(mount, + TP_PROTO(sc_exit(long ret,) char * dev_name, char * dir_name, char * type, unsigned long flags, void * data), + TP_ARGS(sc_exit(ret,) dev_name, dir_name, type, flags, data), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(dev_name, dev_name)) sc_in(ctf_user_string(dir_name, dir_name)) sc_in(ctf_user_string(type, type)) sc_in(ctf_integer(unsigned long, flags, flags)) sc_in(ctf_integer(void *, data, data))) +) +#endif +#ifndef OVERRIDE_64_fchownat +SC_LTTNG_TRACEPOINT_EVENT(fchownat, + TP_PROTO(sc_exit(long ret,) int dfd, const char * filename, uid_t user, gid_t group, int flag), + TP_ARGS(sc_exit(ret,) dfd, filename, user, group, flag), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, dfd, dfd)) sc_in(ctf_user_string(filename, filename)) sc_in(ctf_integer(uid_t, user, user)) sc_in(ctf_integer(gid_t, group, group)) sc_in(ctf_integer(int, flag, flag))) +) +#endif +#ifndef OVERRIDE_64_preadv +SC_LTTNG_TRACEPOINT_EVENT(preadv, + TP_PROTO(sc_exit(long ret,) unsigned long fd, const struct iovec * vec, unsigned long vlen, unsigned long pos_l, unsigned long pos_h), + TP_ARGS(sc_exit(ret,) fd, vec, vlen, pos_l, pos_h), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned long, fd, fd)) sc_out(ctf_integer(const struct iovec *, vec, vec)) sc_in(ctf_integer(unsigned long, vlen, vlen)) sc_in(ctf_integer(unsigned long, pos_l, pos_l)) sc_in(ctf_integer(unsigned long, pos_h, pos_h))) +) +#endif +#ifndef OVERRIDE_64_pwritev +SC_LTTNG_TRACEPOINT_EVENT(pwritev, + TP_PROTO(sc_exit(long ret,) unsigned long fd, const struct iovec * vec, unsigned long vlen, unsigned long pos_l, unsigned long pos_h), + TP_ARGS(sc_exit(ret,) fd, vec, vlen, pos_l, pos_h), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(unsigned long, fd, fd)) sc_in(ctf_integer(const struct iovec *, vec, vec)) sc_in(ctf_integer(unsigned long, vlen, vlen)) sc_in(ctf_integer(unsigned long, pos_l, pos_l)) sc_in(ctf_integer(unsigned long, pos_h, pos_h))) +) +#endif +#ifndef OVERRIDE_64_ppoll +SC_LTTNG_TRACEPOINT_EVENT(ppoll, + TP_PROTO(sc_exit(long ret,) struct pollfd * ufds, unsigned int nfds, struct timespec * tsp, const sigset_t * sigmask, size_t sigsetsize), + TP_ARGS(sc_exit(ret,) ufds, nfds, tsp, sigmask, sigsetsize), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_inout(ctf_integer(struct pollfd *, ufds, ufds)) sc_in(ctf_integer(unsigned int, nfds, nfds)) sc_in(ctf_integer(struct timespec *, tsp, tsp)) sc_in(ctf_integer(const sigset_t *, sigmask, sigmask)) sc_in(ctf_integer(size_t, sigsetsize, sigsetsize))) +) +#endif +#ifndef OVERRIDE_64_waitid +SC_LTTNG_TRACEPOINT_EVENT(waitid, + TP_PROTO(sc_exit(long ret,) int which, pid_t upid, struct siginfo * infop, int options, struct rusage * ru), + TP_ARGS(sc_exit(ret,) which, upid, infop, options, ru), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, which, which)) sc_in(ctf_integer(pid_t, upid, upid)) sc_out(ctf_integer(struct siginfo *, infop, infop)) sc_in(ctf_integer(int, options, options)) sc_out(ctf_integer(struct rusage *, ru, ru))) +) +#endif +#ifndef OVERRIDE_64_mq_timedsend +SC_LTTNG_TRACEPOINT_EVENT(mq_timedsend, + TP_PROTO(sc_exit(long ret,) mqd_t mqdes, const char * u_msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec * u_abs_timeout), + TP_ARGS(sc_exit(ret,) mqdes, u_msg_ptr, msg_len, msg_prio, u_abs_timeout), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(mqd_t, mqdes, mqdes)) sc_in(ctf_integer(const char *, u_msg_ptr, u_msg_ptr)) sc_in(ctf_integer(size_t, msg_len, msg_len)) sc_in(ctf_integer(unsigned int, msg_prio, msg_prio)) sc_in(ctf_integer(const struct timespec *, u_abs_timeout, u_abs_timeout))) +) +#endif +#ifndef OVERRIDE_64_mq_timedreceive +SC_LTTNG_TRACEPOINT_EVENT(mq_timedreceive, + TP_PROTO(sc_exit(long ret,) mqd_t mqdes, char * u_msg_ptr, size_t msg_len, unsigned int * u_msg_prio, const struct timespec * u_abs_timeout), + TP_ARGS(sc_exit(ret,) mqdes, u_msg_ptr, msg_len, u_msg_prio, u_abs_timeout), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(mqd_t, mqdes, mqdes)) sc_out(ctf_integer(char *, u_msg_ptr, u_msg_ptr)) sc_in(ctf_integer(size_t, msg_len, msg_len)) sc_out(ctf_integer(unsigned int *, u_msg_prio, u_msg_prio)) sc_in(ctf_integer(const struct timespec *, u_abs_timeout, u_abs_timeout))) +) +#endif +#ifndef OVERRIDE_64_msgrcv +SC_LTTNG_TRACEPOINT_EVENT(msgrcv, + TP_PROTO(sc_exit(long ret,) int msqid, struct msgbuf * msgp, size_t msgsz, long msgtyp, int msgflg), + TP_ARGS(sc_exit(ret,) msqid, msgp, msgsz, msgtyp, msgflg), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, msqid, msqid)) sc_out(ctf_integer(struct msgbuf *, msgp, msgp)) sc_in(ctf_integer(size_t, msgsz, msgsz)) sc_in(ctf_integer(long, msgtyp, msgtyp)) sc_in(ctf_integer(int, msgflg, msgflg))) +) +#endif +#ifndef OVERRIDE_64_setsockopt +SC_LTTNG_TRACEPOINT_EVENT(setsockopt, + TP_PROTO(sc_exit(long ret,) int fd, int level, int optname, char * optval, int optlen), + TP_ARGS(sc_exit(ret,) fd, level, optname, optval, optlen), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_in(ctf_integer(int, level, level)) sc_in(ctf_integer(int, optname, optname)) sc_in(ctf_integer(char *, optval, optval)) sc_in(ctf_integer(int, optlen, optlen))) +) +#endif +#ifndef OVERRIDE_64_getsockopt +SC_LTTNG_TRACEPOINT_EVENT(getsockopt, + TP_PROTO(sc_exit(long ret,) int fd, int level, int optname, char * optval, int * optlen), + TP_ARGS(sc_exit(ret,) fd, level, optname, optval, optlen), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_in(ctf_integer(int, level, level)) sc_in(ctf_integer(int, optname, optname)) sc_out(ctf_integer(char *, optval, optval)) sc_inout(ctf_integer(int *, optlen, optlen))) +) +#endif +#ifndef OVERRIDE_64_add_key +SC_LTTNG_TRACEPOINT_EVENT(add_key, + TP_PROTO(sc_exit(long ret,) const char * _type, const char * _description, const void * _payload, size_t plen, key_serial_t ringid), + TP_ARGS(sc_exit(ret,) _type, _description, _payload, plen, ringid), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_user_string(_type, _type)) sc_in(ctf_integer(const char *, _description, _description)) sc_in(ctf_integer(const void *, _payload, _payload)) sc_in(ctf_integer(size_t, plen, plen)) sc_in(ctf_integer(key_serial_t, ringid, ringid))) +) +#endif +#ifndef OVERRIDE_64_perf_event_open +SC_LTTNG_TRACEPOINT_EVENT(perf_event_open, + TP_PROTO(sc_exit(long ret,) struct perf_event_attr * attr_uptr, pid_t pid, int cpu, int group_fd, unsigned long flags), + TP_ARGS(sc_exit(ret,) attr_uptr, pid, cpu, group_fd, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(struct perf_event_attr *, attr_uptr, attr_uptr)) sc_in(ctf_integer(pid_t, pid, pid)) sc_in(ctf_integer(int, cpu, cpu)) sc_in(ctf_integer(int, group_fd, group_fd)) sc_in(ctf_integer(unsigned long, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_recvmmsg +SC_LTTNG_TRACEPOINT_EVENT(recvmmsg, + TP_PROTO(sc_exit(long ret,) int fd, struct mmsghdr * mmsg, unsigned int vlen, unsigned int flags, struct timespec * timeout), + TP_ARGS(sc_exit(ret,) fd, mmsg, vlen, flags, timeout), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_out(ctf_integer(struct mmsghdr *, mmsg, mmsg)) sc_in(ctf_integer(unsigned int, vlen, vlen)) sc_in(ctf_integer(unsigned int, flags, flags)) sc_inout(ctf_integer(struct timespec *, timeout, timeout))) +) +#endif +#ifndef OVERRIDE_64_fanotify_mark +SC_LTTNG_TRACEPOINT_EVENT(fanotify_mark, + TP_PROTO(sc_exit(long ret,) int fanotify_fd, unsigned int flags, __u64 mask, int dfd, const char * pathname), + TP_ARGS(sc_exit(ret,) fanotify_fd, flags, mask, dfd, pathname), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fanotify_fd, fanotify_fd)) sc_in(ctf_integer(unsigned int, flags, flags)) sc_in(ctf_integer(__u64, mask, mask)) sc_in(ctf_integer(int, dfd, dfd)) sc_in(ctf_user_string(pathname, pathname))) +) +#endif +#ifndef OVERRIDE_64_name_to_handle_at +SC_LTTNG_TRACEPOINT_EVENT(name_to_handle_at, + TP_PROTO(sc_exit(long ret,) int dfd, const char * name, struct file_handle * handle, int * mnt_id, int flag), + TP_ARGS(sc_exit(ret,) dfd, name, handle, mnt_id, flag), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, dfd, dfd)) sc_in(ctf_user_string(name, name)) sc_inout(ctf_integer(struct file_handle *, handle, handle)) sc_out(ctf_integer(int *, mnt_id, mnt_id)) sc_in(ctf_integer(int, flag, flag))) +) +#endif +#ifndef OVERRIDE_64_renameat2 +SC_LTTNG_TRACEPOINT_EVENT(renameat2, + TP_PROTO(sc_exit(long ret,) int olddfd, const char * oldname, int newdfd, const char * newname, unsigned int flags), + TP_ARGS(sc_exit(ret,) olddfd, oldname, newdfd, newname, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_inout(ctf_integer(int, olddfd, olddfd)) sc_inout(ctf_user_string(oldname, oldname)) sc_inout(ctf_integer(int, newdfd, newdfd)) sc_inout(ctf_user_string(newname, newname)) sc_inout(ctf_integer(unsigned int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_execveat +SC_LTTNG_TRACEPOINT_EVENT(execveat, + TP_PROTO(sc_exit(long ret,) int fd, const char * filename, const char *const * argv, const char *const * envp, int flags), + TP_ARGS(sc_exit(ret,) fd, filename, argv, envp, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_inout(ctf_integer(int, fd, fd)) sc_inout(ctf_user_string(filename, filename)) sc_inout(ctf_integer(const char *const *, argv, argv)) sc_inout(ctf_integer(const char *const *, envp, envp)) sc_inout(ctf_integer(int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_epoll_pwait +SC_LTTNG_TRACEPOINT_EVENT(epoll_pwait, + TP_PROTO(sc_exit(long ret,) int epfd, struct epoll_event * events, int maxevents, int timeout, const sigset_t * sigmask, size_t sigsetsize), + TP_ARGS(sc_exit(ret,) epfd, events, maxevents, timeout, sigmask, sigsetsize), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, epfd, epfd)) sc_out(ctf_integer(struct epoll_event *, events, events)) sc_in(ctf_integer(int, maxevents, maxevents)) sc_in(ctf_integer(int, timeout, timeout)) sc_in(ctf_integer(const sigset_t *, sigmask, sigmask)) sc_in(ctf_integer(size_t, sigsetsize, sigsetsize))) +) +#endif +#ifndef OVERRIDE_64_pselect6 +SC_LTTNG_TRACEPOINT_EVENT(pselect6, + TP_PROTO(sc_exit(long ret,) int n, fd_set * inp, fd_set * outp, fd_set * exp, struct timespec * tsp, void * sig), + TP_ARGS(sc_exit(ret,) n, inp, outp, exp, tsp, sig), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, n, n)) sc_inout(ctf_integer(fd_set *, inp, inp)) sc_inout(ctf_integer(fd_set *, outp, outp)) sc_inout(ctf_integer(fd_set *, exp, exp)) sc_inout(ctf_integer(struct timespec *, tsp, tsp)) sc_in(ctf_integer(void *, sig, sig))) +) +#endif +#ifndef OVERRIDE_64_splice +SC_LTTNG_TRACEPOINT_EVENT(splice, + TP_PROTO(sc_exit(long ret,) int fd_in, loff_t * off_in, int fd_out, loff_t * off_out, size_t len, unsigned int flags), + TP_ARGS(sc_exit(ret,) fd_in, off_in, fd_out, off_out, len, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd_in, fd_in)) sc_in(ctf_integer(loff_t *, off_in, off_in)) sc_in(ctf_integer(int, fd_out, fd_out)) sc_in(ctf_integer(loff_t *, off_out, off_out)) sc_in(ctf_integer(size_t, len, len)) sc_in(ctf_integer(unsigned int, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_futex +SC_LTTNG_TRACEPOINT_EVENT(futex, + TP_PROTO(sc_exit(long ret,) u32 * uaddr, int op, u32 val, struct timespec * utime, u32 * uaddr2, u32 val3), + TP_ARGS(sc_exit(ret,) uaddr, op, val, utime, uaddr2, val3), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_inout(ctf_integer(u32 *, uaddr, uaddr)) sc_in(ctf_integer(int, op, op)) sc_in(ctf_integer(u32, val, val)) sc_in(ctf_integer(struct timespec *, utime, utime)) sc_inout(ctf_integer(u32 *, uaddr2, uaddr2)) sc_in(ctf_integer(u32, val3, val3))) +) +#endif +#ifndef OVERRIDE_64_sendto +SC_LTTNG_TRACEPOINT_EVENT(sendto, + TP_PROTO(sc_exit(long ret,) int fd, void * buff, size_t len, unsigned int flags, struct sockaddr * addr, int addr_len), + TP_ARGS(sc_exit(ret,) fd, buff, len, flags, addr, addr_len), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_in(ctf_integer(void *, buff, buff)) sc_in(ctf_integer(size_t, len, len)) sc_in(ctf_integer(unsigned int, flags, flags)) sc_in(ctf_integer(struct sockaddr *, addr, addr)) sc_in(ctf_integer(int, addr_len, addr_len))) +) +#endif +#ifndef OVERRIDE_64_recvfrom +SC_LTTNG_TRACEPOINT_EVENT(recvfrom, + TP_PROTO(sc_exit(long ret,) int fd, void * ubuf, size_t size, unsigned int flags, struct sockaddr * addr, int * addr_len), + TP_ARGS(sc_exit(ret,) fd, ubuf, size, flags, addr, addr_len), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(int, fd, fd)) sc_out(ctf_integer(void *, ubuf, ubuf)) sc_in(ctf_integer(size_t, size, size)) sc_in(ctf_integer(unsigned int, flags, flags)) sc_out(ctf_integer(struct sockaddr *, addr, addr)) sc_inout(ctf_integer(int *, addr_len, addr_len))) +) +#endif +#ifndef OVERRIDE_64_process_vm_readv +SC_LTTNG_TRACEPOINT_EVENT(process_vm_readv, + TP_PROTO(sc_exit(long ret,) pid_t pid, const struct iovec * lvec, unsigned long liovcnt, const struct iovec * rvec, unsigned long riovcnt, unsigned long flags), + TP_ARGS(sc_exit(ret,) pid, lvec, liovcnt, rvec, riovcnt, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(pid_t, pid, pid)) sc_out(ctf_integer(const struct iovec *, lvec, lvec)) sc_in(ctf_integer(unsigned long, liovcnt, liovcnt)) sc_in(ctf_integer(const struct iovec *, rvec, rvec)) sc_in(ctf_integer(unsigned long, riovcnt, riovcnt)) sc_in(ctf_integer(unsigned long, flags, flags))) +) +#endif +#ifndef OVERRIDE_64_process_vm_writev +SC_LTTNG_TRACEPOINT_EVENT(process_vm_writev, + TP_PROTO(sc_exit(long ret,) pid_t pid, const struct iovec * lvec, unsigned long liovcnt, const struct iovec * rvec, unsigned long riovcnt, unsigned long flags), + TP_ARGS(sc_exit(ret,) pid, lvec, liovcnt, rvec, riovcnt, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_in(ctf_integer(pid_t, pid, pid)) sc_in(ctf_integer(const struct iovec *, lvec, lvec)) sc_in(ctf_integer(unsigned long, liovcnt, liovcnt)) sc_in(ctf_integer(const struct iovec *, rvec, rvec)) sc_in(ctf_integer(unsigned long, riovcnt, riovcnt)) sc_in(ctf_integer(unsigned long, flags, flags))) +) +#endif + +#endif /* _TRACE_SYSCALLS_POINTERS_H */ + +/* This part must be outside protection */ +#include + +#else /* CREATE_SYSCALL_TABLE */ + +#include "arm-64-syscalls-4.4.0_pointers_override.h" +#include "syscalls_pointers_override.h" + +#ifndef OVERRIDE_TABLE_64_io_setup +TRACE_SYSCALL_TABLE(io_setup, io_setup, 0, 2) +#endif +#ifndef OVERRIDE_TABLE_64_io_submit +TRACE_SYSCALL_TABLE(io_submit, io_submit, 2, 3) +#endif +#ifndef OVERRIDE_TABLE_64_io_cancel +TRACE_SYSCALL_TABLE(io_cancel, io_cancel, 3, 3) +#endif +#ifndef OVERRIDE_TABLE_64_io_getevents +TRACE_SYSCALL_TABLE(io_getevents, io_getevents, 4, 5) +#endif +#ifndef OVERRIDE_TABLE_64_setxattr +TRACE_SYSCALL_TABLE(setxattr, setxattr, 5, 5) +#endif +#ifndef OVERRIDE_TABLE_64_lsetxattr +TRACE_SYSCALL_TABLE(lsetxattr, lsetxattr, 6, 5) +#endif +#ifndef OVERRIDE_TABLE_64_fsetxattr +TRACE_SYSCALL_TABLE(fsetxattr, fsetxattr, 7, 5) +#endif +#ifndef OVERRIDE_TABLE_64_getxattr +TRACE_SYSCALL_TABLE(getxattr, getxattr, 8, 4) +#endif +#ifndef OVERRIDE_TABLE_64_lgetxattr +TRACE_SYSCALL_TABLE(lgetxattr, lgetxattr, 9, 4) +#endif +#ifndef OVERRIDE_TABLE_64_fgetxattr +TRACE_SYSCALL_TABLE(fgetxattr, fgetxattr, 10, 4) +#endif +#ifndef OVERRIDE_TABLE_64_listxattr +TRACE_SYSCALL_TABLE(listxattr, listxattr, 11, 3) +#endif +#ifndef OVERRIDE_TABLE_64_llistxattr +TRACE_SYSCALL_TABLE(llistxattr, llistxattr, 12, 3) +#endif +#ifndef OVERRIDE_TABLE_64_flistxattr +TRACE_SYSCALL_TABLE(flistxattr, flistxattr, 13, 3) +#endif +#ifndef OVERRIDE_TABLE_64_removexattr +TRACE_SYSCALL_TABLE(removexattr, removexattr, 14, 2) +#endif +#ifndef OVERRIDE_TABLE_64_lremovexattr +TRACE_SYSCALL_TABLE(lremovexattr, lremovexattr, 15, 2) +#endif +#ifndef OVERRIDE_TABLE_64_fremovexattr +TRACE_SYSCALL_TABLE(fremovexattr, fremovexattr, 16, 2) +#endif +#ifndef OVERRIDE_TABLE_64_getcwd +TRACE_SYSCALL_TABLE(getcwd, getcwd, 17, 2) +#endif +#ifndef OVERRIDE_TABLE_64_lookup_dcookie +TRACE_SYSCALL_TABLE(lookup_dcookie, lookup_dcookie, 18, 3) +#endif +#ifndef OVERRIDE_TABLE_64_epoll_ctl +TRACE_SYSCALL_TABLE(epoll_ctl, epoll_ctl, 21, 4) +#endif +#ifndef OVERRIDE_TABLE_64_epoll_pwait +TRACE_SYSCALL_TABLE(epoll_pwait, epoll_pwait, 22, 6) +#endif +#ifndef OVERRIDE_TABLE_64_inotify_add_watch +TRACE_SYSCALL_TABLE(inotify_add_watch, inotify_add_watch, 27, 3) +#endif +#ifndef OVERRIDE_TABLE_64_mknodat +TRACE_SYSCALL_TABLE(mknodat, mknodat, 33, 4) +#endif +#ifndef OVERRIDE_TABLE_64_mkdirat +TRACE_SYSCALL_TABLE(mkdirat, mkdirat, 34, 3) +#endif +#ifndef OVERRIDE_TABLE_64_unlinkat +TRACE_SYSCALL_TABLE(unlinkat, unlinkat, 35, 3) +#endif +#ifndef OVERRIDE_TABLE_64_symlinkat +TRACE_SYSCALL_TABLE(symlinkat, symlinkat, 36, 3) +#endif +#ifndef OVERRIDE_TABLE_64_linkat +TRACE_SYSCALL_TABLE(linkat, linkat, 37, 5) +#endif +#ifndef OVERRIDE_TABLE_64_renameat +TRACE_SYSCALL_TABLE(renameat, renameat, 38, 4) +#endif +#ifndef OVERRIDE_TABLE_64_umount +TRACE_SYSCALL_TABLE(umount, umount, 39, 2) +#endif +#ifndef OVERRIDE_TABLE_64_mount +TRACE_SYSCALL_TABLE(mount, mount, 40, 5) +#endif +#ifndef OVERRIDE_TABLE_64_pivot_root +TRACE_SYSCALL_TABLE(pivot_root, pivot_root, 41, 2) +#endif +#ifndef OVERRIDE_TABLE_64_statfs +TRACE_SYSCALL_TABLE(statfs, statfs, 43, 2) +#endif +#ifndef OVERRIDE_TABLE_64_fstatfs +TRACE_SYSCALL_TABLE(fstatfs, fstatfs, 44, 2) +#endif +#ifndef OVERRIDE_TABLE_64_truncate +TRACE_SYSCALL_TABLE(truncate, truncate, 45, 2) +#endif +#ifndef OVERRIDE_TABLE_64_faccessat +TRACE_SYSCALL_TABLE(faccessat, faccessat, 48, 3) +#endif +#ifndef OVERRIDE_TABLE_64_chdir +TRACE_SYSCALL_TABLE(chdir, chdir, 49, 1) +#endif +#ifndef OVERRIDE_TABLE_64_chroot +TRACE_SYSCALL_TABLE(chroot, chroot, 51, 1) +#endif +#ifndef OVERRIDE_TABLE_64_fchmodat +TRACE_SYSCALL_TABLE(fchmodat, fchmodat, 53, 3) +#endif +#ifndef OVERRIDE_TABLE_64_fchownat +TRACE_SYSCALL_TABLE(fchownat, fchownat, 54, 5) +#endif +#ifndef OVERRIDE_TABLE_64_openat +TRACE_SYSCALL_TABLE(openat, openat, 56, 4) +#endif +#ifndef OVERRIDE_TABLE_64_pipe2 +TRACE_SYSCALL_TABLE(pipe2, pipe2, 59, 2) +#endif +#ifndef OVERRIDE_TABLE_64_quotactl +TRACE_SYSCALL_TABLE(quotactl, quotactl, 60, 4) +#endif +#ifndef OVERRIDE_TABLE_64_getdents64 +TRACE_SYSCALL_TABLE(getdents64, getdents64, 61, 3) +#endif +#ifndef OVERRIDE_TABLE_64_read +TRACE_SYSCALL_TABLE(read, read, 63, 3) +#endif +#ifndef OVERRIDE_TABLE_64_write +TRACE_SYSCALL_TABLE(write, write, 64, 3) +#endif +#ifndef OVERRIDE_TABLE_64_readv +TRACE_SYSCALL_TABLE(readv, readv, 65, 3) +#endif +#ifndef OVERRIDE_TABLE_64_writev +TRACE_SYSCALL_TABLE(writev, writev, 66, 3) +#endif +#ifndef OVERRIDE_TABLE_64_pread64 +TRACE_SYSCALL_TABLE(pread64, pread64, 67, 4) +#endif +#ifndef OVERRIDE_TABLE_64_pwrite64 +TRACE_SYSCALL_TABLE(pwrite64, pwrite64, 68, 4) +#endif +#ifndef OVERRIDE_TABLE_64_preadv +TRACE_SYSCALL_TABLE(preadv, preadv, 69, 5) +#endif +#ifndef OVERRIDE_TABLE_64_pwritev +TRACE_SYSCALL_TABLE(pwritev, pwritev, 70, 5) +#endif +#ifndef OVERRIDE_TABLE_64_sendfile64 +TRACE_SYSCALL_TABLE(sendfile64, sendfile64, 71, 4) +#endif +#ifndef OVERRIDE_TABLE_64_pselect6 +TRACE_SYSCALL_TABLE(pselect6, pselect6, 72, 6) +#endif +#ifndef OVERRIDE_TABLE_64_ppoll +TRACE_SYSCALL_TABLE(ppoll, ppoll, 73, 5) +#endif +#ifndef OVERRIDE_TABLE_64_signalfd4 +TRACE_SYSCALL_TABLE(signalfd4, signalfd4, 74, 4) +#endif +#ifndef OVERRIDE_TABLE_64_vmsplice +TRACE_SYSCALL_TABLE(vmsplice, vmsplice, 75, 4) +#endif +#ifndef OVERRIDE_TABLE_64_splice +TRACE_SYSCALL_TABLE(splice, splice, 76, 6) +#endif +#ifndef OVERRIDE_TABLE_64_readlinkat +TRACE_SYSCALL_TABLE(readlinkat, readlinkat, 78, 4) +#endif +#ifndef OVERRIDE_TABLE_64_newfstatat +TRACE_SYSCALL_TABLE(newfstatat, newfstatat, 79, 4) +#endif +#ifndef OVERRIDE_TABLE_64_newfstat +TRACE_SYSCALL_TABLE(newfstat, newfstat, 80, 2) +#endif +#ifndef OVERRIDE_TABLE_64_timerfd_settime +TRACE_SYSCALL_TABLE(timerfd_settime, timerfd_settime, 86, 4) +#endif +#ifndef OVERRIDE_TABLE_64_timerfd_gettime +TRACE_SYSCALL_TABLE(timerfd_gettime, timerfd_gettime, 87, 2) +#endif +#ifndef OVERRIDE_TABLE_64_utimensat +TRACE_SYSCALL_TABLE(utimensat, utimensat, 88, 4) +#endif +#ifndef OVERRIDE_TABLE_64_acct +TRACE_SYSCALL_TABLE(acct, acct, 89, 1) +#endif +#ifndef OVERRIDE_TABLE_64_waitid +TRACE_SYSCALL_TABLE(waitid, waitid, 95, 5) +#endif +#ifndef OVERRIDE_TABLE_64_set_tid_address +TRACE_SYSCALL_TABLE(set_tid_address, set_tid_address, 96, 1) +#endif +#ifndef OVERRIDE_TABLE_64_futex +TRACE_SYSCALL_TABLE(futex, futex, 98, 6) +#endif +#ifndef OVERRIDE_TABLE_64_set_robust_list +TRACE_SYSCALL_TABLE(set_robust_list, set_robust_list, 99, 2) +#endif +#ifndef OVERRIDE_TABLE_64_get_robust_list +TRACE_SYSCALL_TABLE(get_robust_list, get_robust_list, 100, 3) +#endif +#ifndef OVERRIDE_TABLE_64_nanosleep +TRACE_SYSCALL_TABLE(nanosleep, nanosleep, 101, 2) +#endif +#ifndef OVERRIDE_TABLE_64_getitimer +TRACE_SYSCALL_TABLE(getitimer, getitimer, 102, 2) +#endif +#ifndef OVERRIDE_TABLE_64_setitimer +TRACE_SYSCALL_TABLE(setitimer, setitimer, 103, 3) +#endif +#ifndef OVERRIDE_TABLE_64_init_module +TRACE_SYSCALL_TABLE(init_module, init_module, 105, 3) +#endif +#ifndef OVERRIDE_TABLE_64_delete_module +TRACE_SYSCALL_TABLE(delete_module, delete_module, 106, 2) +#endif +#ifndef OVERRIDE_TABLE_64_timer_create +TRACE_SYSCALL_TABLE(timer_create, timer_create, 107, 3) +#endif +#ifndef OVERRIDE_TABLE_64_timer_gettime +TRACE_SYSCALL_TABLE(timer_gettime, timer_gettime, 108, 2) +#endif +#ifndef OVERRIDE_TABLE_64_timer_settime +TRACE_SYSCALL_TABLE(timer_settime, timer_settime, 110, 4) +#endif +#ifndef OVERRIDE_TABLE_64_clock_settime +TRACE_SYSCALL_TABLE(clock_settime, clock_settime, 112, 2) +#endif +#ifndef OVERRIDE_TABLE_64_clock_gettime +TRACE_SYSCALL_TABLE(clock_gettime, clock_gettime, 113, 2) +#endif +#ifndef OVERRIDE_TABLE_64_clock_getres +TRACE_SYSCALL_TABLE(clock_getres, clock_getres, 114, 2) +#endif +#ifndef OVERRIDE_TABLE_64_clock_nanosleep +TRACE_SYSCALL_TABLE(clock_nanosleep, clock_nanosleep, 115, 4) +#endif +#ifndef OVERRIDE_TABLE_64_syslog +TRACE_SYSCALL_TABLE(syslog, syslog, 116, 3) +#endif +#ifndef OVERRIDE_TABLE_64_sched_setparam +TRACE_SYSCALL_TABLE(sched_setparam, sched_setparam, 118, 2) +#endif +#ifndef OVERRIDE_TABLE_64_sched_setscheduler +TRACE_SYSCALL_TABLE(sched_setscheduler, sched_setscheduler, 119, 3) +#endif +#ifndef OVERRIDE_TABLE_64_sched_getparam +TRACE_SYSCALL_TABLE(sched_getparam, sched_getparam, 121, 2) +#endif +#ifndef OVERRIDE_TABLE_64_sched_setaffinity +TRACE_SYSCALL_TABLE(sched_setaffinity, sched_setaffinity, 122, 3) +#endif +#ifndef OVERRIDE_TABLE_64_sched_getaffinity +TRACE_SYSCALL_TABLE(sched_getaffinity, sched_getaffinity, 123, 3) +#endif +#ifndef OVERRIDE_TABLE_64_sched_rr_get_interval +TRACE_SYSCALL_TABLE(sched_rr_get_interval, sched_rr_get_interval, 127, 2) +#endif +#ifndef OVERRIDE_TABLE_64_sigaltstack +TRACE_SYSCALL_TABLE(sigaltstack, sigaltstack, 132, 2) +#endif +#ifndef OVERRIDE_TABLE_64_rt_sigsuspend +TRACE_SYSCALL_TABLE(rt_sigsuspend, rt_sigsuspend, 133, 2) +#endif +#ifndef OVERRIDE_TABLE_64_rt_sigaction +TRACE_SYSCALL_TABLE(rt_sigaction, rt_sigaction, 134, 4) +#endif +#ifndef OVERRIDE_TABLE_64_rt_sigprocmask +TRACE_SYSCALL_TABLE(rt_sigprocmask, rt_sigprocmask, 135, 4) +#endif +#ifndef OVERRIDE_TABLE_64_rt_sigpending +TRACE_SYSCALL_TABLE(rt_sigpending, rt_sigpending, 136, 2) +#endif +#ifndef OVERRIDE_TABLE_64_rt_sigtimedwait +TRACE_SYSCALL_TABLE(rt_sigtimedwait, rt_sigtimedwait, 137, 4) +#endif +#ifndef OVERRIDE_TABLE_64_rt_sigqueueinfo +TRACE_SYSCALL_TABLE(rt_sigqueueinfo, rt_sigqueueinfo, 138, 3) +#endif +#ifndef OVERRIDE_TABLE_64_reboot +TRACE_SYSCALL_TABLE(reboot, reboot, 142, 4) +#endif +#ifndef OVERRIDE_TABLE_64_getresuid +TRACE_SYSCALL_TABLE(getresuid, getresuid, 148, 3) +#endif +#ifndef OVERRIDE_TABLE_64_getresgid +TRACE_SYSCALL_TABLE(getresgid, getresgid, 150, 3) +#endif +#ifndef OVERRIDE_TABLE_64_times +TRACE_SYSCALL_TABLE(times, times, 153, 1) +#endif +#ifndef OVERRIDE_TABLE_64_getgroups +TRACE_SYSCALL_TABLE(getgroups, getgroups, 158, 2) +#endif +#ifndef OVERRIDE_TABLE_64_setgroups +TRACE_SYSCALL_TABLE(setgroups, setgroups, 159, 2) +#endif +#ifndef OVERRIDE_TABLE_64_newuname +TRACE_SYSCALL_TABLE(newuname, newuname, 160, 1) +#endif +#ifndef OVERRIDE_TABLE_64_sethostname +TRACE_SYSCALL_TABLE(sethostname, sethostname, 161, 2) +#endif +#ifndef OVERRIDE_TABLE_64_setdomainname +TRACE_SYSCALL_TABLE(setdomainname, setdomainname, 162, 2) +#endif +#ifndef OVERRIDE_TABLE_64_getrlimit +TRACE_SYSCALL_TABLE(getrlimit, getrlimit, 163, 2) +#endif +#ifndef OVERRIDE_TABLE_64_setrlimit +TRACE_SYSCALL_TABLE(setrlimit, setrlimit, 164, 2) +#endif +#ifndef OVERRIDE_TABLE_64_getrusage +TRACE_SYSCALL_TABLE(getrusage, getrusage, 165, 2) +#endif +#ifndef OVERRIDE_TABLE_64_getcpu +TRACE_SYSCALL_TABLE(getcpu, getcpu, 168, 3) +#endif +#ifndef OVERRIDE_TABLE_64_gettimeofday +TRACE_SYSCALL_TABLE(gettimeofday, gettimeofday, 169, 2) +#endif +#ifndef OVERRIDE_TABLE_64_settimeofday +TRACE_SYSCALL_TABLE(settimeofday, settimeofday, 170, 2) +#endif +#ifndef OVERRIDE_TABLE_64_adjtimex +TRACE_SYSCALL_TABLE(adjtimex, adjtimex, 171, 1) +#endif +#ifndef OVERRIDE_TABLE_64_sysinfo +TRACE_SYSCALL_TABLE(sysinfo, sysinfo, 179, 1) +#endif +#ifndef OVERRIDE_TABLE_64_mq_open +TRACE_SYSCALL_TABLE(mq_open, mq_open, 180, 4) +#endif +#ifndef OVERRIDE_TABLE_64_mq_unlink +TRACE_SYSCALL_TABLE(mq_unlink, mq_unlink, 181, 1) +#endif +#ifndef OVERRIDE_TABLE_64_mq_timedsend +TRACE_SYSCALL_TABLE(mq_timedsend, mq_timedsend, 182, 5) +#endif +#ifndef OVERRIDE_TABLE_64_mq_timedreceive +TRACE_SYSCALL_TABLE(mq_timedreceive, mq_timedreceive, 183, 5) +#endif +#ifndef OVERRIDE_TABLE_64_mq_notify +TRACE_SYSCALL_TABLE(mq_notify, mq_notify, 184, 2) +#endif +#ifndef OVERRIDE_TABLE_64_mq_getsetattr +TRACE_SYSCALL_TABLE(mq_getsetattr, mq_getsetattr, 185, 3) +#endif +#ifndef OVERRIDE_TABLE_64_msgctl +TRACE_SYSCALL_TABLE(msgctl, msgctl, 187, 3) +#endif +#ifndef OVERRIDE_TABLE_64_msgrcv +TRACE_SYSCALL_TABLE(msgrcv, msgrcv, 188, 5) +#endif +#ifndef OVERRIDE_TABLE_64_msgsnd +TRACE_SYSCALL_TABLE(msgsnd, msgsnd, 189, 4) +#endif +#ifndef OVERRIDE_TABLE_64_semtimedop +TRACE_SYSCALL_TABLE(semtimedop, semtimedop, 192, 4) +#endif +#ifndef OVERRIDE_TABLE_64_semop +TRACE_SYSCALL_TABLE(semop, semop, 193, 3) +#endif +#ifndef OVERRIDE_TABLE_64_shmctl +TRACE_SYSCALL_TABLE(shmctl, shmctl, 195, 3) +#endif +#ifndef OVERRIDE_TABLE_64_shmat +TRACE_SYSCALL_TABLE(shmat, shmat, 196, 3) +#endif +#ifndef OVERRIDE_TABLE_64_shmdt +TRACE_SYSCALL_TABLE(shmdt, shmdt, 197, 1) +#endif +#ifndef OVERRIDE_TABLE_64_socketpair +TRACE_SYSCALL_TABLE(socketpair, socketpair, 199, 4) +#endif +#ifndef OVERRIDE_TABLE_64_bind +TRACE_SYSCALL_TABLE(bind, bind, 200, 3) +#endif +#ifndef OVERRIDE_TABLE_64_accept +TRACE_SYSCALL_TABLE(accept, accept, 202, 3) +#endif +#ifndef OVERRIDE_TABLE_64_connect +TRACE_SYSCALL_TABLE(connect, connect, 203, 3) +#endif +#ifndef OVERRIDE_TABLE_64_getsockname +TRACE_SYSCALL_TABLE(getsockname, getsockname, 204, 3) +#endif +#ifndef OVERRIDE_TABLE_64_getpeername +TRACE_SYSCALL_TABLE(getpeername, getpeername, 205, 3) +#endif +#ifndef OVERRIDE_TABLE_64_sendto +TRACE_SYSCALL_TABLE(sendto, sendto, 206, 6) +#endif +#ifndef OVERRIDE_TABLE_64_recvfrom +TRACE_SYSCALL_TABLE(recvfrom, recvfrom, 207, 6) +#endif +#ifndef OVERRIDE_TABLE_64_setsockopt +TRACE_SYSCALL_TABLE(setsockopt, setsockopt, 208, 5) +#endif +#ifndef OVERRIDE_TABLE_64_getsockopt +TRACE_SYSCALL_TABLE(getsockopt, getsockopt, 209, 5) +#endif +#ifndef OVERRIDE_TABLE_64_sendmsg +TRACE_SYSCALL_TABLE(sendmsg, sendmsg, 211, 3) +#endif +#ifndef OVERRIDE_TABLE_64_recvmsg +TRACE_SYSCALL_TABLE(recvmsg, recvmsg, 212, 3) +#endif +#ifndef OVERRIDE_TABLE_64_add_key +TRACE_SYSCALL_TABLE(add_key, add_key, 217, 5) +#endif +#ifndef OVERRIDE_TABLE_64_request_key +TRACE_SYSCALL_TABLE(request_key, request_key, 218, 4) +#endif +#ifndef OVERRIDE_TABLE_64_execve +TRACE_SYSCALL_TABLE(execve, execve, 221, 3) +#endif +#ifndef OVERRIDE_TABLE_64_swapon +TRACE_SYSCALL_TABLE(swapon, swapon, 224, 2) +#endif +#ifndef OVERRIDE_TABLE_64_swapoff +TRACE_SYSCALL_TABLE(swapoff, swapoff, 225, 1) +#endif +#ifndef OVERRIDE_TABLE_64_mincore +TRACE_SYSCALL_TABLE(mincore, mincore, 232, 3) +#endif +#ifndef OVERRIDE_TABLE_64_rt_tgsigqueueinfo +TRACE_SYSCALL_TABLE(rt_tgsigqueueinfo, rt_tgsigqueueinfo, 240, 4) +#endif +#ifndef OVERRIDE_TABLE_64_perf_event_open +TRACE_SYSCALL_TABLE(perf_event_open, perf_event_open, 241, 5) +#endif +#ifndef OVERRIDE_TABLE_64_accept4 +TRACE_SYSCALL_TABLE(accept4, accept4, 242, 4) +#endif +#ifndef OVERRIDE_TABLE_64_recvmmsg +TRACE_SYSCALL_TABLE(recvmmsg, recvmmsg, 243, 5) +#endif +#ifndef OVERRIDE_TABLE_64_wait4 +TRACE_SYSCALL_TABLE(wait4, wait4, 260, 4) +#endif +#ifndef OVERRIDE_TABLE_64_prlimit64 +TRACE_SYSCALL_TABLE(prlimit64, prlimit64, 261, 4) +#endif +#ifndef OVERRIDE_TABLE_64_fanotify_mark +TRACE_SYSCALL_TABLE(fanotify_mark, fanotify_mark, 263, 5) +#endif +#ifndef OVERRIDE_TABLE_64_name_to_handle_at +TRACE_SYSCALL_TABLE(name_to_handle_at, name_to_handle_at, 264, 5) +#endif +#ifndef OVERRIDE_TABLE_64_open_by_handle_at +TRACE_SYSCALL_TABLE(open_by_handle_at, open_by_handle_at, 265, 3) +#endif +#ifndef OVERRIDE_TABLE_64_clock_adjtime +TRACE_SYSCALL_TABLE(clock_adjtime, clock_adjtime, 266, 2) +#endif +#ifndef OVERRIDE_TABLE_64_sendmmsg +TRACE_SYSCALL_TABLE(sendmmsg, sendmmsg, 269, 4) +#endif +#ifndef OVERRIDE_TABLE_64_process_vm_readv +TRACE_SYSCALL_TABLE(process_vm_readv, process_vm_readv, 270, 6) +#endif +#ifndef OVERRIDE_TABLE_64_process_vm_writev +TRACE_SYSCALL_TABLE(process_vm_writev, process_vm_writev, 271, 6) +#endif +#ifndef OVERRIDE_TABLE_64_finit_module +TRACE_SYSCALL_TABLE(finit_module, finit_module, 273, 3) +#endif +#ifndef OVERRIDE_TABLE_64_sched_setattr +TRACE_SYSCALL_TABLE(sched_setattr, sched_setattr, 274, 3) +#endif +#ifndef OVERRIDE_TABLE_64_sched_getattr +TRACE_SYSCALL_TABLE(sched_getattr, sched_getattr, 275, 4) +#endif +#ifndef OVERRIDE_TABLE_64_renameat2 +TRACE_SYSCALL_TABLE(renameat2, renameat2, 276, 5) +#endif +#ifndef OVERRIDE_TABLE_64_seccomp +TRACE_SYSCALL_TABLE(seccomp, seccomp, 277, 3) +#endif +#ifndef OVERRIDE_TABLE_64_getrandom +TRACE_SYSCALL_TABLE(getrandom, getrandom, 278, 3) +#endif +#ifndef OVERRIDE_TABLE_64_memfd_create +TRACE_SYSCALL_TABLE(memfd_create, memfd_create, 279, 2) +#endif +#ifndef OVERRIDE_TABLE_64_execveat +TRACE_SYSCALL_TABLE(execveat, execveat, 281, 5) +#endif + +#endif /* CREATE_SYSCALL_TABLE */ diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/arm-64-syscalls-4.4.0_pointers_override.h lttng-modules-2.8.0/instrumentation/syscalls/headers/arm-64-syscalls-4.4.0_pointers_override.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/arm-64-syscalls-4.4.0_pointers_override.h 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/arm-64-syscalls-4.4.0_pointers_override.h 2016-05-20 01:34:54.000000000 +0000 @@ -0,0 +1,9 @@ +/* + * this is a place-holder for arm64 integer syscall definition override. + */ +#ifndef CREATE_SYSCALL_TABLE + +#else +#define OVERRIDE_TABLE_64_clone +TRACE_SYSCALL_TABLE(clone, clone, 220, 5) +#endif diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/compat_syscalls_integers.h lttng-modules-2.8.0/instrumentation/syscalls/headers/compat_syscalls_integers.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/compat_syscalls_integers.h 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/compat_syscalls_integers.h 2016-05-20 01:34:54.000000000 +0000 @@ -1,3 +1,11 @@ #ifdef CONFIG_X86_64 #include "x86-32-syscalls-3.1.0-rc6_integers.h" #endif + +#ifdef CONFIG_ARM64 +#include "arm-32-syscalls-3.4.25_integers.h" +#endif + +#ifdef CONFIG_PPC64 +#include "powerpc-32-syscalls-3.0.34_integers.h" +#endif diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/compat_syscalls_pointers.h lttng-modules-2.8.0/instrumentation/syscalls/headers/compat_syscalls_pointers.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/compat_syscalls_pointers.h 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/compat_syscalls_pointers.h 2016-05-20 01:34:54.000000000 +0000 @@ -1,3 +1,11 @@ #ifdef CONFIG_X86_64 #include "x86-32-syscalls-3.1.0-rc6_pointers.h" #endif + +#ifdef CONFIG_ARM64 +#include "arm-32-syscalls-3.4.25_pointers.h" +#endif + +#ifdef CONFIG_PPC64 +#include "powerpc-32-syscalls-3.0.34_pointers.h" +#endif diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/mips-32-syscalls-3.13.0_integers.h lttng-modules-2.8.0/instrumentation/syscalls/headers/mips-32-syscalls-3.13.0_integers.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/mips-32-syscalls-3.13.0_integers.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/mips-32-syscalls-3.13.0_integers.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(_TRACE_SYSCALLS_INTEGERS_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_SYSCALLS_INTEGERS_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include "mips-32-syscalls-3.13.0_integers_override.h" #include "syscalls_integers_override.h" @@ -777,7 +777,7 @@ #endif /* _TRACE_SYSCALLS_INTEGERS_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include #else /* CREATE_SYSCALL_TABLE */ diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/mips-32-syscalls-3.13.0_pointers.h lttng-modules-2.8.0/instrumentation/syscalls/headers/mips-32-syscalls-3.13.0_pointers.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/mips-32-syscalls-3.13.0_pointers.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/mips-32-syscalls-3.13.0_pointers.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(_TRACE_SYSCALLS_POINTERS_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_SYSCALLS_POINTERS_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include "mips-32-syscalls-3.13.0_pointers_override.h" #include "syscalls_pointers_override.h" @@ -1273,7 +1273,7 @@ #endif /* _TRACE_SYSCALLS_POINTERS_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include #else /* CREATE_SYSCALL_TABLE */ diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/mips-32-syscalls-3.18.0_integers.h lttng-modules-2.8.0/instrumentation/syscalls/headers/mips-32-syscalls-3.18.0_integers.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/mips-32-syscalls-3.18.0_integers.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/mips-32-syscalls-3.18.0_integers.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(_TRACE_SYSCALLS_INTEGERS_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_SYSCALLS_INTEGERS_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include "mips-32-syscalls-3.18.0_integers_override.h" #include "syscalls_integers_override.h" @@ -753,7 +753,7 @@ #endif /* _TRACE_SYSCALLS_INTEGERS_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include #else /* CREATE_SYSCALL_TABLE */ diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/mips-32-syscalls-3.18.0_pointers.h lttng-modules-2.8.0/instrumentation/syscalls/headers/mips-32-syscalls-3.18.0_pointers.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/mips-32-syscalls-3.18.0_pointers.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/mips-32-syscalls-3.18.0_pointers.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(_TRACE_SYSCALLS_POINTERS_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_SYSCALLS_POINTERS_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include "mips-32-syscalls-3.18.0_pointers_override.h" #include "syscalls_pointers_override.h" @@ -1322,7 +1322,7 @@ #endif /* _TRACE_SYSCALLS_POINTERS_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include #else /* CREATE_SYSCALL_TABLE */ diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/mips-64-syscalls-3.5.0_integers.h lttng-modules-2.8.0/instrumentation/syscalls/headers/mips-64-syscalls-3.5.0_integers.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/mips-64-syscalls-3.5.0_integers.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/mips-64-syscalls-3.5.0_integers.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(_TRACE_SYSCALLS_INTEGERS_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_SYSCALLS_INTEGERS_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include "mips-64-syscalls-3.5.0_integers_override.h" #include "syscalls_integers_override.h" @@ -791,7 +791,7 @@ #endif /* _TRACE_SYSCALLS_INTEGERS_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include #else /* CREATE_SYSCALL_TABLE */ diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/mips-64-syscalls-3.5.0_pointers.h lttng-modules-2.8.0/instrumentation/syscalls/headers/mips-64-syscalls-3.5.0_pointers.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/mips-64-syscalls-3.5.0_pointers.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/mips-64-syscalls-3.5.0_pointers.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(_TRACE_SYSCALLS_POINTERS_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_SYSCALLS_POINTERS_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include "mips-64-syscalls-3.5.0_pointers_override.h" #include "syscalls_pointers_override.h" @@ -1301,7 +1301,7 @@ #endif /* _TRACE_SYSCALLS_POINTERS_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include #else /* CREATE_SYSCALL_TABLE */ diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/powerpc-32-syscalls-3.0.34_integers.h lttng-modules-2.8.0/instrumentation/syscalls/headers/powerpc-32-syscalls-3.0.34_integers.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/powerpc-32-syscalls-3.0.34_integers.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/powerpc-32-syscalls-3.0.34_integers.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(_TRACE_SYSCALLS_INTEGERS_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_SYSCALLS_INTEGERS_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include "powerpc-32-syscalls-3.0.34_integers_override.h" #include "syscalls_integers_override.h" @@ -721,7 +721,7 @@ #endif /* _TRACE_SYSCALLS_INTEGERS_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include #else /* CREATE_SYSCALL_TABLE */ diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/powerpc-32-syscalls-3.0.34_integers_override.h lttng-modules-2.8.0/instrumentation/syscalls/headers/powerpc-32-syscalls-3.0.34_integers_override.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/powerpc-32-syscalls-3.0.34_integers_override.h 2015-09-25 17:08:57.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/powerpc-32-syscalls-3.0.34_integers_override.h 2016-05-20 01:34:50.000000000 +0000 @@ -1,9 +1,72 @@ #ifndef CREATE_SYSCALL_TABLE +#define OVERRIDE_32_mmap2 +SC_LTTNG_TRACEPOINT_EVENT(mmap2, + TP_PROTO(sc_exit(unsigned long ret,) + unsigned long addr, unsigned long len, + unsigned long prot, unsigned long flags, + unsigned long fd, unsigned long pgoff), + TP_ARGS(sc_exit(ret,) addr, len, prot, flags, fd, pgoff), + TP_FIELDS(sc_exit(ctf_integer_hex(unsigned long, ret, ret)) + sc_in(ctf_integer_hex(unsigned long, addr, addr)) + sc_in(ctf_integer(size_t, len, len)) + sc_in(ctf_integer(int, prot, prot)) + sc_in(ctf_integer(int, flags, flags)) + sc_in(ctf_integer(int, fd, fd)) + sc_in(ctf_integer(off_t, pgoff, pgoff)) + ) +) + +#if (__BYTE_ORDER == __LITTLE_ENDIAN) + +#define OVERRIDE_32_sync_file_range2 +SC_LTTNG_TRACEPOINT_EVENT(sync_file_range2, + TP_PROTO(sc_exit(long ret,) int fd, + unsigned int flags, + int32_t offset_low, int32_t offset_high, + int32_t nbytes_low, int32_t nbytes_high), + TP_ARGS(sc_exit(ret,) fd, flags, offset_low, offset_high, + nbytes_low, nbytes_high), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) + sc_in(ctf_integer(int, fd, fd)) + sc_in(ctf_integer(unsigned int, flags, flags)) + sc_in(ctf_integer(loff_t, offset, + ((loff_t) offset_high << 32) | offset_low)) + sc_in(ctf_integer(loff_t, nbytes, + ((loff_t) nbytes_high << 32) | nbytes_low)) + ) +) + +#else /* __BIG_ENDIAN */ + +#define OVERRIDE_32_sync_file_range2 +SC_LTTNG_TRACEPOINT_EVENT(sync_file_range2, + TP_PROTO(sc_exit(long ret,) int fd, + unsigned int flags, + int32_t offset_high, int32_t offset_low, + int32_t nbytes_high, int32_t nbytes_low), + TP_ARGS(sc_exit(ret,) fd, flags, offset_high, offset_low, + nbytes_high, nbytes_low), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) + sc_in(ctf_integer(int, fd, fd)) + sc_in(ctf_integer(unsigned int, flags, flags)) + sc_in(ctf_integer(loff_t, offset, + ((loff_t) offset_high << 32) | offset_low)) + sc_in(ctf_integer(loff_t, nbytes, + ((loff_t) nbytes_high << 32) | nbytes_low)) + ) +) + +#endif + #else /* CREATE_SYSCALL_TABLE */ #define OVERRIDE_TABLE_32_mmap TRACE_SYSCALL_TABLE(mmap, mmap, 90, 6) +#define OVERRIDE_TABLE_32_mmap2 +TRACE_SYSCALL_TABLE(mmap2, mmap2, 192, 6) +#define OVERRIDE_TABLE_32_sync_file_range2 +TRACE_SYSCALL_TABLE(sync_file_range2, sync_file_range2, 308, 6) #endif /* CREATE_SYSCALL_TABLE */ diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/powerpc-32-syscalls-3.0.34_pointers.h lttng-modules-2.8.0/instrumentation/syscalls/headers/powerpc-32-syscalls-3.0.34_pointers.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/powerpc-32-syscalls-3.0.34_pointers.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/powerpc-32-syscalls-3.0.34_pointers.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(_TRACE_SYSCALLS_POINTERS_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_SYSCALLS_POINTERS_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include "powerpc-32-syscalls-3.0.34_pointers_override.h" #include "syscalls_pointers_override.h" @@ -1350,7 +1350,7 @@ #endif /* _TRACE_SYSCALLS_POINTERS_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include #else /* CREATE_SYSCALL_TABLE */ diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/powerpc-32-syscalls-3.0.34_pointers_override.h lttng-modules-2.8.0/instrumentation/syscalls/headers/powerpc-32-syscalls-3.0.34_pointers_override.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/powerpc-32-syscalls-3.0.34_pointers_override.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/powerpc-32-syscalls-3.0.34_pointers_override.h 2016-05-20 01:34:50.000000000 +0000 @@ -2,20 +2,6 @@ #ifndef CREATE_SYSCALL_TABLE -SC_LTTNG_TRACEPOINT_EVENT(mmap2, - TP_PROTO(void *addr, size_t len, int prot, - int flags, int fd, off_t pgoff), - TP_ARGS(addr, len, prot, flags, fd, pgoff), - TP_FIELDS( - ctf_integer_hex(void *, addr, addr) - ctf_integer(size_t, len, len) - ctf_integer(int, prot, prot) - ctf_integer(int, flags, flags) - ctf_integer(int, fd, fd) - ctf_integer(off_t, pgoff, pgoff) - ) -) - #define OVERRIDE_32_pipe SC_LTTNG_TRACEPOINT_EVENT(pipe, TP_PROTO(sc_exit(long ret,) int * fildes), @@ -31,8 +17,6 @@ TRACE_SYSCALL_TABLE(execve, execve, 11, 3) #define OVERRIDE_TABLE_32_clone TRACE_SYSCALL_TABLE(clone, clone, 120, 5) -#define OVERRIDE_TABLE_32_mmap2 -TRACE_SYSCALL_TABLE(mmap2, mmap2, 192, 6) #endif /* CREATE_SYSCALL_TABLE */ diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/syscalls_integers.h lttng-modules-2.8.0/instrumentation/syscalls/headers/syscalls_integers.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/syscalls_integers.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/syscalls_integers.h 2016-05-20 01:34:54.000000000 +0000 @@ -17,3 +17,7 @@ #ifdef CONFIG_CPU_MIPS32 #include "mips-32-syscalls-3.18.0_integers.h" #endif + +#ifdef CONFIG_ARM64 +#include "arm-64-syscalls-4.4.0_integers.h" +#endif diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/syscalls_integers_override.h lttng-modules-2.8.0/instrumentation/syscalls/headers/syscalls_integers_override.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/syscalls_integers_override.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/syscalls_integers_override.h 2016-05-20 01:34:50.000000000 +0000 @@ -1,12 +1,14 @@ -#define OVERRIDE_32_mmap -#define OVERRIDE_64_mmap - #ifndef CREATE_SYSCALL_TABLE +#define OVERRIDE_32_mmap +#define OVERRIDE_64_mmap SC_LTTNG_TRACEPOINT_EVENT(mmap, - TP_PROTO(sc_exit(long ret,) unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, unsigned long fd, unsigned long off), + TP_PROTO(sc_exit(unsigned long ret,) + unsigned long addr, unsigned long len, + unsigned long prot, unsigned long flags, + unsigned long fd, unsigned long off), TP_ARGS(sc_exit(ret,) addr, len, prot, flags, fd, off), - TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) + TP_FIELDS(sc_exit(ctf_integer_hex(unsigned long, ret, ret)) sc_in(ctf_integer_hex(unsigned long, addr, addr)) sc_in(ctf_integer(size_t, len, len)) sc_in(ctf_integer(int, prot, prot)) diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/syscalls_pointers.h lttng-modules-2.8.0/instrumentation/syscalls/headers/syscalls_pointers.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/syscalls_pointers.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/syscalls_pointers.h 2016-05-20 01:34:54.000000000 +0000 @@ -17,3 +17,7 @@ #ifdef CONFIG_CPU_MIPS32 #include "mips-32-syscalls-3.18.0_pointers.h" #endif + +#ifdef CONFIG_ARM64 +#include "arm-64-syscalls-4.4.0_pointers.h" +#endif diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/syscalls_pointers_override.h lttng-modules-2.8.0/instrumentation/syscalls/headers/syscalls_pointers_override.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/syscalls_pointers_override.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/syscalls_pointers_override.h 2016-05-20 19:51:59.000000000 +0000 @@ -1,8 +1,7 @@ -#define OVERRIDE_32_execve -#define OVERRIDE_64_execve - #ifndef CREATE_SYSCALL_TABLE +#define OVERRIDE_32_execve +#define OVERRIDE_64_execve SC_LTTNG_TRACEPOINT_EVENT(execve, TP_PROTO(sc_exit(long ret,) const char *filename, char *const *argv, char *const *envp), TP_ARGS(sc_exit(ret,) filename, argv, envp), @@ -13,6 +12,8 @@ ) ) +#define OVERRIDE_32_clone +#define OVERRIDE_64_clone SC_LTTNG_TRACEPOINT_EVENT(clone, TP_PROTO(sc_exit(long ret,) unsigned long clone_flags, unsigned long newsp, void __user *parent_tid, diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/syscalls_unknown.h lttng-modules-2.8.0/instrumentation/syscalls/headers/syscalls_unknown.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/syscalls_unknown.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/syscalls_unknown.h 2016-05-20 01:34:54.000000000 +0000 @@ -1,7 +1,7 @@ #if !defined(_TRACE_SYSCALLS_UNKNOWN_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_SYSCALLS_UNKNOWN_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #define UNKNOWN_SYSCALL_NRARGS 6 @@ -50,4 +50,4 @@ #endif /* _TRACE_SYSCALLS_UNKNOWN_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/x86-32-syscalls-3.1.0-rc6_integers.h lttng-modules-2.8.0/instrumentation/syscalls/headers/x86-32-syscalls-3.1.0-rc6_integers.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/x86-32-syscalls-3.1.0-rc6_integers.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/x86-32-syscalls-3.1.0-rc6_integers.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(_TRACE_SYSCALLS_INTEGERS_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_SYSCALLS_INTEGERS_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include "x86-32-syscalls-3.1.0-rc6_integers_override.h" #include "syscalls_integers_override.h" @@ -817,7 +817,7 @@ #endif /* _TRACE_SYSCALLS_INTEGERS_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include #else /* CREATE_SYSCALL_TABLE */ diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/x86-32-syscalls-3.1.0-rc6_integers_override.h lttng-modules-2.8.0/instrumentation/syscalls/headers/x86-32-syscalls-3.1.0-rc6_integers_override.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/x86-32-syscalls-3.1.0-rc6_integers_override.h 2015-09-24 20:47:34.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/x86-32-syscalls-3.1.0-rc6_integers_override.h 2016-05-20 01:34:50.000000000 +0000 @@ -30,9 +30,56 @@ #endif -#ifdef CREATE_SYSCALL_TABLE +#ifndef CREATE_SYSCALL_TABLE + +/* mmap_pgoff is kernel internal. mmap2 is exposed in unistd.h. */ +#define OVERRIDE_32_mmap_pgoff +#define OVERRIDE_32_mmap2 +SC_LTTNG_TRACEPOINT_EVENT(mmap2, + TP_PROTO(sc_exit(unsigned long ret,) + unsigned long addr, unsigned long len, + unsigned long prot, unsigned long flags, + unsigned long fd, unsigned long pgoff), + TP_ARGS(sc_exit(ret,) addr, len, prot, flags, fd, pgoff), + TP_FIELDS(sc_exit(ctf_integer_hex(unsigned long, ret, ret)) + sc_in(ctf_integer_hex(unsigned long, addr, addr)) + sc_in(ctf_integer(size_t, len, len)) + sc_in(ctf_integer(int, prot, prot)) + sc_in(ctf_integer(int, flags, flags)) + sc_in(ctf_integer(int, fd, fd)) + sc_in(ctf_integer(off_t, pgoff, pgoff)) + ) +) + +#define OVERRIDE_32_sync_file_range +SC_LTTNG_TRACEPOINT_EVENT(sync_file_range, + TP_PROTO(sc_exit(long ret,) int fd, + int32_t offset_low, int32_t offset_high, + int32_t nbytes_low, int32_t nbytes_high, + unsigned int flags), + TP_ARGS(sc_exit(ret,) fd, offset_low, offset_high, + nbytes_low, nbytes_high, flags), + TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) + sc_in(ctf_integer(int, fd, fd)) + sc_in(ctf_integer(loff_t, offset, + ((loff_t) offset_high << 32) | offset_low)) + sc_in(ctf_integer(loff_t, nbytes, + ((loff_t) nbytes_high << 32) | nbytes_low)) + sc_in(ctf_integer(unsigned int, flags, flags)) + ) +) + +#else /* #ifndef CREATE_SYSCALL_TABLE */ #define OVERRIDE_TABLE_32_mmap TRACE_SYSCALL_TABLE(mmap, mmap, 90, 6) -#endif +/* mmap_pgoff is kernel internal. mmap2 is exposed in unistd.h. */ +#define OVERRIDE_TABLE_32_mmap_pgoff +#define OVERRIDE_TABLE_32_mmap2 +TRACE_SYSCALL_TABLE(mmap2, mmap2, 192, 6) + +#define OVERRIDE_TABLE_32_sync_file_range +TRACE_SYSCALL_TABLE(sync_file_range, sync_file_range, 314, 6) + +#endif /* #else #ifndef CREATE_SYSCALL_TABLE */ diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/x86-32-syscalls-3.1.0-rc6_pointers.h lttng-modules-2.8.0/instrumentation/syscalls/headers/x86-32-syscalls-3.1.0-rc6_pointers.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/x86-32-syscalls-3.1.0-rc6_pointers.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/x86-32-syscalls-3.1.0-rc6_pointers.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(_TRACE_SYSCALLS_POINTERS_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_SYSCALLS_POINTERS_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include "x86-32-syscalls-3.1.0-rc6_pointers_override.h" #include "syscalls_pointers_override.h" @@ -1301,7 +1301,7 @@ #endif /* _TRACE_SYSCALLS_POINTERS_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include #else /* CREATE_SYSCALL_TABLE */ diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/x86-64-syscalls-3.10.0-rc7_integers.h lttng-modules-2.8.0/instrumentation/syscalls/headers/x86-64-syscalls-3.10.0-rc7_integers.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/x86-64-syscalls-3.10.0-rc7_integers.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/x86-64-syscalls-3.10.0-rc7_integers.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(_TRACE_SYSCALLS_INTEGERS_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_SYSCALLS_INTEGERS_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include "x86-64-syscalls-3.10.0-rc7_integers_override.h" #include "syscalls_integers_override.h" @@ -746,7 +746,7 @@ #endif /* _TRACE_SYSCALLS_INTEGERS_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include #else /* CREATE_SYSCALL_TABLE */ diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/x86-64-syscalls-3.10.0-rc7_pointers.h lttng-modules-2.8.0/instrumentation/syscalls/headers/x86-64-syscalls-3.10.0-rc7_pointers.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/x86-64-syscalls-3.10.0-rc7_pointers.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/x86-64-syscalls-3.10.0-rc7_pointers.h 2016-05-20 01:34:54.000000000 +0000 @@ -4,7 +4,7 @@ #if !defined(_TRACE_SYSCALLS_POINTERS_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_SYSCALLS_POINTERS_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include "x86-64-syscalls-3.10.0-rc7_pointers_override.h" #include "syscalls_pointers_override.h" @@ -1343,7 +1343,7 @@ #endif /* _TRACE_SYSCALLS_POINTERS_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include #else /* CREATE_SYSCALL_TABLE */ diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/headers/x86-64-syscalls-3.10.0-rc7_pointers_override.h lttng-modules-2.8.0/instrumentation/syscalls/headers/x86-64-syscalls-3.10.0-rc7_pointers_override.h --- lttng-modules-2.7.1/instrumentation/syscalls/headers/x86-64-syscalls-3.10.0-rc7_pointers_override.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/headers/x86-64-syscalls-3.10.0-rc7_pointers_override.h 2016-05-20 01:34:54.000000000 +0000 @@ -11,7 +11,7 @@ uint16_t v6addr[8]; unsigned int v4addr_len, v6addr_len; ), - TP_code( + TP_code_pre( sc_in( memset(tp_locvar, 0, sizeof(*tp_locvar)); if (addrlen < sizeof(struct sockaddr)) @@ -48,7 +48,8 @@ sc_in(ctf_integer_network(uint16_t, dport, tp_locvar->dport)) sc_in(ctf_sequence_network(uint8_t, v4addr, &tp_locvar->v4addr, unsigned int, tp_locvar->v4addr_len)) sc_in(ctf_sequence_network(uint16_t, v6addr, &tp_locvar->v6addr, unsigned int, tp_locvar->v6addr_len)) - ) + ), + TP_code_post() ) #define OVERRIDE_64_accept @@ -63,7 +64,7 @@ int v4addr_len, v6addr_len; int uaddr_len; ), - TP_code( + TP_code_pre( sc_inout( memset(tp_locvar, 0, sizeof(*tp_locvar)); (void) get_user(tp_locvar->uaddr_len, upeer_addrlen); @@ -103,7 +104,8 @@ sc_out(ctf_integer_network(uint16_t, sport, tp_locvar->sport)) sc_in(ctf_sequence_network(uint8_t, v4addr, &tp_locvar->v4addr, unsigned int, tp_locvar->v4addr_len)) sc_in(ctf_sequence_network(uint16_t, v6addr, &tp_locvar->v6addr, unsigned int, tp_locvar->v6addr_len)) - ) + ), + TP_code_post() ) #define OVERRIDE_64_pipe diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/lttng-syscalls-extractor/Kbuild lttng-modules-2.8.0/instrumentation/syscalls/lttng-syscalls-extractor/Kbuild --- lttng-modules-2.7.1/instrumentation/syscalls/lttng-syscalls-extractor/Kbuild 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/lttng-syscalls-extractor/Kbuild 2016-05-20 01:34:54.000000000 +0000 @@ -0,0 +1 @@ +obj-m += lttng-syscalls-extractor.o diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/lttng-syscalls-extractor/Makefile lttng-modules-2.8.0/instrumentation/syscalls/lttng-syscalls-extractor/Makefile --- lttng-modules-2.7.1/instrumentation/syscalls/lttng-syscalls-extractor/Makefile 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/lttng-syscalls-extractor/Makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -obj-m += lttng-syscalls-extractor.o diff -Nru lttng-modules-2.7.1/instrumentation/syscalls/lttng-syscalls-generate-headers.sh lttng-modules-2.8.0/instrumentation/syscalls/lttng-syscalls-generate-headers.sh --- lttng-modules-2.7.1/instrumentation/syscalls/lttng-syscalls-generate-headers.sh 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/instrumentation/syscalls/lttng-syscalls-generate-headers.sh 2016-05-20 01:34:54.000000000 +0000 @@ -76,7 +76,7 @@ #if !defined(_TRACE_SYSCALLS_${CLASSCAP}_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_SYSCALLS_${CLASSCAP}_H -#include \"../../../probes/lttng-tracepoint-event.h\" +#include #include #include \"${INPUTFILE}_${CLASS}_override.h\" #include \"syscalls_${CLASS}_override.h\" @@ -303,7 +303,7 @@ #endif /* _TRACE_SYSCALLS_${CLASSCAP}_H */ /* This part must be outside protection */ -#include \"../../../probes/define_trace.h\" +#include #else /* CREATE_SYSCALL_TABLE */ diff -Nru lttng-modules-2.7.1/Kconfig lttng-modules-2.8.0/Kconfig --- lttng-modules-2.7.1/Kconfig 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/Kconfig 2016-05-20 01:34:54.000000000 +0000 @@ -0,0 +1,12 @@ +config LTTNG + tristate "LTTng support" + depends on TRACEPOINTS + help + LTTng is an open source tracing framework for Linux. + + See https://lttng.org/ + + To compile as a set of modules, choose M here. To compile into + the Linux kernel image, choose Y. + + If unsure, say N. diff -Nru lttng-modules-2.7.1/lib/align.h lttng-modules-2.8.0/lib/align.h --- lttng-modules-2.7.1/lib/align.h 2015-10-24 07:33:20.000000000 +0000 +++ lttng-modules-2.8.0/lib/align.h 2016-05-20 01:34:54.000000000 +0000 @@ -24,7 +24,7 @@ #ifdef __KERNEL__ #include -#include "bug.h" +#include #define ALIGN_FLOOR(x, a) __ALIGN_FLOOR_MASK(x, (typeof(x)) (a) - 1) #define __ALIGN_FLOOR_MASK(x, mask) ((x) & ~(mask)) diff -Nru lttng-modules-2.7.1/lib/bitfield.h lttng-modules-2.8.0/lib/bitfield.h --- lttng-modules-2.7.1/lib/bitfield.h 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/lib/bitfield.h 2016-05-20 01:34:54.000000000 +0000 @@ -27,7 +27,7 @@ * SOFTWARE. */ -#include "../lttng-endian.h" +#include #ifndef CHAR_BIT #define CHAR_BIT 8 diff -Nru lttng-modules-2.7.1/lib/Kbuild lttng-modules-2.8.0/lib/Kbuild --- lttng-modules-2.7.1/lib/Kbuild 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/lib/Kbuild 2016-05-20 01:34:54.000000000 +0000 @@ -0,0 +1,19 @@ +TOP_LTTNG_MODULES_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))/.. + +include $(TOP_LTTNG_MODULES_DIR)/Makefile.ABI.workarounds + +ccflags-y += -I$(TOP_LTTNG_MODULES_DIR) + +obj-$(CONFIG_LTTNG) += lttng-lib-ring-buffer.o + +lttng-lib-ring-buffer-objs := \ + ringbuffer/ring_buffer_backend.o \ + ringbuffer/ring_buffer_frontend.o \ + ringbuffer/ring_buffer_iterator.o \ + ringbuffer/ring_buffer_vfs.o \ + ringbuffer/ring_buffer_splice.o \ + ringbuffer/ring_buffer_mmap.o \ + prio_heap/lttng_prio_heap.o \ + ../wrapper/splice.o + +# vim:syntax=make diff -Nru lttng-modules-2.7.1/lib/Makefile lttng-modules-2.8.0/lib/Makefile --- lttng-modules-2.7.1/lib/Makefile 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lib/Makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -KERNELDIR = ${LTTNG_KERNELDIR} -MAKEFILEDIR = $(shell dirname $(lastword $(MAKEFILE_LIST))) - -include $(MAKEFILEDIR)/../Makefile.ABI.workarounds - -obj-m += lttng-lib-ring-buffer.o - -lttng-lib-ring-buffer-objs := \ - ringbuffer/ring_buffer_backend.o \ - ringbuffer/ring_buffer_frontend.o \ - ringbuffer/ring_buffer_iterator.o \ - ringbuffer/ring_buffer_vfs.o \ - ringbuffer/ring_buffer_splice.o \ - ringbuffer/ring_buffer_mmap.o \ - prio_heap/lttng_prio_heap.o \ - ../wrapper/splice.o diff -Nru lttng-modules-2.7.1/lib/prio_heap/lttng_prio_heap.c lttng-modules-2.8.0/lib/prio_heap/lttng_prio_heap.c --- lttng-modules-2.7.1/lib/prio_heap/lttng_prio_heap.c 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/lib/prio_heap/lttng_prio_heap.c 2016-05-20 01:34:54.000000000 +0000 @@ -25,7 +25,7 @@ */ #include -#include "lttng_prio_heap.h" +#include #ifdef DEBUG_HEAP void lttng_check_heap(const struct lttng_ptr_heap *heap) diff -Nru lttng-modules-2.7.1/lib/ringbuffer/api.h lttng-modules-2.8.0/lib/ringbuffer/api.h --- lttng-modules-2.7.1/lib/ringbuffer/api.h 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/lib/ringbuffer/api.h 2016-05-20 01:34:54.000000000 +0000 @@ -23,15 +23,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "../../wrapper/ringbuffer/backend.h" -#include "../../wrapper/ringbuffer/frontend.h" -#include "../../wrapper/ringbuffer/vfs.h" +#include +#include +#include /* * ring_buffer_frontend_api.h contains static inline functions that depend on - * client static inlines. Hence the inclusion of this "api" header only + * client static inlines. Hence the inclusion of this >api> header only * within the client. */ -#include "../../wrapper/ringbuffer/frontend_api.h" +#include #endif /* _LIB_RING_BUFFER_API_H */ diff -Nru lttng-modules-2.7.1/lib/ringbuffer/backend.h lttng-modules-2.8.0/lib/ringbuffer/backend.h --- lttng-modules-2.7.1/lib/ringbuffer/backend.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lib/ringbuffer/backend.h 2016-05-20 01:34:54.000000000 +0000 @@ -37,8 +37,8 @@ #include /* Internal helpers */ -#include "../../wrapper/ringbuffer/backend_internal.h" -#include "../../wrapper/ringbuffer/frontend_internal.h" +#include +#include /* Ring buffer backend API */ @@ -54,8 +54,8 @@ extern int lib_ring_buffer_read_cstr(struct lib_ring_buffer_backend *bufb, size_t offset, void *dest, size_t len); -extern struct page ** -lib_ring_buffer_read_get_page(struct lib_ring_buffer_backend *bufb, size_t offset, +extern unsigned long * +lib_ring_buffer_read_get_pfn(struct lib_ring_buffer_backend *bufb, size_t offset, void ***virt); /* @@ -334,8 +334,7 @@ rpages->p[index].virt + (offset & ~PAGE_MASK), src, len); if (unlikely(ret > 0)) { - len -= (pagecpy - ret); - offset += (pagecpy - ret); + /* Copy failed. */ goto fill_buffer; } } else { @@ -479,4 +478,29 @@ return records_unread; } +/* + * We use __copy_from_user_inatomic to copy userspace data after + * checking with access_ok() and disabling page faults. + * + * Return 0 if OK, nonzero on error. + */ +static inline +unsigned long lib_ring_buffer_copy_from_user_check_nofault(void *dest, + const void __user *src, + unsigned long len) +{ + unsigned long ret; + mm_segment_t old_fs; + + if (!access_ok(VERIFY_READ, src, len)) + return 1; + old_fs = get_fs(); + set_fs(KERNEL_DS); + pagefault_disable(); + ret = __copy_from_user_inatomic(dest, src, len); + pagefault_enable(); + set_fs(old_fs); + return ret; +} + #endif /* _LIB_RING_BUFFER_BACKEND_H */ diff -Nru lttng-modules-2.7.1/lib/ringbuffer/backend_internal.h lttng-modules-2.8.0/lib/ringbuffer/backend_internal.h --- lttng-modules-2.7.1/lib/ringbuffer/backend_internal.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lib/ringbuffer/backend_internal.h 2016-05-20 01:34:54.000000000 +0000 @@ -23,9 +23,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "../../wrapper/ringbuffer/config.h" -#include "../../wrapper/ringbuffer/backend_types.h" -#include "../../wrapper/ringbuffer/frontend_types.h" +#include +#include +#include #include #include @@ -309,6 +309,14 @@ return pages->data_size; } +static inline +void subbuffer_inc_packet_count(const struct lib_ring_buffer_config *config, + struct lib_ring_buffer_backend *bufb, + unsigned long idx) +{ + bufb->buf_cnt[idx].seq_cnt++; +} + /** * lib_ring_buffer_clear_noref - Clear the noref subbuffer flag, called by * writer. @@ -443,6 +451,8 @@ /* * We use __copy_from_user_inatomic to copy userspace data since we already * did the access_ok for the whole range. + * + * Return 0 if OK, nonzero on error. */ static inline unsigned long lib_ring_buffer_do_copy_from_user_inatomic(void *dest, diff -Nru lttng-modules-2.7.1/lib/ringbuffer/backend_types.h lttng-modules-2.8.0/lib/ringbuffer/backend_types.h --- lttng-modules-2.7.1/lib/ringbuffer/backend_types.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lib/ringbuffer/backend_types.h 2016-05-20 01:34:54.000000000 +0000 @@ -28,7 +28,7 @@ struct lib_ring_buffer_backend_page { void *virt; /* page virtual address (cached) */ - struct page *page; /* pointer to page structure */ + unsigned long pfn; /* page frame number */ }; struct lib_ring_buffer_backend_pages { @@ -44,6 +44,16 @@ unsigned long id; /* backend subbuffer identifier */ }; +struct lib_ring_buffer_backend_counts { + /* + * Counter specific to the sub-buffer location within the ring buffer. + * The actual sequence number of the packet within the entire ring + * buffer can be derived from the formula nr_subbuffers * seq_cnt + + * subbuf_idx. + */ + uint64_t seq_cnt; /* packet sequence number */ +}; + /* * Forward declaration of frontend-specific channel and ring_buffer. */ @@ -55,6 +65,8 @@ struct lib_ring_buffer_backend_subbuffer *buf_wsb; /* ring_buffer_backend_subbuffer for reader */ struct lib_ring_buffer_backend_subbuffer buf_rsb; + /* Array of lib_ring_buffer_backend_counts for the packet counter */ + struct lib_ring_buffer_backend_counts *buf_cnt; /* * Pointer array of backend pages, for whole buffer. * Indexed by ring_buffer_backend_subbuffer identifier (id) index. diff -Nru lttng-modules-2.7.1/lib/ringbuffer/config.h lttng-modules-2.8.0/lib/ringbuffer/config.h --- lttng-modules-2.7.1/lib/ringbuffer/config.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/lib/ringbuffer/config.h 2016-05-20 01:34:54.000000000 +0000 @@ -26,8 +26,8 @@ #include #include -#include "../align.h" -#include "../../lttng-tracer-core.h" +#include +#include struct lib_ring_buffer; struct channel; @@ -310,6 +310,6 @@ return 0; } -#include "../../wrapper/ringbuffer/vatomic.h" +#include #endif /* _LIB_RING_BUFFER_CONFIG_H */ diff -Nru lttng-modules-2.7.1/lib/ringbuffer/frontend_api.h lttng-modules-2.8.0/lib/ringbuffer/frontend_api.h --- lttng-modules-2.7.1/lib/ringbuffer/frontend_api.h 2015-11-05 22:10:32.000000000 +0000 +++ lttng-modules-2.8.0/lib/ringbuffer/frontend_api.h 2016-05-20 01:34:54.000000000 +0000 @@ -29,8 +29,8 @@ * See linux/ringbuffer/frontend.h for channel allocation and read-side API. */ -#include "../../wrapper/ringbuffer/frontend.h" -#include "../../wrapper/percpu-defs.h" +#include +#include #include #include diff -Nru lttng-modules-2.7.1/lib/ringbuffer/frontend.h lttng-modules-2.8.0/lib/ringbuffer/frontend.h --- lttng-modules-2.7.1/lib/ringbuffer/frontend.h 2015-11-05 22:10:32.000000000 +0000 +++ lttng-modules-2.8.0/lib/ringbuffer/frontend.h 2016-05-20 01:34:54.000000000 +0000 @@ -49,7 +49,7 @@ #include /* Internal helpers */ -#include "../../wrapper/ringbuffer/frontend_internal.h" +#include /* Buffer creation/removal and setup operations */ @@ -113,6 +113,9 @@ unsigned long consumed); extern void lib_ring_buffer_put_subbuf(struct lib_ring_buffer *buf); +void lib_ring_buffer_set_quiescent_channel(struct channel *chan); +void lib_ring_buffer_clear_quiescent_channel(struct channel *chan); + /* * lib_ring_buffer_get_next_subbuf/lib_ring_buffer_put_next_subbuf are helpers * to read sub-buffers sequentially. diff -Nru lttng-modules-2.7.1/lib/ringbuffer/frontend_internal.h lttng-modules-2.8.0/lib/ringbuffer/frontend_internal.h --- lttng-modules-2.7.1/lib/ringbuffer/frontend_internal.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lib/ringbuffer/frontend_internal.h 2016-05-20 01:34:54.000000000 +0000 @@ -28,10 +28,10 @@ * See ring_buffer_frontend.c for more information on wait-free algorithms. */ -#include "../../wrapper/ringbuffer/config.h" -#include "../../wrapper/ringbuffer/backend_types.h" -#include "../../wrapper/ringbuffer/frontend_types.h" -#include "../../lib/prio_heap/lttng_prio_heap.h" /* For per-CPU read-side iterator */ +#include +#include +#include +#include /* For per-CPU read-side iterator */ /* Buffer offset macros */ @@ -159,6 +159,9 @@ extern void lib_ring_buffer_switch_remote(struct lib_ring_buffer *buf); +extern +void lib_ring_buffer_switch_remote_empty(struct lib_ring_buffer *buf); + /* Buffer write helpers */ static inline @@ -368,6 +371,12 @@ idx)); /* + * Increment the packet counter while we have exclusive + * access. + */ + subbuffer_inc_packet_count(config, &buf->backend, idx); + + /* * Set noref flag and offset for this subbuffer id. * Contains a memory barrier that ensures counter stores * are ordered before set noref and offset. diff -Nru lttng-modules-2.7.1/lib/ringbuffer/frontend_types.h lttng-modules-2.8.0/lib/ringbuffer/frontend_types.h --- lttng-modules-2.7.1/lib/ringbuffer/frontend_types.h 2014-09-26 00:27:36.000000000 +0000 +++ lttng-modules-2.8.0/lib/ringbuffer/frontend_types.h 2016-05-20 19:51:59.000000000 +0000 @@ -29,10 +29,10 @@ */ #include -#include "../../wrapper/ringbuffer/config.h" -#include "../../wrapper/ringbuffer/backend_types.h" -#include "../../wrapper/spinlock.h" -#include "../../lib/prio_heap/lttng_prio_heap.h" /* For per-CPU read-side iterator */ +#include +#include +#include +#include /* For per-CPU read-side iterator */ /* * A switch is done during tracing or as a final flush after tracing (so it @@ -152,7 +152,8 @@ unsigned long cons_snapshot; /* Consumer count snapshot */ unsigned int get_subbuf:1, /* Sub-buffer being held by reader */ switch_timer_enabled:1, /* Protected by ring_buffer_nohz_lock */ - read_timer_enabled:1; /* Protected by ring_buffer_nohz_lock */ + read_timer_enabled:1, /* Protected by ring_buffer_nohz_lock */ + quiescent:1; }; static inline diff -Nru lttng-modules-2.7.1/lib/ringbuffer/iterator.h lttng-modules-2.8.0/lib/ringbuffer/iterator.h --- lttng-modules-2.7.1/lib/ringbuffer/iterator.h 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/lib/ringbuffer/iterator.h 2016-05-20 01:34:54.000000000 +0000 @@ -26,9 +26,9 @@ * Mathieu Desnoyers */ -#include "../../wrapper/ringbuffer/backend.h" -#include "../../wrapper/ringbuffer/frontend.h" -#include "../../wrapper/ringbuffer/vfs.h" +#include +#include +#include /* * lib_ring_buffer_get_next_record advances the buffer read position to the next diff -Nru lttng-modules-2.7.1/lib/ringbuffer/ring_buffer_backend.c lttng-modules-2.8.0/lib/ringbuffer/ring_buffer_backend.c --- lttng-modules-2.7.1/lib/ringbuffer/ring_buffer_backend.c 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lib/ringbuffer/ring_buffer_backend.c 2016-05-20 01:34:54.000000000 +0000 @@ -28,10 +28,10 @@ #include #include -#include "../../wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */ -#include "../../wrapper/ringbuffer/config.h" -#include "../../wrapper/ringbuffer/backend.h" -#include "../../wrapper/ringbuffer/frontend.h" +#include /* for wrapper_vmalloc_sync_all() */ +#include +#include +#include /** * lib_ring_buffer_backend_allocate - allocate a channel buffer @@ -52,7 +52,6 @@ unsigned long subbuf_size, mmap_offset = 0; unsigned long num_subbuf_alloc; struct page **pages; - void **virt; unsigned long i; num_pages = size >> PAGE_SHIFT; @@ -71,12 +70,6 @@ if (unlikely(!pages)) goto pages_error; - virt = kmalloc_node(ALIGN(sizeof(*virt) * num_pages, - 1 << INTERNODE_CACHE_SHIFT), - GFP_KERNEL, cpu_to_node(max(bufb->cpu, 0))); - if (unlikely(!virt)) - goto virt_error; - bufb->array = kmalloc_node(ALIGN(sizeof(*bufb->array) * num_subbuf_alloc, 1 << INTERNODE_CACHE_SHIFT), @@ -89,7 +82,6 @@ GFP_KERNEL | __GFP_ZERO, 0); if (unlikely(!pages[i])) goto depopulate; - virt[i] = page_address(pages[i]); } bufb->num_pages_per_subbuf = num_pages_per_subbuf; @@ -125,12 +117,21 @@ else bufb->buf_rsb.id = subbuffer_id(config, 0, 1, 0); + /* Allocate subbuffer packet counter table */ + bufb->buf_cnt = kzalloc_node(ALIGN( + sizeof(struct lib_ring_buffer_backend_counts) + * num_subbuf, + 1 << INTERNODE_CACHE_SHIFT), + GFP_KERNEL, cpu_to_node(max(bufb->cpu, 0))); + if (unlikely(!bufb->buf_cnt)) + goto free_wsb; + /* Assign pages to page index */ for (i = 0; i < num_subbuf_alloc; i++) { for (j = 0; j < num_pages_per_subbuf; j++) { CHAN_WARN_ON(chanb, page_idx > num_pages); - bufb->array[i]->p[j].virt = virt[page_idx]; - bufb->array[i]->p[j].page = pages[page_idx]; + bufb->array[i]->p[j].virt = page_address(pages[page_idx]); + bufb->array[i]->p[j].pfn = page_to_pfn(pages[page_idx]); page_idx++; } if (config->output == RING_BUFFER_MMAP) { @@ -144,10 +145,11 @@ * will not fault. */ wrapper_vmalloc_sync_all(); - kfree(virt); kfree(pages); return 0; +free_wsb: + kfree(bufb->buf_wsb); free_array: for (i = 0; (i < num_subbuf_alloc && bufb->array[i]); i++) kfree(bufb->array[i]); @@ -157,8 +159,6 @@ __free_page(pages[i]); kfree(bufb->array); array_error: - kfree(virt); -virt_error: kfree(pages); pages_error: return -ENOMEM; @@ -187,9 +187,10 @@ num_subbuf_alloc++; kfree(bufb->buf_wsb); + kfree(bufb->buf_cnt); for (i = 0; i < num_subbuf_alloc; i++) { for (j = 0; j < bufb->num_pages_per_subbuf; j++) - __free_page(bufb->array[i]->p[j].page); + __free_page(pfn_to_page(bufb->array[i]->p[j].pfn)); kfree(bufb->array[i]); } kfree(bufb->array); @@ -692,8 +693,7 @@ + (offset & ~PAGE_MASK), src, pagecpy) != 0; if (ret > 0) { - offset += (pagecpy - ret); - len -= (pagecpy - ret); + /* Copy failed. */ _lib_ring_buffer_memset(bufb, offset, 0, len, 0); break; /* stop copy */ } @@ -949,15 +949,15 @@ EXPORT_SYMBOL_GPL(lib_ring_buffer_read_cstr); /** - * lib_ring_buffer_read_get_page - Get a whole page to read from + * lib_ring_buffer_read_get_pfn - Get a page frame number to read from * @bufb : buffer backend * @offset : offset within the buffer * @virt : pointer to page address (output) * * Should be protected by get_subbuf/put_subbuf. - * Returns the pointer to the page struct pointer. + * Returns the pointer to the page frame number unsigned long. */ -struct page **lib_ring_buffer_read_get_page(struct lib_ring_buffer_backend *bufb, +unsigned long *lib_ring_buffer_read_get_pfn(struct lib_ring_buffer_backend *bufb, size_t offset, void ***virt) { size_t index; @@ -974,9 +974,9 @@ CHAN_WARN_ON(chanb, config->mode == RING_BUFFER_OVERWRITE && subbuffer_id_is_noref(config, id)); *virt = &rpages->p[index].virt; - return &rpages->p[index].page; + return &rpages->p[index].pfn; } -EXPORT_SYMBOL_GPL(lib_ring_buffer_read_get_page); +EXPORT_SYMBOL_GPL(lib_ring_buffer_read_get_pfn); /** * lib_ring_buffer_read_offset_address - get address of a buffer location diff -Nru lttng-modules-2.7.1/lib/ringbuffer/ring_buffer_frontend.c lttng-modules-2.8.0/lib/ringbuffer/ring_buffer_frontend.c --- lttng-modules-2.7.1/lib/ringbuffer/ring_buffer_frontend.c 2015-10-24 07:33:20.000000000 +0000 +++ lttng-modules-2.8.0/lib/ringbuffer/ring_buffer_frontend.c 2016-05-20 19:51:59.000000000 +0000 @@ -55,13 +55,14 @@ #include #include -#include "../../wrapper/ringbuffer/config.h" -#include "../../wrapper/ringbuffer/backend.h" -#include "../../wrapper/ringbuffer/frontend.h" -#include "../../wrapper/ringbuffer/iterator.h" -#include "../../wrapper/ringbuffer/nohz.h" -#include "../../wrapper/atomic.h" -#include "../../wrapper/percpu-defs.h" +#include +#include +#include +#include +#include +#include +#include +#include /* * Internal structure representing offsets to use at a sub-buffer switch. @@ -91,6 +92,9 @@ static void lib_ring_buffer_print_errors(struct channel *chan, struct lib_ring_buffer *buf, int cpu); +static +void _lib_ring_buffer_switch_remote(struct lib_ring_buffer *buf, + enum switch_mode mode); /* * Must be called under cpu hotplug protection. @@ -585,6 +589,63 @@ channel_backend_unregister_notifiers(&chan->backend); } +static void lib_ring_buffer_set_quiescent(struct lib_ring_buffer *buf) +{ + if (!buf->quiescent) { + buf->quiescent = true; + _lib_ring_buffer_switch_remote(buf, SWITCH_FLUSH); + } +} + +static void lib_ring_buffer_clear_quiescent(struct lib_ring_buffer *buf) +{ + buf->quiescent = false; +} + +void lib_ring_buffer_set_quiescent_channel(struct channel *chan) +{ + int cpu; + const struct lib_ring_buffer_config *config = &chan->backend.config; + + if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) { + get_online_cpus(); + for_each_channel_cpu(cpu, chan) { + struct lib_ring_buffer *buf = per_cpu_ptr(chan->backend.buf, + cpu); + + lib_ring_buffer_set_quiescent(buf); + } + put_online_cpus(); + } else { + struct lib_ring_buffer *buf = chan->backend.buf; + + lib_ring_buffer_set_quiescent(buf); + } +} +EXPORT_SYMBOL_GPL(lib_ring_buffer_set_quiescent_channel); + +void lib_ring_buffer_clear_quiescent_channel(struct channel *chan) +{ + int cpu; + const struct lib_ring_buffer_config *config = &chan->backend.config; + + if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) { + get_online_cpus(); + for_each_channel_cpu(cpu, chan) { + struct lib_ring_buffer *buf = per_cpu_ptr(chan->backend.buf, + cpu); + + lib_ring_buffer_clear_quiescent(buf); + } + put_online_cpus(); + } else { + struct lib_ring_buffer *buf = chan->backend.buf; + + lib_ring_buffer_clear_quiescent(buf); + } +} +EXPORT_SYMBOL_GPL(lib_ring_buffer_clear_quiescent_channel); + static void channel_free(struct channel *chan) { if (chan->backend.release_priv_ops) { @@ -745,7 +806,7 @@ chan->backend.priv, cpu); if (buf->backend.allocated) - lib_ring_buffer_switch_slow(buf, SWITCH_FLUSH); + lib_ring_buffer_set_quiescent(buf); /* * Perform flush before writing to finalized. */ @@ -759,7 +820,7 @@ if (config->cb.buffer_finalize) config->cb.buffer_finalize(buf, chan->backend.priv, -1); if (buf->backend.allocated) - lib_ring_buffer_switch_slow(buf, SWITCH_FLUSH); + lib_ring_buffer_set_quiescent(buf); /* * Perform flush before writing to finalized. */ @@ -793,7 +854,10 @@ if (!atomic_long_add_unless(&buf->active_readers, 1, 1)) return -EBUSY; - kref_get(&chan->ref); + if (!lttng_kref_get(&chan->ref)) { + atomic_long_dec(&buf->active_readers); + return -EOVERFLOW; + } lttng_smp_mb__after_atomic(); return 0; } @@ -1229,7 +1293,8 @@ /* * lib_ring_buffer_switch_old_start: Populate old subbuffer header. * - * Only executed when the buffer is finalized, in SWITCH_FLUSH. + * Only executed by SWITCH_FLUSH, which can be issued while tracing is active + * or at buffer finalization (destroy). */ static void lib_ring_buffer_switch_old_start(struct lib_ring_buffer *buf, @@ -1420,12 +1485,14 @@ unsigned long sb_index, commit_count; /* - * We are performing a SWITCH_FLUSH. At this stage, there are no - * concurrent writes into the buffer. + * We are performing a SWITCH_FLUSH. There may be concurrent + * writes into the buffer if e.g. invoked while performing a + * snapshot on an active trace. * - * The client does not save any header information. Don't - * switch empty subbuffer on finalize, because it is invalid to - * deliver a completely empty subbuffer. + * If the client does not save any header information (sub-buffer + * header size == 0), don't switch empty subbuffer on finalize, + * because it is invalid to deliver a completely empty + * subbuffer. */ if (!config->cb.subbuffer_header_size()) return -1; @@ -1539,24 +1606,32 @@ } EXPORT_SYMBOL_GPL(lib_ring_buffer_switch_slow); +struct switch_param { + struct lib_ring_buffer *buf; + enum switch_mode mode; +}; + static void remote_switch(void *info) { - struct lib_ring_buffer *buf = info; + struct switch_param *param = info; + struct lib_ring_buffer *buf = param->buf; - lib_ring_buffer_switch_slow(buf, SWITCH_ACTIVE); + lib_ring_buffer_switch_slow(buf, param->mode); } -void lib_ring_buffer_switch_remote(struct lib_ring_buffer *buf) +static void _lib_ring_buffer_switch_remote(struct lib_ring_buffer *buf, + enum switch_mode mode) { struct channel *chan = buf->backend.chan; const struct lib_ring_buffer_config *config = &chan->backend.config; int ret; + struct switch_param param; /* * With global synchronization we don't need to use the IPI scheme. */ if (config->sync == RING_BUFFER_SYNC_GLOBAL) { - lib_ring_buffer_switch_slow(buf, SWITCH_ACTIVE); + lib_ring_buffer_switch_slow(buf, mode); return; } @@ -1571,16 +1646,30 @@ * switch. */ get_online_cpus(); + param.buf = buf; + param.mode = mode; ret = smp_call_function_single(buf->backend.cpu, - remote_switch, buf, 1); + remote_switch, ¶m, 1); if (ret) { /* Remote CPU is offline, do it ourself. */ - lib_ring_buffer_switch_slow(buf, SWITCH_ACTIVE); + lib_ring_buffer_switch_slow(buf, mode); } put_online_cpus(); } + +void lib_ring_buffer_switch_remote(struct lib_ring_buffer *buf) +{ + _lib_ring_buffer_switch_remote(buf, SWITCH_ACTIVE); +} EXPORT_SYMBOL_GPL(lib_ring_buffer_switch_remote); +/* Switch sub-buffer even if current sub-buffer is empty. */ +void lib_ring_buffer_switch_remote_empty(struct lib_ring_buffer *buf) +{ + _lib_ring_buffer_switch_remote(buf, SWITCH_FLUSH); +} +EXPORT_SYMBOL_GPL(lib_ring_buffer_switch_remote_empty); + /* * Returns : * 0 if ok diff -Nru lttng-modules-2.7.1/lib/ringbuffer/ring_buffer_iterator.c lttng-modules-2.8.0/lib/ringbuffer/ring_buffer_iterator.c --- lttng-modules-2.7.1/lib/ringbuffer/ring_buffer_iterator.c 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/lib/ringbuffer/ring_buffer_iterator.c 2016-05-20 01:34:54.000000000 +0000 @@ -25,8 +25,8 @@ * Mathieu Desnoyers */ -#include "../../wrapper/ringbuffer/iterator.h" -#include "../../wrapper/file.h" +#include +#include #include #include #include diff -Nru lttng-modules-2.7.1/lib/ringbuffer/ring_buffer_mmap.c lttng-modules-2.8.0/lib/ringbuffer/ring_buffer_mmap.c --- lttng-modules-2.7.1/lib/ringbuffer/ring_buffer_mmap.c 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lib/ringbuffer/ring_buffer_mmap.c 2016-05-20 01:34:54.000000000 +0000 @@ -25,9 +25,9 @@ #include #include -#include "../../wrapper/ringbuffer/backend.h" -#include "../../wrapper/ringbuffer/frontend.h" -#include "../../wrapper/ringbuffer/vfs.h" +#include +#include +#include /* * fault() vm_op implementation for ring buffer file mapping. @@ -38,7 +38,7 @@ struct channel *chan = buf->backend.chan; const struct lib_ring_buffer_config *config = &chan->backend.config; pgoff_t pgoff = vmf->pgoff; - struct page **page; + unsigned long *pfnp; void **virt; unsigned long offset, sb_bindex; @@ -53,14 +53,14 @@ buf->backend.chan->backend.subbuf_size)) return VM_FAULT_SIGBUS; /* - * ring_buffer_read_get_page() gets the page in the current reader's - * pages. + * ring_buffer_read_get_pfn() gets the page frame number for the + * current reader's pages. */ - page = lib_ring_buffer_read_get_page(&buf->backend, offset, &virt); - if (!*page) + pfnp = lib_ring_buffer_read_get_pfn(&buf->backend, offset, &virt); + if (!*pfnp) return VM_FAULT_SIGBUS; - get_page(*page); - vmf->page = *page; + get_page(pfn_to_page(*pfnp)); + vmf->page = pfn_to_page(*pfnp); return 0; } diff -Nru lttng-modules-2.7.1/lib/ringbuffer/ring_buffer_splice.c lttng-modules-2.8.0/lib/ringbuffer/ring_buffer_splice.c --- lttng-modules-2.7.1/lib/ringbuffer/ring_buffer_splice.c 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lib/ringbuffer/ring_buffer_splice.c 2016-05-20 01:34:54.000000000 +0000 @@ -27,10 +27,10 @@ #include #include -#include "../../wrapper/splice.h" -#include "../../wrapper/ringbuffer/backend.h" -#include "../../wrapper/ringbuffer/frontend.h" -#include "../../wrapper/ringbuffer/vfs.h" +#include +#include +#include +#include #if 0 #define printk_dbg(fmt, args...) printk(fmt, args) @@ -126,7 +126,8 @@ for (; spd.nr_pages < nr_pages; spd.nr_pages++) { unsigned int this_len; - struct page **page, *new_page; + unsigned long *pfnp, new_pfn; + struct page *new_page; void **virt; if (!len) @@ -143,11 +144,11 @@ GFP_KERNEL | __GFP_ZERO, 0); if (!new_page) break; - + new_pfn = page_to_pfn(new_page); this_len = PAGE_SIZE - poff; - page = lib_ring_buffer_read_get_page(&buf->backend, roffset, &virt); - spd.pages[spd.nr_pages] = *page; - *page = new_page; + pfnp = lib_ring_buffer_read_get_pfn(&buf->backend, roffset, &virt); + spd.pages[spd.nr_pages] = pfn_to_page(*pfnp); + *pfnp = new_pfn; *virt = page_address(new_page); spd.partial[spd.nr_pages].offset = poff; spd.partial[spd.nr_pages].len = this_len; diff -Nru lttng-modules-2.7.1/lib/ringbuffer/ring_buffer_vfs.c lttng-modules-2.8.0/lib/ringbuffer/ring_buffer_vfs.c --- lttng-modules-2.7.1/lib/ringbuffer/ring_buffer_vfs.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/lib/ringbuffer/ring_buffer_vfs.c 2016-05-20 01:34:54.000000000 +0000 @@ -24,11 +24,11 @@ #include #include -#include "../../wrapper/ringbuffer/backend.h" -#include "../../wrapper/ringbuffer/frontend.h" -#include "../../wrapper/ringbuffer/vfs.h" -#include "../../wrapper/poll.h" -#include "../../lttng-tracer.h" +#include +#include +#include +#include +#include static int put_ulong(unsigned long val, unsigned long arg) { @@ -191,6 +191,15 @@ switch (cmd) { case RING_BUFFER_SNAPSHOT: + /* + * First, ensure we perform a "final" flush onto the + * stream. This will ensure we create a packet of + * padding if we encounter an empty packet. This ensures + * the time-stamps right before the snapshot is used as + * end of packet timestamp. + */ + if (!buf->quiescent) + lib_ring_buffer_switch_remote_empty(buf); return lib_ring_buffer_snapshot(buf, &buf->cons_snapshot, &buf->prod_snapshot); case RING_BUFFER_SNAPSHOT_GET_CONSUMED: @@ -320,6 +329,15 @@ switch (cmd) { case RING_BUFFER_COMPAT_SNAPSHOT: + /* + * First, ensure we perform a "final" flush onto the + * stream. This will ensure we create a packet of + * padding if we encounter an empty packet. This ensures + * the time-stamps right before the snapshot is used as + * end of packet timestamp. + */ + if (!buf->quiescent) + lib_ring_buffer_switch_remote_empty(buf); return lib_ring_buffer_snapshot(buf, &buf->cons_snapshot, &buf->prod_snapshot); case RING_BUFFER_COMPAT_SNAPSHOT_GET_CONSUMED: diff -Nru lttng-modules-2.7.1/lib/ringbuffer/vfs.h lttng-modules-2.8.0/lib/ringbuffer/vfs.h --- lttng-modules-2.7.1/lib/ringbuffer/vfs.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lib/ringbuffer/vfs.h 2016-05-20 01:34:54.000000000 +0000 @@ -113,6 +113,8 @@ #define RING_BUFFER_GET_MMAP_READ_OFFSET _IOR(0xF6, 0x0B, unsigned long) /* flush the current sub-buffer */ #define RING_BUFFER_FLUSH _IO(0xF6, 0x0C) +/* Get the current version of the metadata cache (after a get_next). */ +#define RING_BUFFER_GET_METADATA_VERSION _IOR(0xF6, 0x0D, uint64_t) #ifdef CONFIG_COMPAT /* Get a snapshot of the current ring buffer producer and consumer positions */ @@ -145,6 +147,8 @@ #define RING_BUFFER_COMPAT_GET_MMAP_READ_OFFSET _IOR(0xF6, 0x0B, compat_ulong_t) /* flush the current sub-buffer */ #define RING_BUFFER_COMPAT_FLUSH RING_BUFFER_FLUSH +/* Get the current version of the metadata cache (after a get_next). */ +#define RING_BUFFER_COMPAT_GET_METADATA_VERSION RING_BUFFER_GET_METADATA_VERSION #endif /* CONFIG_COMPAT */ #endif /* _LIB_RING_BUFFER_VFS_H */ diff -Nru lttng-modules-2.7.1/lttng-abi.c lttng-modules-2.8.0/lttng-abi.c --- lttng-modules-2.7.1/lttng-abi.c 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lttng-abi.c 2016-05-20 01:34:54.000000000 +0000 @@ -44,17 +44,18 @@ #include #include #include -#include "wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */ -#include "wrapper/ringbuffer/vfs.h" -#include "wrapper/ringbuffer/backend.h" -#include "wrapper/ringbuffer/frontend.h" -#include "wrapper/poll.h" -#include "wrapper/file.h" -#include "lttng-abi.h" -#include "lttng-abi-old.h" -#include "lttng-events.h" -#include "lttng-tracer.h" -#include "lib/ringbuffer/frontend_types.h" +#include /* for wrapper_vmalloc_sync_all() */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* * This is LTTng's own personal way to create a system call as an external @@ -69,6 +70,8 @@ static const struct file_operations lttng_event_fops; static struct file_operations lttng_stream_ring_buffer_file_operations; +static int put_u64(uint64_t val, unsigned long arg); + /* * Teardown management: opened file descriptors keep a refcount on the module, * so it can only exit when all file descriptors are closed. @@ -234,6 +237,14 @@ return lttng_add_hostname_to_ctx(ctx); case LTTNG_KERNEL_CONTEXT_CPU_ID: return lttng_add_cpu_id_to_ctx(ctx); + case LTTNG_KERNEL_CONTEXT_INTERRUPTIBLE: + return lttng_add_interruptible_to_ctx(ctx); + case LTTNG_KERNEL_CONTEXT_NEED_RESCHEDULE: + return lttng_add_need_reschedule_to_ctx(ctx); + case LTTNG_KERNEL_CONTEXT_PREEMPTIBLE: + return lttng_add_preemptible_to_ctx(ctx); + case LTTNG_KERNEL_CONTEXT_MIGRATABLE: + return lttng_add_migratable_to_ctx(ctx); default: return -EINVAL; } @@ -417,6 +428,10 @@ transport_name = ""; break; } + if (atomic_long_add_unless(&session_file->f_count, + 1, INT_MAX) == INT_MAX) { + goto refcount_error; + } /* * We tolerate no failure path after channel creation. It will stay * invariant for the rest of the session. @@ -434,11 +449,12 @@ chan->file = chan_file; chan_file->private_data = chan; fd_install(chan_fd, chan_file); - atomic_long_inc(&session_file->f_count); return chan_fd; chan_error: + atomic_long_dec(&session_file->f_count); +refcount_error: fput(chan_file); file_error: put_unused_fd(chan_fd); @@ -551,6 +567,8 @@ return lttng_session_untrack_pid(session, (int) arg); case LTTNG_KERNEL_SESSION_LIST_TRACKER_PIDS: return lttng_session_list_tracker_pids(session); + case LTTNG_KERNEL_SESSION_METADATA_REGEN: + return lttng_session_metadata_regenerate(session); default: return -ENOIOCTLCMD; } @@ -678,6 +696,24 @@ goto err; break; } + case RING_BUFFER_GET_METADATA_VERSION: + { + struct lttng_metadata_stream *stream = filp->private_data; + + return put_u64(stream->version, arg); + } + case RING_BUFFER_SNAPSHOT: + { + /* + * Force the buffer to quiescent so the ring buffer + * don't attempt to perform a SWITCH_FLUSH, which would + * desynchronize the client accounting of the amount of + * data available in the buffer from the ring buffer + * view. + */ + buf->quiescent = true; + break; + } default: break; } @@ -733,6 +769,39 @@ */ return -ENOSYS; } + case RING_BUFFER_FLUSH: + { + struct lttng_metadata_stream *stream = filp->private_data; + struct lib_ring_buffer *buf = stream->priv; + struct channel *chan = buf->backend.chan; + + /* + * Before doing the actual ring buffer flush, write up to one + * packet of metadata in the ring buffer. + */ + ret = lttng_metadata_output_channel(stream, chan); + if (ret < 0) + goto err; + break; + } + case RING_BUFFER_GET_METADATA_VERSION: + { + struct lttng_metadata_stream *stream = filp->private_data; + + return put_u64(stream->version, arg); + } + case RING_BUFFER_SNAPSHOT: + { + /* + * Force the buffer to quiescent so the ring buffer + * don't attempt to perform a SWITCH_FLUSH, which would + * desynchronize the client accounting of the amount of + * data available in the buffer from the ring buffer + * view. + */ + buf->quiescent = true; + break; + } default: break; } @@ -927,17 +996,20 @@ goto notransport; } + if (!lttng_kref_get(&session->metadata_cache->refcount)) + goto kref_error; ret = lttng_abi_create_stream_fd(channel_file, stream_priv, <tng_metadata_ring_buffer_file_operations); if (ret < 0) goto fd_error; - kref_get(&session->metadata_cache->refcount); list_add(&metadata_stream->list, &session->metadata_cache->metadata_stream); return ret; fd_error: + kref_put(&session->metadata_cache->refcount, metadata_cache_destroy); +kref_error: module_put(metadata_stream->transport->owner); notransport: kfree(metadata_stream); @@ -981,6 +1053,12 @@ ret = PTR_ERR(event_file); goto file_error; } + /* The event holds a reference on the channel */ + if (atomic_long_add_unless(&channel_file->f_count, + 1, INT_MAX) == INT_MAX) { + ret = -EOVERFLOW; + goto refcount_error; + } if (event_param->instrumentation == LTTNG_KERNEL_TRACEPOINT || event_param->instrumentation == LTTNG_KERNEL_SYSCALL) { struct lttng_enabler *enabler; @@ -1012,11 +1090,11 @@ } event_file->private_data = priv; fd_install(event_fd, event_file); - /* The event holds a reference on the channel */ - atomic_long_inc(&channel_file->f_count); return event_fd; event_error: + atomic_long_dec(&channel_file->f_count); +refcount_error: fput(event_file); file_error: put_unused_fd(event_fd); @@ -1500,6 +1578,24 @@ goto error; return put_u64(ts, arg); } + case LTTNG_RING_BUFFER_GET_SEQ_NUM: + { + uint64_t seq; + + ret = ops->sequence_number(config, buf, &seq); + if (ret < 0) + goto error; + return put_u64(seq, arg); + } + case LTTNG_RING_BUFFER_INSTANCE_ID: + { + uint64_t id; + + ret = ops->instance_id(config, buf, &id); + if (ret < 0) + goto error; + return put_u64(id, arg); + } default: return lib_ring_buffer_file_operations.unlocked_ioctl(filp, cmd, arg); @@ -1586,6 +1682,24 @@ goto error; return put_u64(ts, arg); } + case LTTNG_RING_BUFFER_COMPAT_GET_SEQ_NUM: + { + uint64_t seq; + + ret = ops->sequence_number(config, buf, &seq); + if (ret < 0) + goto error; + return put_u64(seq, arg); + } + case LTTNG_RING_BUFFER_COMPAT_INSTANCE_ID: + { + uint64_t id; + + ret = ops->instance_id(config, buf, &id); + if (ret < 0) + goto error; + return put_u64(id, arg); + } default: return lib_ring_buffer_file_operations.compat_ioctl(filp, cmd, arg); @@ -1624,6 +1738,7 @@ int ret = 0; wrapper_vmalloc_sync_all(); + lttng_clock_ref(); lttng_proc_dentry = proc_create_data("lttng", S_IRUSR | S_IWUSR, NULL, <tng_fops, NULL); @@ -1633,14 +1748,17 @@ goto error; } lttng_stream_override_ring_buffer_fops(); + return 0; error: + lttng_clock_unref(); return ret; } /* No __exit annotation because used by init error path too. */ void lttng_abi_exit(void) { + lttng_clock_unref(); if (lttng_proc_dentry) remove_proc_entry("lttng", NULL); } diff -Nru lttng-modules-2.7.1/lttng-abi.h lttng-modules-2.8.0/lttng-abi.h --- lttng-modules-2.7.1/lttng-abi.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lttng-abi.h 2016-05-20 01:34:54.000000000 +0000 @@ -30,7 +30,7 @@ * should be increased when an incompatible ABI change is done. */ #define LTTNG_MODULES_ABI_MAJOR_VERSION 2 -#define LTTNG_MODULES_ABI_MINOR_VERSION 0 +#define LTTNG_MODULES_ABI_MINOR_VERSION 1 #define LTTNG_KERNEL_SYM_NAME_LEN 256 @@ -142,6 +142,10 @@ LTTNG_KERNEL_CONTEXT_VPPID = 9, LTTNG_KERNEL_CONTEXT_HOSTNAME = 10, LTTNG_KERNEL_CONTEXT_CPU_ID = 11, + LTTNG_KERNEL_CONTEXT_INTERRUPTIBLE = 12, + LTTNG_KERNEL_CONTEXT_PREEMPTIBLE = 13, + LTTNG_KERNEL_CONTEXT_NEED_RESCHEDULE = 14, + LTTNG_KERNEL_CONTEXT_MIGRATABLE = 15, }; struct lttng_kernel_perf_counter_ctx { @@ -193,7 +197,13 @@ _IOR(0xF6, 0x58, int32_t) #define LTTNG_KERNEL_SESSION_UNTRACK_PID \ _IOR(0xF6, 0x59, int32_t) +/* + * ioctl 0x58 and 0x59 are duplicated here. It works, since _IOR vs _IO + * are generating two different ioctl numbers, but this was not done on + * purpose. We should generally try to avoid those duplications. + */ #define LTTNG_KERNEL_SESSION_LIST_TRACKER_PIDS _IO(0xF6, 0x58) +#define LTTNG_KERNEL_SESSION_METADATA_REGEN _IO(0xF6, 0x59) /* Channel FD ioctl */ #define LTTNG_KERNEL_STREAM _IO(0xF6, 0x62) @@ -228,6 +238,10 @@ #define LTTNG_RING_BUFFER_GET_STREAM_ID _IOR(0xF6, 0x25, uint64_t) /* returns the current timestamp */ #define LTTNG_RING_BUFFER_GET_CURRENT_TIMESTAMP _IOR(0xF6, 0x26, uint64_t) +/* returns the packet sequence number */ +#define LTTNG_RING_BUFFER_GET_SEQ_NUM _IOR(0xF6, 0x27, uint64_t) +/* returns the stream instance id */ +#define LTTNG_RING_BUFFER_INSTANCE_ID _IOR(0xF6, 0x28, uint64_t) #ifdef CONFIG_COMPAT /* returns the timestamp begin of the current sub-buffer */ @@ -251,6 +265,12 @@ /* returns the current timestamp */ #define LTTNG_RING_BUFFER_COMPAT_GET_CURRENT_TIMESTAMP \ LTTNG_RING_BUFFER_GET_CURRENT_TIMESTAMP +/* returns the packet sequence number */ +#define LTTNG_RING_BUFFER_COMPAT_GET_SEQ_NUM \ + LTTNG_RING_BUFFER_GET_SEQ_NUM +/* returns the stream instance id */ +#define LTTNG_RING_BUFFER_COMPAT_INSTANCE_ID \ + LTTNG_RING_BUFFER_INSTANCE_ID #endif /* CONFIG_COMPAT */ #endif /* _LTTNG_ABI_H */ diff -Nru lttng-modules-2.7.1/lttng-abi-old.h lttng-modules-2.8.0/lttng-abi-old.h --- lttng-modules-2.7.1/lttng-abi-old.h 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/lttng-abi-old.h 2016-05-20 01:34:54.000000000 +0000 @@ -24,7 +24,7 @@ */ #include -#include "lttng-abi.h" +#include /* * LTTng DebugFS ABI structures. diff -Nru lttng-modules-2.7.1/lttng-calibrate.c lttng-modules-2.8.0/lttng-calibrate.c --- lttng-modules-2.7.1/lttng-calibrate.c 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/lttng-calibrate.c 2016-05-20 01:34:54.000000000 +0000 @@ -20,8 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "lttng-abi.h" -#include "lttng-events.h" +#include +#include noinline void lttng_calibrate_kretprobe(void) diff -Nru lttng-modules-2.7.1/lttng-clock.c lttng-modules-2.8.0/lttng-clock.c --- lttng-modules-2.7.1/lttng-clock.c 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/lttng-clock.c 2016-05-20 01:34:54.000000000 +0000 @@ -0,0 +1,110 @@ +/* + * lttng-clock.c + * + * Copyright (C) 2014 Mathieu Desnoyers + * + * 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 +#include +#include + +#include +#include +#include + +struct lttng_trace_clock *lttng_trace_clock; +EXPORT_SYMBOL_GPL(lttng_trace_clock); + +static DEFINE_MUTEX(clock_mutex); +static struct module *lttng_trace_clock_mod; /* plugin */ +static int clock_used; /* refcount */ + +int lttng_clock_register_plugin(struct lttng_trace_clock *ltc, + struct module *mod) +{ + int ret = 0; + + mutex_lock(&clock_mutex); + if (clock_used) { + ret = -EBUSY; + goto end; + } + if (lttng_trace_clock_mod) { + ret = -EEXIST; + goto end; + } + /* set clock */ + ACCESS_ONCE(lttng_trace_clock) = ltc; + lttng_trace_clock_mod = mod; +end: + mutex_unlock(&clock_mutex); + return ret; +} +EXPORT_SYMBOL_GPL(lttng_clock_register_plugin); + +void lttng_clock_unregister_plugin(struct lttng_trace_clock *ltc, + struct module *mod) +{ + mutex_lock(&clock_mutex); + WARN_ON_ONCE(clock_used); + if (!lttng_trace_clock_mod) { + goto end; + } + WARN_ON_ONCE(lttng_trace_clock_mod != mod); + + ACCESS_ONCE(lttng_trace_clock) = NULL; + lttng_trace_clock_mod = NULL; +end: + mutex_unlock(&clock_mutex); +} +EXPORT_SYMBOL_GPL(lttng_clock_unregister_plugin); + +void lttng_clock_ref(void) +{ + mutex_lock(&clock_mutex); + clock_used++; + if (lttng_trace_clock_mod) { + int ret; + + ret = try_module_get(lttng_trace_clock_mod); + if (!ret) { + printk(KERN_ERR "LTTng-clock cannot get clock plugin module\n"); + ACCESS_ONCE(lttng_trace_clock) = NULL; + lttng_trace_clock_mod = NULL; + } + } + mutex_unlock(&clock_mutex); +} +EXPORT_SYMBOL_GPL(lttng_clock_ref); + +void lttng_clock_unref(void) +{ + mutex_lock(&clock_mutex); + clock_used--; + if (lttng_trace_clock_mod) + module_put(lttng_trace_clock_mod); + mutex_unlock(&clock_mutex); +} +EXPORT_SYMBOL_GPL(lttng_clock_unref); + +MODULE_LICENSE("GPL and additional rights"); +MODULE_AUTHOR("Mathieu Desnoyers "); +MODULE_DESCRIPTION("LTTng Clock"); +MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "." + __stringify(LTTNG_MODULES_MINOR_VERSION) "." + __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION) + LTTNG_MODULES_EXTRAVERSION); diff -Nru lttng-modules-2.7.1/lttng-clock.h lttng-modules-2.8.0/lttng-clock.h --- lttng-modules-2.7.1/lttng-clock.h 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/lttng-clock.h 2016-05-20 01:34:54.000000000 +0000 @@ -0,0 +1,41 @@ +#ifndef _LTTNG_CLOCK_H +#define _LTTNG_CLOCK_H + +/* + * lttng-clock.h + * + * Copyright (C) 2014 Mathieu Desnoyers + * + * 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 + +#define LTTNG_MODULES_UUID_STR_LEN 37 + +struct lttng_trace_clock { + u64 (*read64)(void); + u64 (*freq)(void); + int (*uuid)(char *uuid); + const char *(*name)(void); + const char *(*description)(void); +}; + +int lttng_clock_register_plugin(struct lttng_trace_clock *ltc, + struct module *mod); +void lttng_clock_unregister_plugin(struct lttng_trace_clock *ltc, + struct module *mod); + +#endif /* _LTTNG_TRACE_CLOCK_H */ diff -Nru lttng-modules-2.7.1/lttng-context.c lttng-modules-2.8.0/lttng-context.c --- lttng-modules-2.7.1/lttng-context.c 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lttng-context.c 2016-05-20 19:51:59.000000000 +0000 @@ -24,9 +24,9 @@ #include #include #include -#include "wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */ -#include "lttng-events.h" -#include "lttng-tracer.h" +#include /* for wrapper_vmalloc_sync_all() */ +#include +#include /* * The filter implementation requires that two consecutive "get" for the @@ -56,14 +56,20 @@ int lttng_get_context_index(struct lttng_ctx *ctx, const char *name) { unsigned int i; + const char *subname; if (!ctx) return -1; + if (strncmp(name, "$ctx.", strlen("$ctx.")) == 0) { + subname = name + strlen("$ctx."); + } else { + subname = name; + } for (i = 0; i < ctx->nr_fields; i++) { /* Skip allocated (but non-initialized) contexts */ if (!ctx->fields[i].event_field.name) continue; - if (!strcmp(ctx->fields[i].event_field.name, name)) + if (!strcmp(ctx->fields[i].event_field.name, subname)) return i; } return -1; @@ -268,6 +274,26 @@ if (ret) { printk(KERN_WARNING "Cannot add context lttng_add_cpu_id_to_ctx"); } + ret = lttng_add_interruptible_to_ctx(<tng_static_ctx); + if (ret) { + printk(KERN_WARNING "Cannot add context lttng_add_interruptible_to_ctx"); + } + ret = lttng_add_need_reschedule_to_ctx(<tng_static_ctx); + if (ret) { + printk(KERN_WARNING "Cannot add context lttng_add_need_reschedule_to_ctx"); + } +#if defined(CONFIG_PREEMPT_RT_FULL) || defined(CONFIG_PREEMPT) + ret = lttng_add_preemptible_to_ctx(<tng_static_ctx); + if (ret != -ENOSYS) { + printk(KERN_WARNING "Cannot add context lttng_add_preemptible_to_ctx"); + } +#endif +#ifdef CONFIG_PREEMPT_RT_FULL + ret = lttng_add_migratable_to_ctx(<tng_static_ctx); + if (ret != -ENOSYS) { + printk(KERN_WARNING "Cannot add context lttng_add_migratable_to_ctx"); + } +#endif /* TODO: perf counters for filtering */ return 0; } diff -Nru lttng-modules-2.7.1/lttng-context-cpu-id.c lttng-modules-2.8.0/lttng-context-cpu-id.c --- lttng-modules-2.7.1/lttng-context-cpu-id.c 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lttng-context-cpu-id.c 2016-05-20 01:34:54.000000000 +0000 @@ -23,10 +23,10 @@ #include #include #include -#include "lttng-events.h" -#include "wrapper/ringbuffer/frontend_types.h" -#include "wrapper/vmalloc.h" -#include "lttng-tracer.h" +#include +#include +#include +#include static size_t cpu_id_get_size(size_t offset) @@ -52,6 +52,7 @@ static void cpu_id_get_value(struct lttng_ctx_field *field, + struct lttng_probe_ctx *lttng_probe_ctx, union lttng_ctx_value *value) { value->s64 = smp_processor_id(); @@ -84,11 +85,3 @@ return 0; } EXPORT_SYMBOL_GPL(lttng_add_cpu_id_to_ctx); - -MODULE_LICENSE("GPL and additional rights"); -MODULE_AUTHOR("Mathieu Desnoyers"); -MODULE_DESCRIPTION("Linux Trace Toolkit CPU id Context"); -MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "." - __stringify(LTTNG_MODULES_MINOR_VERSION) "." - __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION) - LTTNG_MODULES_EXTRAVERSION); diff -Nru lttng-modules-2.7.1/lttng-context-hostname.c lttng-modules-2.8.0/lttng-context-hostname.c --- lttng-modules-2.7.1/lttng-context-hostname.c 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lttng-context-hostname.c 2016-05-20 01:34:54.000000000 +0000 @@ -24,10 +24,10 @@ #include #include #include -#include "lttng-events.h" -#include "wrapper/ringbuffer/frontend_types.h" -#include "wrapper/vmalloc.h" -#include "lttng-tracer.h" +#include +#include +#include +#include #define LTTNG_HOSTNAME_CTX_LEN (__NEW_UTS_LEN + 1) @@ -67,6 +67,7 @@ static void hostname_get_value(struct lttng_ctx_field *field, + struct lttng_probe_ctx *lttng_probe_ctx, union lttng_ctx_value *value) { struct nsproxy *nsproxy; @@ -117,11 +118,3 @@ return 0; } EXPORT_SYMBOL_GPL(lttng_add_hostname_to_ctx); - -MODULE_LICENSE("GPL and additional rights"); -MODULE_AUTHOR("Mathieu Desnoyers"); -MODULE_DESCRIPTION("Linux Trace Toolkit Perf Support"); -MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "." - __stringify(LTTNG_MODULES_MINOR_VERSION) "." - __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION) - LTTNG_MODULES_EXTRAVERSION); diff -Nru lttng-modules-2.7.1/lttng-context-interruptible.c lttng-modules-2.8.0/lttng-context-interruptible.c --- lttng-modules-2.7.1/lttng-context-interruptible.c 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/lttng-context-interruptible.c 2016-05-20 01:34:54.000000000 +0000 @@ -0,0 +1,94 @@ +/* + * lttng-context-interruptible.c + * + * LTTng interruptible context. + * + * Copyright (C) 2009-2015 Mathieu Desnoyers + * + * 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 +#include +#include +#include +#include +#include +#include +#include + +/* + * Interruptible at value -1 means "unknown". + */ + +static +size_t interruptible_get_size(size_t offset) +{ + size_t size = 0; + + size += lib_ring_buffer_align(offset, lttng_alignof(int8_t)); + size += sizeof(int8_t); + return size; +} + +static +void interruptible_record(struct lttng_ctx_field *field, + struct lib_ring_buffer_ctx *ctx, + struct lttng_channel *chan) +{ + struct lttng_probe_ctx *lttng_probe_ctx = ctx->priv; + int8_t interruptible = lttng_probe_ctx->interruptible; + + lib_ring_buffer_align_ctx(ctx, lttng_alignof(interruptible)); + chan->ops->event_write(ctx, &interruptible, sizeof(interruptible)); +} + +static +void interruptible_get_value(struct lttng_ctx_field *field, + struct lttng_probe_ctx *lttng_probe_ctx, + union lttng_ctx_value *value) +{ + int8_t interruptible = lttng_probe_ctx->interruptible; + + value->s64 = interruptible; +} + +int lttng_add_interruptible_to_ctx(struct lttng_ctx **ctx) +{ + struct lttng_ctx_field *field; + + field = lttng_append_context(ctx); + if (!field) + return -ENOMEM; + if (lttng_find_context(*ctx, "interruptible")) { + lttng_remove_context_field(ctx, field); + return -EEXIST; + } + field->event_field.name = "interruptible"; + field->event_field.type.atype = atype_integer; + field->event_field.type.u.basic.integer.size = sizeof(int8_t) * CHAR_BIT; + field->event_field.type.u.basic.integer.alignment = lttng_alignof(int8_t) * CHAR_BIT; + field->event_field.type.u.basic.integer.signedness = lttng_is_signed_type(int8_t); + field->event_field.type.u.basic.integer.reverse_byte_order = 0; + field->event_field.type.u.basic.integer.base = 10; + field->event_field.type.u.basic.integer.encoding = lttng_encode_none; + field->get_size = interruptible_get_size; + field->record = interruptible_record; + field->get_value = interruptible_get_value; + lttng_context_update(*ctx); + wrapper_vmalloc_sync_all(); + return 0; +} +EXPORT_SYMBOL_GPL(lttng_add_interruptible_to_ctx); diff -Nru lttng-modules-2.7.1/lttng-context-migratable.c lttng-modules-2.8.0/lttng-context-migratable.c --- lttng-modules-2.7.1/lttng-context-migratable.c 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/lttng-context-migratable.c 2016-05-20 01:34:54.000000000 +0000 @@ -0,0 +1,87 @@ +/* + * lttng-context-migratable.c + * + * LTTng migratable context. + * + * Copyright (C) 2009-2015 Mathieu Desnoyers + * + * 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 +#include +#include +#include +#include +#include +#include +#include + +static +size_t migratable_get_size(size_t offset) +{ + size_t size = 0; + + size += lib_ring_buffer_align(offset, lttng_alignof(uint8_t)); + size += sizeof(uint8_t); + return size; +} + +static +void migratable_record(struct lttng_ctx_field *field, + struct lib_ring_buffer_ctx *ctx, + struct lttng_channel *chan) +{ + uint8_t migratable = !__migrate_disabled(current); + + lib_ring_buffer_align_ctx(ctx, lttng_alignof(migratable)); + chan->ops->event_write(ctx, &migratable, sizeof(migratable)); +} + +static +void migratable_get_value(struct lttng_ctx_field *field, + struct lttng_probe_ctx *lttng_probe_ctx, + union lttng_ctx_value *value) +{ + value->s64 = !__migrate_disabled(current); +} + +int lttng_add_migratable_to_ctx(struct lttng_ctx **ctx) +{ + struct lttng_ctx_field *field; + + field = lttng_append_context(ctx); + if (!field) + return -ENOMEM; + if (lttng_find_context(*ctx, "migratable")) { + lttng_remove_context_field(ctx, field); + return -EEXIST; + } + field->event_field.name = "migratable"; + field->event_field.type.atype = atype_integer; + field->event_field.type.u.basic.integer.size = sizeof(uint8_t) * CHAR_BIT; + field->event_field.type.u.basic.integer.alignment = lttng_alignof(uint8_t) * CHAR_BIT; + field->event_field.type.u.basic.integer.signedness = lttng_is_signed_type(uint8_t); + field->event_field.type.u.basic.integer.reverse_byte_order = 0; + field->event_field.type.u.basic.integer.base = 10; + field->event_field.type.u.basic.integer.encoding = lttng_encode_none; + field->get_size = migratable_get_size; + field->record = migratable_record; + field->get_value = migratable_get_value; + lttng_context_update(*ctx); + wrapper_vmalloc_sync_all(); + return 0; +} +EXPORT_SYMBOL_GPL(lttng_add_migratable_to_ctx); diff -Nru lttng-modules-2.7.1/lttng-context-need-reschedule.c lttng-modules-2.8.0/lttng-context-need-reschedule.c --- lttng-modules-2.7.1/lttng-context-need-reschedule.c 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/lttng-context-need-reschedule.c 2016-05-20 01:34:54.000000000 +0000 @@ -0,0 +1,87 @@ +/* + * lttng-context-need-reschedule.c + * + * LTTng need_reschedule context. + * + * Copyright (C) 2009-2015 Mathieu Desnoyers + * + * 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 +#include +#include +#include +#include +#include +#include +#include + +static +size_t need_reschedule_get_size(size_t offset) +{ + size_t size = 0; + + size += lib_ring_buffer_align(offset, lttng_alignof(uint8_t)); + size += sizeof(uint8_t); + return size; +} + +static +void need_reschedule_record(struct lttng_ctx_field *field, + struct lib_ring_buffer_ctx *ctx, + struct lttng_channel *chan) +{ + uint8_t need_reschedule = test_tsk_need_resched(current); + + lib_ring_buffer_align_ctx(ctx, lttng_alignof(need_reschedule)); + chan->ops->event_write(ctx, &need_reschedule, sizeof(need_reschedule)); +} + +static +void need_reschedule_get_value(struct lttng_ctx_field *field, + struct lttng_probe_ctx *lttng_probe_ctx, + union lttng_ctx_value *value) +{ + value->s64 = test_tsk_need_resched(current);; +} + +int lttng_add_need_reschedule_to_ctx(struct lttng_ctx **ctx) +{ + struct lttng_ctx_field *field; + + field = lttng_append_context(ctx); + if (!field) + return -ENOMEM; + if (lttng_find_context(*ctx, "need_reschedule")) { + lttng_remove_context_field(ctx, field); + return -EEXIST; + } + field->event_field.name = "need_reschedule"; + field->event_field.type.atype = atype_integer; + field->event_field.type.u.basic.integer.size = sizeof(uint8_t) * CHAR_BIT; + field->event_field.type.u.basic.integer.alignment = lttng_alignof(uint8_t) * CHAR_BIT; + field->event_field.type.u.basic.integer.signedness = lttng_is_signed_type(uint8_t); + field->event_field.type.u.basic.integer.reverse_byte_order = 0; + field->event_field.type.u.basic.integer.base = 10; + field->event_field.type.u.basic.integer.encoding = lttng_encode_none; + field->get_size = need_reschedule_get_size; + field->record = need_reschedule_record; + field->get_value = need_reschedule_get_value; + lttng_context_update(*ctx); + wrapper_vmalloc_sync_all(); + return 0; +} +EXPORT_SYMBOL_GPL(lttng_add_need_reschedule_to_ctx); diff -Nru lttng-modules-2.7.1/lttng-context-nice.c lttng-modules-2.8.0/lttng-context-nice.c --- lttng-modules-2.7.1/lttng-context-nice.c 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lttng-context-nice.c 2016-05-20 01:34:54.000000000 +0000 @@ -23,10 +23,10 @@ #include #include #include -#include "lttng-events.h" -#include "wrapper/ringbuffer/frontend_types.h" -#include "wrapper/vmalloc.h" -#include "lttng-tracer.h" +#include +#include +#include +#include static size_t nice_get_size(size_t offset) @@ -52,6 +52,7 @@ static void nice_get_value(struct lttng_ctx_field *field, + struct lttng_probe_ctx *lttng_probe_ctx, union lttng_ctx_value *value) { value->s64 = task_nice(current); @@ -84,11 +85,3 @@ return 0; } EXPORT_SYMBOL_GPL(lttng_add_nice_to_ctx); - -MODULE_LICENSE("GPL and additional rights"); -MODULE_AUTHOR("Mathieu Desnoyers"); -MODULE_DESCRIPTION("Linux Trace Toolkit Nice Context"); -MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "." - __stringify(LTTNG_MODULES_MINOR_VERSION) "." - __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION) - LTTNG_MODULES_EXTRAVERSION); diff -Nru lttng-modules-2.7.1/lttng-context-perf-counters.c lttng-modules-2.8.0/lttng-context-perf-counters.c --- lttng-modules-2.7.1/lttng-context-perf-counters.c 2015-10-24 07:33:20.000000000 +0000 +++ lttng-modules-2.8.0/lttng-context-perf-counters.c 2016-05-20 01:34:54.000000000 +0000 @@ -26,11 +26,11 @@ #include #include #include -#include "lttng-events.h" -#include "wrapper/ringbuffer/frontend_types.h" -#include "wrapper/vmalloc.h" -#include "wrapper/perf.h" -#include "lttng-tracer.h" +#include +#include +#include +#include +#include static size_t perf_counter_get_size(size_t offset) @@ -280,11 +280,3 @@ kfree(events); return ret; } - -MODULE_LICENSE("GPL and additional rights"); -MODULE_AUTHOR("Mathieu Desnoyers"); -MODULE_DESCRIPTION("Linux Trace Toolkit Perf Support"); -MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "." - __stringify(LTTNG_MODULES_MINOR_VERSION) "." - __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION) - LTTNG_MODULES_EXTRAVERSION); diff -Nru lttng-modules-2.7.1/lttng-context-pid.c lttng-modules-2.8.0/lttng-context-pid.c --- lttng-modules-2.7.1/lttng-context-pid.c 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lttng-context-pid.c 2016-05-20 01:34:54.000000000 +0000 @@ -23,10 +23,10 @@ #include #include #include -#include "lttng-events.h" -#include "wrapper/ringbuffer/frontend_types.h" -#include "wrapper/vmalloc.h" -#include "lttng-tracer.h" +#include +#include +#include +#include static size_t pid_get_size(size_t offset) @@ -52,6 +52,7 @@ static void pid_get_value(struct lttng_ctx_field *field, + struct lttng_probe_ctx *lttng_probe_ctx, union lttng_ctx_value *value) { value->s64 = task_tgid_nr(current); @@ -84,11 +85,3 @@ return 0; } EXPORT_SYMBOL_GPL(lttng_add_pid_to_ctx); - -MODULE_LICENSE("GPL and additional rights"); -MODULE_AUTHOR("Mathieu Desnoyers"); -MODULE_DESCRIPTION("Linux Trace Toolkit PID Context"); -MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "." - __stringify(LTTNG_MODULES_MINOR_VERSION) "." - __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION) - LTTNG_MODULES_EXTRAVERSION); diff -Nru lttng-modules-2.7.1/lttng-context-ppid.c lttng-modules-2.8.0/lttng-context-ppid.c --- lttng-modules-2.7.1/lttng-context-ppid.c 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lttng-context-ppid.c 2016-05-20 01:34:54.000000000 +0000 @@ -24,10 +24,10 @@ #include #include #include -#include "lttng-events.h" -#include "wrapper/ringbuffer/frontend_types.h" -#include "wrapper/vmalloc.h" -#include "lttng-tracer.h" +#include +#include +#include +#include static size_t ppid_get_size(size_t offset) @@ -62,6 +62,7 @@ static void ppid_get_value(struct lttng_ctx_field *field, + struct lttng_probe_ctx *lttng_probe_ctx, union lttng_ctx_value *value) { pid_t ppid; @@ -106,11 +107,3 @@ return 0; } EXPORT_SYMBOL_GPL(lttng_add_ppid_to_ctx); - -MODULE_LICENSE("GPL and additional rights"); -MODULE_AUTHOR("Mathieu Desnoyers"); -MODULE_DESCRIPTION("Linux Trace Toolkit PPID Context"); -MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "." - __stringify(LTTNG_MODULES_MINOR_VERSION) "." - __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION) - LTTNG_MODULES_EXTRAVERSION); diff -Nru lttng-modules-2.7.1/lttng-context-preemptible.c lttng-modules-2.8.0/lttng-context-preemptible.c --- lttng-modules-2.7.1/lttng-context-preemptible.c 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/lttng-context-preemptible.c 2016-05-20 01:34:54.000000000 +0000 @@ -0,0 +1,105 @@ +/* + * lttng-context-preemptible.c + * + * LTTng preemptible context. + * + * Copyright (C) 2009-2015 Mathieu Desnoyers + * + * 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 +#include +#include +#include +#include +#include +#include +#include + +/* + * We nest twice in preempt disabling within LTTng: one nesting is done + * by the instrumentation (tracepoint, kprobes, kretprobes, syscall + * tracepoint), and the second is within the lib ring buffer + * lib_ring_buffer_get_cpu(). + */ +#define LTTNG_PREEMPT_DISABLE_NESTING 2 + +static +size_t preemptible_get_size(size_t offset) +{ + size_t size = 0; + + size += lib_ring_buffer_align(offset, lttng_alignof(uint8_t)); + size += sizeof(uint8_t); + return size; +} + +static +void preemptible_record(struct lttng_ctx_field *field, + struct lib_ring_buffer_ctx *ctx, + struct lttng_channel *chan) +{ + int pc = preempt_count(); + uint8_t preemptible = 0; + + WARN_ON_ONCE(pc < LTTNG_PREEMPT_DISABLE_NESTING); + if (pc == LTTNG_PREEMPT_DISABLE_NESTING) + preemptible = 1; + lib_ring_buffer_align_ctx(ctx, lttng_alignof(preemptible)); + chan->ops->event_write(ctx, &preemptible, sizeof(preemptible)); +} + +static +void preemptible_get_value(struct lttng_ctx_field *field, + struct lttng_probe_ctx *lttng_probe_ctx, + union lttng_ctx_value *value) +{ + int pc = preempt_count(); + + WARN_ON_ONCE(pc < LTTNG_PREEMPT_DISABLE_NESTING); + if (pc == LTTNG_PREEMPT_DISABLE_NESTING) + value->s64 = 1; + else + value->s64 = 0; +} + +int lttng_add_preemptible_to_ctx(struct lttng_ctx **ctx) +{ + struct lttng_ctx_field *field; + + field = lttng_append_context(ctx); + if (!field) + return -ENOMEM; + if (lttng_find_context(*ctx, "preemptible")) { + lttng_remove_context_field(ctx, field); + return -EEXIST; + } + field->event_field.name = "preemptible"; + field->event_field.type.atype = atype_integer; + field->event_field.type.u.basic.integer.size = sizeof(uint8_t) * CHAR_BIT; + field->event_field.type.u.basic.integer.alignment = lttng_alignof(uint8_t) * CHAR_BIT; + field->event_field.type.u.basic.integer.signedness = lttng_is_signed_type(uint8_t); + field->event_field.type.u.basic.integer.reverse_byte_order = 0; + field->event_field.type.u.basic.integer.base = 10; + field->event_field.type.u.basic.integer.encoding = lttng_encode_none; + field->get_size = preemptible_get_size; + field->record = preemptible_record; + field->get_value = preemptible_get_value; + lttng_context_update(*ctx); + wrapper_vmalloc_sync_all(); + return 0; +} +EXPORT_SYMBOL_GPL(lttng_add_preemptible_to_ctx); diff -Nru lttng-modules-2.7.1/lttng-context-prio.c lttng-modules-2.8.0/lttng-context-prio.c --- lttng-modules-2.7.1/lttng-context-prio.c 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lttng-context-prio.c 2016-05-20 01:34:54.000000000 +0000 @@ -23,11 +23,11 @@ #include #include #include -#include "lttng-events.h" -#include "wrapper/ringbuffer/frontend_types.h" -#include "wrapper/vmalloc.h" -#include "wrapper/kallsyms.h" -#include "lttng-tracer.h" +#include +#include +#include +#include +#include static int (*wrapper_task_prio_sym)(struct task_struct *t); @@ -66,6 +66,7 @@ static void prio_get_value(struct lttng_ctx_field *field, + struct lttng_probe_ctx *lttng_probe_ctx, union lttng_ctx_value *value) { value->s64 = wrapper_task_prio_sym(current); @@ -105,11 +106,3 @@ return 0; } EXPORT_SYMBOL_GPL(lttng_add_prio_to_ctx); - -MODULE_LICENSE("GPL and additional rights"); -MODULE_AUTHOR("Mathieu Desnoyers"); -MODULE_DESCRIPTION("Linux Trace Toolkit Priority Context"); -MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "." - __stringify(LTTNG_MODULES_MINOR_VERSION) "." - __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION) - LTTNG_MODULES_EXTRAVERSION); diff -Nru lttng-modules-2.7.1/lttng-context-procname.c lttng-modules-2.8.0/lttng-context-procname.c --- lttng-modules-2.7.1/lttng-context-procname.c 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lttng-context-procname.c 2016-05-20 01:34:54.000000000 +0000 @@ -23,10 +23,10 @@ #include #include #include -#include "lttng-events.h" -#include "wrapper/ringbuffer/frontend_types.h" -#include "wrapper/vmalloc.h" -#include "lttng-tracer.h" +#include +#include +#include +#include static size_t procname_get_size(size_t offset) @@ -53,6 +53,7 @@ static void procname_get_value(struct lttng_ctx_field *field, + struct lttng_probe_ctx *lttng_probe_ctx, union lttng_ctx_value *value) { value->str = current->comm; @@ -88,11 +89,3 @@ return 0; } EXPORT_SYMBOL_GPL(lttng_add_procname_to_ctx); - -MODULE_LICENSE("GPL and additional rights"); -MODULE_AUTHOR("Mathieu Desnoyers"); -MODULE_DESCRIPTION("Linux Trace Toolkit Perf Support"); -MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "." - __stringify(LTTNG_MODULES_MINOR_VERSION) "." - __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION) - LTTNG_MODULES_EXTRAVERSION); diff -Nru lttng-modules-2.7.1/lttng-context-tid.c lttng-modules-2.8.0/lttng-context-tid.c --- lttng-modules-2.7.1/lttng-context-tid.c 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lttng-context-tid.c 2016-05-20 01:34:54.000000000 +0000 @@ -23,10 +23,10 @@ #include #include #include -#include "lttng-events.h" -#include "wrapper/ringbuffer/frontend_types.h" -#include "wrapper/vmalloc.h" -#include "lttng-tracer.h" +#include +#include +#include +#include static size_t tid_get_size(size_t offset) @@ -52,6 +52,7 @@ static void tid_get_value(struct lttng_ctx_field *field, + struct lttng_probe_ctx *lttng_probe_ctx, union lttng_ctx_value *value) { pid_t tid; @@ -87,11 +88,3 @@ return 0; } EXPORT_SYMBOL_GPL(lttng_add_tid_to_ctx); - -MODULE_LICENSE("GPL and additional rights"); -MODULE_AUTHOR("Mathieu Desnoyers"); -MODULE_DESCRIPTION("Linux Trace Toolkit TID Context"); -MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "." - __stringify(LTTNG_MODULES_MINOR_VERSION) "." - __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION) - LTTNG_MODULES_EXTRAVERSION); diff -Nru lttng-modules-2.7.1/lttng-context-vpid.c lttng-modules-2.8.0/lttng-context-vpid.c --- lttng-modules-2.7.1/lttng-context-vpid.c 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lttng-context-vpid.c 2016-05-20 01:34:54.000000000 +0000 @@ -23,10 +23,10 @@ #include #include #include -#include "lttng-events.h" -#include "wrapper/ringbuffer/frontend_types.h" -#include "wrapper/vmalloc.h" -#include "lttng-tracer.h" +#include +#include +#include +#include static size_t vpid_get_size(size_t offset) @@ -58,6 +58,7 @@ static void vpid_get_value(struct lttng_ctx_field *field, + struct lttng_probe_ctx *lttng_probe_ctx, union lttng_ctx_value *value) { pid_t vpid; @@ -99,11 +100,3 @@ return 0; } EXPORT_SYMBOL_GPL(lttng_add_vpid_to_ctx); - -MODULE_LICENSE("GPL and additional rights"); -MODULE_AUTHOR("Mathieu Desnoyers"); -MODULE_DESCRIPTION("Linux Trace Toolkit vPID Context"); -MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "." - __stringify(LTTNG_MODULES_MINOR_VERSION) "." - __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION) - LTTNG_MODULES_EXTRAVERSION); diff -Nru lttng-modules-2.7.1/lttng-context-vppid.c lttng-modules-2.8.0/lttng-context-vppid.c --- lttng-modules-2.7.1/lttng-context-vppid.c 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lttng-context-vppid.c 2016-05-20 01:34:54.000000000 +0000 @@ -24,10 +24,10 @@ #include #include #include -#include "lttng-events.h" -#include "wrapper/ringbuffer/frontend_types.h" -#include "wrapper/vmalloc.h" -#include "lttng-tracer.h" +#include +#include +#include +#include static size_t vppid_get_size(size_t offset) @@ -73,6 +73,7 @@ static void vppid_get_value(struct lttng_ctx_field *field, + struct lttng_probe_ctx *lttng_probe_ctx, union lttng_ctx_value *value) { struct task_struct *parent; @@ -128,11 +129,3 @@ return 0; } EXPORT_SYMBOL_GPL(lttng_add_vppid_to_ctx); - -MODULE_LICENSE("GPL and additional rights"); -MODULE_AUTHOR("Mathieu Desnoyers"); -MODULE_DESCRIPTION("Linux Trace Toolkit vPPID Context"); -MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "." - __stringify(LTTNG_MODULES_MINOR_VERSION) "." - __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION) - LTTNG_MODULES_EXTRAVERSION); diff -Nru lttng-modules-2.7.1/lttng-context-vtid.c lttng-modules-2.8.0/lttng-context-vtid.c --- lttng-modules-2.7.1/lttng-context-vtid.c 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lttng-context-vtid.c 2016-05-20 01:34:54.000000000 +0000 @@ -23,10 +23,10 @@ #include #include #include -#include "lttng-events.h" -#include "wrapper/ringbuffer/frontend_types.h" -#include "wrapper/vmalloc.h" -#include "lttng-tracer.h" +#include +#include +#include +#include static size_t vtid_get_size(size_t offset) @@ -58,6 +58,7 @@ static void vtid_get_value(struct lttng_ctx_field *field, + struct lttng_probe_ctx *lttng_probe_ctx, union lttng_ctx_value *value) { pid_t vtid; @@ -99,11 +100,3 @@ return 0; } EXPORT_SYMBOL_GPL(lttng_add_vtid_to_ctx); - -MODULE_LICENSE("GPL and additional rights"); -MODULE_AUTHOR("Mathieu Desnoyers"); -MODULE_DESCRIPTION("Linux Trace Toolkit vTID Context"); -MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "." - __stringify(LTTNG_MODULES_MINOR_VERSION) "." - __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION) - LTTNG_MODULES_EXTRAVERSION); diff -Nru lttng-modules-2.7.1/lttng-events.c lttng-modules-2.8.0/lttng-events.c --- lttng-modules-2.7.1/lttng-events.c 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lttng-events.c 2016-05-20 19:51:59.000000000 +0000 @@ -36,21 +36,24 @@ #include #include #include -#include "wrapper/file.h" +#include #include #include #include -#include "wrapper/uuid.h" -#include "wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */ -#include "wrapper/random.h" -#include "wrapper/tracepoint.h" -#include "wrapper/list.h" -#include "lttng-kernel-version.h" -#include "lttng-events.h" -#include "lttng-tracer.h" -#include "lttng-abi-old.h" -#include "wrapper/vzalloc.h" +#include +#include /* for wrapper_vmalloc_sync_all() */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #define METADATA_CACHE_DEFAULT_SIZE 4096 @@ -236,6 +239,12 @@ /* We need to sync enablers with session before activation. */ lttng_session_sync_enablers(session); + /* Clear each stream's quiescent state. */ + list_for_each_entry(chan, &session->chan, list) { + if (chan->channel_type != METADATA_CHANNEL) + lib_ring_buffer_clear_quiescent_channel(chan->chan); + } + ACCESS_ONCE(session->active) = 1; ACCESS_ONCE(session->been_active) = 1; ret = _lttng_session_metadata_statedump(session); @@ -254,6 +263,7 @@ int lttng_session_disable(struct lttng_session *session) { int ret = 0; + struct lttng_channel *chan; mutex_lock(&sessions_mutex); if (!session->active) { @@ -265,11 +275,59 @@ /* Set transient enabler state to "disabled" */ session->tstate = 0; lttng_session_sync_enablers(session); + + /* Set each stream's quiescent state. */ + list_for_each_entry(chan, &session->chan, list) { + if (chan->channel_type != METADATA_CHANNEL) + lib_ring_buffer_set_quiescent_channel(chan->chan); + } +end: + mutex_unlock(&sessions_mutex); + return ret; +} + +int lttng_session_metadata_regenerate(struct lttng_session *session) +{ + int ret = 0; + struct lttng_channel *chan; + struct lttng_event *event; + struct lttng_metadata_cache *cache = session->metadata_cache; + struct lttng_metadata_stream *stream; + + mutex_lock(&sessions_mutex); + if (!session->active) { + ret = -EBUSY; + goto end; + } + + mutex_lock(&cache->lock); + memset(cache->data, 0, cache->cache_alloc); + cache->metadata_written = 0; + cache->version++; + list_for_each_entry(stream, &session->metadata_cache->metadata_stream, list) { + stream->metadata_out = 0; + stream->metadata_in = 0; + } + mutex_unlock(&cache->lock); + + session->metadata_dumped = 0; + list_for_each_entry(chan, &session->chan, list) { + chan->metadata_dumped = 0; + } + + list_for_each_entry(event, &session->events, list) { + event->metadata_dumped = 0; + } + + ret = _lttng_session_metadata_statedump(session); + end: mutex_unlock(&sessions_mutex); return ret; } + + int lttng_channel_enable(struct lttng_channel *channel) { int ret = 0; @@ -1043,17 +1101,22 @@ ret = PTR_ERR(tracker_pids_list_file); goto file_error; } + if (atomic_long_add_unless(&session->file->f_count, + 1, INT_MAX) == INT_MAX) { + goto refcount_error; + } ret = lttng_tracker_pids_list_fops.open(NULL, tracker_pids_list_file); if (ret < 0) goto open_error; m = tracker_pids_list_file->private_data; m->private = session; fd_install(file_fd, tracker_pids_list_file); - atomic_long_inc(&session->file->f_count); return file_fd; open_error: + atomic_long_dec(&session->file->f_count); +refcount_error: fput(tracker_pids_list_file); file_error: put_unused_fd(file_fd); @@ -1517,6 +1580,10 @@ if (stream->metadata_in != stream->metadata_out) goto end; + /* Metadata regenerated, change the version. */ + if (stream->metadata_cache->version != stream->version) + stream->version = stream->metadata_cache->version; + len = stream->metadata_cache->metadata_written - stream->metadata_in; if (!len) @@ -1631,7 +1698,7 @@ ? "UTF8" : "ASCII", field->type.u.basic.integer.base, -#ifdef __BIG_ENDIAN +#if __BYTE_ORDER == __BIG_ENDIAN field->type.u.basic.integer.reverse_byte_order ? " byte_order = le;" : "", #else field->type.u.basic.integer.reverse_byte_order ? " byte_order = be;" : "", @@ -1649,6 +1716,14 @@ const struct lttng_basic_type *elem_type; elem_type = &field->type.u.array.elem_type; + if (field->type.u.array.elem_alignment) { + ret = lttng_metadata_printf(session, + " struct { } align(%u) _%s_padding;\n", + field->type.u.array.elem_alignment * CHAR_BIT, + field->name); + if (ret) + return ret; + } ret = lttng_metadata_printf(session, " integer { size = %u; align = %u; signed = %u; encoding = %s; base = %u;%s } _%s[%u];\n", elem_type->u.basic.integer.size, @@ -1660,7 +1735,7 @@ ? "UTF8" : "ASCII", elem_type->u.basic.integer.base, -#ifdef __BIG_ENDIAN +#if __BYTE_ORDER == __BIG_ENDIAN elem_type->u.basic.integer.reverse_byte_order ? " byte_order = le;" : "", #else elem_type->u.basic.integer.reverse_byte_order ? " byte_order = be;" : "", @@ -1686,7 +1761,7 @@ ? "UTF8" : "ASCII"), length_type->u.basic.integer.base, -#ifdef __BIG_ENDIAN +#if __BYTE_ORDER == __BIG_ENDIAN length_type->u.basic.integer.reverse_byte_order ? " byte_order = le;" : "", #else length_type->u.basic.integer.reverse_byte_order ? " byte_order = be;" : "", @@ -1695,6 +1770,14 @@ if (ret) return ret; + if (field->type.u.sequence.elem_alignment) { + ret = lttng_metadata_printf(session, + " struct { } align(%u) _%s_padding;\n", + field->type.u.sequence.elem_alignment * CHAR_BIT, + field->name); + if (ret) + return ret; + } ret = lttng_metadata_printf(session, " integer { size = %u; align = %u; signed = %u; encoding = %s; base = %u;%s } _%s[ __%s_length ];\n", elem_type->u.basic.integer.size, @@ -1706,7 +1789,7 @@ ? "UTF8" : "ASCII"), elem_type->u.basic.integer.base, -#ifdef __BIG_ENDIAN +#if __BYTE_ORDER == __BIG_ENDIAN elem_type->u.basic.integer.reverse_byte_order ? " byte_order = le;" : "", #else elem_type->u.basic.integer.reverse_byte_order ? " byte_order = be;" : "", @@ -1899,6 +1982,7 @@ " uint64_clock_monotonic_t timestamp_end;\n" " uint64_t content_size;\n" " uint64_t packet_size;\n" + " uint64_t packet_seq_num;\n" " unsigned long events_discarded;\n" " uint32_t cpu_id;\n" "};\n\n" @@ -1955,11 +2039,15 @@ * taken at start of trace. * Yes, this is only an approximation. Yes, we can (and will) do better * in future versions. + * This function may return a negative offset. It may happen if the + * system sets the REALTIME clock to 0 after boot. */ static -uint64_t measure_clock_offset(void) +int64_t measure_clock_offset(void) { - uint64_t offset, monotonic[2], realtime; + uint64_t monotonic_avg, monotonic[2], realtime; + uint64_t tcf = trace_clock_freq(); + int64_t offset; struct timespec rts = { 0, 0 }; unsigned long flags; @@ -1970,10 +2058,17 @@ monotonic[1] = trace_clock_read64(); local_irq_restore(flags); - offset = (monotonic[0] + monotonic[1]) >> 1; - realtime = (uint64_t) rts.tv_sec * NSEC_PER_SEC; - realtime += rts.tv_nsec; - offset = realtime - offset; + monotonic_avg = (monotonic[0] + monotonic[1]) >> 1; + realtime = (uint64_t) rts.tv_sec * tcf; + if (tcf == NSEC_PER_SEC) { + realtime += rts.tv_nsec; + } else { + uint64_t n = rts.tv_nsec * tcf; + + do_div(n, NSEC_PER_SEC); + realtime += n; + } + offset = (int64_t) realtime - monotonic_avg; return offset; } @@ -2020,6 +2115,7 @@ " uint32_t magic;\n" " uint8_t uuid[16];\n" " uint32_t stream_id;\n" + " uint64_t stream_instance_id;\n" " };\n" "};\n\n", lttng_alignof(uint8_t) * CHAR_BIT, @@ -2031,7 +2127,7 @@ CTF_SPEC_MAJOR, CTF_SPEC_MINOR, uuid_s, -#ifdef __BIG_ENDIAN +#if __BYTE_ORDER == __BIG_ENDIAN "be" #else "le" @@ -2065,8 +2161,8 @@ ret = lttng_metadata_printf(session, "clock {\n" - " name = %s;\n", - "monotonic" + " name = \"%s\";\n", + trace_clock_name() ); if (ret) goto end; @@ -2081,13 +2177,14 @@ } ret = lttng_metadata_printf(session, - " description = \"Monotonic Clock\";\n" + " description = \"%s\";\n" " freq = %llu; /* Frequency, in Hz */\n" " /* clock value offset from Epoch is: offset * (1/freq) */\n" - " offset = %llu;\n" + " offset = %lld;\n" "};\n\n", + trace_clock_description(), (unsigned long long) trace_clock_freq(), - (unsigned long long) measure_clock_offset() + (long long) measure_clock_offset() ); if (ret) goto end; @@ -2095,20 +2192,23 @@ ret = lttng_metadata_printf(session, "typealias integer {\n" " size = 27; align = 1; signed = false;\n" - " map = clock.monotonic.value;\n" + " map = clock.%s.value;\n" "} := uint27_clock_monotonic_t;\n" "\n" "typealias integer {\n" " size = 32; align = %u; signed = false;\n" - " map = clock.monotonic.value;\n" + " map = clock.%s.value;\n" "} := uint32_clock_monotonic_t;\n" "\n" "typealias integer {\n" " size = 64; align = %u; signed = false;\n" - " map = clock.monotonic.value;\n" + " map = clock.%s.value;\n" "} := uint64_clock_monotonic_t;\n\n", + trace_clock_name(), lttng_alignof(uint32_t) * CHAR_BIT, - lttng_alignof(uint64_t) * CHAR_BIT + trace_clock_name(), + lttng_alignof(uint64_t) * CHAR_BIT, + trace_clock_name() ); if (ret) goto end; @@ -2187,6 +2287,9 @@ ret = wrapper_get_pfnblock_flags_mask_init(); if (ret) return ret; + ret = wrapper_get_pageblock_flags_mask_init(); + if (ret) + return ret; ret = lttng_context_init(); if (ret) return ret; diff -Nru lttng-modules-2.7.1/lttng-events.h lttng-modules-2.8.0/lttng-events.h --- lttng-modules-2.7.1/lttng-events.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lttng-events.h 2016-05-20 19:51:59.000000000 +0000 @@ -27,9 +27,9 @@ #include #include #include -#include "wrapper/uuid.h" -#include "lttng-abi.h" -#include "lttng-abi-old.h" +#include +#include +#include #define lttng_is_signed_type(type) (((type)(-1)) < 0) @@ -43,7 +43,6 @@ /* Type description */ -/* Update the astract_types name table in lttng-types.c along with this enum */ enum abstract_types { atype_integer, atype_enum, @@ -53,7 +52,6 @@ NR_ABSTRACT_TYPES, }; -/* Update the string_encodings name table in lttng-types.c along with this enum */ enum lttng_string_encodings { lttng_encode_none = 0, lttng_encode_UTF8 = 1, @@ -71,15 +69,16 @@ const char *string; }; -#define __type_integer(_type, _byte_order, _base, _encoding) \ +#define __type_integer(_type, _size, _alignment, _signedness, \ + _byte_order, _base, _encoding) \ { \ .atype = atype_integer, \ .u.basic.integer = \ { \ - .size = sizeof(_type) * CHAR_BIT, \ - .alignment = lttng_alignof(_type) * CHAR_BIT, \ - .signedness = lttng_is_signed_type(_type), \ - .reverse_byte_order = _byte_order != __BYTE_ORDER, \ + .size = (_size) ? : sizeof(_type) * CHAR_BIT, \ + .alignment = (_alignment) ? : lttng_alignof(_type) * CHAR_BIT, \ + .signedness = (_signedness) >= 0 ? (_signedness) : lttng_is_signed_type(_type), \ + .reverse_byte_order = _byte_order != __BYTE_ORDER, \ .base = _base, \ .encoding = lttng_encode_##_encoding, \ }, \ @@ -118,10 +117,12 @@ struct { struct lttng_basic_type elem_type; unsigned int length; /* num. elems. */ + unsigned int elem_alignment; /* alignment override */ } array; struct { struct lttng_basic_type length_type; struct lttng_basic_type elem_type; + unsigned int elem_alignment; /* alignment override */ } sequence; } u; }; @@ -159,6 +160,11 @@ struct perf_event **e; /* per-cpu array */ }; +struct lttng_probe_ctx { + struct lttng_event *event; + uint8_t interruptible; +}; + struct lttng_ctx_field { struct lttng_event_field event_field; size_t (*get_size)(size_t offset); @@ -166,6 +172,7 @@ struct lib_ring_buffer_ctx *ctx, struct lttng_channel *chan); void (*get_value)(struct lttng_ctx_field *field, + struct lttng_probe_ctx *lttng_probe_ctx, union lttng_ctx_value *value); union { struct lttng_perf_counter_field *perf_counter; @@ -228,7 +235,8 @@ struct lttng_bytecode_runtime { /* Associated bytecode */ struct lttng_filter_bytecode_node *bc; - uint64_t (*filter)(void *filter_data, const char *filter_stack_data); + uint64_t (*filter)(void *filter_data, struct lttng_probe_ctx *lttng_probe_ctx, + const char *filter_stack_data); int link_failed; struct list_head node; /* list of bytecode runtime in event */ }; @@ -358,6 +366,12 @@ int (*current_timestamp) (const struct lib_ring_buffer_config *config, struct lib_ring_buffer *bufb, uint64_t *ts); + int (*sequence_number) (const struct lib_ring_buffer_config *config, + struct lib_ring_buffer *bufb, + uint64_t *seq); + int (*instance_id) (const struct lib_ring_buffer_config *config, + struct lib_ring_buffer *bufb, + uint64_t *id); }; struct lttng_transport { @@ -415,6 +429,7 @@ wait_queue_head_t read_wait; /* Reader buffer-level wait queue */ struct list_head list; /* Stream list */ struct lttng_transport *transport; + uint64_t version; /* Current version of the metadata cache */ }; @@ -460,7 +475,8 @@ struct kref refcount; /* Metadata cache usage */ struct list_head metadata_stream; /* Metadata stream list */ uuid_le uuid; /* Trace session unique ID (copy) */ - struct mutex lock; + struct mutex lock; /* Produce/consume lock */ + uint64_t version; /* Current version of the metadata */ }; void lttng_lock_sessions(void); @@ -481,6 +497,7 @@ int lttng_session_enable(struct lttng_session *session); int lttng_session_disable(struct lttng_session *session); void lttng_session_destroy(struct lttng_session *session); +int lttng_session_metadata_regenerate(struct lttng_session *session); void metadata_cache_destroy(struct kref *kref); struct lttng_channel *lttng_channel_create(struct lttng_session *session, @@ -548,6 +565,9 @@ int lttng_session_list_tracker_pids(struct lttng_session *session); +void lttng_clock_ref(void); +void lttng_clock_unref(void); + #if defined(CONFIG_HAVE_SYSCALL_TRACEPOINTS) int lttng_syscalls_register(struct lttng_channel *chan, void *filter); int lttng_syscalls_unregister(struct lttng_channel *chan); @@ -615,6 +635,26 @@ int lttng_add_ppid_to_ctx(struct lttng_ctx **ctx); int lttng_add_vppid_to_ctx(struct lttng_ctx **ctx); int lttng_add_hostname_to_ctx(struct lttng_ctx **ctx); +int lttng_add_interruptible_to_ctx(struct lttng_ctx **ctx); +int lttng_add_need_reschedule_to_ctx(struct lttng_ctx **ctx); +#if defined(CONFIG_PREEMPT_RT_FULL) || defined(CONFIG_PREEMPT) +int lttng_add_preemptible_to_ctx(struct lttng_ctx **ctx); +#else +static inline +int lttng_add_preemptible_to_ctx(struct lttng_ctx **ctx) +{ + return -ENOSYS; +} +#endif +#ifdef CONFIG_PREEMPT_RT_FULL +int lttng_add_migratable_to_ctx(struct lttng_ctx **ctx); +#else +static inline +int lttng_add_migratable_to_ctx(struct lttng_ctx **ctx) +{ + return -ENOSYS; +} +#endif #if defined(CONFIG_PERF_EVENTS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) int lttng_add_perf_counter_to_ctx(uint32_t type, uint64_t config, diff -Nru lttng-modules-2.7.1/lttng-filter.c lttng-modules-2.8.0/lttng-filter.c --- lttng-modules-2.7.1/lttng-filter.c 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/lttng-filter.c 2016-05-20 19:51:59.000000000 +0000 @@ -23,7 +23,7 @@ #include #include -#include "lttng-filter.h" +#include static const char *opnames[] = { [ FILTER_OP_UNKNOWN ] = "UNKNOWN", diff -Nru lttng-modules-2.7.1/lttng-filter.h lttng-modules-2.8.0/lttng-filter.h --- lttng-modules-2.7.1/lttng-filter.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lttng-filter.h 2016-05-20 01:34:54.000000000 +0000 @@ -25,8 +25,8 @@ #include -#include "lttng-events.h" -#include "filter-bytecode.h" +#include +#include /* Filter stack length, in number of entries */ #define FILTER_STACK_LEN 10 /* includes 2 dummy */ @@ -139,19 +139,19 @@ #define estack_ax(stack, top) \ ({ \ - WARN_ON_ONCE((top) <= FILTER_STACK_EMPTY); \ + BUG_ON((top) <= FILTER_STACK_EMPTY); \ &(stack)->e[top]; \ }) #define estack_bx(stack, top) \ ({ \ - WARN_ON_ONCE((top) <= FILTER_STACK_EMPTY + 1); \ + BUG_ON((top) <= FILTER_STACK_EMPTY + 1); \ &(stack)->e[(top) - 1]; \ }) #define estack_push(stack, top, ax, bx) \ do { \ - WARN_ON_ONCE((top) >= FILTER_STACK_LEN - 1); \ + BUG_ON((top) >= FILTER_STACK_LEN - 1); \ (stack)->e[(top) - 1].u.v = (bx); \ (bx) = (ax); \ ++(top); \ @@ -159,7 +159,7 @@ #define estack_pop(stack, top, ax, bx) \ do { \ - WARN_ON_ONCE((top) <= FILTER_STACK_EMPTY); \ + BUG_ON((top) <= FILTER_STACK_EMPTY); \ (ax) = (bx); \ (bx) = (stack)->e[(top) - 2].u.v; \ (top)--; \ @@ -171,8 +171,10 @@ int lttng_filter_specialize_bytecode(struct bytecode_runtime *bytecode); uint64_t lttng_filter_false(void *filter_data, + struct lttng_probe_ctx *lttng_probe_ctx, const char *filter_stack_data); uint64_t lttng_filter_interpret_bytecode(void *filter_data, + struct lttng_probe_ctx *lttng_probe_ctx, const char *filter_stack_data); #endif /* _LTTNG_FILTER_H */ diff -Nru lttng-modules-2.7.1/lttng-filter-interpreter.c lttng-modules-2.8.0/lttng-filter-interpreter.c --- lttng-modules-2.7.1/lttng-filter-interpreter.c 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lttng-filter-interpreter.c 2016-05-20 01:34:54.000000000 +0000 @@ -22,7 +22,7 @@ #include -#include "lttng-filter.h" +#include /* * get_char should be called with page fault handler disabled if it is expected @@ -119,21 +119,16 @@ } } if (unlikely(char_ax == '\0')) { - if (char_bx == '\0') { - diff = 0; - break; - } else { - if (estack_bx(stack, top)->u.s.literal) { - ret = parse_char(estack_bx(stack, top), - &char_bx, &offset_bx); - if (ret == -1) { - diff = 0; - break; - } + if (estack_bx(stack, top)->u.s.literal) { + ret = parse_char(estack_bx(stack, top), + &char_bx, &offset_bx); + if (ret == -1) { + diff = 0; + break; } - diff = 1; - break; } + diff = 1; + break; } if (estack_bx(stack, top)->u.s.literal) { ret = parse_char(estack_bx(stack, top), @@ -183,6 +178,7 @@ } uint64_t lttng_filter_false(void *filter_data, + struct lttng_probe_ctx *lttng_probe_ctx, const char *filter_stack_data) { return 0; @@ -240,6 +236,7 @@ * effect. */ uint64_t lttng_filter_interpret_bytecode(void *filter_data, + struct lttng_probe_ctx *lttng_probe_ctx, const char *filter_stack_data) { struct bytecode_runtime *bytecode = filter_data; @@ -766,7 +763,7 @@ dbg_printk("get context ref offset %u type string\n", ref->offset); ctx_field = <tng_static_ctx->fields[ref->offset]; - ctx_field->get_value(ctx_field, &v); + ctx_field->get_value(ctx_field, lttng_probe_ctx, &v); estack_push(stack, top, ax, bx); estack_ax(stack, top)->u.s.str = v.str; if (unlikely(!estack_ax(stack, top)->u.s.str)) { @@ -792,7 +789,7 @@ dbg_printk("get context ref offset %u type s64\n", ref->offset); ctx_field = <tng_static_ctx->fields[ref->offset]; - ctx_field->get_value(ctx_field, &v); + ctx_field->get_value(ctx_field, lttng_probe_ctx, &v); estack_push(stack, top, ax, bx); estack_ax_v = v.s64; dbg_printk("ref get context s64 %lld\n", @@ -816,7 +813,7 @@ dbg_printk("load field ref offset %u type user string\n", ref->offset); estack_push(stack, top, ax, bx); - estack_ax(stack, top)->u.s.str = + estack_ax(stack, top)->u.s.user_str = *(const char * const *) &filter_stack_data[ref->offset]; if (unlikely(!estack_ax(stack, top)->u.s.str)) { dbg_printk("Filter warning: loading a NULL string.\n"); @@ -841,7 +838,7 @@ estack_push(stack, top, ax, bx); estack_ax(stack, top)->u.s.seq_len = *(unsigned long *) &filter_stack_data[ref->offset]; - estack_ax(stack, top)->u.s.str = + estack_ax(stack, top)->u.s.user_str = *(const char **) (&filter_stack_data[ref->offset + sizeof(unsigned long)]); if (unlikely(!estack_ax(stack, top)->u.s.str)) { diff -Nru lttng-modules-2.7.1/lttng-filter-specialize.c lttng-modules-2.8.0/lttng-filter-specialize.c --- lttng-modules-2.7.1/lttng-filter-specialize.c 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/lttng-filter-specialize.c 2016-05-20 01:34:54.000000000 +0000 @@ -20,7 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "lttng-filter.h" +#include int lttng_filter_specialize_bytecode(struct bytecode_runtime *bytecode) { diff -Nru lttng-modules-2.7.1/lttng-filter-validator.c lttng-modules-2.8.0/lttng-filter-validator.c --- lttng-modules-2.7.1/lttng-filter-validator.c 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/lttng-filter-validator.c 2016-05-20 01:34:54.000000000 +0000 @@ -24,8 +24,8 @@ #include #include -#include "wrapper/list.h" -#include "lttng-filter.h" +#include +#include #define MERGE_POINT_TABLE_BITS 7 #define MERGE_POINT_TABLE_SIZE (1U << MERGE_POINT_TABLE_BITS) @@ -166,7 +166,7 @@ */ static int bytecode_validate_overflow(struct bytecode_runtime *bytecode, - void *start_pc, void *pc) + char *start_pc, char *pc) { int ret = 0; @@ -387,8 +387,8 @@ static int validate_instruction_context(struct bytecode_runtime *bytecode, struct vstack *stack, - void *start_pc, - void *pc) + char *start_pc, + char *pc) { int ret = 0; @@ -724,8 +724,8 @@ int validate_instruction_all_contexts(struct bytecode_runtime *bytecode, struct mp_table *mp_table, struct vstack *stack, - void *start_pc, - void *pc) + char *start_pc, + char *pc) { int ret, found = 0; unsigned long target_pc = pc - start_pc; @@ -773,11 +773,11 @@ int exec_insn(struct bytecode_runtime *bytecode, struct mp_table *mp_table, struct vstack *stack, - void **_next_pc, - void *pc) + char **_next_pc, + char *pc) { int ret = 1; - void *next_pc = *_next_pc; + char *next_pc = *_next_pc; switch (*(filter_opcode_t *) pc) { case FILTER_OP_UNKNOWN: @@ -1017,7 +1017,7 @@ int lttng_filter_validate_bytecode(struct bytecode_runtime *bytecode) { struct mp_table *mp_table; - void *pc, *next_pc, *start_pc; + char *pc, *next_pc, *start_pc; int ret = -EINVAL; struct vstack stack; diff -Nru lttng-modules-2.7.1/lttng-kernel-version.h lttng-modules-2.8.0/lttng-kernel-version.h --- lttng-modules-2.7.1/lttng-kernel-version.h 2015-10-24 07:33:20.000000000 +0000 +++ lttng-modules-2.8.0/lttng-kernel-version.h 2016-05-20 01:34:50.000000000 +0000 @@ -39,6 +39,8 @@ (LINUX_VERSION_CODE >= KERNEL_VERSION(a_low, b_low, c_low) && \ LINUX_VERSION_CODE < KERNEL_VERSION(a_high, b_high, c_high)) +/* Ubuntu */ + #define LTTNG_UBUNTU_KERNEL_VERSION(a, b, c, d) \ (((a) << 24) + ((b) << 16) + ((c) << 8) + (d)) @@ -56,6 +58,8 @@ LTTNG_UBUNTU_VERSION_CODE < \ LTTNG_UBUNTU_KERNEL_VERSION(a_high, b_high, c_high, d_high)) +/* Debian */ + #define LTTNG_DEBIAN_KERNEL_VERSION(a, b, c, d, e, f) \ (((((a) << 16) + ((b) << 8) + (c)) * 1000000ULL) + ((d) * 10000) + ((e) * 100) + (f)) @@ -73,21 +77,42 @@ LTTNG_DEBIAN_VERSION_CODE < \ LTTNG_DEBIAN_KERNEL_VERSION(a_high, b_high, c_high, d_high, e_high, f_high)) -#define LTTNG_RHEL_KERNEL_VERSION(a, b, c, d, e) \ - (((a) * (1ULL << 32)) + ((b) << 24) + ((c) << 16) + ((d) << 8) + (e)) +#define LTTNG_RHEL_KERNEL_VERSION(a, b, c, d, e, f) \ + (((((a) << 16) + ((b) << 8) + (c)) * 10000000ULL) + ((d) * 10000) + ((e) * 100) + (f)) + +/* RHEL */ -#ifdef RHEL_RELEASE_CODE +#ifdef RHEL_API_VERSION #define LTTNG_RHEL_VERSION_CODE \ - ((LINUX_VERSION_CODE * (1ULL << 16)) + RHEL_RELEASE_CODE) + ((LINUX_VERSION_CODE * 10000000ULL) + RHEL_API_VERSION) #else #define LTTNG_RHEL_VERSION_CODE 0 #endif -#define LTTNG_RHEL_KERNEL_RANGE(a_low, b_low, c_low, d_low, e_low, \ - a_high, b_high, c_high, d_high, e_high) \ +#define LTTNG_RHEL_KERNEL_RANGE(a_low, b_low, c_low, d_low, e_low, f_low, \ + a_high, b_high, c_high, d_high, e_high, f_high) \ (LTTNG_RHEL_VERSION_CODE >= \ - LTTNG_RHEL_KERNEL_VERSION(a_low, b_low, c_low, d_low, e_low) && \ + LTTNG_RHEL_KERNEL_VERSION(a_low, b_low, c_low, d_low, e_low, f_low) && \ LTTNG_RHEL_VERSION_CODE < \ - LTTNG_RHEL_KERNEL_VERSION(a_high, b_high, c_high, d_high, e_high)) + LTTNG_RHEL_KERNEL_VERSION(a_high, b_high, c_high, d_high, e_high, f_high)) + +/* RT patch */ + +#define LTTNG_RT_KERNEL_VERSION(a, b, c, d) \ + (((a) << 24) + ((b) << 16) + ((c) << 8) + (d)) + +#ifdef RT_PATCH_VERSION +#define LTTNG_RT_VERSION_CODE \ + ((LINUX_VERSION_CODE << 8) + RT_PATCH_VERSION) +#else +#define LTTNG_RT_VERSION_CODE 0 +#endif + +#define LTTNG_RT_KERNEL_RANGE(a_low, b_low, c_low, d_low, \ + a_high, b_high, c_high, d_high) \ + (LTTNG_RT_VERSION_CODE >= \ + LTTNG_RT_KERNEL_VERSION(a_low, b_low, c_low, d_low) && \ + LTTNG_RT_VERSION_CODE < \ + LTTNG_RT_KERNEL_VERSION(a_high, b_high, c_high, d_high)) #endif /* _LTTNG_KERNEL_VERSION_H */ diff -Nru lttng-modules-2.7.1/lttng-probes.c lttng-modules-2.8.0/lttng-probes.c --- lttng-modules-2.7.1/lttng-probes.c 2015-12-05 10:06:26.000000000 +0000 +++ lttng-modules-2.8.0/lttng-probes.c 2016-05-20 19:51:59.000000000 +0000 @@ -25,7 +25,7 @@ #include #include -#include "lttng-events.h" +#include /* * probe list is protected by sessions lock. diff -Nru lttng-modules-2.7.1/lttng-ring-buffer-client-discard.c lttng-modules-2.8.0/lttng-ring-buffer-client-discard.c --- lttng-modules-2.7.1/lttng-ring-buffer-client-discard.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/lttng-ring-buffer-client-discard.c 2016-05-20 01:34:54.000000000 +0000 @@ -21,7 +21,7 @@ */ #include -#include "lttng-tracer.h" +#include #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_DISCARD #define RING_BUFFER_MODE_TEMPLATE_STRING "discard" diff -Nru lttng-modules-2.7.1/lttng-ring-buffer-client.h lttng-modules-2.8.0/lttng-ring-buffer-client.h --- lttng-modules-2.7.1/lttng-ring-buffer-client.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lttng-ring-buffer-client.h 2016-05-20 01:34:54.000000000 +0000 @@ -22,12 +22,12 @@ #include #include -#include "lib/bitfield.h" -#include "wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */ -#include "wrapper/trace-clock.h" -#include "lttng-events.h" -#include "lttng-tracer.h" -#include "wrapper/ringbuffer/frontend_types.h" +#include +#include /* for wrapper_vmalloc_sync_all() */ +#include +#include +#include +#include #define LTTNG_COMPACT_EVENT_BITS 5 #define LTTNG_COMPACT_TSC_BITS 27 @@ -57,6 +57,7 @@ */ uint8_t uuid[16]; uint32_t stream_id; + uint64_t stream_instance_id; struct { /* Stream packet context */ @@ -64,6 +65,7 @@ uint64_t timestamp_end; /* Cycle count at subbuffer end */ uint64_t content_size; /* Size of data in subbuffer */ uint64_t packet_size; /* Subbuffer size (include padding) */ + uint64_t packet_seq_num; /* Packet sequence number */ unsigned long events_discarded; /* * Events lost in this subbuffer since * the beginning of the trace. @@ -128,7 +130,8 @@ struct lib_ring_buffer_ctx *ctx) { struct lttng_channel *lttng_chan = channel_get_private(chan); - struct lttng_event *event = ctx->priv; + struct lttng_probe_ctx *lttng_probe_ctx = ctx->priv; + struct lttng_event *event = lttng_probe_ctx->event; size_t orig_offset = offset; size_t padding; @@ -167,14 +170,14 @@ padding = 0; WARN_ON_ONCE(1); } - offset += ctx_get_size(offset, event->ctx); offset += ctx_get_size(offset, lttng_chan->ctx); + offset += ctx_get_size(offset, event->ctx); *pre_header_padding = padding; return offset - orig_offset; } -#include "wrapper/ringbuffer/api.h" +#include static void lttng_write_event_header_slow(const struct lib_ring_buffer_config *config, @@ -196,7 +199,8 @@ uint32_t event_id) { struct lttng_channel *lttng_chan = channel_get_private(ctx->chan); - struct lttng_event *event = ctx->priv; + struct lttng_probe_ctx *lttng_probe_ctx = ctx->priv; + struct lttng_event *event = lttng_probe_ctx->event; if (unlikely(ctx->rflags)) goto slow_path; @@ -247,7 +251,8 @@ uint32_t event_id) { struct lttng_channel *lttng_chan = channel_get_private(ctx->chan); - struct lttng_event *event = ctx->priv; + struct lttng_probe_ctx *lttng_probe_ctx = ctx->priv; + struct lttng_event *event = lttng_probe_ctx->event; switch (lttng_chan->header_type) { case 1: /* compact */ @@ -351,10 +356,14 @@ header->magic = CTF_MAGIC_NUMBER; memcpy(header->uuid, session->uuid.b, sizeof(session->uuid)); header->stream_id = lttng_chan->id; + header->stream_instance_id = buf->backend.cpu; header->ctx.timestamp_begin = tsc; header->ctx.timestamp_end = 0; header->ctx.content_size = ~0ULL; /* for debugging */ header->ctx.packet_size = ~0ULL; + header->ctx.packet_seq_num = chan->backend.num_subbuf * \ + buf->backend.buf_cnt[subbuf_idx].seq_cnt + \ + subbuf_idx; header->ctx.events_discarded = 0; header->ctx.cpu_id = buf->backend.cpu; } @@ -470,6 +479,28 @@ return 0; } +static int client_sequence_number(const struct lib_ring_buffer_config *config, + struct lib_ring_buffer *buf, + uint64_t *seq) +{ + struct packet_header *header = client_packet_header(config, buf); + + *seq = header->ctx.packet_seq_num; + + return 0; +} + +static +int client_instance_id(const struct lib_ring_buffer_config *config, + struct lib_ring_buffer *buf, + uint64_t *id) +{ + struct packet_header *header = client_packet_header(config, buf); + *id = header->stream_instance_id; + + return 0; +} + static const struct lib_ring_buffer_config client_config = { .cb.ring_buffer_clock_read = client_ring_buffer_clock_read, .cb.record_header_size = client_record_header_size, @@ -700,6 +731,8 @@ .packet_size = client_packet_size, .stream_id = client_stream_id, .current_timestamp = client_current_timestamp, + .sequence_number = client_sequence_number, + .instance_id = client_instance_id, }, }; diff -Nru lttng-modules-2.7.1/lttng-ring-buffer-client-mmap-discard.c lttng-modules-2.8.0/lttng-ring-buffer-client-mmap-discard.c --- lttng-modules-2.7.1/lttng-ring-buffer-client-mmap-discard.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/lttng-ring-buffer-client-mmap-discard.c 2016-05-20 01:34:54.000000000 +0000 @@ -21,7 +21,7 @@ */ #include -#include "lttng-tracer.h" +#include #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_DISCARD #define RING_BUFFER_MODE_TEMPLATE_STRING "discard-mmap" diff -Nru lttng-modules-2.7.1/lttng-ring-buffer-client-mmap-overwrite.c lttng-modules-2.8.0/lttng-ring-buffer-client-mmap-overwrite.c --- lttng-modules-2.7.1/lttng-ring-buffer-client-mmap-overwrite.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/lttng-ring-buffer-client-mmap-overwrite.c 2016-05-20 01:34:54.000000000 +0000 @@ -21,7 +21,7 @@ */ #include -#include "lttng-tracer.h" +#include #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_OVERWRITE #define RING_BUFFER_MODE_TEMPLATE_STRING "overwrite-mmap" diff -Nru lttng-modules-2.7.1/lttng-ring-buffer-client-overwrite.c lttng-modules-2.8.0/lttng-ring-buffer-client-overwrite.c --- lttng-modules-2.7.1/lttng-ring-buffer-client-overwrite.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/lttng-ring-buffer-client-overwrite.c 2016-05-20 01:34:54.000000000 +0000 @@ -21,7 +21,7 @@ */ #include -#include "lttng-tracer.h" +#include #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_OVERWRITE #define RING_BUFFER_MODE_TEMPLATE_STRING "overwrite" diff -Nru lttng-modules-2.7.1/lttng-ring-buffer-metadata-client.c lttng-modules-2.8.0/lttng-ring-buffer-metadata-client.c --- lttng-modules-2.7.1/lttng-ring-buffer-metadata-client.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/lttng-ring-buffer-metadata-client.c 2016-05-20 01:34:54.000000000 +0000 @@ -21,7 +21,7 @@ */ #include -#include "lttng-tracer.h" +#include #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_DISCARD #define RING_BUFFER_MODE_TEMPLATE_STRING "metadata" diff -Nru lttng-modules-2.7.1/lttng-ring-buffer-metadata-client.h lttng-modules-2.8.0/lttng-ring-buffer-metadata-client.h --- lttng-modules-2.7.1/lttng-ring-buffer-metadata-client.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lttng-ring-buffer-metadata-client.h 2016-05-20 01:34:54.000000000 +0000 @@ -22,9 +22,9 @@ #include #include -#include "wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */ -#include "lttng-events.h" -#include "lttng-tracer.h" +#include /* for wrapper_vmalloc_sync_all() */ +#include +#include static struct lttng_transport lttng_relay_transport; @@ -63,7 +63,7 @@ return 0; } -#include "wrapper/ringbuffer/api.h" +#include static u64 client_ring_buffer_clock_read(struct channel *chan) { @@ -199,6 +199,21 @@ return -ENOSYS; } +static int client_sequence_number(const struct lib_ring_buffer_config *config, + struct lib_ring_buffer *bufb, + uint64_t *seq) +{ + return -ENOSYS; +} + +static +int client_instance_id(const struct lib_ring_buffer_config *config, + struct lib_ring_buffer *bufb, + uint64_t *id) +{ + return -ENOSYS; +} + static const struct lib_ring_buffer_config client_config = { .cb.ring_buffer_clock_read = client_ring_buffer_clock_read, .cb.record_header_size = client_record_header_size, @@ -405,6 +420,8 @@ .packet_size = client_packet_size, .stream_id = client_stream_id, .current_timestamp = client_current_timestamp, + .sequence_number = client_sequence_number, + .instance_id = client_instance_id, }, }; diff -Nru lttng-modules-2.7.1/lttng-ring-buffer-metadata-mmap-client.c lttng-modules-2.8.0/lttng-ring-buffer-metadata-mmap-client.c --- lttng-modules-2.7.1/lttng-ring-buffer-metadata-mmap-client.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/lttng-ring-buffer-metadata-mmap-client.c 2016-05-20 01:34:54.000000000 +0000 @@ -21,7 +21,7 @@ */ #include -#include "lttng-tracer.h" +#include #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_DISCARD #define RING_BUFFER_MODE_TEMPLATE_STRING "metadata-mmap" diff -Nru lttng-modules-2.7.1/lttng-statedump-impl.c lttng-modules-2.8.0/lttng-statedump-impl.c --- lttng-modules-2.7.1/lttng-statedump-impl.c 2015-10-24 07:33:20.000000000 +0000 +++ lttng-modules-2.8.0/lttng-statedump-impl.c 2016-05-20 01:34:54.000000000 +0000 @@ -47,17 +47,17 @@ #include #include -#include "lttng-events.h" -#include "lttng-tracer.h" -#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" -#include "wrapper/file.h" -#include "wrapper/time.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifdef CONFIG_LTTNG_HAS_LIST_IRQ #include @@ -65,10 +65,10 @@ /* Define the tracepoints, but do not build the probes */ #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module #define TRACE_INCLUDE_FILE lttng-statedump #define LTTNG_INSTRUMENTATION -#include "instrumentation/events/lttng-module/lttng-statedump.h" +#include DEFINE_TRACE(lttng_statedump_block_device); DEFINE_TRACE(lttng_statedump_end); @@ -403,7 +403,8 @@ */ #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_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(); @@ -422,7 +423,8 @@ } #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_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(); diff -Nru lttng-modules-2.7.1/lttng-syscalls.c lttng-modules-2.8.0/lttng-syscalls.c --- lttng-modules-2.7.1/lttng-syscalls.c 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/lttng-syscalls.c 2016-05-20 19:51:59.000000000 +0000 @@ -34,11 +34,11 @@ #include #include -#include "lib/bitfield.h" -#include "wrapper/tracepoint.h" -#include "wrapper/file.h" -#include "wrapper/rcu.h" -#include "lttng-events.h" +#include +#include +#include +#include +#include #ifndef CONFIG_COMPAT # ifndef is_compat_task @@ -46,6 +46,11 @@ # endif #endif +/* in_compat_syscall appears in kernel 4.6. */ +#ifndef in_compat_syscall + #define in_compat_syscall() is_compat_task() +#endif + enum sc_type { SC_TYPE_ENTRY, SC_TYPE_EXIT, @@ -78,6 +83,7 @@ struct sel_arg_struct; struct mmap_arg_struct; struct file_handle; +struct user_msghdr; #ifdef IA32_NR_syscalls #define NR_compat_syscalls IA32_NR_syscalls @@ -91,14 +97,14 @@ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS #define TP_MODULE_NOINIT -#define TRACE_INCLUDE_PATH ../instrumentation/syscalls/headers +#define TRACE_INCLUDE_PATH instrumentation/syscalls/headers #define PARAMS(args...) args /* Handle unknown syscalls */ #undef TRACE_SYSTEM #define TRACE_SYSTEM syscalls_unknown -#include "instrumentation/syscalls/headers/syscalls_unknown.h" +#include #undef TRACE_SYSTEM #define SC_ENTER @@ -118,10 +124,10 @@ #define SC_LTTNG_TRACEPOINT_EVENT(_name, _proto, _args, _fields) \ LTTNG_TRACEPOINT_EVENT(syscall_entry_##_name, PARAMS(_proto), PARAMS(_args), \ PARAMS(_fields)) -#define SC_LTTNG_TRACEPOINT_EVENT_CODE(_name, _proto, _args, _locvar, _code, _fields) \ +#define SC_LTTNG_TRACEPOINT_EVENT_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post) \ LTTNG_TRACEPOINT_EVENT_CODE(syscall_entry_##_name, PARAMS(_proto), PARAMS(_args), \ - PARAMS(_locvar), PARAMS(_code), \ - PARAMS(_fields)) + PARAMS(_locvar), PARAMS(_code_pre), \ + PARAMS(_fields), PARAMS(_code_post)) #define SC_LTTNG_TRACEPOINT_EVENT_CLASS_NOARGS(_name, _fields) \ LTTNG_TRACEPOINT_EVENT_CLASS_NOARGS(syscall_entry_##_name, PARAMS(_fields)) #define SC_LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(_template, _name) \ @@ -129,12 +135,12 @@ #undef TRACE_SYSTEM #define TRACE_SYSTEM syscall_entry_integers #define TRACE_INCLUDE_FILE syscalls_integers -#include "instrumentation/syscalls/headers/syscalls_integers.h" +#include #undef TRACE_INCLUDE_FILE #undef TRACE_SYSTEM #define TRACE_SYSTEM syscall_entry_pointers #define TRACE_INCLUDE_FILE syscalls_pointers -#include "instrumentation/syscalls/headers/syscalls_pointers.h" +#include #undef TRACE_INCLUDE_FILE #undef TRACE_SYSTEM #undef SC_LTTNG_TRACEPOINT_EVENT_CODE @@ -150,9 +156,9 @@ #define SC_LTTNG_TRACEPOINT_EVENT(_name, _proto, _args, _fields) \ LTTNG_TRACEPOINT_EVENT(compat_syscall_entry_##_name, PARAMS(_proto), PARAMS(_args), \ PARAMS(_fields)) -#define SC_LTTNG_TRACEPOINT_EVENT_CODE(_name, _proto, _args, _locvar, _code, _fields) \ +#define SC_LTTNG_TRACEPOINT_EVENT_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post) \ LTTNG_TRACEPOINT_EVENT_CODE(compat_syscall_entry_##_name, PARAMS(_proto), PARAMS(_args), \ - PARAMS(_locvar), PARAMS(_code), PARAMS(_fields)) + PARAMS(_locvar), PARAMS(_code_pre), PARAMS(_fields), PARAMS(_code_post)) #define SC_LTTNG_TRACEPOINT_EVENT_CLASS_NOARGS(_name, _fields) \ LTTNG_TRACEPOINT_EVENT_CLASS_NOARGS(compat_syscall_entry_##_name, PARAMS(_fields)) #define SC_LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(_template, _name) \ @@ -160,12 +166,12 @@ compat_syscall_entry_##_name) #define TRACE_SYSTEM compat_syscall_entry_integers #define TRACE_INCLUDE_FILE compat_syscalls_integers -#include "instrumentation/syscalls/headers/compat_syscalls_integers.h" +#include #undef TRACE_INCLUDE_FILE #undef TRACE_SYSTEM #define TRACE_SYSTEM compat_syscall_entry_pointers #define TRACE_INCLUDE_FILE compat_syscalls_pointers -#include "instrumentation/syscalls/headers/compat_syscalls_pointers.h" +#include #undef TRACE_INCLUDE_FILE #undef TRACE_SYSTEM #undef SC_LTTNG_TRACEPOINT_EVENT_CODE @@ -194,9 +200,9 @@ #define SC_LTTNG_TRACEPOINT_EVENT(_name, _proto, _args, _fields) \ LTTNG_TRACEPOINT_EVENT(syscall_exit_##_name, PARAMS(_proto), PARAMS(_args), \ PARAMS(_fields)) -#define SC_LTTNG_TRACEPOINT_EVENT_CODE(_name, _proto, _args, _locvar, _code, _fields) \ +#define SC_LTTNG_TRACEPOINT_EVENT_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post) \ LTTNG_TRACEPOINT_EVENT_CODE(syscall_exit_##_name, PARAMS(_proto), PARAMS(_args), \ - PARAMS(_locvar), PARAMS(_code), PARAMS(_fields)) + PARAMS(_locvar), PARAMS(_code_pre), PARAMS(_fields), PARAMS(_code_post)) #define SC_LTTNG_TRACEPOINT_EVENT_CLASS_NOARGS(_name, _fields) \ LTTNG_TRACEPOINT_EVENT_CLASS_NOARGS(syscall_exit_##_name, PARAMS(_fields)) #define SC_LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(_template, _name) \ @@ -204,12 +210,12 @@ syscall_exit_##_name) #define TRACE_SYSTEM syscall_exit_integers #define TRACE_INCLUDE_FILE syscalls_integers -#include "instrumentation/syscalls/headers/syscalls_integers.h" +#include #undef TRACE_INCLUDE_FILE #undef TRACE_SYSTEM #define TRACE_SYSTEM syscall_exit_pointers #define TRACE_INCLUDE_FILE syscalls_pointers -#include "instrumentation/syscalls/headers/syscalls_pointers.h" +#include #undef TRACE_INCLUDE_FILE #undef TRACE_SYSTEM #undef SC_LTTNG_TRACEPOINT_EVENT_CODE @@ -226,9 +232,9 @@ #define SC_LTTNG_TRACEPOINT_EVENT(_name, _proto, _args, _fields) \ LTTNG_TRACEPOINT_EVENT(compat_syscall_exit_##_name, PARAMS(_proto), PARAMS(_args), \ PARAMS(_fields)) -#define SC_LTTNG_TRACEPOINT_EVENT_CODE(_name, _proto, _args, _locvar, _code, _fields) \ +#define SC_LTTNG_TRACEPOINT_EVENT_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post) \ LTTNG_TRACEPOINT_EVENT_CODE(compat_syscall_exit_##_name, PARAMS(_proto), PARAMS(_args), \ - PARAMS(_locvar), PARAMS(_code), PARAMS(_fields)) + PARAMS(_locvar), PARAMS(_code_pre), PARAMS(_fields), PARAMS(_code_post)) #define SC_LTTNG_TRACEPOINT_EVENT_CLASS_NOARGS(_name, _fields) \ LTTNG_TRACEPOINT_EVENT_CLASS_NOARGS(compat_syscall_exit_##_name, PARAMS(_fields)) #define SC_LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(_template, _name) \ @@ -236,12 +242,12 @@ compat_syscall_exit_##_name) #define TRACE_SYSTEM compat_syscall_exit_integers #define TRACE_INCLUDE_FILE compat_syscalls_integers -#include "instrumentation/syscalls/headers/compat_syscalls_integers.h" +#include #undef TRACE_INCLUDE_FILE #undef TRACE_SYSTEM #define TRACE_SYSTEM compat_syscall_exit_pointers #define TRACE_INCLUDE_FILE compat_syscalls_pointers -#include "instrumentation/syscalls/headers/compat_syscalls_pointers.h" +#include #undef TRACE_INCLUDE_FILE #undef TRACE_SYSTEM #undef SC_LTTNG_TRACEPOINT_EVENT_CODE @@ -283,8 +289,8 @@ /* Syscall enter tracing table */ static const struct trace_syscall_entry sc_table[] = { -#include "instrumentation/syscalls/headers/syscalls_integers.h" -#include "instrumentation/syscalls/headers/syscalls_pointers.h" +#include +#include }; #undef TRACE_SYSCALL_TABLE @@ -298,8 +304,8 @@ /* Compat syscall enter table */ const struct trace_syscall_entry compat_sc_table[] = { -#include "instrumentation/syscalls/headers/compat_syscalls_integers.h" -#include "instrumentation/syscalls/headers/compat_syscalls_pointers.h" +#include +#include }; #undef SC_ENTER @@ -320,8 +326,8 @@ /* Syscall exit table */ static const struct trace_syscall_entry sc_exit_table[] = { -#include "instrumentation/syscalls/headers/syscalls_integers.h" -#include "instrumentation/syscalls/headers/syscalls_pointers.h" +#include +#include }; #undef TRACE_SYSCALL_TABLE @@ -335,8 +341,8 @@ /* Compat syscall exit table */ const struct trace_syscall_entry compat_sc_exit_table[] = { -#include "instrumentation/syscalls/headers/compat_syscalls_integers.h" -#include "instrumentation/syscalls/headers/compat_syscalls_pointers.h" +#include +#include }; #undef SC_EXIT @@ -354,7 +360,7 @@ unsigned long args[UNKNOWN_SYSCALL_NRARGS]; syscall_get_arguments(current, regs, 0, UNKNOWN_SYSCALL_NRARGS, args); - if (unlikely(is_compat_task())) + if (unlikely(in_compat_syscall())) __event_probe__compat_syscall_entry_unknown(event, id, args); else __event_probe__syscall_entry_unknown(event, id, args); @@ -367,7 +373,7 @@ const struct trace_syscall_entry *table, *entry; size_t table_len; - if (unlikely(is_compat_task())) { + if (unlikely(in_compat_syscall())) { struct lttng_syscall_filter *filter; filter = lttng_rcu_dereference(chan->sc_filter); @@ -400,7 +406,7 @@ syscall_entry_unknown(unknown_event, regs, id); return; } - if (unlikely(is_compat_task())) + if (unlikely(in_compat_syscall())) event = chan->compat_sc_table[id]; else event = chan->sc_table[id]; @@ -505,7 +511,7 @@ unsigned long args[UNKNOWN_SYSCALL_NRARGS]; syscall_get_arguments(current, regs, 0, UNKNOWN_SYSCALL_NRARGS, args); - if (unlikely(is_compat_task())) + if (unlikely(in_compat_syscall())) __event_probe__compat_syscall_exit_unknown(event, id, ret, args); else @@ -521,7 +527,7 @@ long id; id = syscall_get_nr(current, regs); - if (unlikely(is_compat_task())) { + if (unlikely(in_compat_syscall())) { struct lttng_syscall_filter *filter; filter = lttng_rcu_dereference(chan->sc_filter); @@ -554,7 +560,7 @@ syscall_exit_unknown(unknown_event, regs, id, ret); return; } - if (unlikely(is_compat_task())) + if (unlikely(in_compat_syscall())) event = chan->compat_sc_exit_table[id]; else event = chan->sc_exit_table[id]; diff -Nru lttng-modules-2.7.1/lttng-tracepoint.c lttng-modules-2.8.0/lttng-tracepoint.c --- lttng-modules-2.7.1/lttng-tracepoint.c 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/lttng-tracepoint.c 2016-05-20 01:34:54.000000000 +0000 @@ -28,8 +28,8 @@ #include #include -#include "lttng-tracepoint.h" -#include "wrapper/list.h" +#include +#include /* * Protect the tracepoint table. lttng_tracepoint_mutex nests within diff -Nru lttng-modules-2.7.1/lttng-tracer-core.h lttng-modules-2.8.0/lttng-tracer-core.h --- lttng-modules-2.7.1/lttng-tracer-core.h 2014-12-01 22:24:28.000000000 +0000 +++ lttng-modules-2.8.0/lttng-tracer-core.h 2016-05-20 01:34:54.000000000 +0000 @@ -32,7 +32,7 @@ #define RING_BUFFER_ALIGN #endif -#include "wrapper/ringbuffer/config.h" +#include struct lttng_session; struct lttng_channel; diff -Nru lttng-modules-2.7.1/lttng-tracer.h lttng-modules-2.8.0/lttng-tracer.h --- lttng-modules-2.7.1/lttng-tracer.h 2016-01-05 18:34:48.000000000 +0000 +++ lttng-modules-2.8.0/lttng-tracer.h 2016-05-20 20:06:55.000000000 +0000 @@ -34,19 +34,18 @@ #include #include -#include "wrapper/trace-clock.h" -#include "wrapper/compiler.h" -#include "lttng-tracer-core.h" -#include "lttng-events.h" +#include +#include +#include +#include #define LTTNG_MODULES_MAJOR_VERSION 2 -#define LTTNG_MODULES_MINOR_VERSION 7 -#define LTTNG_MODULES_PATCHLEVEL_VERSION 1 +#define LTTNG_MODULES_MINOR_VERSION 8 +#define LTTNG_MODULES_PATCHLEVEL_VERSION 0 #define LTTNG_MODULES_EXTRAVERSION "" -#define LTTNG_VERSION_NAME "Herbe à Détourne" -#define LTTNG_VERSION_DESCRIPTION \ - "Brewed with unrestrained amounts of Citra hop, the Herbe à Détourne is a fantastic New World Tripel brewed by \"Dieu du Ciel!\". Aromas of mango, cantaloupe melon and passion fruit, combined with a controlled bitter finish, unite in making this smooth golden-orange beer stand apart." +#define LTTNG_VERSION_NAME "Isseki Nicho" +#define LTTNG_VERSION_DESCRIPTION "The result of a collaboration between \"Dieu du Ciel!\" and Nagano-based \"Shiga Kogen\", Isseki Nicho is a strong Imperial Dark Saison offering a rich roasted malt flavor combined with a complex fruity finish typical of Saison yeasts." #ifndef CHAR_BIT #define CHAR_BIT 8 diff -Nru lttng-modules-2.7.1/lttng-tracker-pid.c lttng-modules-2.8.0/lttng-tracker-pid.c --- lttng-modules-2.7.1/lttng-tracker-pid.c 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/lttng-tracker-pid.c 2016-05-20 01:34:54.000000000 +0000 @@ -28,10 +28,10 @@ #include #include -#include "wrapper/tracepoint.h" -#include "wrapper/rcu.h" -#include "wrapper/list.h" -#include "lttng-events.h" +#include +#include +#include +#include /* * Hash table is allocated and freed when there are no possible diff -Nru lttng-modules-2.7.1/Makefile lttng-modules-2.8.0/Makefile --- lttng-modules-2.7.1/Makefile 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/Makefile 2016-05-20 01:34:54.000000000 +0000 @@ -3,92 +3,119 @@ # ifneq ($(KERNELRELEASE),) -ifneq ($(CONFIG_TRACEPOINTS),) -KERNELDIR = ${LTTNG_KERNELDIR} -MAKEFILEDIR = $(shell dirname $(lastword $(MAKEFILE_LIST))) + # This part of the Makefile is used when called by the kernel build system + # and defines the modules to be built. -lttng_check_linux_version = $(shell pwd)/include/linux/version.h -lttng_check_generated_linux_version = $(shell pwd)/include/generated/uapi/linux/version.h + ifdef CONFIG_LOCALVERSION # Check if dot-config is included. + ifeq ($(CONFIG_TRACEPOINTS),) + $(error The option CONFIG_TRACEPOINTS needs to be enabled in your kernel configuration) + endif # CONFIG_TRACEPOINTS + endif # ifdef CONFIG_LOCALVERSION + + TOP_LTTNG_MODULES_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST))) + + lttng_check_linux_version = $(shell pwd)/include/linux/version.h + lttng_check_generated_linux_version = $(shell pwd)/include/generated/uapi/linux/version.h + + # + # Check for stale version.h, which can be a leftover from an old Linux + # kernel tree moved to a newer kernel version, only pruned by make + # distclean. + # + ifneq ($(wildcard $(lttng_check_linux_version)),) + ifneq ($(wildcard $(lttng_check_generated_linux_version)),) + $(error Duplicate version.h files found in $(lttng_check_linux_version) and $(lttng_check_generated_linux_version). Consider running make distclean on your kernel, or removing the stale $(lttng_check_linux_version) file) + endif + endif + + include $(TOP_LTTNG_MODULES_DIR)/Makefile.ABI.workarounds + + ccflags-y += -I$(TOP_LTTNG_MODULES_DIR) + + obj-$(CONFIG_LTTNG) += lttng-ring-buffer-client-discard.o + obj-$(CONFIG_LTTNG) += lttng-ring-buffer-client-overwrite.o + obj-$(CONFIG_LTTNG) += lttng-ring-buffer-metadata-client.o + obj-$(CONFIG_LTTNG) += lttng-ring-buffer-client-mmap-discard.o + obj-$(CONFIG_LTTNG) += lttng-ring-buffer-client-mmap-overwrite.o + obj-$(CONFIG_LTTNG) += lttng-ring-buffer-metadata-mmap-client.o + obj-$(CONFIG_LTTNG) += lttng-clock.o + + obj-$(CONFIG_LTTNG) += lttng-tracer.o + + lttng-tracer-objs := lttng-events.o lttng-abi.o \ + lttng-probes.o lttng-context.o \ + lttng-context-pid.o lttng-context-procname.o \ + lttng-context-prio.o lttng-context-nice.o \ + lttng-context-vpid.o lttng-context-tid.o \ + lttng-context-vtid.o lttng-context-ppid.o \ + lttng-context-vppid.o lttng-context-cpu-id.o \ + lttng-context-interruptible.o \ + lttng-context-need-reschedule.o lttng-calibrate.o \ + lttng-context-hostname.o wrapper/random.o \ + probes/lttng.o wrapper/trace-clock.o \ + wrapper/page_alloc.o \ + lttng-tracker-pid.o \ + lttng-filter.o lttng-filter-interpreter.o \ + lttng-filter-specialize.o \ + lttng-filter-validator.o \ + probes/lttng-probe-user.o + + ifneq ($(CONFIG_HAVE_SYSCALL_TRACEPOINTS),) + lttng-tracer-objs += lttng-syscalls.o + endif # CONFIG_HAVE_SYSCALL_TRACEPOINTS + + ifneq ($(CONFIG_PERF_EVENTS),) + lttng-tracer-objs += $(shell \ + if [ $(VERSION) -ge 3 \ + -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 33 \) ] ; then \ + echo "lttng-context-perf-counters.o" ; fi;) + endif # CONFIG_PERF_EVENTS + + ifneq ($(CONFIG_PREEMPT_RT_FULL),) + lttng-tracer-objs += lttng-context-migratable.o + lttng-tracer-objs += lttng-context-preemptible.o + endif # CONFIG_PREEMPT_RT_FULL + + ifneq ($(CONFIG_PREEMPT),) + lttng-tracer-objs += lttng-context-preemptible.o + endif + + lttng-tracer-objs += $(shell \ + if [ $(VERSION) -ge 4 \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 15 -a $(SUBLEVEL) -ge 0 \) ] ; then \ + echo "lttng-tracepoint.o" ; fi;) + + obj-$(CONFIG_LTTNG) += lttng-statedump.o + lttng-statedump-objs := lttng-statedump-impl.o wrapper/irqdesc.o \ + wrapper/fdtable.o + + obj-$(CONFIG_LTTNG) += probes/ + obj-$(CONFIG_LTTNG) += lib/ + obj-$(CONFIG_LTTNG) += tests/ +else # KERNELRELEASE -# -# Check for stale version.h, which can be a leftover from an old Linux -# kernel tree moved to a newer kernel version, only pruned by make -# distclean. -# -ifneq ($(wildcard $(lttng_check_linux_version)),) -ifneq ($(wildcard $(lttng_check_generated_linux_version)),) -$(error Duplicate version.h files found in $(lttng_check_linux_version) and $(lttng_check_generated_linux_version). Consider running make distclean on your kernel, or removing the stale $(lttng_check_linux_version) file) -endif -endif - -include $(MAKEFILEDIR)/Makefile.ABI.workarounds - -obj-m += lttng-ring-buffer-client-discard.o -obj-m += lttng-ring-buffer-client-overwrite.o -obj-m += lttng-ring-buffer-metadata-client.o -obj-m += lttng-ring-buffer-client-mmap-discard.o -obj-m += lttng-ring-buffer-client-mmap-overwrite.o -obj-m += lttng-ring-buffer-metadata-mmap-client.o - -obj-m += lttng-tracer.o -lttng-tracer-objs := lttng-events.o lttng-abi.o \ - lttng-probes.o lttng-context.o \ - lttng-context-pid.o lttng-context-procname.o \ - lttng-context-prio.o lttng-context-nice.o \ - lttng-context-vpid.o lttng-context-tid.o \ - lttng-context-vtid.o lttng-context-ppid.o \ - lttng-context-vppid.o lttng-context-cpu-id.o \ - lttng-calibrate.o \ - lttng-context-hostname.o wrapper/random.o \ - probes/lttng.o wrapper/trace-clock.o \ - wrapper/page_alloc.o \ - lttng-tracker-pid.o \ - lttng-filter.o lttng-filter-interpreter.o \ - lttng-filter-specialize.o \ - lttng-filter-validator.o \ - probes/lttng-probe-user.o - -obj-m += lttng-statedump.o -lttng-statedump-objs := lttng-statedump-impl.o wrapper/irqdesc.o \ - wrapper/fdtable.o - -ifneq ($(CONFIG_HAVE_SYSCALL_TRACEPOINTS),) -lttng-tracer-objs += lttng-syscalls.o -endif # CONFIG_HAVE_SYSCALL_TRACEPOINTS - -ifneq ($(CONFIG_PERF_EVENTS),) -lttng-tracer-objs += $(shell \ - if [ $(VERSION) -ge 3 \ - -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 33 \) ] ; then \ - echo "lttng-context-perf-counters.o" ; fi;) -endif # CONFIG_PERF_EVENTS - -lttng-tracer-objs += $(shell \ - if [ $(VERSION) -ge 4 \ - -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 15 -a $(SUBLEVEL) -ge 0 \) ] ; then \ - echo "lttng-tracepoint.o" ; fi;) - -obj-m += probes/ -obj-m += lib/ - -endif # CONFIG_TRACEPOINTS +# This part of the Makefile is used when the 'make' command is runned in the +# base directory of the lttng-modules sources. It sets some environment and +# calls the kernel build system to build the actual modules. + +KERNELDIR ?= /lib/modules/$(shell uname -r)/build +PWD := $(shell pwd) +CFLAGS = $(EXTCFLAGS) -else # KERNELRELEASE - KERNELDIR ?= /lib/modules/$(shell uname -r)/build - PWD := $(shell pwd) - CFLAGS = $(EXTCFLAGS) +default: modules -default: - LTTNG_KERNELDIR=$(KERNELDIR) $(MAKE) -C $(KERNELDIR) M=$(PWD) modules +modules: + $(MAKE) -C $(KERNELDIR) M=$(PWD) CONFIG_LTTNG=m modules modules_install: - LTTNG_KERNELDIR=$(KERNELDIR) $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install + $(MAKE) -C $(KERNELDIR) M=$(PWD) CONFIG_LTTNG=m modules_install clean: - LTTNG_KERNELDIR=$(KERNELDIR) $(MAKE) -C $(KERNELDIR) M=$(PWD) clean + $(MAKE) -C $(KERNELDIR) M=$(PWD) clean %.i: %.c - LTTNG_KERNELDIR=$(KERNELDIR) $(MAKE) -C $(KERNELDIR) M=$(PWD) $@ + $(MAKE) -C $(KERNELDIR) M=$(PWD) CONFIG_LTTNG=m $@ + endif # KERNELRELEASE diff -Nru lttng-modules-2.7.1/Makefile.ABI.workarounds lttng-modules-2.8.0/Makefile.ABI.workarounds --- lttng-modules-2.7.1/Makefile.ABI.workarounds 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/Makefile.ABI.workarounds 2016-05-20 01:34:54.000000000 +0000 @@ -4,8 +4,20 @@ # the kernel EXTRAVERSION to figure it out. Translate this information # into a define visible from the C preprocessor. -DEB_API_VERSION=$(shell $(MAKEFILEDIR)/abi-debian-version.sh $(KERNELDIR)) +DEB_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-debian-version.sh $(CURDIR)) ifneq ($(DEB_API_VERSION), 0) -ccflags-y += -DDEBIAN_API_VERSION=$(DEB_API_VERSION) + ccflags-y += -DDEBIAN_API_VERSION=$(DEB_API_VERSION) +endif + +RHEL_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-rhel-version.sh $(CURDIR)) + +ifneq ($(RHEL_API_VERSION), 0) + ccflags-y += -DRHEL_API_VERSION=$(RHEL_API_VERSION) +endif + +RT_PATCH_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/rt-patch-version.sh $(CURDIR)) + +ifneq ($(RT_PATCH_VERSION), 0) + ccflags-y += -DRT_PATCH_VERSION=$(RT_PATCH_VERSION) endif diff -Nru lttng-modules-2.7.1/probes/bkp lttng-modules-2.8.0/probes/bkp --- lttng-modules-2.7.1/probes/bkp 2015-09-04 20:38:31.000000000 +0000 +++ lttng-modules-2.8.0/probes/bkp 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -/* - * probes/lttng-probe-test.c - * - * LTTng test probes. - * - * Copyright (C) 2010-2012 Mathieu Desnoyers - * - * 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 -#include "../lttng-tracer.h" - -#include "../wrapper/tracepoint.h" - -/* - * Create LTTng tracepoint probes. - */ -#define LTTNG_PACKAGE_BUILD -#define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module -#define TRACE_INCLUDE_FILE lttng-test - -#include "../instrumentation/events/lttng-module/lttng-test.h" - -MODULE_LICENSE("GPL and additional rights"); -MODULE_AUTHOR("Mathieu Desnoyers "); -MODULE_DESCRIPTION("LTTng test probes"); -MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "." - __stringify(LTTNG_MODULES_MINOR_VERSION) "." - __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION) - LTTNG_MODULES_EXTRAVERSION); diff -Nru lttng-modules-2.7.1/probes/define_trace.h lttng-modules-2.8.0/probes/define_trace.h --- lttng-modules-2.7.1/probes/define_trace.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/probes/define_trace.h 2016-05-20 01:34:54.000000000 +0000 @@ -56,10 +56,10 @@ #define LTTNG_TRACEPOINT_EVENT(name, proto, args, fields) #undef LTTNG_TRACEPOINT_EVENT_CODE -#define LTTNG_TRACEPOINT_EVENT_CODE(name, proto, args, _locvar, _code, fields) +#define LTTNG_TRACEPOINT_EVENT_CODE(name, proto, args, _locvar, _code_pre, fields, _code_post) #undef LTTNG_TRACEPOINT_EVENT_CODE_MAP -#define LTTNG_TRACEPOINT_EVENT_CODE_MAP(name, map, proto, args, _locvar, _code, fields) +#define LTTNG_TRACEPOINT_EVENT_CODE_MAP(name, map, proto, args, _locvar, _code_pre, fields, _code_post) #undef LTTNG_TRACEPOINT_EVENT_INSTANCE #define LTTNG_TRACEPOINT_EVENT_INSTANCE(template, name, proto, args) @@ -97,7 +97,7 @@ #define DECLARE_TRACE(name, proto, args) #ifdef LTTNG_PACKAGE_BUILD -#include "lttng-events.h" +#include #endif #undef LTTNG_TRACEPOINT_EVENT diff -Nru lttng-modules-2.7.1/probes/Kbuild lttng-modules-2.8.0/probes/Kbuild --- lttng-modules-2.7.1/probes/Kbuild 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/probes/Kbuild 2016-05-20 01:34:54.000000000 +0000 @@ -0,0 +1,264 @@ +TOP_LTTNG_MODULES_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))/.. + +include $(TOP_LTTNG_MODULES_DIR)/Makefile.ABI.workarounds + +ccflags-y += -I$(TOP_LTTNG_MODULES_DIR) + +obj-$(CONFIG_LTTNG) += lttng-probe-sched.o +obj-$(CONFIG_LTTNG) += lttng-probe-irq.o +obj-$(CONFIG_LTTNG) += lttng-probe-timer.o +obj-$(CONFIG_LTTNG) += lttng-probe-kmem.o +obj-$(CONFIG_LTTNG) += lttng-probe-module.o +obj-$(CONFIG_LTTNG) += lttng-probe-power.o +obj-$(CONFIG_LTTNG) += lttng-probe-statedump.o + +ifneq ($(CONFIG_KVM),) + obj-$(CONFIG_LTTNG) += lttng-probe-kvm.o + ifneq ($(CONFIG_X86),) + kvm_dep_lapic = $(srctree)/arch/x86/kvm/lapic.h + ifneq ($(wildcard $(kvm_dep_lapic)),) + kvm_dep = $(srctree)/virt/kvm/iodev.h $(srctree)/include/kvm/iodev.h + ifneq ($(wildcard $(kvm_dep)),) + CFLAGS_lttng-probe-kvm-x86.o += -I$(srctree)/virt/kvm + CFLAGS_lttng-probe-kvm-x86-mmu.o += -I$(srctree)/virt/kvm + obj-$(CONFIG_LTTNG) += $(shell \ + if [ $(VERSION) -ge 3 \ + -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 38 \) ] ; then \ + echo "lttng-probe-kvm-x86.o" ; fi;) + obj-$(CONFIG_LTTNG) += $(shell \ + if [ $(VERSION) -ge 3 \ + -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 38 \) ] ; then \ + echo "lttng-probe-kvm-x86-mmu.o" ; fi;) + else + $(warning File $(kvm_dep) not found. Probe "kvm" x86-specific is disabled. Use full kernel source tree to enable it.) + endif # $(wildcard $(kvm_dep)) + else + $(warning File $(kvm_dep_lapic) not found. Probe "kvm" x86-specific is disabled. Use full kernel source tree to enable it.) + endif # $(wildcard $(kvm_dep_lapic)) + endif # CONFIG_X86 +endif # CONFIG_KVM + +ifneq ($(CONFIG_X86),) + x86_irq_vectors_dep = $(srctree)/arch/x86/include/asm/trace/irq_vectors.h + + ifneq ($(wildcard $(x86_irq_vectors_dep)),) + obj-$(CONFIG_LTTNG) += lttng-probe-x86-irq-vectors.o + endif # $(wildcard $(x86_irq_vectors_dep)) + + x86_exceptions_dep = $(srctree)/arch/x86/include/asm/trace/exceptions.h + + ifneq ($(wildcard $(x86_exceptions_dep)),) + obj-$(CONFIG_LTTNG) += lttng-probe-x86-exceptions.o + endif # $(wildcard $(x86_exceptions_dep)) +endif # CONFIG_X86 + +obj-$(CONFIG_LTTNG) += $(shell \ + if [ $(VERSION) -ge 3 \ + -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 33 \) ] ; then \ + echo "lttng-probe-signal.o" ; fi;) + +ifneq ($(CONFIG_BLOCK),) + # need blk_cmd_buf_len + ifneq ($(CONFIG_EVENT_TRACING),) + obj-$(CONFIG_LTTNG) += lttng-probe-block.o + endif # CONFIG_EVENT_TRACING +endif # CONFIG_BLOCK + +ifneq ($(CONFIG_NET),) + obj-$(CONFIG_LTTNG) += lttng-probe-napi.o + obj-$(CONFIG_LTTNG) += lttng-probe-skb.o + obj-$(CONFIG_LTTNG) += $(shell \ + if [ $(VERSION) -ge 3 \ + -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 37 \) ] ; then \ + echo "lttng-probe-net.o" ; fi;) + obj-$(CONFIG_LTTNG) += $(shell \ + if [ $(VERSION) -ge 4 \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 1 \) ] ; then \ + echo "lttng-probe-sock.o" ; fi;) + obj-$(CONFIG_LTTNG) += $(shell \ + if [ $(VERSION) -ge 4 \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 1 \) ] ; then \ + echo "lttng-probe-udp.o" ; fi;) +endif # CONFIG_NET + +ifneq ($(CONFIG_SND_SOC),) + obj-$(CONFIG_LTTNG) += $(shell \ + if [ $(VERSION) -ge 3 \ + -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 38 \) ] ; then \ + echo "lttng-probe-asoc.o" ; fi;) +endif # CONFIG_SND_SOC + +ifneq ($(CONFIG_EXT3_FS),) + ext3_dep = $(srctree)/fs/ext3/*.h + ext3_dep_check = $(wildcard $(ext3_dep)) + ext3 = $(shell \ + if [ $(VERSION) -ge 4 -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 1 \) ] ; then \ + if [ \( $(VERSION) -ge 4 -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 4 \) \) -a \ + -z "$(ext3_dep_check)" ] ; then \ + echo "warn" ; \ + exit ; \ + fi; \ + echo "lttng-probe-ext3.o" ; \ + fi;) + ifeq ($(ext3),warn) + $(warning Files $(ext3_dep) not found. Probe "ext3" is disabled. Use full kernel source tree to enable it.) + ext3 = + endif # $(ext3),warn + obj-$(CONFIG_LTTNG) += $(ext3) +endif # CONFIG_EXT3_FS + +ifneq ($(CONFIG_GPIOLIB),) + obj-$(CONFIG_LTTNG) += $(shell \ + if [ $(VERSION) -ge 3 ] ; then \ + echo "lttng-probe-gpio.o" ; fi;) +endif # CONFIG_GPIOLIB + +ifneq ($(CONFIG_JBD2),) + obj-$(CONFIG_LTTNG) += lttng-probe-jbd2.o +endif # CONFIG_JBD2 + +ifneq ($(CONFIG_JBD),) + obj-$(CONFIG_LTTNG) += $(shell \ + if [ $(VERSION) -ge 4 \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 1 \) ] ; then \ + echo "lttng-probe-jbd.o" ; fi;) +endif # CONFIG_JBD + +ifneq ($(CONFIG_REGULATOR),) + obj-$(CONFIG_LTTNG) += $(shell \ + if [ $(VERSION) -ge 3 \ + -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 38 \) ] ; then \ + echo "lttng-probe-regulator.o" ; fi;) +endif # CONFIG_REGULATOR + +ifneq ($(CONFIG_SCSI),) + obj-$(CONFIG_LTTNG) += $(shell \ + if [ $(VERSION) -ge 3 \ + -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 35 \) ] ; then \ + echo "lttng-probe-scsi.o" ; fi;) +endif # CONFIG_SCSI + +vmscan = $(shell \ + if [ $(VERSION) -ge 3 \ + -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 36 \) ] ; then \ + echo "lttng-probe-vmscan.o" ; fi;) + +ifneq ($(CONFIG_SWAP),) + obj-$(CONFIG_LTTNG) += $(vmscan) +else + ifneq ($(CONFIG_CGROUP_MEM_RES_CTLR),) + obj-$(CONFIG_LTTNG) += $(vmscan) + endif # CONFIG_CGROUP_MEM_RES_CTLR +endif # CONFIG_SWAP + +# lock probe does not work, so disabling it for now +#ifneq ($(CONFIG_LOCKDEP),) +# obj-$(CONFIG_LTTNG) += lttng-probe-lock.o +#endif # CONFIG_LOCKDEP + +ifneq ($(CONFIG_BTRFS_FS),) + btrfs_dep = $(srctree)/fs/btrfs/*.h + btrfs = $(shell \ + if [ $(VERSION) -ge 3 \ + -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 39 \) ] ; then \ + echo "lttng-probe-btrfs.o" ; fi;) + ifneq ($(btrfs),) + ifeq ($(wildcard $(btrfs_dep)),) + $(warning Files $(btrfs_dep) not found. Probe "btrfs" is disabled. Use full kernel source tree to enable it.) + btrfs = + endif # $(wildcard $(btrfs_dep)) + endif # $(btrfs) + obj-$(CONFIG_LTTNG) += $(btrfs) +endif # CONFIG_BTRFS_FS + +obj-$(CONFIG_LTTNG) += $(shell \ + if [ $(VERSION) -ge 3 \ + -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 38 \) ] ; then \ + echo "lttng-probe-compaction.o" ; fi;) + +ifneq ($(CONFIG_EXT4_FS),) + ext4_dep = $(srctree)/fs/ext4/*.h + ext4 = lttng-probe-ext4.o + ifeq ($(wildcard $(ext4_dep)),) + $(warning Files $(ext4_dep) not found. Probe "ext4" is disabled. Use full kernel source tree to enable it.) + ext4 = + endif # $(wildcard $(ext4_dep)) + obj-$(CONFIG_LTTNG) += $(ext4) +endif # CONFIG_EXT4_FS + +obj-$(CONFIG_LTTNG) += $(shell \ + if [ $(VERSION) -ge 4 \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 4 \) ] ; then \ + echo "lttng-probe-printk.o" ; fi;) + +ifneq ($(CONFIG_FRAME_WARN),0) + CFLAGS_lttng-probe-printk.o += -Wframe-larger-than=2200 +endif + +obj-$(CONFIG_LTTNG) += $(shell \ + if [ $(VERSION) -ge 4 \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 6 \) \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 5 -a $(SUBLEVEL) -ge 2 \) \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 4 -a $(SUBLEVEL) -ge 9 \) \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 0 -a $(SUBLEVEL) -ge 41 \) ] ; then \ + echo "lttng-probe-random.o" ; fi;) + +obj-$(CONFIG_LTTNG) += $(shell \ + if [ $(VERSION) -ge 4 \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 2 \) ] ; then \ + echo "lttng-probe-rcu.o" ; fi;) + +ifneq ($(CONFIG_REGMAP),) + regmap_dep_4_1 = $(srctree)/drivers/base/regmap/trace.h + ifneq ($(wildcard $(regmap_dep_4_1)),) + obj-$(CONFIG_LTTNG) += lttng-probe-regmap.o + else + $(warning File $(regmap_dep_4_1) not found. Probe "regmap" is disabled. Need Linux 4.1+ kernel source tree to enable it.) + endif # $(wildcard $(regmap_dep_4_1)), +endif # CONFIG_REGMAP + +ifneq ($(CONFIG_PM_RUNTIME),) + obj-$(CONFIG_LTTNG) += $(shell \ + if [ $(VERSION) -ge 4 \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 2 \) ] ; then \ + echo "lttng-probe-rpm.o" ; fi;) +endif # CONFIG_PM_RUNTIME + +ifneq ($(CONFIG_SUNRPC),) + obj-$(CONFIG_LTTNG) += $(shell \ + if [ $(VERSION) -ge 4 \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 4 \) ] ; then \ + echo "lttng-probe-sunrpc.o" ; fi;) +endif # CONFIG_SUNRPC + +ifneq ($(CONFIG_VIDEO_V4L2),) + obj-$(CONFIG_LTTNG) += $(shell \ + if [ $(VERSION) -ge 4 \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 14 \) ] ; then \ + echo "lttng-probe-v4l2.o" ; fi;) +endif # CONFIG_VIDEO_V4L2 + +obj-$(CONFIG_LTTNG) += lttng-probe-workqueue.o + +ifneq ($(CONFIG_KALLSYMS_ALL),) + obj-$(CONFIG_LTTNG) += $(shell \ + if [ $(VERSION) -ge 3 \ + -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 36 \) ] ; then \ + echo "lttng-probe-writeback.o" ; fi;) +else + $(warning CONFIG_KALLSYMS_ALL is disabled, therefore probe "writeback" is disabled. Rebuild your kernel with this configuration option enabled in order to trace this subsystem.) +endif # CONFIG_KALLSYMS_ALL + +ifneq ($(CONFIG_KPROBES),) + obj-$(CONFIG_LTTNG) += lttng-kprobes.o +endif # CONFIG_KPROBES + +ifneq ($(CONFIG_KRETPROBES),) + obj-$(CONFIG_LTTNG) += lttng-kretprobes.o +endif # CONFIG_KRETPROBES + +ifneq ($(CONFIG_DYNAMIC_FTRACE),) + obj-$(CONFIG_LTTNG) += lttng-ftrace.o +endif # CONFIG_DYNAMIC_FTRACE + +# vim:syntax=make diff -Nru lttng-modules-2.7.1/probes/lttng.c lttng-modules-2.8.0/probes/lttng.c --- lttng-modules-2.7.1/probes/lttng.c 2015-09-24 20:47:34.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng.c 2016-05-20 01:34:54.000000000 +0000 @@ -28,17 +28,17 @@ #include #include #include -#include "../wrapper/vmalloc.h" -#include "../lttng-events.h" +#include +#include #define TP_MODULE_NOAUTOLOAD #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module #define TRACE_INCLUDE_FILE lttng #define LTTNG_INSTRUMENTATION -#include "../instrumentation/events/lttng-module/lttng.h" +#include /* Events written through logger are truncated at 1024 bytes */ #define LTTNG_LOGGER_COUNT_MAX 1024 diff -Nru lttng-modules-2.7.1/probes/lttng-events.h lttng-modules-2.8.0/probes/lttng-events.h --- lttng-modules-2.7.1/probes/lttng-events.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-events.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,943 +0,0 @@ -/* - * lttng-events.h - * - * Copyright (C) 2009 Steven Rostedt - * Copyright (C) 2009-2014 Mathieu Desnoyers - * - * 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 -#include -#include -#include "lttng.h" -#include "lttng-types.h" -#include "lttng-probe-user.h" -#include "../wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */ -#include "../wrapper/ringbuffer/frontend_types.h" -#include "../wrapper/rcu.h" -#include "../lttng-events.h" -#include "../lttng-tracer-core.h" - -/* - * Macro declarations used for all stages. - */ - -/* - * LTTng name mapping macros. LTTng remaps some of the kernel events to - * enforce name-spacing. - */ -#undef LTTNG_TRACEPOINT_EVENT_MAP -#define LTTNG_TRACEPOINT_EVENT_MAP(name, map, proto, args, fields) \ - LTTNG_TRACEPOINT_EVENT_CLASS(map, \ - PARAMS(proto), \ - PARAMS(args), \ - PARAMS(fields)) \ - LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(map, name, map, PARAMS(proto), PARAMS(args)) - -#undef LTTNG_TRACEPOINT_EVENT_MAP_NOARGS -#define LTTNG_TRACEPOINT_EVENT_MAP_NOARGS(name, map, fields) \ - LTTNG_TRACEPOINT_EVENT_CLASS_NOARGS(map, \ - PARAMS(fields)) \ - LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS(map, name, map) - -#undef LTTNG_TRACEPOINT_EVENT_CODE_MAP -#define LTTNG_TRACEPOINT_EVENT_CODE_MAP(name, map, proto, args, _locvar, _code, fields) \ - LTTNG_TRACEPOINT_EVENT_CLASS_CODE(map, \ - PARAMS(proto), \ - PARAMS(args), \ - PARAMS(_locvar), \ - PARAMS(_code), \ - PARAMS(fields)) \ - LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(map, name, map, PARAMS(proto), PARAMS(args)) - -#undef LTTNG_TRACEPOINT_EVENT_CODE -#define LTTNG_TRACEPOINT_EVENT_CODE(name, proto, args, _locvar, _code, fields) \ - LTTNG_TRACEPOINT_EVENT_CODE_MAP(name, name, \ - PARAMS(proto), \ - PARAMS(args), \ - PARAMS(_locvar), \ - PARAMS(_code), \ - PARAMS(fields)) - -/* - * LTTNG_TRACEPOINT_EVENT_CLASS can be used to add a generic function - * handlers for events. That is, if all events have the same parameters - * and just have distinct trace points. Each tracepoint can be defined - * with LTTNG_TRACEPOINT_EVENT_INSTANCE and that will map the - * LTTNG_TRACEPOINT_EVENT_CLASS to the tracepoint. - * - * LTTNG_TRACEPOINT_EVENT is a one to one mapping between tracepoint and - * template. - */ - -#undef LTTNG_TRACEPOINT_EVENT -#define LTTNG_TRACEPOINT_EVENT(name, proto, args, fields) \ - LTTNG_TRACEPOINT_EVENT_MAP(name, name, \ - PARAMS(proto), \ - PARAMS(args), \ - PARAMS(fields)) - -#undef LTTNG_TRACEPOINT_EVENT_NOARGS -#define LTTNG_TRACEPOINT_EVENT_NOARGS(name, fields) \ - LTTNG_TRACEPOINT_EVENT_MAP_NOARGS(name, name, PARAMS(fields)) - -#undef LTTNG_TRACEPOINT_EVENT_INSTANCE -#define LTTNG_TRACEPOINT_EVENT_INSTANCE(template, name, proto, args) \ - LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(template, name, name, PARAMS(proto), PARAMS(args)) - -#undef LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS -#define LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(template, name) \ - LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS(template, name, name) - -#undef LTTNG_TRACEPOINT_EVENT_CLASS -#define LTTNG_TRACEPOINT_EVENT_CLASS(_name, _proto, _args, _fields) \ - LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, PARAMS(_proto), PARAMS(_args), , , \ - PARAMS(_fields)) - -#undef LTTNG_TRACEPOINT_EVENT_CLASS_NOARGS -#define LTTNG_TRACEPOINT_EVENT_CLASS_NOARGS(_name, _fields) \ - LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, , , PARAMS(_fields)) - - -/* - * Stage 1 of the trace events. - * - * Create dummy trace calls for each events, verifying that the LTTng module - * instrumentation headers match the kernel arguments. Will be optimized - * out by the compiler. - */ - -/* Reset all macros within TRACEPOINT_EVENT */ -#include "lttng-events-reset.h" - -#undef TP_PROTO -#define TP_PROTO(...) __VA_ARGS__ - -#undef TP_ARGS -#define TP_ARGS(...) __VA_ARGS__ - -#undef LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP -#define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(_template, _name, _map, _proto, _args) \ -void trace_##_name(_proto); - -#undef LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS -#define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS(_template, _name, _map) \ -void trace_##_name(void); - -#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) - -/* - * Stage 1.1 of the trace events. - * - * Create dummy trace prototypes for each event class, and for each used - * template. This will allow checking whether the prototypes from the - * class and the instance using the class actually match. - */ - -#include "lttng-events-reset.h" /* Reset all macros within TRACE_EVENT */ - -#undef TP_PROTO -#define TP_PROTO(...) __VA_ARGS__ - -#undef TP_ARGS -#define TP_ARGS(...) __VA_ARGS__ - -#undef LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP -#define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(_template, _name, _map, _proto, _args) \ -void __event_template_proto___##_template(_proto); - -#undef LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS -#define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS(_template, _name, _map) \ -void __event_template_proto___##_template(void); - -#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE -#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code, _fields) \ -void __event_template_proto___##_name(_proto); - -#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS -#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code, _fields) \ -void __event_template_proto___##_name(void); - -#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) - -/* - * Stage 2 of the trace events. - * - * Create event field type metadata section. - * Each event produce an array of fields. - */ - -/* Reset all macros within TRACEPOINT_EVENT */ -#include "lttng-events-reset.h" -#include "lttng-events-write.h" -#include "lttng-events-nowrite.h" - -#undef _ctf_integer_ext -#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _user, _nowrite) \ - { \ - .name = #_item, \ - .type = __type_integer(_type, _byte_order, _base, none),\ - .nowrite = _nowrite, \ - .user = _user, \ - }, - -#undef _ctf_array_encoded -#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _user, _nowrite) \ - { \ - .name = #_item, \ - .type = \ - { \ - .atype = atype_array, \ - .u = \ - { \ - .array = \ - { \ - .elem_type = __type_integer(_type, __BYTE_ORDER, 10, _encoding), \ - .length = _length, \ - } \ - } \ - }, \ - .nowrite = _nowrite, \ - .user = _user, \ - }, - -#undef _ctf_sequence_encoded -#define _ctf_sequence_encoded(_type, _item, _src, \ - _length_type, _src_length, _encoding, \ - _byte_order, _base, _user, _nowrite) \ - { \ - .name = #_item, \ - .type = \ - { \ - .atype = atype_sequence, \ - .u = \ - { \ - .sequence = \ - { \ - .length_type = __type_integer(_length_type, __BYTE_ORDER, 10, none), \ - .elem_type = __type_integer(_type, _byte_order, _base, _encoding), \ - }, \ - }, \ - }, \ - .nowrite = _nowrite, \ - .user = _user, \ - }, - -#undef _ctf_string -#define _ctf_string(_item, _src, _user, _nowrite) \ - { \ - .name = #_item, \ - .type = \ - { \ - .atype = atype_string, \ - .u = \ - { \ - .basic = { .string = { .encoding = lttng_encode_UTF8 } } \ - }, \ - }, \ - .nowrite = _nowrite, \ - .user = _user, \ - }, - -#undef TP_FIELDS -#define TP_FIELDS(...) __VA_ARGS__ /* Only one used in this phase */ - -#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS -#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code, _fields) \ - static const struct lttng_event_field __event_fields___##_name[] = { \ - _fields \ - }; - -#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE -#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code, _fields) \ - LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code, PARAMS(_fields)) - -#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) - -/* - * Stage 3 of the trace events. - * - * Create probe callback prototypes. - */ - -/* Reset all macros within TRACEPOINT_EVENT */ -#include "lttng-events-reset.h" - -#undef TP_PROTO -#define TP_PROTO(...) __VA_ARGS__ - -#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE -#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code, _fields) \ -static void __event_probe__##_name(void *__data, _proto); - -#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS -#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code, _fields) \ -static void __event_probe__##_name(void *__data); - -#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) - -/* - * Stage 4 of the trace events. - * - * Create static inline function that calculates event size. - */ - -/* Reset all macros within TRACEPOINT_EVENT */ -#include "lttng-events-reset.h" -#include "lttng-events-write.h" - -#undef _ctf_integer_ext -#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _user, _nowrite) \ - __event_len += lib_ring_buffer_align(__event_len, lttng_alignof(_type)); \ - __event_len += sizeof(_type); - -#undef _ctf_array_encoded -#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _user, _nowrite) \ - __event_len += lib_ring_buffer_align(__event_len, lttng_alignof(_type)); \ - __event_len += sizeof(_type) * (_length); - -#undef _ctf_sequence_encoded -#define _ctf_sequence_encoded(_type, _item, _src, _length_type, \ - _src_length, _encoding, _byte_order, _base, _user, _nowrite) \ - __event_len += lib_ring_buffer_align(__event_len, lttng_alignof(_length_type)); \ - __event_len += sizeof(_length_type); \ - __event_len += lib_ring_buffer_align(__event_len, lttng_alignof(_type)); \ - __dynamic_len[__dynamic_len_idx] = (_src_length); \ - __event_len += sizeof(_type) * __dynamic_len[__dynamic_len_idx]; \ - __dynamic_len_idx++; - -/* - * ctf_user_string includes \0. If returns 0, it faulted, so we set size to - * 1 (\0 only). - */ -#undef _ctf_string -#define _ctf_string(_item, _src, _user, _nowrite) \ - if (_user) \ - __event_len += __dynamic_len[__dynamic_len_idx++] = \ - max_t(size_t, lttng_strlen_user_inatomic(_src), 1); \ - else \ - __event_len += __dynamic_len[__dynamic_len_idx++] = \ - strlen(_src) + 1; - -#undef TP_PROTO -#define TP_PROTO(...) __VA_ARGS__ - -#undef TP_FIELDS -#define TP_FIELDS(...) __VA_ARGS__ - -#undef TP_locvar -#define TP_locvar(...) __VA_ARGS__ - -#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE -#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code, _fields) \ -static inline size_t __event_get_size__##_name(size_t *__dynamic_len, \ - void *__tp_locvar, _proto) \ -{ \ - size_t __event_len = 0; \ - unsigned int __dynamic_len_idx __attribute__((unused)) = 0; \ - struct { _locvar } *tp_locvar __attribute__((unused)) = __tp_locvar; \ - \ - _fields \ - return __event_len; \ -} - -#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS -#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code, _fields) \ -static inline size_t __event_get_size__##_name(size_t *__dynamic_len, \ - void *__tp_locvar) \ -{ \ - size_t __event_len = 0; \ - unsigned int __dynamic_len_idx __attribute__((unused)) = 0; \ - struct { _locvar } *tp_locvar __attribute__((unused)) = __tp_locvar; \ - \ - _fields \ - return __event_len; \ -} - -#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) - - -/* - * Stage 4.1 of tracepoint event generation. - * - * Create static inline function that layout the filter stack data. - * We make both write and nowrite data available to the filter. - */ - -/* Reset all macros within TRACEPOINT_EVENT */ -#include "lttng-events-reset.h" -#include "lttng-events-write.h" -#include "lttng-events-nowrite.h" - -#undef _ctf_integer_ext_fetched -#define _ctf_integer_ext_fetched(_type, _item, _src, _byte_order, _base, _nowrite) \ - if (lttng_is_signed_type(_type)) { \ - int64_t __ctf_tmp_int64; \ - switch (sizeof(_type)) { \ - case 1: \ - { \ - union { _type t; int8_t v; } __tmp = { (_type) (_src) }; \ - __ctf_tmp_int64 = (int64_t) __tmp.v; \ - break; \ - } \ - case 2: \ - { \ - union { _type t; int16_t v; } __tmp = { (_type) (_src) }; \ - __ctf_tmp_int64 = (int64_t) __tmp.v; \ - break; \ - } \ - case 4: \ - { \ - union { _type t; int32_t v; } __tmp = { (_type) (_src) }; \ - __ctf_tmp_int64 = (int64_t) __tmp.v; \ - break; \ - } \ - case 8: \ - { \ - union { _type t; int64_t v; } __tmp = { (_type) (_src) }; \ - __ctf_tmp_int64 = (int64_t) __tmp.v; \ - break; \ - } \ - default: \ - BUG_ON(1); \ - }; \ - memcpy(__stack_data, &__ctf_tmp_int64, sizeof(int64_t)); \ - } else { \ - uint64_t __ctf_tmp_uint64; \ - switch (sizeof(_type)) { \ - case 1: \ - { \ - union { _type t; uint8_t v; } __tmp = { (_type) (_src) }; \ - __ctf_tmp_uint64 = (uint64_t) __tmp.v; \ - break; \ - } \ - case 2: \ - { \ - union { _type t; uint16_t v; } __tmp = { (_type) (_src) }; \ - __ctf_tmp_uint64 = (uint64_t) __tmp.v; \ - break; \ - } \ - case 4: \ - { \ - union { _type t; uint32_t v; } __tmp = { (_type) (_src) }; \ - __ctf_tmp_uint64 = (uint64_t) __tmp.v; \ - break; \ - } \ - case 8: \ - { \ - union { _type t; uint64_t v; } __tmp = { (_type) (_src) }; \ - __ctf_tmp_uint64 = (uint64_t) __tmp.v; \ - break; \ - } \ - default: \ - BUG_ON(1); \ - }; \ - memcpy(__stack_data, &__ctf_tmp_uint64, sizeof(uint64_t)); \ - } \ - __stack_data += sizeof(int64_t); - -#undef _ctf_integer_ext_isuser0 -#define _ctf_integer_ext_isuser0(_type, _item, _src, _byte_order, _base, _nowrite) \ - _ctf_integer_ext_fetched(_type, _item, _src, _byte_order, _base, _nowrite) - -#undef _ctf_integer_ext_isuser1 -#define _ctf_integer_ext_isuser1(_type, _item, _user_src, _byte_order, _base, _nowrite) \ -{ \ - __typeof__(_user_src) _src; \ - if (get_user(_src, &(_user_src))) \ - _src = 0; \ - _ctf_integer_ext_fetched(_type, _item, _src, _byte_order, _base, _nowrite) \ -} - -#undef _ctf_integer_ext -#define _ctf_integer_ext(_type, _item, _user_src, _byte_order, _base, _user, _nowrite) \ - _ctf_integer_ext_isuser##_user(_type, _item, _user_src, _byte_order, _base, _nowrite) - -#undef _ctf_array_encoded -#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _user, _nowrite) \ - { \ - unsigned long __ctf_tmp_ulong = (unsigned long) (_length); \ - const void *__ctf_tmp_ptr = (_src); \ - memcpy(__stack_data, &__ctf_tmp_ulong, sizeof(unsigned long)); \ - __stack_data += sizeof(unsigned long); \ - memcpy(__stack_data, &__ctf_tmp_ptr, sizeof(void *)); \ - __stack_data += sizeof(void *); \ - } - -#undef _ctf_sequence_encoded -#define _ctf_sequence_encoded(_type, _item, _src, _length_type, \ - _src_length, _encoding, _byte_order, _base, _user, _nowrite) \ - { \ - unsigned long __ctf_tmp_ulong = (unsigned long) (_src_length); \ - const void *__ctf_tmp_ptr = (_src); \ - memcpy(__stack_data, &__ctf_tmp_ulong, sizeof(unsigned long)); \ - __stack_data += sizeof(unsigned long); \ - memcpy(__stack_data, &__ctf_tmp_ptr, sizeof(void *)); \ - __stack_data += sizeof(void *); \ - } - -#undef _ctf_string -#define _ctf_string(_item, _src, _user, _nowrite) \ - { \ - const void *__ctf_tmp_ptr = (_src); \ - memcpy(__stack_data, &__ctf_tmp_ptr, sizeof(void *)); \ - __stack_data += sizeof(void *); \ - } - -#undef TP_PROTO -#define TP_PROTO(...) __VA_ARGS__ - -#undef TP_FIELDS -#define TP_FIELDS(...) __VA_ARGS__ - -#undef TP_locvar -#define TP_locvar(...) __VA_ARGS__ - -#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS -#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code, _fields) \ -static inline \ -void __event_prepare_filter_stack__##_name(char *__stack_data, \ - void *__tp_locvar) \ -{ \ - struct { _locvar } *tp_locvar __attribute__((unused)) = __tp_locvar; \ - \ - _fields \ -} - -#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE -#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code, _fields) \ -static inline \ -void __event_prepare_filter_stack__##_name(char *__stack_data, \ - void *__tp_locvar, _proto) \ -{ \ - struct { _locvar } *tp_locvar __attribute__((unused)) = __tp_locvar; \ - \ - _fields \ -} - -#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) - -/* - * Stage 5 of the trace events. - * - * Create static inline function that calculates event payload alignment. - */ - -/* Reset all macros within TRACEPOINT_EVENT */ -#include "lttng-events-reset.h" -#include "lttng-events-write.h" - -#undef _ctf_integer_ext -#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _user, _nowrite) \ - __event_align = max_t(size_t, __event_align, lttng_alignof(_type)); - -#undef _ctf_array_encoded -#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _user, _nowrite) \ - __event_align = max_t(size_t, __event_align, lttng_alignof(_type)); - -#undef _ctf_sequence_encoded -#define _ctf_sequence_encoded(_type, _item, _src, _length_type, \ - _src_length, _encoding, _byte_order, _base, _user, _nowrite) \ - __event_align = max_t(size_t, __event_align, lttng_alignof(_length_type)); \ - __event_align = max_t(size_t, __event_align, lttng_alignof(_type)); - -#undef _ctf_string -#define _ctf_string(_item, _src, _user, _nowrite) - -#undef TP_PROTO -#define TP_PROTO(...) __VA_ARGS__ - -#undef TP_FIELDS -#define TP_FIELDS(...) __VA_ARGS__ - -#undef TP_locvar -#define TP_locvar(...) __VA_ARGS__ - -#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE -#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code, _fields) \ -static inline size_t __event_get_align__##_name(void *__tp_locvar, _proto) \ -{ \ - size_t __event_align = 1; \ - struct { _locvar } *tp_locvar __attribute__((unused)) = __tp_locvar; \ - \ - _fields \ - return __event_align; \ -} - -#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS -#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code, _fields) \ -static inline size_t __event_get_align__##_name(void *__tp_locvar) \ -{ \ - size_t __event_align = 1; \ - struct { _locvar } *tp_locvar __attribute__((unused)) = __tp_locvar; \ - \ - _fields \ - return __event_align; \ -} - -#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) - -/* - * Stage 6 of tracepoint event generation. - * - * Create the probe function. This function calls event size calculation - * and writes event data into the buffer. - */ - -/* Reset all macros within TRACEPOINT_EVENT */ -#include "lttng-events-reset.h" -#include "lttng-events-write.h" - -#undef _ctf_integer_ext_fetched -#define _ctf_integer_ext_fetched(_type, _item, _src, _byte_order, _base, _nowrite) \ - { \ - _type __tmp = _src; \ - lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(__tmp));\ - __chan->ops->event_write(&__ctx, &__tmp, sizeof(__tmp));\ - } - -#undef _ctf_integer_ext_isuser0 -#define _ctf_integer_ext_isuser0(_type, _item, _src, _byte_order, _base, _nowrite) \ - _ctf_integer_ext_fetched(_type, _item, _src, _byte_order, _base, _nowrite) - -#undef _ctf_integer_ext_isuser1 -#define _ctf_integer_ext_isuser1(_type, _item, _user_src, _byte_order, _base, _nowrite) \ -{ \ - __typeof__(_user_src) _src; \ - if (get_user(_src, &(_user_src))) \ - _src = 0; \ - _ctf_integer_ext_fetched(_type, _item, _src, _byte_order, _base, _nowrite) \ -} - -#undef _ctf_integer_ext -#define _ctf_integer_ext(_type, _item, _user_src, _byte_order, _base, _user, _nowrite) \ - _ctf_integer_ext_isuser##_user(_type, _item, _user_src, _byte_order, _base, _nowrite) - -#undef _ctf_array_encoded -#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _user, _nowrite) \ - lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(_type)); \ - if (_user) { \ - __chan->ops->event_write_from_user(&__ctx, _src, sizeof(_type) * (_length)); \ - } else { \ - __chan->ops->event_write(&__ctx, _src, sizeof(_type) * (_length)); \ - } - -#undef _ctf_sequence_encoded -#define _ctf_sequence_encoded(_type, _item, _src, _length_type, \ - _src_length, _encoding, _byte_order, _base, _user, _nowrite) \ - { \ - _length_type __tmpl = __stackvar.__dynamic_len[__dynamic_len_idx]; \ - lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(_length_type));\ - __chan->ops->event_write(&__ctx, &__tmpl, sizeof(_length_type));\ - } \ - lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(_type)); \ - if (_user) { \ - __chan->ops->event_write_from_user(&__ctx, _src, \ - sizeof(_type) * __get_dynamic_len(dest)); \ - } else { \ - __chan->ops->event_write(&__ctx, _src, \ - sizeof(_type) * __get_dynamic_len(dest)); \ - } - -#undef _ctf_string -#define _ctf_string(_item, _src, _user, _nowrite) \ - lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(*(_src))); \ - if (_user) { \ - __chan->ops->event_strcpy_from_user(&__ctx, _src, \ - __get_dynamic_len(dest)); \ - } else { \ - __chan->ops->event_strcpy(&__ctx, _src, \ - __get_dynamic_len(dest)); \ - } - -/* Beware: this get len actually consumes the len value */ -#undef __get_dynamic_len -#define __get_dynamic_len(field) __stackvar.__dynamic_len[__dynamic_len_idx++] - -#undef TP_PROTO -#define TP_PROTO(...) __VA_ARGS__ - -#undef TP_ARGS -#define TP_ARGS(...) __VA_ARGS__ - -#undef TP_FIELDS -#define TP_FIELDS(...) __VA_ARGS__ - -#undef TP_locvar -#define TP_locvar(...) __VA_ARGS__ - -#undef TP_code -#define TP_code(...) __VA_ARGS__ - -/* - * For state dump, check that "session" argument (mandatory) matches the - * session this event belongs to. Ensures that we write state dump data only - * into the started session, not into all sessions. - */ -#ifdef TP_SESSION_CHECK -#define _TP_SESSION_CHECK(session, csession) (session == csession) -#else /* TP_SESSION_CHECK */ -#define _TP_SESSION_CHECK(session, csession) 1 -#endif /* TP_SESSION_CHECK */ - -/* - * Using twice size for filter stack data to hold size and pointer for - * each field (worse case). For integers, max size required is 64-bit. - * Same for double-precision floats. Those fit within - * 2*sizeof(unsigned long) for all supported architectures. - * Perform UNION (||) of filter runtime list. - */ -#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE -#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code, _fields) \ -static void __event_probe__##_name(void *__data, _proto) \ -{ \ - struct probe_local_vars { _locvar }; \ - struct lttng_event *__event = __data; \ - struct lttng_channel *__chan = __event->chan; \ - struct lttng_session *__session = __chan->session; \ - struct lib_ring_buffer_ctx __ctx; \ - size_t __event_len, __event_align; \ - size_t __dynamic_len_idx __attribute__((unused)) = 0; \ - union { \ - size_t __dynamic_len[ARRAY_SIZE(__event_fields___##_name)]; \ - char __filter_stack_data[2 * sizeof(unsigned long) * ARRAY_SIZE(__event_fields___##_name)]; \ - } __stackvar; \ - int __ret; \ - struct probe_local_vars __tp_locvar; \ - struct probe_local_vars *tp_locvar __attribute__((unused)) = \ - &__tp_locvar; \ - struct lttng_pid_tracker *__lpf; \ - \ - if (!_TP_SESSION_CHECK(session, __session)) \ - return; \ - if (unlikely(!ACCESS_ONCE(__session->active))) \ - return; \ - if (unlikely(!ACCESS_ONCE(__chan->enabled))) \ - return; \ - if (unlikely(!ACCESS_ONCE(__event->enabled))) \ - return; \ - __lpf = lttng_rcu_dereference(__session->pid_tracker); \ - if (__lpf && likely(!lttng_pid_tracker_lookup(__lpf, current->pid))) \ - return; \ - _code \ - if (unlikely(!list_empty(&__event->bytecode_runtime_head))) { \ - struct lttng_bytecode_runtime *bc_runtime; \ - int __filter_record = __event->has_enablers_without_bytecode; \ - \ - __event_prepare_filter_stack__##_name(__stackvar.__filter_stack_data, \ - tp_locvar, _args); \ - lttng_list_for_each_entry_rcu(bc_runtime, &__event->bytecode_runtime_head, node) { \ - if (unlikely(bc_runtime->filter(bc_runtime, \ - __stackvar.__filter_stack_data) & LTTNG_FILTER_RECORD_FLAG)) \ - __filter_record = 1; \ - } \ - if (likely(!__filter_record)) \ - return; \ - } \ - __event_len = __event_get_size__##_name(__stackvar.__dynamic_len, \ - tp_locvar, _args); \ - __event_align = __event_get_align__##_name(tp_locvar, _args); \ - lib_ring_buffer_ctx_init(&__ctx, __chan->chan, __event, __event_len, \ - __event_align, -1); \ - __ret = __chan->ops->event_reserve(&__ctx, __event->id); \ - if (__ret < 0) \ - return; \ - _fields \ - __chan->ops->event_commit(&__ctx); \ -} - -#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS -#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code, _fields) \ -static void __event_probe__##_name(void *__data) \ -{ \ - struct probe_local_vars { _locvar }; \ - struct lttng_event *__event = __data; \ - struct lttng_channel *__chan = __event->chan; \ - struct lttng_session *__session = __chan->session; \ - struct lib_ring_buffer_ctx __ctx; \ - size_t __event_len, __event_align; \ - size_t __dynamic_len_idx __attribute__((unused)) = 0; \ - union { \ - size_t __dynamic_len[ARRAY_SIZE(__event_fields___##_name)]; \ - char __filter_stack_data[2 * sizeof(unsigned long) * ARRAY_SIZE(__event_fields___##_name)]; \ - } __stackvar; \ - int __ret; \ - struct probe_local_vars __tp_locvar; \ - struct probe_local_vars *tp_locvar __attribute__((unused)) = \ - &__tp_locvar; \ - struct lttng_pid_tracker *__lpf; \ - \ - if (!_TP_SESSION_CHECK(session, __session)) \ - return; \ - if (unlikely(!ACCESS_ONCE(__session->active))) \ - return; \ - if (unlikely(!ACCESS_ONCE(__chan->enabled))) \ - return; \ - if (unlikely(!ACCESS_ONCE(__event->enabled))) \ - return; \ - __lpf = lttng_rcu_dereference(__session->pid_tracker); \ - if (__lpf && likely(!lttng_pid_tracker_lookup(__lpf, current->pid))) \ - return; \ - _code \ - if (unlikely(!list_empty(&__event->bytecode_runtime_head))) { \ - struct lttng_bytecode_runtime *bc_runtime; \ - int __filter_record = __event->has_enablers_without_bytecode; \ - \ - __event_prepare_filter_stack__##_name(__stackvar.__filter_stack_data, \ - tp_locvar); \ - lttng_list_for_each_entry_rcu(bc_runtime, &__event->bytecode_runtime_head, node) { \ - if (unlikely(bc_runtime->filter(bc_runtime, \ - __stackvar.__filter_stack_data) & LTTNG_FILTER_RECORD_FLAG)) \ - __filter_record = 1; \ - } \ - if (likely(!__filter_record)) \ - return; \ - } \ - __event_len = __event_get_size__##_name(__stackvar.__dynamic_len, tp_locvar); \ - __event_align = __event_get_align__##_name(tp_locvar); \ - lib_ring_buffer_ctx_init(&__ctx, __chan->chan, __event, __event_len, \ - __event_align, -1); \ - __ret = __chan->ops->event_reserve(&__ctx, __event->id); \ - if (__ret < 0) \ - return; \ - _fields \ - __chan->ops->event_commit(&__ctx); \ -} - -#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) - -#undef __get_dynamic_len - -/* - * Stage 7 of the trace events. - * - * Create event descriptions. - */ - -/* Named field types must be defined in lttng-types.h */ - -#include "lttng-events-reset.h" /* Reset all macros within LTTNG_TRACEPOINT_EVENT */ - -#ifndef TP_PROBE_CB -#define TP_PROBE_CB(_template) &__event_probe__##_template -#endif - -#undef LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS -#define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS(_template, _name, _map) \ -static const struct lttng_event_desc __event_desc___##_map = { \ - .fields = __event_fields___##_template, \ - .name = #_map, \ - .kname = #_name, \ - .probe_callback = (void *) TP_PROBE_CB(_template), \ - .nr_fields = ARRAY_SIZE(__event_fields___##_template), \ - .owner = THIS_MODULE, \ -}; - -#undef LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP -#define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(_template, _name, _map, _proto, _args) \ - LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS(_template, _name, _map) - -#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) - -/* - * Stage 8 of the trace events. - * - * Create an array of event description pointers. - */ - -#include "lttng-events-reset.h" /* Reset all macros within LTTNG_TRACEPOINT_EVENT */ - -#undef LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS -#define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS(_template, _name, _map) \ - &__event_desc___##_map, - -#undef LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP -#define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(_template, _name, _map, _proto, _args) \ - LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS(_template, _name, _map) - -#define TP_ID1(_token, _system) _token##_system -#define TP_ID(_token, _system) TP_ID1(_token, _system) - -static const struct lttng_event_desc *TP_ID(__event_desc___, TRACE_SYSTEM)[] = { -#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) -}; - -#undef TP_ID1 -#undef TP_ID - -/* - * Stage 9 of the trace events. - * - * Create a toplevel descriptor for the whole probe. - */ - -#define TP_ID1(_token, _system) _token##_system -#define TP_ID(_token, _system) TP_ID1(_token, _system) - -/* non-const because list head will be modified when registered. */ -static __used struct lttng_probe_desc TP_ID(__probe_desc___, TRACE_SYSTEM) = { - .provider = __stringify(TRACE_SYSTEM), - .event_desc = TP_ID(__event_desc___, TRACE_SYSTEM), - .nr_events = ARRAY_SIZE(TP_ID(__event_desc___, TRACE_SYSTEM)), - .head = { NULL, NULL }, - .lazy_init_head = { NULL, NULL }, - .lazy = 0, -}; - -#undef TP_ID1 -#undef TP_ID - -/* - * Stage 10 of the trace events. - * - * Register/unregister probes at module load/unload. - */ - -#include "lttng-events-reset.h" /* Reset all macros within LTTNG_TRACEPOINT_EVENT */ - -#define TP_ID1(_token, _system) _token##_system -#define TP_ID(_token, _system) TP_ID1(_token, _system) -#define module_init_eval1(_token, _system) module_init(_token##_system) -#define module_init_eval(_token, _system) module_init_eval1(_token, _system) -#define module_exit_eval1(_token, _system) module_exit(_token##_system) -#define module_exit_eval(_token, _system) module_exit_eval1(_token, _system) - -#ifndef TP_MODULE_NOINIT -static int TP_ID(__lttng_events_init__, TRACE_SYSTEM)(void) -{ - wrapper_vmalloc_sync_all(); - return lttng_probe_register(&TP_ID(__probe_desc___, TRACE_SYSTEM)); -} - -static void TP_ID(__lttng_events_exit__, TRACE_SYSTEM)(void) -{ - lttng_probe_unregister(&TP_ID(__probe_desc___, TRACE_SYSTEM)); -} - -#ifndef TP_MODULE_NOAUTOLOAD -module_init_eval(__lttng_events_init__, TRACE_SYSTEM); -module_exit_eval(__lttng_events_exit__, TRACE_SYSTEM); -#endif - -#endif - -#undef module_init_eval -#undef module_exit_eval -#undef TP_ID1 -#undef TP_ID - -#undef TP_PROTO -#undef TP_ARGS diff -Nru lttng-modules-2.7.1/probes/lttng-events-nowrite.h lttng-modules-2.8.0/probes/lttng-events-nowrite.h --- lttng-modules-2.7.1/probes/lttng-events-nowrite.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-events-nowrite.h 2016-05-20 19:51:59.000000000 +0000 @@ -46,6 +46,10 @@ #define ctf_array_text_nowrite(_type, _item, _user_src, _length) \ _ctf_array_encoded(_type, _item, _user_src, _length, UTF8, 0, 1) +#undef ctf_array_bitfield_nowrite +#define ctf_array_bitfield_nowrite(_type, _item, _src, _length) \ + _ctf_array_bitfield(_type, _item, _src, _length, 0, 1) + #undef ctf_sequence_nowrite #define ctf_sequence_nowrite(_type, _item, _user_src, _length_type, _user_src_length) \ _ctf_sequence_encoded(_type, _item, _user_src, \ @@ -56,6 +60,11 @@ _ctf_sequence_encoded(_type, _item, _user_src, \ _length_type, _user_src_length, UTF8, __BYTE_ORDER, 10, 0, 1) +#undef ctf_sequence_bitfield_nowrite +#define ctf_sequence_bitfield_nowrite(_type, _item, _src, _length_type, _src_length) \ + _ctf_sequence_bitfield(_type, _item, _src, \ + _length_type, _src_length, 0, 1) + #undef ctf_string_nowrite #define ctf_string_nowrite(_item, _user_src) \ _ctf_string(_item, _user_src, 0, 1) @@ -85,6 +94,10 @@ #define ctf_user_array_text_nowrite(_type, _item, _user_src, _length) \ _ctf_array_encoded(_type, _item, _user_src, _length, UTF8, 1, 1) +#undef ctf_user_array_bitfield_nowrite +#define ctf_user_array_bitfield_nowrite(_type, _item, _src, _length) \ + _ctf_array_bitfield(_type, _item, _src, _length, 1, 1) + #undef ctf_user_sequence_nowrite #define ctf_user_sequence_nowrite(_type, _item, _user_src, _length_type, _user_src_length) \ _ctf_sequence_encoded(_type, _item, _user_src, \ @@ -95,6 +108,11 @@ _ctf_sequence_encoded(_type, _item, _user_src, \ _length_type, _user_src_length, UTF8, __BYTE_ORDER, 10, 1, 1) +#undef ctf_user_sequence_bitfield_nowrite +#define ctf_user_sequence_bitfield_nowrite(_type, _item, _src, _length_type, _src_length) \ + _ctf_sequence_bitfield(_type, _item, _src, \ + _length_type, _src_length, 1, 1) + #undef ctf_user_string_nowrite #define ctf_user_string_nowrite(_item, _user_src) \ _ctf_string(_item, _user_src, 1, 1) diff -Nru lttng-modules-2.7.1/probes/lttng-events-reset.h lttng-modules-2.8.0/probes/lttng-events-reset.h --- lttng-modules-2.7.1/probes/lttng-events-reset.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-events-reset.h 2016-05-20 19:51:59.000000000 +0000 @@ -21,10 +21,10 @@ /* Reset macros used within LTTNG_TRACEPOINT_EVENT to "nothing" */ #undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE -#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code, _fields) +#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post) #undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS -#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code, _fields) +#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code_pre, _fields, _code_post) #undef LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP #define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(_template, _name, _map, _proto, _args) @@ -41,8 +41,11 @@ #undef TP_locvar #define TP_locvar(...) -#undef TP_code -#define TP_code(...) +#undef TP_code_pre +#define TP_code_pre(...) + +#undef TP_code_post +#define TP_code_post(...) #undef TP_FIELDS #define TP_FIELDS(args...) @@ -67,10 +70,17 @@ #define _ctf_array_encoded(_type, _item, _src, _length, _encoding, \ _user, _nowrite) +#undef _ctf_array_bitfield +#define _ctf_array_bitfield(_type, _item, _src, _length, _user, _nowrite) + #undef _ctf_sequence_encoded #define _ctf_sequence_encoded(_type, _item, _src, _length_type, \ _src_length, _encoding, _byte_order, _base, _user, _nowrite) +#undef _ctf_sequence_bitfield +#define _ctf_sequence_bitfield(_type, _item, _src, _length_type, \ + _src_length, _byte_order, _user, _nowrite) + #undef _ctf_string #define _ctf_string(_item, _src, _user, _nowrite) @@ -99,6 +109,9 @@ #undef ctf_array_text #define ctf_array_text(_type, _item, _src, _length) +#undef ctf_array_bitfield +#define ctf_array_bitfield(_type, _item, _src, _length) + #undef ctf_sequence #define ctf_sequence(_type, _item, _src, _length_type, _src_length) @@ -111,6 +124,9 @@ #undef ctf_sequence_text #define ctf_sequence_text(_type, _item, _src, _length_type, _src_length) +#undef ctf_sequence_bitfield +#define ctf_sequence_bitfield(_type, _item, _src, _length_type, _src_length) + #undef ctf_string #define ctf_string(_item, _src) @@ -127,12 +143,18 @@ #undef ctf_array_text_nowrite #define ctf_array_text_nowrite(_type, _item, _src, _length) +#undef ctf_array_bitfield_nowrite +#define ctf_array_bitfield_nowrite(_type, _item, _src, _length) + #undef ctf_sequence_nowrite #define ctf_sequence_nowrite(_type, _item, _src, _length_type, _src_length) #undef ctf_sequence_text_nowrite #define ctf_sequence_text_nowrite(_type, _item, _src, _length_type, _src_length) +#undef ctf_sequence_bitfield_nowrite +#define ctf_sequence_bitfield_nowrite(_type, _item, _src, _length_type, _src_length) + #undef ctf_string_nowrite #define ctf_string_nowrite(_item, _src) @@ -158,12 +180,18 @@ #undef ctf_user_array_text #define ctf_user_array_text(_type, _item, _user_src, _length) +#undef ctf_user_array_bitfield +#define ctf_user_array_bitfield(_type, _item, _src, _length) + #undef ctf_user_sequence #define ctf_user_sequence(_type, _item, _user_src, _length_type, _user_src_length) #undef ctf_user_sequence_text #define ctf_user_sequence_text(_type, _item, _user_src, _length_type, _user_src_length) +#undef ctf_user_sequence_bitfield +#define ctf_user_sequence_bitfield(_type, _item, _src, _length_type, _src_length) + #undef ctf_user_string #define ctf_user_string(_item, _user_src) @@ -180,11 +208,17 @@ #undef ctf_user_array_text_nowrite #define ctf_user_array_text_nowrite(_type, _item, _user_src, _length) +#undef ctf_user_array_bitfield_nowrite +#define ctf_user_array_bitfield_nowrite(_type, _item, _src, _length) + #undef ctf_user_sequence_nowrite #define ctf_user_sequence_nowrite(_type, _item, _user_src, _length_type, _user_src_length) #undef ctf_user_sequence_text_nowrite #define ctf_user_sequence_text_nowrite(_type, _item, _user_src, _length_type, _user_src_length) +#undef ctf_user_sequence_bitfield_nowrite +#define ctf_user_sequence_bitfield_nowrite(_type, _item, _src, _length_type, _src_length) + #undef ctf_user_string_nowrite #define ctf_user_string_nowrite(_item, _user_src) diff -Nru lttng-modules-2.7.1/probes/lttng-events-write.h lttng-modules-2.8.0/probes/lttng-events-write.h --- lttng-modules-2.7.1/probes/lttng-events-write.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-events-write.h 2016-05-20 19:51:59.000000000 +0000 @@ -46,6 +46,10 @@ #define ctf_array_text(_type, _item, _src, _length) \ _ctf_array_encoded(_type, _item, _src, _length, UTF8, 0, 0) +#undef ctf_array_bitfield +#define ctf_array_bitfield(_type, _item, _src, _length) \ + _ctf_array_bitfield(_type, _item, _src, _length, 0, 0) + #undef ctf_sequence #define ctf_sequence(_type, _item, _src, _length_type, _src_length) \ _ctf_sequence_encoded(_type, _item, _src, \ @@ -66,6 +70,11 @@ _ctf_sequence_encoded(_type, _item, _src, \ _length_type, _src_length, UTF8, __BYTE_ORDER, 10, 0, 0) +#undef ctf_sequence_bitfield +#define ctf_sequence_bitfield(_type, _item, _src, _length_type, _src_length) \ + _ctf_sequence_bitfield(_type, _item, _src, \ + _length_type, _src_length, 0, 0) + #undef ctf_string #define ctf_string(_item, _src) \ _ctf_string(_item, _src, 0, 0) @@ -95,6 +104,10 @@ #define ctf_user_array_text(_type, _item, _src, _length) \ _ctf_array_encoded(_type, _item, _src, _length, UTF8, 1, 0) +#undef ctf_user_array_bitfield +#define ctf_user_array_bitfield(_type, _item, _src, _length) \ + _ctf_array_bitfield(_type, _item, _src, _length, 1, 0) + #undef ctf_user_sequence #define ctf_user_sequence(_type, _item, _src, _length_type, _src_length) \ _ctf_sequence_encoded(_type, _item, _src, \ @@ -110,6 +123,11 @@ _ctf_sequence_encoded(_type, _item, _src, \ _length_type, _src_length, UTF8, __BYTE_ORDER, 10, 1, 0) +#undef ctf_user_sequence_bitfield +#define ctf_user_sequence_bitfield(_type, _item, _src, _length_type, _src_length) \ + _ctf_sequence_bitfield(_type, _item, _src, \ + _length_type, _src_length, 1, 0) + #undef ctf_user_string #define ctf_user_string(_item, _src) \ _ctf_string(_item, _src, 1, 0) diff -Nru lttng-modules-2.7.1/probes/lttng-ftrace.c lttng-modules-2.8.0/probes/lttng-ftrace.c --- lttng-modules-2.7.1/probes/lttng-ftrace.c 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-ftrace.c 2016-05-20 01:34:54.000000000 +0000 @@ -33,16 +33,20 @@ #include #include #include -#include "../lttng-events.h" -#include "../wrapper/ringbuffer/frontend_types.h" -#include "../wrapper/ftrace.h" -#include "../wrapper/vmalloc.h" -#include "../lttng-tracer.h" +#include +#include +#include +#include +#include static void lttng_ftrace_handler(unsigned long ip, unsigned long parent_ip, void **data) { struct lttng_event *event = *data; + struct lttng_probe_ctx lttng_probe_ctx = { + .event = event, + .interruptible = !irqs_disabled(), + }; struct lttng_channel *chan = event->chan; struct lib_ring_buffer_ctx ctx; struct { @@ -58,7 +62,7 @@ if (unlikely(!ACCESS_ONCE(event->enabled))) return; - lib_ring_buffer_ctx_init(&ctx, chan->chan, event, + lib_ring_buffer_ctx_init(&ctx, chan->chan, <tng_probe_ctx, sizeof(payload), lttng_alignof(payload), -1); ret = chan->ops->event_reserve(&ctx, event->id); if (ret < 0) diff -Nru lttng-modules-2.7.1/probes/lttng-kprobes.c lttng-modules-2.8.0/probes/lttng-kprobes.c --- lttng-modules-2.7.1/probes/lttng-kprobes.c 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-kprobes.c 2016-05-20 01:34:54.000000000 +0000 @@ -23,16 +23,21 @@ #include #include #include -#include "../lttng-events.h" -#include "../wrapper/ringbuffer/frontend_types.h" -#include "../wrapper/vmalloc.h" -#include "../lttng-tracer.h" +#include +#include +#include +#include +#include static int lttng_kprobes_handler_pre(struct kprobe *p, struct pt_regs *regs) { struct lttng_event *event = container_of(p, struct lttng_event, u.kprobe.kp); + struct lttng_probe_ctx lttng_probe_ctx = { + .event = event, + .interruptible = !lttng_regs_irqs_disabled(regs), + }; struct lttng_channel *chan = event->chan; struct lib_ring_buffer_ctx ctx; int ret; @@ -45,7 +50,7 @@ if (unlikely(!ACCESS_ONCE(event->enabled))) return 0; - lib_ring_buffer_ctx_init(&ctx, chan->chan, event, sizeof(data), + lib_ring_buffer_ctx_init(&ctx, chan->chan, <tng_probe_ctx, sizeof(data), lttng_alignof(data), -1); ret = chan->ops->event_reserve(&ctx, event->id); if (ret < 0) diff -Nru lttng-modules-2.7.1/probes/lttng-kretprobes.c lttng-modules-2.8.0/probes/lttng-kretprobes.c --- lttng-modules-2.7.1/probes/lttng-kretprobes.c 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-kretprobes.c 2016-05-20 01:34:54.000000000 +0000 @@ -1,5 +1,5 @@ /* - * probes/lttng-kretprobes.c +* probes/lttng-kretprobes.c * * LTTng kretprobes integration module. * @@ -24,10 +24,11 @@ #include #include #include -#include "../lttng-events.h" -#include "../wrapper/ringbuffer/frontend_types.h" -#include "../wrapper/vmalloc.h" -#include "../lttng-tracer.h" +#include +#include +#include +#include +#include enum lttng_kretprobe_type { EVENT_ENTRY = 0, @@ -50,6 +51,10 @@ container_of(krpi->rp, struct lttng_krp, krp); struct lttng_event *event = lttng_krp->event[type]; + struct lttng_probe_ctx lttng_probe_ctx = { + .event = event, + .interruptible = !lttng_regs_irqs_disabled(regs), + }; struct lttng_channel *chan = event->chan; struct lib_ring_buffer_ctx ctx; int ret; @@ -68,7 +73,7 @@ payload.ip = (unsigned long) krpi->rp->kp.addr; payload.parent_ip = (unsigned long) krpi->ret_addr; - lib_ring_buffer_ctx_init(&ctx, chan->chan, event, sizeof(payload), + lib_ring_buffer_ctx_init(&ctx, chan->chan, <tng_probe_ctx, sizeof(payload), lttng_alignof(payload), -1); ret = chan->ops->event_reserve(&ctx, event->id); if (ret < 0) @@ -219,9 +224,9 @@ * unregistered. Same for memory allocation. */ kref_init(<tng_krp->kref_alloc); - kref_get(<tng_krp->kref_alloc); /* inc refcount to 2 */ + kref_get(<tng_krp->kref_alloc); /* inc refcount to 2, no overflow. */ kref_init(<tng_krp->kref_register); - kref_get(<tng_krp->kref_register); /* inc refcount to 2 */ + kref_get(<tng_krp->kref_register); /* inc refcount to 2, no overflow. */ /* * Ensure the memory we just allocated don't trigger page faults. diff -Nru lttng-modules-2.7.1/probes/lttng-probe-asoc.c lttng-modules-2.8.0/probes/lttng-probe-asoc.c --- lttng-modules-2.7.1/probes/lttng-probe-asoc.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-asoc.c 2016-05-20 01:34:54.000000000 +0000 @@ -24,7 +24,7 @@ #include #include #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -37,9 +37,9 @@ */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/asoc.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Wade Farnsworth , Paul Woegerer , and Andrew Gabbasov "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-block.c lttng-modules-2.8.0/probes/lttng-probe-block.c --- lttng-modules-2.7.1/probes/lttng-probe-block.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-block.c 2016-05-20 01:34:54.000000000 +0000 @@ -22,8 +22,8 @@ #include #include -#include "../lttng-tracer.h" -#include "../lttng-kernel-version.h" +#include +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -31,16 +31,16 @@ */ #include -#include "../wrapper/tracepoint.h" +#include /* * Create LTTng tracepoint probes. */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/block.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Mathieu Desnoyers "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-btrfs.c lttng-modules-2.8.0/probes/lttng-probe-btrfs.c --- lttng-modules-2.7.1/probes/lttng-probe-btrfs.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-btrfs.c 2016-05-20 01:34:54.000000000 +0000 @@ -27,7 +27,7 @@ #include <../fs/btrfs/transaction.h> #include <../fs/btrfs/volumes.h> #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -40,9 +40,9 @@ */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/btrfs.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Andrew Gabbasov "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-compaction.c lttng-modules-2.8.0/probes/lttng-probe-compaction.c --- lttng-modules-2.7.1/probes/lttng-probe-compaction.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-compaction.c 2016-05-20 01:34:54.000000000 +0000 @@ -22,7 +22,7 @@ */ #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -35,9 +35,9 @@ */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/compaction.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Andrew Gabbasov "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-ext3.c lttng-modules-2.8.0/probes/lttng-probe-ext3.c --- lttng-modules-2.7.1/probes/lttng-probe-ext3.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-ext3.c 2016-05-20 01:34:54.000000000 +0000 @@ -25,7 +25,7 @@ #include #include #include -#include "../lttng-tracer.h" +#include #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) #include <../fs/ext3/ext3.h> @@ -44,9 +44,9 @@ */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/ext3.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Wade Farnsworth , Paul Woegerer , and Andrew Gabbasov "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-ext4.c lttng-modules-2.8.0/probes/lttng-probe-ext4.c --- lttng-modules-2.7.1/probes/lttng-probe-ext4.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-ext4.c 2016-05-20 01:34:54.000000000 +0000 @@ -27,7 +27,7 @@ #include <../fs/ext4/mballoc.h> #include <../fs/ext4/ext4_extents.h> #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -35,17 +35,17 @@ */ #include -#include "../lttng-kernel-version.h" -#include "../wrapper/tracepoint.h" +#include +#include /* * Create LTTng tracepoint probes. */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/ext4.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Andrew Gabbasov "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-gpio.c lttng-modules-2.8.0/probes/lttng-probe-gpio.c --- lttng-modules-2.7.1/probes/lttng-probe-gpio.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-gpio.c 2016-05-20 01:34:54.000000000 +0000 @@ -22,7 +22,7 @@ */ #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -35,9 +35,9 @@ */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/gpio.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Wade Farnsworth "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-irq.c lttng-modules-2.8.0/probes/lttng-probe-irq.c --- lttng-modules-2.7.1/probes/lttng-probe-irq.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-irq.c 2016-05-20 01:34:54.000000000 +0000 @@ -22,7 +22,7 @@ #include #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -30,16 +30,16 @@ */ #include -#include "../wrapper/tracepoint.h" +#include /* * Create LTTng tracepoint probes. */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/irq.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Mathieu Desnoyers "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-jbd2.c lttng-modules-2.8.0/probes/lttng-probe-jbd2.c --- lttng-modules-2.7.1/probes/lttng-probe-jbd2.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-jbd2.c 2016-05-20 01:34:54.000000000 +0000 @@ -22,7 +22,7 @@ */ #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -30,16 +30,16 @@ */ #include -#include "../wrapper/tracepoint.h" +#include /* * Create LTTng tracepoint probes. */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/jbd2.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Wade Farnsworth and Andrew Gabbasov "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-jbd.c lttng-modules-2.8.0/probes/lttng-probe-jbd.c --- lttng-modules-2.7.1/probes/lttng-probe-jbd.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-jbd.c 2016-05-20 01:34:54.000000000 +0000 @@ -22,7 +22,7 @@ */ #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -35,9 +35,9 @@ */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/jbd.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Wade Farnsworth , Paul Woegerer , and Andrew Gabbasov "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-kmem.c lttng-modules-2.8.0/probes/lttng-probe-kmem.c --- lttng-modules-2.7.1/probes/lttng-probe-kmem.c 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-kmem.c 2016-05-20 01:34:54.000000000 +0000 @@ -25,9 +25,10 @@ * This page_alloc.h wrapper needs to be included before gfpflags.h because it * overrides a function with a define. */ -#include "../wrapper/page_alloc.h" +#include #include -#include "../lttng-tracer.h" +#include +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -35,16 +36,16 @@ */ #include -#include "../wrapper/tracepoint.h" +#include /* * Create LTTng tracepoint probes. */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/kmem.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Wade Farnsworth and Andrew Gabbasov "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-kvm.c lttng-modules-2.8.0/probes/lttng-probe-kvm.c --- lttng-modules-2.7.1/probes/lttng-probe-kvm.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-kvm.c 2016-05-20 01:34:54.000000000 +0000 @@ -22,7 +22,7 @@ #include #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -30,16 +30,16 @@ */ #include -#include "../wrapper/tracepoint.h" +#include /* * Create LTTng tracepoint probes. */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/kvm.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Mathieu Desnoyers "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-kvm-x86.c lttng-modules-2.8.0/probes/lttng-probe-kvm-x86.c --- lttng-modules-2.7.1/probes/lttng-probe-kvm-x86.c 2015-10-24 07:33:20.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-kvm-x86.c 2016-05-20 01:34:54.000000000 +0000 @@ -22,8 +22,8 @@ #include #include -#include "../lttng-tracer.h" -#include "../lttng-kernel-version.h" +#include +#include #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) #include @@ -37,7 +37,7 @@ */ #include -#include "../wrapper/tracepoint.h" +#include /* * Create LTTng tracepoint probes. @@ -45,8 +45,8 @@ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module/arch/x86/kvm -#include "../instrumentation/events/lttng-module/arch/x86/kvm/trace.h" +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module/arch/x86/kvm +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Mathieu Desnoyers "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-kvm-x86-mmu.c lttng-modules-2.8.0/probes/lttng-probe-kvm-x86-mmu.c --- lttng-modules-2.7.1/probes/lttng-probe-kvm-x86-mmu.c 2015-10-24 07:33:20.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-kvm-x86-mmu.c 2016-05-20 01:34:54.000000000 +0000 @@ -22,8 +22,8 @@ #include #include -#include "../lttng-tracer.h" -#include "../lttng-kernel-version.h" +#include +#include #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) #include @@ -35,7 +35,7 @@ * Create the tracepoint static inlines from the kernel to validate that our * trace event macros match the kernel we run on. */ -#include "../wrapper/tracepoint.h" +#include #include <../../arch/x86/kvm/mmutrace.h> @@ -48,8 +48,8 @@ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module/arch/x86/kvm -#include "../instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h" +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module/arch/x86/kvm +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Mathieu Desnoyers "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-lock.c lttng-modules-2.8.0/probes/lttng-probe-lock.c --- lttng-modules-2.7.1/probes/lttng-probe-lock.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-lock.c 2016-05-20 01:34:54.000000000 +0000 @@ -23,7 +23,7 @@ #include #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -35,16 +35,16 @@ #include #endif -#include "../wrapper/tracepoint.h" +#include /* * Create LTTng tracepoint probes. */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/lock.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Wade Farnsworth and Andrew Gabbasov "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-module.c lttng-modules-2.8.0/probes/lttng-probe-module.c --- lttng-modules-2.7.1/probes/lttng-probe-module.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-module.c 2016-05-20 01:34:54.000000000 +0000 @@ -22,7 +22,7 @@ */ #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -30,16 +30,16 @@ */ #include -#include "../wrapper/tracepoint.h" +#include /* * Create LTTng tracepoint probes. */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/module.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Wade Farnsworth and Andrew Gabbasov "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-napi.c lttng-modules-2.8.0/probes/lttng-probe-napi.c --- lttng-modules-2.7.1/probes/lttng-probe-napi.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-napi.c 2016-05-20 01:34:54.000000000 +0000 @@ -22,7 +22,7 @@ */ #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -30,16 +30,16 @@ */ #include -#include "../wrapper/tracepoint.h" +#include /* * Create LTTng tracepoint probes. */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/napi.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Wade Farnsworth "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-net.c lttng-modules-2.8.0/probes/lttng-probe-net.c --- lttng-modules-2.7.1/probes/lttng-probe-net.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-net.c 2016-05-20 01:34:54.000000000 +0000 @@ -22,7 +22,7 @@ */ #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -35,9 +35,9 @@ */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/net.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Wade Farnsworth "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-power.c lttng-modules-2.8.0/probes/lttng-probe-power.c --- lttng-modules-2.7.1/probes/lttng-probe-power.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-power.c 2016-05-20 01:34:54.000000000 +0000 @@ -22,7 +22,7 @@ */ #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -30,16 +30,16 @@ */ #include -#include "../wrapper/tracepoint.h" +#include /* * Create LTTng tracepoint probes. */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/power.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Wade Farnsworth and Andrew Gabbasov "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-printk.c lttng-modules-2.8.0/probes/lttng-probe-printk.c --- lttng-modules-2.7.1/probes/lttng-probe-printk.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-printk.c 2016-05-20 01:34:54.000000000 +0000 @@ -22,7 +22,7 @@ */ #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -35,9 +35,9 @@ */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/printk.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Andrew Gabbasov "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-random.c lttng-modules-2.8.0/probes/lttng-probe-random.c --- lttng-modules-2.7.1/probes/lttng-probe-random.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-random.c 2016-05-20 01:34:54.000000000 +0000 @@ -22,7 +22,7 @@ */ #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -35,9 +35,9 @@ */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/random.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Andrew Gabbasov "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-rcu.c lttng-modules-2.8.0/probes/lttng-probe-rcu.c --- lttng-modules-2.7.1/probes/lttng-probe-rcu.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-rcu.c 2016-05-20 01:34:54.000000000 +0000 @@ -23,7 +23,7 @@ #include #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -36,9 +36,9 @@ */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/rcu.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Andrew Gabbasov "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-regmap.c lttng-modules-2.8.0/probes/lttng-probe-regmap.c --- lttng-modules-2.7.1/probes/lttng-probe-regmap.c 2015-10-24 07:33:20.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-regmap.c 2016-05-20 01:34:54.000000000 +0000 @@ -23,8 +23,8 @@ #include #include -#include "../lttng-kernel-version.h" -#include "../lttng-tracer.h" +#include +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -40,9 +40,9 @@ */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/regmap.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Andrew Gabbasov "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-regulator.c lttng-modules-2.8.0/probes/lttng-probe-regulator.c --- lttng-modules-2.7.1/probes/lttng-probe-regulator.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-regulator.c 2016-05-20 01:34:54.000000000 +0000 @@ -22,7 +22,7 @@ */ #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -35,9 +35,9 @@ */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/regulator.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Wade Farnsworth "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-rpm.c lttng-modules-2.8.0/probes/lttng-probe-rpm.c --- lttng-modules-2.7.1/probes/lttng-probe-rpm.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-rpm.c 2016-05-20 01:34:54.000000000 +0000 @@ -23,7 +23,7 @@ #include #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -36,9 +36,9 @@ */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/rpm.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Andrew Gabbasov "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-sched.c lttng-modules-2.8.0/probes/lttng-probe-sched.c --- lttng-modules-2.7.1/probes/lttng-probe-sched.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-sched.c 2016-05-20 01:34:54.000000000 +0000 @@ -21,7 +21,7 @@ */ #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -29,16 +29,16 @@ */ #include -#include "../wrapper/tracepoint.h" +#include /* * Create LTTng tracepoint probes. */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/sched.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Mathieu Desnoyers "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-scsi.c lttng-modules-2.8.0/probes/lttng-probe-scsi.c --- lttng-modules-2.7.1/probes/lttng-probe-scsi.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-scsi.c 2016-05-20 01:34:54.000000000 +0000 @@ -23,7 +23,7 @@ #include #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -36,9 +36,9 @@ */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/scsi.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Wade Farnsworth and Andrew Gabbasov "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-signal.c lttng-modules-2.8.0/probes/lttng-probe-signal.c --- lttng-modules-2.7.1/probes/lttng-probe-signal.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-signal.c 2016-05-20 01:34:54.000000000 +0000 @@ -21,7 +21,7 @@ */ #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -34,9 +34,9 @@ */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/signal.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Mathieu Desnoyers "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-skb.c lttng-modules-2.8.0/probes/lttng-probe-skb.c --- lttng-modules-2.7.1/probes/lttng-probe-skb.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-skb.c 2016-05-20 01:34:54.000000000 +0000 @@ -22,7 +22,7 @@ */ #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -30,16 +30,16 @@ */ #include -#include "../wrapper/tracepoint.h" +#include /* * Create LTTng tracepoint probes. */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/skb.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Wade Farnsworth and Andrew Gabbasov "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-sock.c lttng-modules-2.8.0/probes/lttng-probe-sock.c --- lttng-modules-2.7.1/probes/lttng-probe-sock.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-sock.c 2016-05-20 01:34:54.000000000 +0000 @@ -22,7 +22,7 @@ */ #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -35,9 +35,9 @@ */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/sock.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Wade Farnsworth "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-statedump.c lttng-modules-2.8.0/probes/lttng-probe-statedump.c --- lttng-modules-2.7.1/probes/lttng-probe-statedump.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-statedump.c 2016-05-20 01:34:54.000000000 +0000 @@ -28,8 +28,8 @@ #include #include #include -#include "../lttng-events.h" -#include "../lttng-tracer.h" +#include +#include /* * Create LTTng tracepoint probes. @@ -37,10 +37,10 @@ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS #define TP_SESSION_CHECK -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module #define TRACE_INCLUDE_FILE lttng-statedump -#include "../instrumentation/events/lttng-module/lttng-statedump.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Mathieu Desnoyers "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-sunrpc.c lttng-modules-2.8.0/probes/lttng-probe-sunrpc.c --- lttng-modules-2.7.1/probes/lttng-probe-sunrpc.c 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-sunrpc.c 2016-05-20 01:34:54.000000000 +0000 @@ -22,7 +22,7 @@ */ #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -35,9 +35,9 @@ */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/rpc.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Andrew Gabbasov "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-timer.c lttng-modules-2.8.0/probes/lttng-probe-timer.c --- lttng-modules-2.7.1/probes/lttng-probe-timer.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-timer.c 2016-05-20 01:34:54.000000000 +0000 @@ -21,7 +21,7 @@ */ #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -31,16 +31,16 @@ #include #include -#include "../wrapper/tracepoint.h" +#include /* * Create LTTng tracepoint probes. */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/timer.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Mathieu Desnoyers "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-udp.c lttng-modules-2.8.0/probes/lttng-probe-udp.c --- lttng-modules-2.7.1/probes/lttng-probe-udp.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-udp.c 2016-05-20 01:34:54.000000000 +0000 @@ -22,7 +22,7 @@ */ #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -35,9 +35,9 @@ */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/udp.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Wade Farnsworth "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-user.c lttng-modules-2.8.0/probes/lttng-probe-user.c --- lttng-modules-2.7.1/probes/lttng-probe-user.c 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-user.c 2016-05-20 01:34:54.000000000 +0000 @@ -20,7 +20,7 @@ #include #include -#include "lttng-probe-user.h" +#include /* * Calculate string length. Include final null terminating character if there is diff -Nru lttng-modules-2.7.1/probes/lttng-probe-v4l2.c lttng-modules-2.8.0/probes/lttng-probe-v4l2.c --- lttng-modules-2.7.1/probes/lttng-probe-v4l2.c 2015-12-05 10:06:26.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-v4l2.c 2016-05-20 01:34:54.000000000 +0000 @@ -24,7 +24,7 @@ #include #include #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our * trace event macros match the kernel we run on. @@ -36,9 +36,9 @@ */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/v4l2.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Wade Farnsworth "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-vmscan.c lttng-modules-2.8.0/probes/lttng-probe-vmscan.c --- lttng-modules-2.7.1/probes/lttng-probe-vmscan.c 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-vmscan.c 2016-05-20 01:34:54.000000000 +0000 @@ -22,7 +22,7 @@ */ #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -30,16 +30,16 @@ */ #include -#include "../lttng-kernel-version.h" +#include /* * Create LTTng tracepoint probes. */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/mm_vmscan.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Wade Farnsworth , Paul Woegerer , and Andrew Gabbasov "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-workqueue.c lttng-modules-2.8.0/probes/lttng-probe-workqueue.c --- lttng-modules-2.7.1/probes/lttng-probe-workqueue.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-workqueue.c 2016-05-20 01:34:54.000000000 +0000 @@ -23,7 +23,7 @@ #include #include -#include "../lttng-tracer.h" +#include struct cpu_workqueue_struct; struct pool_workqueue; @@ -34,16 +34,16 @@ */ #include -#include "../wrapper/tracepoint.h" +#include /* * Create LTTng tracepoint probes. */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/workqueue.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Andrew Gabbasov "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-writeback.c lttng-modules-2.8.0/probes/lttng-probe-writeback.c --- lttng-modules-2.7.1/probes/lttng-probe-writeback.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-writeback.c 2016-05-20 01:34:54.000000000 +0000 @@ -24,7 +24,7 @@ #include #include #include -#include "../lttng-tracer.h" +#include /* * Create the tracepoint static inlines from the kernel to validate that our @@ -32,8 +32,8 @@ */ #include -#include "../lttng-kernel-version.h" -#include "../wrapper/writeback.h" +#include +#include /* #if */ @@ -46,9 +46,9 @@ */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module -#include "../instrumentation/events/lttng-module/writeback.h" +#include MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Andrew Gabbasov "); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-x86-exceptions.c lttng-modules-2.8.0/probes/lttng-probe-x86-exceptions.c --- lttng-modules-2.7.1/probes/lttng-probe-x86-exceptions.c 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-x86-exceptions.c 2016-05-20 01:34:54.000000000 +0000 @@ -0,0 +1,52 @@ +/* + * probes/lttng-probe-x86-exceptions.c + * + * LTTng x86 exceptions probes. + * + * Copyright (C) 2010-2015 Mathieu Desnoyers + * + * 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 +#include + +/* + * Create the tracepoint static inlines from the kernel to validate that our + * trace event macros match the kernel we run on. + */ +#include + +#include + +#undef TRACE_INCLUDE_PATH +#undef TRACE_INCLUDE_FILE + +/* + * Create LTTng tracepoint probes. + */ +#define LTTNG_PACKAGE_BUILD +#define CREATE_TRACE_POINTS +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module/arch/x86 + +#include + +MODULE_LICENSE("GPL and additional rights"); +MODULE_AUTHOR("Mathieu Desnoyers "); +MODULE_DESCRIPTION("LTTng x86 exceptions probes"); +MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "." + __stringify(LTTNG_MODULES_MINOR_VERSION) "." + __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION) + LTTNG_MODULES_EXTRAVERSION); diff -Nru lttng-modules-2.7.1/probes/lttng-probe-x86-irq-vectors.c lttng-modules-2.8.0/probes/lttng-probe-x86-irq-vectors.c --- lttng-modules-2.7.1/probes/lttng-probe-x86-irq-vectors.c 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-probe-x86-irq-vectors.c 2016-05-20 01:34:54.000000000 +0000 @@ -0,0 +1,52 @@ +/* + * probes/lttng-probe-x86-irq-vectors.c + * + * LTTng x86 irq vectors probes. + * + * Copyright (C) 2010-2015 Mathieu Desnoyers + * + * 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 +#include + +/* + * Create the tracepoint static inlines from the kernel to validate that our + * trace event macros match the kernel we run on. + */ +#include + +#include + +#undef TRACE_INCLUDE_PATH +#undef TRACE_INCLUDE_FILE + +/* + * Create LTTng tracepoint probes. + */ +#define LTTNG_PACKAGE_BUILD +#define CREATE_TRACE_POINTS +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module/arch/x86 + +#include + +MODULE_LICENSE("GPL and additional rights"); +MODULE_AUTHOR("Mathieu Desnoyers "); +MODULE_DESCRIPTION("LTTng x86 irq vectors probes"); +MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "." + __stringify(LTTNG_MODULES_MINOR_VERSION) "." + __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION) + LTTNG_MODULES_EXTRAVERSION); diff -Nru lttng-modules-2.7.1/probes/lttng-test.c lttng-modules-2.8.0/probes/lttng-test.c --- lttng-modules-2.7.1/probes/lttng-test.c 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-test.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,142 +0,0 @@ -/* - * lttng-test.c - * - * Linux Trace Toolkit Next Generation Test Module - * - * Copyright 2015 Mathieu Desnoyers - * - * 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 -#include -#include -#include - -#include "../lttng-events.h" -#include "../lttng-tracer.h" -#include "../wrapper/tracepoint.h" -#include "../wrapper/kstrtox.h" - -#define TP_MODULE_NOAUTOLOAD -#define LTTNG_PACKAGE_BUILD -#define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module -#define TRACE_INCLUDE_FILE lttng-test -#define LTTNG_INSTRUMENTATION -#include "../instrumentation/events/lttng-module/lttng-test.h" - -DEFINE_TRACE(lttng_test_filter_event); - -#define LTTNG_TEST_FILTER_EVENT_FILE "lttng-test-filter-event" - -#define LTTNG_WRITE_COUNT_MAX 64 - -static struct proc_dir_entry *lttng_test_filter_event_dentry; - -static -void trace_test_event(unsigned int nr_iter) -{ - int i, netint; - long values[] = { 1, 2, 3 }; - char text[10] = "test"; - char escape[10] = "\\*"; - - for (i = 0; i < nr_iter; i++) { - netint = htonl(i); - trace_lttng_test_filter_event(i, netint, values, text, strlen(text), escape); - } -} - -/** - * lttng_filter_event_write - trigger a lttng_test_filter_event - * @file: file pointer - * @user_buf: user string - * @count: length to copy - * - * Return -1 on error, with EFAULT errno. Returns count on success. - */ -static -ssize_t lttng_test_filter_event_write(struct file *file, const char __user *user_buf, - size_t count, loff_t *ppos) -{ - unsigned int nr_iter; - ssize_t written; - int ret; - - /* Get the number of iterations */ - ret = lttng_kstrtouint_from_user(user_buf, count, 10, &nr_iter); - if (ret) { - written = ret; - goto end; - } - /* Trace the event */ - trace_test_event(nr_iter); - written = count; - *ppos += written; -end: - return written; -} - -static const struct file_operations lttng_test_filter_event_operations = { - .write = lttng_test_filter_event_write, -}; - -static -int __init lttng_test_init(void) -{ - int ret = 0; - - (void) wrapper_lttng_fixup_sig(THIS_MODULE); - wrapper_vmalloc_sync_all(); - lttng_test_filter_event_dentry = - proc_create_data(LTTNG_TEST_FILTER_EVENT_FILE, - S_IRUGO | S_IWUGO, NULL, - <tng_test_filter_event_operations, NULL); - if (!lttng_test_filter_event_dentry) { - printk(KERN_ERR "Error creating LTTng test filter file\n"); - ret = -ENOMEM; - goto error; - } - ret = __lttng_events_init__lttng_test(); - if (ret) - goto error_events; - return ret; - -error_events: - remove_proc_entry(LTTNG_TEST_FILTER_EVENT_FILE, NULL); -error: - return ret; -} - -module_init(lttng_test_init); - -static -void __exit lttng_test_exit(void) -{ - __lttng_events_exit__lttng_test(); - if (lttng_test_filter_event_dentry) - remove_proc_entry(LTTNG_TEST_FILTER_EVENT_FILE, NULL); -} - -module_exit(lttng_test_exit); - -MODULE_LICENSE("GPL and additional rights"); -MODULE_AUTHOR("Mathieu Desnoyers "); -MODULE_DESCRIPTION("LTTng Test"); -MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "." - __stringify(LTTNG_MODULES_MINOR_VERSION) "." - __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION) - LTTNG_MODULES_EXTRAVERSION); diff -Nru lttng-modules-2.7.1/probes/lttng-tracepoint-event.h lttng-modules-2.8.0/probes/lttng-tracepoint-event.h --- lttng-modules-2.7.1/probes/lttng-tracepoint-event.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-tracepoint-event.h 2016-05-20 19:51:59.000000000 +0000 @@ -37,9 +37,9 @@ #define LTTNG_TRACEPOINT_EVENT(name, proto, args, fields) \ _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))) -#define LTTNG_TRACEPOINT_EVENT_CODE(name, proto, args, _locvar, _code, fields) \ +#define LTTNG_TRACEPOINT_EVENT_CODE(name, proto, args, _locvar, _code_pre, fields, _code_post) \ _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))) -#define LTTNG_TRACEPOINT_EVENT_CODE_MAP(name, map, proto, args, _locvar, _code, fields) \ +#define LTTNG_TRACEPOINT_EVENT_CODE_MAP(name, map, proto, args, _locvar, _code_pre, fields, _code_post) \ _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))) #define LTTNG_TRACEPOINT_EVENT_MAP(name, map, proto, args, fields) \ _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))) @@ -47,8 +47,8 @@ _LTTNG_INSTRUMENTATION(DECLARE_TRACE_NOARGS(name)) #define LTTNG_TRACEPOINT_EVENT_CLASS(name, proto, args, fields) -#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code, _fields) -#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code, _fields) +#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post) +#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code_pre, _fields, _code_post) #define LTTNG_TRACEPOINT_EVENT_INSTANCE(template, name, proto, args) \ _LTTNG_INSTRUMENTATION(DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))) diff -Nru lttng-modules-2.7.1/probes/lttng-tracepoint-event-impl.h lttng-modules-2.8.0/probes/lttng-tracepoint-event-impl.h --- lttng-modules-2.7.1/probes/lttng-tracepoint-event-impl.h 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-tracepoint-event-impl.h 2016-05-20 19:51:59.000000000 +0000 @@ -0,0 +1,1184 @@ +/* + * lttng-tracepoint-event-impl.h + * + * Copyright (C) 2009 Steven Rostedt + * Copyright (C) 2009-2014 Mathieu Desnoyers + * + * 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 +#include +#include +#include +#include + +#include +#include +#include +#include /* for wrapper_vmalloc_sync_all() */ +#include +#include +#include +#include +#include + +#define __LTTNG_NULL_STRING "(null)" + +/* + * Macro declarations used for all stages. + */ + +/* + * LTTng name mapping macros. LTTng remaps some of the kernel events to + * enforce name-spacing. + */ +#undef LTTNG_TRACEPOINT_EVENT_MAP +#define LTTNG_TRACEPOINT_EVENT_MAP(name, map, proto, args, fields) \ + LTTNG_TRACEPOINT_EVENT_CLASS(map, \ + PARAMS(proto), \ + PARAMS(args), \ + PARAMS(fields)) \ + LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(map, name, map, PARAMS(proto), PARAMS(args)) + +#undef LTTNG_TRACEPOINT_EVENT_MAP_NOARGS +#define LTTNG_TRACEPOINT_EVENT_MAP_NOARGS(name, map, fields) \ + LTTNG_TRACEPOINT_EVENT_CLASS_NOARGS(map, \ + PARAMS(fields)) \ + LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS(map, name, map) + +#undef LTTNG_TRACEPOINT_EVENT_CODE_MAP +#define LTTNG_TRACEPOINT_EVENT_CODE_MAP(name, map, proto, args, _locvar, _code_pre, fields, _code_post) \ + LTTNG_TRACEPOINT_EVENT_CLASS_CODE(map, \ + PARAMS(proto), \ + PARAMS(args), \ + PARAMS(_locvar), \ + PARAMS(_code_pre), \ + PARAMS(fields), \ + PARAMS(_code_post)) \ + LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(map, name, map, PARAMS(proto), PARAMS(args)) + +#undef LTTNG_TRACEPOINT_EVENT_CODE +#define LTTNG_TRACEPOINT_EVENT_CODE(name, proto, args, _locvar, _code_pre, fields, _code_post) \ + LTTNG_TRACEPOINT_EVENT_CODE_MAP(name, name, \ + PARAMS(proto), \ + PARAMS(args), \ + PARAMS(_locvar), \ + PARAMS(_code_pre), \ + PARAMS(fields), \ + PARAMS(_code_post)) + +/* + * LTTNG_TRACEPOINT_EVENT_CLASS can be used to add a generic function + * handlers for events. That is, if all events have the same parameters + * and just have distinct trace points. Each tracepoint can be defined + * with LTTNG_TRACEPOINT_EVENT_INSTANCE and that will map the + * LTTNG_TRACEPOINT_EVENT_CLASS to the tracepoint. + * + * LTTNG_TRACEPOINT_EVENT is a one to one mapping between tracepoint and + * template. + */ + +#undef LTTNG_TRACEPOINT_EVENT +#define LTTNG_TRACEPOINT_EVENT(name, proto, args, fields) \ + LTTNG_TRACEPOINT_EVENT_MAP(name, name, \ + PARAMS(proto), \ + PARAMS(args), \ + PARAMS(fields)) + +#undef LTTNG_TRACEPOINT_EVENT_NOARGS +#define LTTNG_TRACEPOINT_EVENT_NOARGS(name, fields) \ + LTTNG_TRACEPOINT_EVENT_MAP_NOARGS(name, name, PARAMS(fields)) + +#undef LTTNG_TRACEPOINT_EVENT_INSTANCE +#define LTTNG_TRACEPOINT_EVENT_INSTANCE(template, name, proto, args) \ + LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(template, name, name, PARAMS(proto), PARAMS(args)) + +#undef LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS +#define LTTNG_TRACEPOINT_EVENT_INSTANCE_NOARGS(template, name) \ + LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS(template, name, name) + +#undef LTTNG_TRACEPOINT_EVENT_CLASS +#define LTTNG_TRACEPOINT_EVENT_CLASS(_name, _proto, _args, _fields) \ + LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, PARAMS(_proto), PARAMS(_args), , , \ + PARAMS(_fields), ) + +#undef LTTNG_TRACEPOINT_EVENT_CLASS_NOARGS +#define LTTNG_TRACEPOINT_EVENT_CLASS_NOARGS(_name, _fields) \ + LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, , , PARAMS(_fields), ) + + +/* + * Stage 1 of the trace events. + * + * Create dummy trace calls for each events, verifying that the LTTng module + * instrumentation headers match the kernel arguments. Will be optimized + * out by the compiler. + */ + +/* Reset all macros within TRACEPOINT_EVENT */ +#include + +#undef TP_PROTO +#define TP_PROTO(...) __VA_ARGS__ + +#undef TP_ARGS +#define TP_ARGS(...) __VA_ARGS__ + +#undef LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP +#define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(_template, _name, _map, _proto, _args) \ +void trace_##_name(_proto); + +#undef LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS +#define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS(_template, _name, _map) \ +void trace_##_name(void); + +#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) + +/* + * Stage 1.1 of the trace events. + * + * Create dummy trace prototypes for each event class, and for each used + * template. This will allow checking whether the prototypes from the + * class and the instance using the class actually match. + */ + +#include /* Reset all macros within TRACE_EVENT */ + +#undef TP_PROTO +#define TP_PROTO(...) __VA_ARGS__ + +#undef TP_ARGS +#define TP_ARGS(...) __VA_ARGS__ + +#undef LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP +#define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(_template, _name, _map, _proto, _args) \ +void __event_template_proto___##_template(_proto); + +#undef LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS +#define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS(_template, _name, _map) \ +void __event_template_proto___##_template(void); + +#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE +#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post) \ +void __event_template_proto___##_name(_proto); + +#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS +#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code_pre, _fields, _code_post) \ +void __event_template_proto___##_name(void); + +#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) + +/* + * Stage 2 of the trace events. + * + * Create event field type metadata section. + * Each event produce an array of fields. + */ + +/* Reset all macros within TRACEPOINT_EVENT */ +#include +#include +#include + +#undef _ctf_integer_ext +#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _user, _nowrite) \ + { \ + .name = #_item, \ + .type = __type_integer(_type, 0, 0, -1, _byte_order, _base, none),\ + .nowrite = _nowrite, \ + .user = _user, \ + }, + +#undef _ctf_array_encoded +#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _user, _nowrite) \ + { \ + .name = #_item, \ + .type = \ + { \ + .atype = atype_array, \ + .u = \ + { \ + .array = \ + { \ + .elem_type = __type_integer(_type, 0, 0, 0, __BYTE_ORDER, 10, _encoding), \ + .length = _length, \ + } \ + } \ + }, \ + .nowrite = _nowrite, \ + .user = _user, \ + }, + +#undef _ctf_array_bitfield +#define _ctf_array_bitfield(_type, _item, _src, _length, _user, _nowrite) \ + { \ + .name = #_item, \ + .type = \ + { \ + .atype = atype_array, \ + .u = \ + { \ + .array = \ + { \ + .elem_type = __type_integer(_type, 1, 1, 0, __LITTLE_ENDIAN, 10, none), \ + .length = (_length) * sizeof(_type) * CHAR_BIT, \ + .elem_alignment = lttng_alignof(_type), \ + } \ + } \ + }, \ + .nowrite = _nowrite, \ + .user = _user, \ + }, + + +#undef _ctf_sequence_encoded +#define _ctf_sequence_encoded(_type, _item, _src, \ + _length_type, _src_length, _encoding, \ + _byte_order, _base, _user, _nowrite) \ + { \ + .name = #_item, \ + .type = \ + { \ + .atype = atype_sequence, \ + .u = \ + { \ + .sequence = \ + { \ + .length_type = __type_integer(_length_type, 0, 0, 0, __BYTE_ORDER, 10, none), \ + .elem_type = __type_integer(_type, 0, 0, -1, _byte_order, _base, _encoding), \ + }, \ + }, \ + }, \ + .nowrite = _nowrite, \ + .user = _user, \ + }, + +#undef _ctf_sequence_bitfield +#define _ctf_sequence_bitfield(_type, _item, _src, \ + _length_type, _src_length, \ + _user, _nowrite) \ + { \ + .name = #_item, \ + .type = \ + { \ + .atype = atype_sequence, \ + .u = \ + { \ + .sequence = \ + { \ + .length_type = __type_integer(_length_type, 0, 0, 0, __BYTE_ORDER, 10, none), \ + .elem_type = __type_integer(_type, 1, 1, 0, __LITTLE_ENDIAN, 10, none), \ + .elem_alignment = lttng_alignof(_type), \ + }, \ + }, \ + }, \ + .nowrite = _nowrite, \ + .user = _user, \ + }, + +#undef _ctf_string +#define _ctf_string(_item, _src, _user, _nowrite) \ + { \ + .name = #_item, \ + .type = \ + { \ + .atype = atype_string, \ + .u = \ + { \ + .basic = { .string = { .encoding = lttng_encode_UTF8 } } \ + }, \ + }, \ + .nowrite = _nowrite, \ + .user = _user, \ + }, + +#undef TP_FIELDS +#define TP_FIELDS(...) __VA_ARGS__ /* Only one used in this phase */ + +#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS +#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code_pre, _fields, _code_post) \ + static const struct lttng_event_field __event_fields___##_name[] = { \ + _fields \ + }; + +#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE +#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post) \ + LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code_pre, PARAMS(_fields), _code_post) + +#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) + +/* + * Stage 3 of the trace events. + * + * Create probe callback prototypes. + */ + +/* Reset all macros within TRACEPOINT_EVENT */ +#include + +#undef TP_PROTO +#define TP_PROTO(...) __VA_ARGS__ + +#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE +#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post) \ +static void __event_probe__##_name(void *__data, _proto); + +#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS +#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code_pre, _fields, _code_post) \ +static void __event_probe__##_name(void *__data); + +#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) + +/* + * Stage 4 of the trace events. + * + * Create static inline function that calculates event size. + */ + +/* Reset all macros within TRACEPOINT_EVENT */ +#include +#include + +#undef _ctf_integer_ext +#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _user, _nowrite) \ + __event_len += lib_ring_buffer_align(__event_len, lttng_alignof(_type)); \ + __event_len += sizeof(_type); + +#undef _ctf_array_encoded +#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _user, _nowrite) \ + __event_len += lib_ring_buffer_align(__event_len, lttng_alignof(_type)); \ + __event_len += sizeof(_type) * (_length); + +#undef _ctf_array_bitfield +#define _ctf_array_bitfield(_type, _item, _src, _length, _user, _nowrite) \ + _ctf_array_encoded(_type, _item, _src, _length, none, _user, _nowrite) + +#undef _ctf_sequence_encoded +#define _ctf_sequence_encoded(_type, _item, _src, _length_type, \ + _src_length, _encoding, _byte_order, _base, _user, _nowrite) \ + __event_len += lib_ring_buffer_align(__event_len, lttng_alignof(_length_type)); \ + __event_len += sizeof(_length_type); \ + __event_len += lib_ring_buffer_align(__event_len, lttng_alignof(_type)); \ + __dynamic_len[__dynamic_len_idx] = (_src_length); \ + __event_len += sizeof(_type) * __dynamic_len[__dynamic_len_idx]; \ + __dynamic_len_idx++; + +#undef _ctf_sequence_bitfield +#define _ctf_sequence_bitfield(_type, _item, _src, \ + _length_type, _src_length, \ + _user, _nowrite) \ + _ctf_sequence_encoded(_type, _item, _src, _length_type, _src_length, \ + none, __LITTLE_ENDIAN, 10, _user, _nowrite) + +/* + * ctf_user_string includes \0. If returns 0, it faulted, so we set size to + * 1 (\0 only). + */ +#undef _ctf_string +#define _ctf_string(_item, _src, _user, _nowrite) \ + if (_user) \ + __event_len += __dynamic_len[__dynamic_len_idx++] = \ + max_t(size_t, lttng_strlen_user_inatomic(_src), 1); \ + else \ + __event_len += __dynamic_len[__dynamic_len_idx++] = \ + strlen((_src) ? (_src) : __LTTNG_NULL_STRING) + 1; + +#undef TP_PROTO +#define TP_PROTO(...) __VA_ARGS__ + +#undef TP_FIELDS +#define TP_FIELDS(...) __VA_ARGS__ + +#undef TP_locvar +#define TP_locvar(...) __VA_ARGS__ + +#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE +#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post) \ +static inline size_t __event_get_size__##_name(size_t *__dynamic_len, \ + void *__tp_locvar, _proto) \ +{ \ + size_t __event_len = 0; \ + unsigned int __dynamic_len_idx __attribute__((unused)) = 0; \ + struct { _locvar } *tp_locvar __attribute__((unused)) = __tp_locvar; \ + \ + _fields \ + return __event_len; \ +} + +#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS +#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code_pre, _fields, _code_post) \ +static inline size_t __event_get_size__##_name(size_t *__dynamic_len, \ + void *__tp_locvar) \ +{ \ + size_t __event_len = 0; \ + unsigned int __dynamic_len_idx __attribute__((unused)) = 0; \ + struct { _locvar } *tp_locvar __attribute__((unused)) = __tp_locvar; \ + \ + _fields \ + return __event_len; \ +} + +#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) + + +/* + * Stage 4.1 of tracepoint event generation. + * + * Create static inline function that layout the filter stack data. + * We make both write and nowrite data available to the filter. + */ + +/* Reset all macros within TRACEPOINT_EVENT */ +#include +#include +#include + +#undef _ctf_integer_ext_fetched +#define _ctf_integer_ext_fetched(_type, _item, _src, _byte_order, _base, _nowrite) \ + if (lttng_is_signed_type(_type)) { \ + int64_t __ctf_tmp_int64; \ + switch (sizeof(_type)) { \ + case 1: \ + { \ + union { _type t; int8_t v; } __tmp = { (_type) (_src) }; \ + __ctf_tmp_int64 = (int64_t) __tmp.v; \ + break; \ + } \ + case 2: \ + { \ + union { _type t; int16_t v; } __tmp = { (_type) (_src) }; \ + if (_byte_order != __BYTE_ORDER) \ + __swab16s(&__tmp.v); \ + __ctf_tmp_int64 = (int64_t) __tmp.v; \ + break; \ + } \ + case 4: \ + { \ + union { _type t; int32_t v; } __tmp = { (_type) (_src) }; \ + if (_byte_order != __BYTE_ORDER) \ + __swab32s(&__tmp.v); \ + __ctf_tmp_int64 = (int64_t) __tmp.v; \ + break; \ + } \ + case 8: \ + { \ + union { _type t; int64_t v; } __tmp = { (_type) (_src) }; \ + if (_byte_order != __BYTE_ORDER) \ + __swab64s(&__tmp.v); \ + __ctf_tmp_int64 = (int64_t) __tmp.v; \ + break; \ + } \ + default: \ + BUG_ON(1); \ + }; \ + memcpy(__stack_data, &__ctf_tmp_int64, sizeof(int64_t)); \ + } else { \ + uint64_t __ctf_tmp_uint64; \ + switch (sizeof(_type)) { \ + case 1: \ + { \ + union { _type t; uint8_t v; } __tmp = { (_type) (_src) }; \ + __ctf_tmp_uint64 = (uint64_t) __tmp.v; \ + break; \ + } \ + case 2: \ + { \ + union { _type t; uint16_t v; } __tmp = { (_type) (_src) }; \ + if (_byte_order != __BYTE_ORDER) \ + __swab16s(&__tmp.v); \ + __ctf_tmp_uint64 = (uint64_t) __tmp.v; \ + break; \ + } \ + case 4: \ + { \ + union { _type t; uint32_t v; } __tmp = { (_type) (_src) }; \ + if (_byte_order != __BYTE_ORDER) \ + __swab32s(&__tmp.v); \ + __ctf_tmp_uint64 = (uint64_t) __tmp.v; \ + break; \ + } \ + case 8: \ + { \ + union { _type t; uint64_t v; } __tmp = { (_type) (_src) }; \ + if (_byte_order != __BYTE_ORDER) \ + __swab64s(&__tmp.v); \ + __ctf_tmp_uint64 = (uint64_t) __tmp.v; \ + break; \ + } \ + default: \ + BUG_ON(1); \ + }; \ + memcpy(__stack_data, &__ctf_tmp_uint64, sizeof(uint64_t)); \ + } \ + __stack_data += sizeof(int64_t); + +#undef _ctf_integer_ext_isuser0 +#define _ctf_integer_ext_isuser0(_type, _item, _src, _byte_order, _base, _nowrite) \ + _ctf_integer_ext_fetched(_type, _item, _src, _byte_order, _base, _nowrite) + +#undef _ctf_integer_ext_isuser1 +#define _ctf_integer_ext_isuser1(_type, _item, _user_src, _byte_order, _base, _nowrite) \ +{ \ + union { \ + char __array[sizeof(_user_src)]; \ + __typeof__(_user_src) __v; \ + } __tmp_fetch; \ + if (lib_ring_buffer_copy_from_user_check_nofault(__tmp_fetch.__array, \ + &(_user_src), sizeof(_user_src))) \ + memset(__tmp_fetch.__array, 0, sizeof(__tmp_fetch.__array)); \ + _ctf_integer_ext_fetched(_type, _item, __tmp_fetch.__v, _byte_order, _base, _nowrite) \ +} + +#undef _ctf_integer_ext +#define _ctf_integer_ext(_type, _item, _user_src, _byte_order, _base, _user, _nowrite) \ + _ctf_integer_ext_isuser##_user(_type, _item, _user_src, _byte_order, _base, _nowrite) + +#undef _ctf_array_encoded +#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _user, _nowrite) \ + { \ + unsigned long __ctf_tmp_ulong = (unsigned long) (_length); \ + const void *__ctf_tmp_ptr = (_src); \ + memcpy(__stack_data, &__ctf_tmp_ulong, sizeof(unsigned long)); \ + __stack_data += sizeof(unsigned long); \ + memcpy(__stack_data, &__ctf_tmp_ptr, sizeof(void *)); \ + __stack_data += sizeof(void *); \ + } + +#undef _ctf_array_bitfield +#define _ctf_array_bitfield(_type, _item, _src, _length, _user, _nowrite) \ + _ctf_array_encoded(_type, _item, _src, _length, none, _user, _nowrite) + +#undef _ctf_sequence_encoded +#define _ctf_sequence_encoded(_type, _item, _src, _length_type, \ + _src_length, _encoding, _byte_order, _base, _user, _nowrite) \ + { \ + unsigned long __ctf_tmp_ulong = (unsigned long) (_src_length); \ + const void *__ctf_tmp_ptr = (_src); \ + memcpy(__stack_data, &__ctf_tmp_ulong, sizeof(unsigned long)); \ + __stack_data += sizeof(unsigned long); \ + memcpy(__stack_data, &__ctf_tmp_ptr, sizeof(void *)); \ + __stack_data += sizeof(void *); \ + } + +#undef _ctf_sequence_bitfield +#define _ctf_sequence_bitfield(_type, _item, _src, \ + _length_type, _src_length, \ + _user, _nowrite) \ + _ctf_sequence_encoded(_type, _item, _src, _length_type, _src_length, \ + none, __LITTLE_ENDIAN, 10, _user, _nowrite) + +#undef _ctf_string +#define _ctf_string(_item, _src, _user, _nowrite) \ + { \ + const void *__ctf_tmp_ptr = \ + ((_src) ? (_src) : __LTTNG_NULL_STRING); \ + memcpy(__stack_data, &__ctf_tmp_ptr, sizeof(void *)); \ + __stack_data += sizeof(void *); \ + } + +#undef TP_PROTO +#define TP_PROTO(...) __VA_ARGS__ + +#undef TP_FIELDS +#define TP_FIELDS(...) __VA_ARGS__ + +#undef TP_locvar +#define TP_locvar(...) __VA_ARGS__ + +#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS +#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code_pre, _fields, _code_post) \ +static inline \ +void __event_prepare_filter_stack__##_name(char *__stack_data, \ + void *__tp_locvar) \ +{ \ + struct { _locvar } *tp_locvar __attribute__((unused)) = __tp_locvar; \ + \ + _fields \ +} + +#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE +#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post) \ +static inline \ +void __event_prepare_filter_stack__##_name(char *__stack_data, \ + void *__tp_locvar, _proto) \ +{ \ + struct { _locvar } *tp_locvar __attribute__((unused)) = __tp_locvar; \ + \ + _fields \ +} + +#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) + +/* + * Stage 5 of the trace events. + * + * Create static inline function that calculates event payload alignment. + */ + +/* Reset all macros within TRACEPOINT_EVENT */ +#include +#include + +#undef _ctf_integer_ext +#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _user, _nowrite) \ + __event_align = max_t(size_t, __event_align, lttng_alignof(_type)); + +#undef _ctf_array_encoded +#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _user, _nowrite) \ + __event_align = max_t(size_t, __event_align, lttng_alignof(_type)); + +#undef _ctf_array_bitfield +#define _ctf_array_bitfield(_type, _item, _src, _length, _user, _nowrite) \ + _ctf_array_encoded(_type, _item, _src, _length, none, _user, _nowrite) + +#undef _ctf_sequence_encoded +#define _ctf_sequence_encoded(_type, _item, _src, _length_type, \ + _src_length, _encoding, _byte_order, _base, _user, _nowrite) \ + __event_align = max_t(size_t, __event_align, lttng_alignof(_length_type)); \ + __event_align = max_t(size_t, __event_align, lttng_alignof(_type)); + +#undef _ctf_sequence_bitfield +#define _ctf_sequence_bitfield(_type, _item, _src, \ + _length_type, _src_length, \ + _user, _nowrite) \ + _ctf_sequence_encoded(_type, _item, _src, _length_type, _src_length, \ + none, __LITTLE_ENDIAN, 10, _user, _nowrite) + +#undef _ctf_string +#define _ctf_string(_item, _src, _user, _nowrite) + +#undef TP_PROTO +#define TP_PROTO(...) __VA_ARGS__ + +#undef TP_FIELDS +#define TP_FIELDS(...) __VA_ARGS__ + +#undef TP_locvar +#define TP_locvar(...) __VA_ARGS__ + +#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE +#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post) \ +static inline size_t __event_get_align__##_name(void *__tp_locvar, _proto) \ +{ \ + size_t __event_align = 1; \ + struct { _locvar } *tp_locvar __attribute__((unused)) = __tp_locvar; \ + \ + _fields \ + return __event_align; \ +} + +#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS +#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code_pre, _fields, _code_post) \ +static inline size_t __event_get_align__##_name(void *__tp_locvar) \ +{ \ + size_t __event_align = 1; \ + struct { _locvar } *tp_locvar __attribute__((unused)) = __tp_locvar; \ + \ + _fields \ + return __event_align; \ +} + +#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) + +/* + * Stage 6 of tracepoint event generation. + * + * Create the probe function. This function calls event size calculation + * and writes event data into the buffer. + */ + +/* Reset all macros within TRACEPOINT_EVENT */ +#include +#include + +#undef _ctf_integer_ext_fetched +#define _ctf_integer_ext_fetched(_type, _item, _src, _byte_order, _base, _nowrite) \ + { \ + _type __tmp = _src; \ + lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(__tmp));\ + __chan->ops->event_write(&__ctx, &__tmp, sizeof(__tmp));\ + } + +#undef _ctf_integer_ext_isuser0 +#define _ctf_integer_ext_isuser0(_type, _item, _src, _byte_order, _base, _nowrite) \ + _ctf_integer_ext_fetched(_type, _item, _src, _byte_order, _base, _nowrite) + +#undef _ctf_integer_ext_isuser1 +#define _ctf_integer_ext_isuser1(_type, _item, _user_src, _byte_order, _base, _nowrite) \ +{ \ + union { \ + char __array[sizeof(_user_src)]; \ + __typeof__(_user_src) __v; \ + } __tmp_fetch; \ + if (lib_ring_buffer_copy_from_user_check_nofault(__tmp_fetch.__array, \ + &(_user_src), sizeof(_user_src))) \ + memset(__tmp_fetch.__array, 0, sizeof(__tmp_fetch.__array)); \ + _ctf_integer_ext_fetched(_type, _item, __tmp_fetch.__v, _byte_order, _base, _nowrite) \ +} + +#undef _ctf_integer_ext +#define _ctf_integer_ext(_type, _item, _user_src, _byte_order, _base, _user, _nowrite) \ + _ctf_integer_ext_isuser##_user(_type, _item, _user_src, _byte_order, _base, _nowrite) + +#undef _ctf_array_encoded +#define _ctf_array_encoded(_type, _item, _src, _length, _encoding, _user, _nowrite) \ + lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(_type)); \ + if (_user) { \ + __chan->ops->event_write_from_user(&__ctx, _src, sizeof(_type) * (_length)); \ + } else { \ + __chan->ops->event_write(&__ctx, _src, sizeof(_type) * (_length)); \ + } + +#if (__BYTE_ORDER == __LITTLE_ENDIAN) +#undef _ctf_array_bitfield +#define _ctf_array_bitfield(_type, _item, _src, _length, _user, _nowrite) \ + lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(_type)); \ + if (_user) { \ + __chan->ops->event_write_from_user(&__ctx, _src, sizeof(_type) * (_length)); \ + } else { \ + __chan->ops->event_write(&__ctx, _src, sizeof(_type) * (_length)); \ + } +#else /* #if (__BYTE_ORDER == __LITTLE_ENDIAN) */ +/* + * For big endian, we need to byteswap into little endian. + */ +#undef _ctf_array_bitfield +#define _ctf_array_bitfield(_type, _item, _src, _length, _user, _nowrite) \ + lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(_type)); \ + { \ + size_t _i; \ + \ + for (_i = 0; _i < (_length); _i++) { \ + _type _tmp; \ + \ + if (_user) { \ + if (get_user(_tmp, (_type *) _src + _i)) \ + _tmp = 0; \ + } else { \ + _tmp = ((_type *) _src)[_i]; \ + } \ + switch (sizeof(_type)) { \ + case 1: \ + break; \ + case 2: \ + _tmp = cpu_to_le16(_tmp); \ + break; \ + case 4: \ + _tmp = cpu_to_le32(_tmp); \ + break; \ + case 8: \ + _tmp = cpu_to_le64(_tmp); \ + break; \ + default: \ + BUG_ON(1); \ + } \ + __chan->ops->event_write(&__ctx, &_tmp, sizeof(_type)); \ + } \ + } +#endif /* #else #if (__BYTE_ORDER == __LITTLE_ENDIAN) */ + +#undef _ctf_sequence_encoded +#define _ctf_sequence_encoded(_type, _item, _src, _length_type, \ + _src_length, _encoding, _byte_order, _base, _user, _nowrite) \ + { \ + _length_type __tmpl = __stackvar.__dynamic_len[__dynamic_len_idx]; \ + lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(_length_type));\ + __chan->ops->event_write(&__ctx, &__tmpl, sizeof(_length_type));\ + } \ + lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(_type)); \ + if (_user) { \ + __chan->ops->event_write_from_user(&__ctx, _src, \ + sizeof(_type) * __get_dynamic_len(dest)); \ + } else { \ + __chan->ops->event_write(&__ctx, _src, \ + sizeof(_type) * __get_dynamic_len(dest)); \ + } + +#if (__BYTE_ORDER == __LITTLE_ENDIAN) +#undef _ctf_sequence_bitfield +#define _ctf_sequence_bitfield(_type, _item, _src, \ + _length_type, _src_length, \ + _user, _nowrite) \ + { \ + _length_type __tmpl = __stackvar.__dynamic_len[__dynamic_len_idx] * sizeof(_type) * CHAR_BIT; \ + lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(_length_type));\ + __chan->ops->event_write(&__ctx, &__tmpl, sizeof(_length_type));\ + } \ + lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(_type)); \ + if (_user) { \ + __chan->ops->event_write_from_user(&__ctx, _src, \ + sizeof(_type) * __get_dynamic_len(dest)); \ + } else { \ + __chan->ops->event_write(&__ctx, _src, \ + sizeof(_type) * __get_dynamic_len(dest)); \ + } +#else /* #if (__BYTE_ORDER == __LITTLE_ENDIAN) */ +/* + * For big endian, we need to byteswap into little endian. + */ +#undef _ctf_sequence_bitfield +#define _ctf_sequence_bitfield(_type, _item, _src, \ + _length_type, _src_length, \ + _user, _nowrite) \ + { \ + _length_type __tmpl = __stackvar.__dynamic_len[__dynamic_len_idx] * sizeof(_type) * CHAR_BIT; \ + lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(_length_type));\ + __chan->ops->event_write(&__ctx, &__tmpl, sizeof(_length_type));\ + } \ + lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(_type)); \ + { \ + size_t _i, _length; \ + \ + _length = __get_dynamic_len(dest); \ + for (_i = 0; _i < _length; _i++) { \ + _type _tmp; \ + \ + if (_user) { \ + if (get_user(_tmp, (_type *) _src + _i)) \ + _tmp = 0; \ + } else { \ + _tmp = ((_type *) _src)[_i]; \ + } \ + switch (sizeof(_type)) { \ + case 1: \ + break; \ + case 2: \ + _tmp = cpu_to_le16(_tmp); \ + break; \ + case 4: \ + _tmp = cpu_to_le32(_tmp); \ + break; \ + case 8: \ + _tmp = cpu_to_le64(_tmp); \ + break; \ + default: \ + BUG_ON(1); \ + } \ + __chan->ops->event_write(&__ctx, &_tmp, sizeof(_type)); \ + } \ + } +#endif /* #else #if (__BYTE_ORDER == __LITTLE_ENDIAN) */ + +#undef _ctf_string +#define _ctf_string(_item, _src, _user, _nowrite) \ + if (_user) { \ + lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(*(_src))); \ + __chan->ops->event_strcpy_from_user(&__ctx, _src, \ + __get_dynamic_len(dest)); \ + } else { \ + const char *__ctf_tmp_string = \ + ((_src) ? (_src) : __LTTNG_NULL_STRING); \ + lib_ring_buffer_align_ctx(&__ctx, \ + lttng_alignof(*__ctf_tmp_string)); \ + __chan->ops->event_strcpy(&__ctx, __ctf_tmp_string, \ + __get_dynamic_len(dest)); \ + } + +/* Beware: this get len actually consumes the len value */ +#undef __get_dynamic_len +#define __get_dynamic_len(field) __stackvar.__dynamic_len[__dynamic_len_idx++] + +#undef TP_PROTO +#define TP_PROTO(...) __VA_ARGS__ + +#undef TP_ARGS +#define TP_ARGS(...) __VA_ARGS__ + +#undef TP_FIELDS +#define TP_FIELDS(...) __VA_ARGS__ + +#undef TP_locvar +#define TP_locvar(...) __VA_ARGS__ + +#undef TP_code_pre +#define TP_code_pre(...) __VA_ARGS__ + +#undef TP_code_post +#define TP_code_post(...) __VA_ARGS__ + +/* + * For state dump, check that "session" argument (mandatory) matches the + * session this event belongs to. Ensures that we write state dump data only + * into the started session, not into all sessions. + */ +#ifdef TP_SESSION_CHECK +#define _TP_SESSION_CHECK(session, csession) (session == csession) +#else /* TP_SESSION_CHECK */ +#define _TP_SESSION_CHECK(session, csession) 1 +#endif /* TP_SESSION_CHECK */ + +/* + * Using twice size for filter stack data to hold size and pointer for + * each field (worse case). For integers, max size required is 64-bit. + * Same for double-precision floats. Those fit within + * 2*sizeof(unsigned long) for all supported architectures. + * Perform UNION (||) of filter runtime list. + */ +#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE +#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE(_name, _proto, _args, _locvar, _code_pre, _fields, _code_post) \ +static void __event_probe__##_name(void *__data, _proto) \ +{ \ + struct probe_local_vars { _locvar }; \ + struct lttng_event *__event = __data; \ + struct lttng_probe_ctx __lttng_probe_ctx = { \ + .event = __event, \ + .interruptible = !irqs_disabled(), \ + }; \ + struct lttng_channel *__chan = __event->chan; \ + struct lttng_session *__session = __chan->session; \ + struct lib_ring_buffer_ctx __ctx; \ + size_t __event_len, __event_align; \ + size_t __dynamic_len_idx __attribute__((unused)) = 0; \ + union { \ + size_t __dynamic_len[ARRAY_SIZE(__event_fields___##_name)]; \ + char __filter_stack_data[2 * sizeof(unsigned long) * ARRAY_SIZE(__event_fields___##_name)]; \ + } __stackvar; \ + int __ret; \ + struct probe_local_vars __tp_locvar; \ + struct probe_local_vars *tp_locvar __attribute__((unused)) = \ + &__tp_locvar; \ + struct lttng_pid_tracker *__lpf; \ + \ + if (!_TP_SESSION_CHECK(session, __session)) \ + return; \ + if (unlikely(!ACCESS_ONCE(__session->active))) \ + return; \ + if (unlikely(!ACCESS_ONCE(__chan->enabled))) \ + return; \ + if (unlikely(!ACCESS_ONCE(__event->enabled))) \ + return; \ + __lpf = lttng_rcu_dereference(__session->pid_tracker); \ + if (__lpf && likely(!lttng_pid_tracker_lookup(__lpf, current->pid))) \ + return; \ + _code_pre \ + if (unlikely(!list_empty(&__event->bytecode_runtime_head))) { \ + struct lttng_bytecode_runtime *bc_runtime; \ + int __filter_record = __event->has_enablers_without_bytecode; \ + \ + __event_prepare_filter_stack__##_name(__stackvar.__filter_stack_data, \ + tp_locvar, _args); \ + lttng_list_for_each_entry_rcu(bc_runtime, &__event->bytecode_runtime_head, node) { \ + if (unlikely(bc_runtime->filter(bc_runtime, &__lttng_probe_ctx, \ + __stackvar.__filter_stack_data) & LTTNG_FILTER_RECORD_FLAG)) \ + __filter_record = 1; \ + } \ + if (likely(!__filter_record)) \ + goto __post; \ + } \ + __event_len = __event_get_size__##_name(__stackvar.__dynamic_len, \ + tp_locvar, _args); \ + __event_align = __event_get_align__##_name(tp_locvar, _args); \ + lib_ring_buffer_ctx_init(&__ctx, __chan->chan, &__lttng_probe_ctx, __event_len, \ + __event_align, -1); \ + __ret = __chan->ops->event_reserve(&__ctx, __event->id); \ + if (__ret < 0) \ + goto __post; \ + _fields \ + __chan->ops->event_commit(&__ctx); \ +__post: \ + _code_post \ + return; \ +} + +#undef LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS +#define LTTNG_TRACEPOINT_EVENT_CLASS_CODE_NOARGS(_name, _locvar, _code_pre, _fields, _code_post) \ +static void __event_probe__##_name(void *__data) \ +{ \ + struct probe_local_vars { _locvar }; \ + struct lttng_event *__event = __data; \ + struct lttng_probe_ctx __lttng_probe_ctx = { \ + .event = __event, \ + .interruptible = !irqs_disabled(), \ + }; \ + struct lttng_channel *__chan = __event->chan; \ + struct lttng_session *__session = __chan->session; \ + struct lib_ring_buffer_ctx __ctx; \ + size_t __event_len, __event_align; \ + size_t __dynamic_len_idx __attribute__((unused)) = 0; \ + union { \ + size_t __dynamic_len[ARRAY_SIZE(__event_fields___##_name)]; \ + char __filter_stack_data[2 * sizeof(unsigned long) * ARRAY_SIZE(__event_fields___##_name)]; \ + } __stackvar; \ + int __ret; \ + struct probe_local_vars __tp_locvar; \ + struct probe_local_vars *tp_locvar __attribute__((unused)) = \ + &__tp_locvar; \ + struct lttng_pid_tracker *__lpf; \ + \ + if (!_TP_SESSION_CHECK(session, __session)) \ + return; \ + if (unlikely(!ACCESS_ONCE(__session->active))) \ + return; \ + if (unlikely(!ACCESS_ONCE(__chan->enabled))) \ + return; \ + if (unlikely(!ACCESS_ONCE(__event->enabled))) \ + return; \ + __lpf = lttng_rcu_dereference(__session->pid_tracker); \ + if (__lpf && likely(!lttng_pid_tracker_lookup(__lpf, current->pid))) \ + return; \ + _code_pre \ + if (unlikely(!list_empty(&__event->bytecode_runtime_head))) { \ + struct lttng_bytecode_runtime *bc_runtime; \ + int __filter_record = __event->has_enablers_without_bytecode; \ + \ + __event_prepare_filter_stack__##_name(__stackvar.__filter_stack_data, \ + tp_locvar); \ + lttng_list_for_each_entry_rcu(bc_runtime, &__event->bytecode_runtime_head, node) { \ + if (unlikely(bc_runtime->filter(bc_runtime, &__lttng_probe_ctx, \ + __stackvar.__filter_stack_data) & LTTNG_FILTER_RECORD_FLAG)) \ + __filter_record = 1; \ + } \ + if (likely(!__filter_record)) \ + goto __post; \ + } \ + __event_len = __event_get_size__##_name(__stackvar.__dynamic_len, tp_locvar); \ + __event_align = __event_get_align__##_name(tp_locvar); \ + lib_ring_buffer_ctx_init(&__ctx, __chan->chan, &__lttng_probe_ctx, __event_len, \ + __event_align, -1); \ + __ret = __chan->ops->event_reserve(&__ctx, __event->id); \ + if (__ret < 0) \ + goto __post; \ + _fields \ + __chan->ops->event_commit(&__ctx); \ +__post: \ + _code_post \ + return; \ +} + +#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) + +#undef __get_dynamic_len + +/* + * Stage 7 of the trace events. + * + * Create event descriptions. + */ + +/* Named field types must be defined in lttng-types.h */ + +#include /* Reset all macros within LTTNG_TRACEPOINT_EVENT */ + +#ifndef TP_PROBE_CB +#define TP_PROBE_CB(_template) &__event_probe__##_template +#endif + +#undef LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS +#define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS(_template, _name, _map) \ +static const struct lttng_event_desc __event_desc___##_map = { \ + .fields = __event_fields___##_template, \ + .name = #_map, \ + .kname = #_name, \ + .probe_callback = (void *) TP_PROBE_CB(_template), \ + .nr_fields = ARRAY_SIZE(__event_fields___##_template), \ + .owner = THIS_MODULE, \ +}; + +#undef LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP +#define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(_template, _name, _map, _proto, _args) \ + LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS(_template, _name, _map) + +#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) + +/* + * Stage 8 of the trace events. + * + * Create an array of event description pointers. + */ + +#include /* Reset all macros within LTTNG_TRACEPOINT_EVENT */ + +#undef LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS +#define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS(_template, _name, _map) \ + &__event_desc___##_map, + +#undef LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP +#define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(_template, _name, _map, _proto, _args) \ + LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS(_template, _name, _map) + +#define TP_ID1(_token, _system) _token##_system +#define TP_ID(_token, _system) TP_ID1(_token, _system) + +static const struct lttng_event_desc *TP_ID(__event_desc___, TRACE_SYSTEM)[] = { +#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) +}; + +#undef TP_ID1 +#undef TP_ID + +/* + * Stage 9 of the trace events. + * + * Create a toplevel descriptor for the whole probe. + */ + +#define TP_ID1(_token, _system) _token##_system +#define TP_ID(_token, _system) TP_ID1(_token, _system) + +/* non-const because list head will be modified when registered. */ +static __used struct lttng_probe_desc TP_ID(__probe_desc___, TRACE_SYSTEM) = { + .provider = __stringify(TRACE_SYSTEM), + .event_desc = TP_ID(__event_desc___, TRACE_SYSTEM), + .nr_events = ARRAY_SIZE(TP_ID(__event_desc___, TRACE_SYSTEM)), + .head = { NULL, NULL }, + .lazy_init_head = { NULL, NULL }, + .lazy = 0, +}; + +#undef TP_ID1 +#undef TP_ID + +/* + * Stage 10 of the trace events. + * + * Register/unregister probes at module load/unload. + */ + +#include /* Reset all macros within LTTNG_TRACEPOINT_EVENT */ + +#define TP_ID1(_token, _system) _token##_system +#define TP_ID(_token, _system) TP_ID1(_token, _system) +#define module_init_eval1(_token, _system) module_init(_token##_system) +#define module_init_eval(_token, _system) module_init_eval1(_token, _system) +#define module_exit_eval1(_token, _system) module_exit(_token##_system) +#define module_exit_eval(_token, _system) module_exit_eval1(_token, _system) + +#ifndef TP_MODULE_NOINIT +static int TP_ID(__lttng_events_init__, TRACE_SYSTEM)(void) +{ + wrapper_vmalloc_sync_all(); + return lttng_probe_register(&TP_ID(__probe_desc___, TRACE_SYSTEM)); +} + +static void TP_ID(__lttng_events_exit__, TRACE_SYSTEM)(void) +{ + lttng_probe_unregister(&TP_ID(__probe_desc___, TRACE_SYSTEM)); +} + +#ifndef TP_MODULE_NOAUTOLOAD +module_init_eval(__lttng_events_init__, TRACE_SYSTEM); +module_exit_eval(__lttng_events_exit__, TRACE_SYSTEM); +#endif + +#endif + +#undef module_init_eval +#undef module_exit_eval +#undef TP_ID1 +#undef TP_ID + +#undef TP_PROTO +#undef TP_ARGS diff -Nru lttng-modules-2.7.1/probes/lttng-type-list.h lttng-modules-2.8.0/probes/lttng-type-list.h --- lttng-modules-2.7.1/probes/lttng-type-list.h 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-type-list.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -/* - * lttng-type-list.h - * - * Copyright (C) 2010-2012 Mathieu Desnoyers - * - * 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 - */ - -/* Type list, used to create metadata */ - -/* Enumerations */ -TRACE_EVENT_ENUM(hrtimer_mode, - V(HRTIMER_MODE_ABS), - V(HRTIMER_MODE_REL), - V(HRTIMER_MODE_PINNED), - V(HRTIMER_MODE_ABS_PINNED), - V(HRTIMER_MODE_REL_PINNED), - R(HRTIMER_MODE_UNDEFINED, 0x04, 0x20), /* Example (to remove) */ -) - -TRACE_EVENT_TYPE(hrtimer_mode, enum, unsigned char) diff -Nru lttng-modules-2.7.1/probes/lttng-types.c lttng-modules-2.8.0/probes/lttng-types.c --- lttng-modules-2.7.1/probes/lttng-types.c 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-types.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,66 +0,0 @@ -/* - * probes/lttng-types.c - * - * LTTng types. - * - * Copyright (C) 2010-2012 Mathieu Desnoyers - * - * 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 -#include -#include "../wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */ -#include "../lttng-events.h" -#include "lttng-types.h" -#include -#include "../lttng-tracer.h" - -#define STAGE_EXPORT_ENUMS -#include "lttng-types.h" -#include "lttng-type-list.h" -#undef STAGE_EXPORT_ENUMS - -struct lttng_enum lttng_enums[] = { -#define STAGE_EXPORT_TYPES -#include "lttng-types.h" -#include "lttng-type-list.h" -#undef STAGE_EXPORT_TYPES -}; - -static int lttng_types_init(void) -{ - int ret = 0; - - wrapper_vmalloc_sync_all(); - /* TODO */ - return ret; -} - -module_init(lttng_types_init); - -static void lttng_types_exit(void) -{ -} - -module_exit(lttng_types_exit); - -MODULE_LICENSE("GPL and additional rights"); -MODULE_AUTHOR("Mathieu Desnoyers "); -MODULE_DESCRIPTION("LTTng types"); -MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "." - __stringify(LTTNG_MODULES_MINOR_VERSION) "." - __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION) - LTTNG_MODULES_EXTRAVERSION); diff -Nru lttng-modules-2.7.1/probes/lttng-types.h lttng-modules-2.8.0/probes/lttng-types.h --- lttng-modules-2.7.1/probes/lttng-types.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/probes/lttng-types.h 2016-05-20 01:34:54.000000000 +0000 @@ -28,10 +28,10 @@ */ #include -#include "lttng.h" -#include "../lttng-events.h" -#include "../lttng-tracer.h" -#include "../lttng-endian.h" +#include +#include +#include +#include #endif /* _LTTNG_PROBES_LTTNG_TYPES_H */ @@ -68,7 +68,7 @@ #define TRACE_EVENT_TYPE___enum(_name, _container_type) \ { \ .name = #_name, \ - .container_type = __type_integer(_container_type, __BYTE_ORDER, 10, none), \ + .container_type = __type_integer(_container_type, 0, 0, -1, __BYTE_ORDER, 10, none), \ .entries = __trace_event_enum_##_name, \ .len = ARRAY_SIZE(__trace_event_enum_##_name), \ }, diff -Nru lttng-modules-2.7.1/probes/Makefile lttng-modules-2.8.0/probes/Makefile --- lttng-modules-2.7.1/probes/Makefile 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/probes/Makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,278 +0,0 @@ -# -# Makefile for the LTT probes. -# Only build from the package top-level directory. Never use with make directly. - -ifneq ($(KERNELRELEASE),) -ifneq ($(CONFIG_TRACEPOINTS),) - -KERNELDIR = ${LTTNG_KERNELDIR} -MAKEFILEDIR = $(shell dirname $(lastword $(MAKEFILE_LIST))) - -include $(MAKEFILEDIR)/../Makefile.ABI.workarounds - -ccflags-y += -I$(PWD)/probes -obj-m += lttng-types.o - -obj-m += lttng-probe-sched.o -obj-m += lttng-probe-irq.o -obj-m += lttng-probe-timer.o -obj-m += lttng-probe-kmem.o -obj-m += lttng-probe-module.o -obj-m += lttng-probe-power.o - -obj-m += lttng-probe-statedump.o - -ifneq ($(CONFIG_KVM),) -obj-m += lttng-probe-kvm.o -ifneq ($(CONFIG_X86),) -kvm_dep_lapic = $(srctree)/arch/x86/kvm/lapic.h -ifneq ($(wildcard $(kvm_dep_lapic)),) -kvm_dep = $(srctree)/virt/kvm/iodev.h $(srctree)/include/kvm/iodev.h -ifneq ($(wildcard $(kvm_dep)),) -CFLAGS_lttng-probe-kvm-x86.o += -I$(srctree)/virt/kvm -CFLAGS_lttng-probe-kvm-x86-mmu.o += -I$(srctree)/virt/kvm -obj-m += $(shell \ - if [ $(VERSION) -ge 3 \ - -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 38 \) ] ; then \ - echo "lttng-probe-kvm-x86.o" ; fi;) -obj-m += $(shell \ - if [ $(VERSION) -ge 3 \ - -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 38 \) ] ; then \ - echo "lttng-probe-kvm-x86-mmu.o" ; fi;) -else -$(warning File $(kvm_dep) not found. Probe "kvm" x86-specific is disabled. Use full kernel source tree to enable it.) -endif -else -$(warning File $(kvm_dep_lapic) not found. Probe "kvm" x86-specific is disabled. Use full kernel source tree to enable it.) -endif -endif -endif - -obj-m += $(shell \ - if [ $(VERSION) -ge 3 \ - -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 33 \) ] ; then \ - echo "lttng-probe-signal.o" ; fi;) - -ifneq ($(CONFIG_BLOCK),) -ifneq ($(CONFIG_EVENT_TRACING),) # need blk_cmd_buf_len -obj-m += lttng-probe-block.o -endif -endif - -ifneq ($(CONFIG_NET),) -obj-m += lttng-probe-napi.o -obj-m += lttng-probe-skb.o -obj-m += $(shell \ - if [ $(VERSION) -ge 3 \ - -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 37 \) ] ; then \ - echo "lttng-probe-net.o" ; fi;) -obj-m += $(shell \ - if [ $(VERSION) -ge 4 \ - -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 1 \) ] ; then \ - echo "lttng-probe-sock.o" ; fi;) -obj-m += $(shell \ - if [ $(VERSION) -ge 4 \ - -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 1 \) ] ; then \ - echo "lttng-probe-udp.o" ; fi;) -endif - -ifneq ($(CONFIG_SND_SOC),) -obj-m += $(shell \ - if [ $(VERSION) -ge 3 \ - -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 38 \) ] ; then \ - echo "lttng-probe-asoc.o" ; fi;) -endif - -ifneq ($(CONFIG_EXT3_FS),) -ext3_dep = $(srctree)/fs/ext3/*.h -ext3_dep_check = $(wildcard $(ext3_dep)) -ext3 = $(shell \ - if [ $(VERSION) -ge 4 -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 1 \) ] ; then \ - if [ \( $(VERSION) -ge 4 -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 4 \) \) -a \ - -z "$(ext3_dep_check)" ] ; then \ - echo "warn" ; \ - exit ; \ - fi; \ - echo "lttng-probe-ext3.o" ; \ - fi;) -ifeq ($(ext3),warn) -$(warning Files $(ext3_dep) not found. Probe "ext3" is disabled. Use full kernel source tree to enable it.) -ext3 = -endif -obj-m += $(ext3) -endif - -ifneq ($(CONFIG_GPIOLIB),) -obj-m += $(shell \ - if [ $(VERSION) -ge 3 ] ; then \ - echo "lttng-probe-gpio.o" ; fi;) -endif - -ifneq ($(CONFIG_JBD2),) -obj-m += lttng-probe-jbd2.o -endif - -ifneq ($(CONFIG_JBD),) -obj-m += $(shell \ - if [ $(VERSION) -ge 4 \ - -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 1 \) ] ; then \ - echo "lttng-probe-jbd.o" ; fi;) -endif - -ifneq ($(CONFIG_REGULATOR),) -obj-m += $(shell \ - if [ $(VERSION) -ge 3 \ - -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 38 \) ] ; then \ - echo "lttng-probe-regulator.o" ; fi;) -endif - -ifneq ($(CONFIG_SCSI),) -obj-m += $(shell \ - if [ $(VERSION) -ge 3 \ - -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 35 \) ] ; then \ - echo "lttng-probe-scsi.o" ; fi;) -endif - -vmscan = $(shell \ - if [ $(VERSION) -ge 3 \ - -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 36 \) ] ; then \ - echo "lttng-probe-vmscan.o" ; fi;) -ifneq ($(CONFIG_SWAP),) - obj-m += $(vmscan) -else -ifneq ($(CONFIG_CGROUP_MEM_RES_CTLR),) - obj-m += $(vmscan) -endif -endif - -# lock probe does not work, so disabling it for now -#ifneq ($(CONFIG_LOCKDEP),) -#obj-m += lttng-probe-lock.o -#endif - -ifneq ($(CONFIG_BTRFS_FS),) -btrfs_dep = $(srctree)/fs/btrfs/*.h -btrfs = $(shell \ - if [ $(VERSION) -ge 3 \ - -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 39 \) ] ; then \ - echo "lttng-probe-btrfs.o" ; fi;) -ifneq ($(btrfs),) -ifeq ($(wildcard $(btrfs_dep)),) -$(warning Files $(btrfs_dep) not found. Probe "btrfs" is disabled. Use full kernel source tree to enable it.) -btrfs = -endif -endif -obj-m += $(btrfs) -endif - -obj-m += $(shell \ - if [ $(VERSION) -ge 3 \ - -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 38 \) ] ; then \ - echo "lttng-probe-compaction.o" ; fi;) - -ifneq ($(CONFIG_EXT4_FS),) -ext4_dep = $(srctree)/fs/ext4/*.h -ext4 = lttng-probe-ext4.o -ifeq ($(wildcard $(ext4_dep)),) -$(warning Files $(ext4_dep) not found. Probe "ext4" is disabled. Use full kernel source tree to enable it.) -ext4 = -endif -obj-m += $(ext4) -endif - -obj-m += $(shell \ - if [ $(VERSION) -ge 4 \ - -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 4 \) ] ; then \ - echo "lttng-probe-printk.o" ; fi;) -ifneq ($(CONFIG_FRAME_WARN),0) -CFLAGS_lttng-probe-printk.o += -Wframe-larger-than=2200 -endif - -obj-m += $(shell \ - if [ $(VERSION) -ge 4 \ - -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 6 \) \ - -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 5 -a $(SUBLEVEL) -ge 2 \) \ - -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 4 -a $(SUBLEVEL) -ge 9 \) \ - -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 0 -a $(SUBLEVEL) -ge 41 \) ] ; then \ - echo "lttng-probe-random.o" ; fi;) - -obj-m += $(shell \ - if [ $(VERSION) -ge 4 \ - -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 2 \) ] ; then \ - echo "lttng-probe-rcu.o" ; fi;) - -ifneq ($(CONFIG_REGMAP),) -regmap_dep_4_1 = $(srctree)/drivers/base/regmap/trace.h -ifneq ($(wildcard $(regmap_dep_4_1)),) -obj-m += lttng-probe-regmap.o -else -$(warning File $(regmap_dep_4_1) not found. Probe "regmap" is disabled. Need Linux 4.1+ kernel source tree to enable it.) -endif -endif - -ifneq ($(CONFIG_PM_RUNTIME),) -obj-m += $(shell \ - if [ $(VERSION) -ge 4 \ - -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 2 \) ] ; then \ - echo "lttng-probe-rpm.o" ; fi;) -endif - -ifneq ($(CONFIG_SUNRPC),) -obj-m += $(shell \ - if [ $(VERSION) -ge 4 \ - -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 4 \) ] ; then \ - echo "lttng-probe-sunrpc.o" ; fi;) -endif - -ifneq ($(CONFIG_VIDEO_V4L2),) -obj-m += $(shell \ - if [ $(VERSION) -ge 4 \ - -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 14 \) ] ; then \ - echo "lttng-probe-v4l2.o" ; fi;) -endif - -obj-m += lttng-probe-workqueue.o - -ifneq ($(CONFIG_KALLSYMS_ALL),) -obj-m += $(shell \ - if [ $(VERSION) -ge 3 \ - -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 36 \) ] ; then \ - echo "lttng-probe-writeback.o" ; fi;) -else -$(warning CONFIG_KALLSYMS_ALL is disabled, therefore probe "writeback" is disabled. Rebuild your kernel with this configuration option enabled in order to trace this subsystem.) -endif - - -ifneq ($(CONFIG_KPROBES),) -obj-m += lttng-kprobes.o -endif - - -ifneq ($(CONFIG_KRETPROBES),) -obj-m += lttng-kretprobes.o -endif - -ifneq ($(CONFIG_DYNAMIC_FTRACE),) -obj-m += lttng-ftrace.o -endif - -endif - -obj-m += lttng-test.o - -else - KERNELDIR ?= /lib/modules/$(shell uname -r)/build - PWD := $(shell pwd) - CFLAGS = $(EXTCFLAGS) - -default: - $(MAKE) -C $(KERNELDIR) M=$(PWD) modules - -modules_install: - $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install - /sbin/depmod -a - -clean: - $(MAKE) -C $(KERNELDIR) M=$(PWD) clean - -endif diff -Nru lttng-modules-2.7.1/README.md lttng-modules-2.8.0/README.md --- lttng-modules-2.7.1/README.md 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/README.md 2016-05-20 01:34:54.000000000 +0000 @@ -42,11 +42,22 @@ sudo depmod -a kernel_version +### Kernel built-in support + +It is also possible to build these modules as part of a kernel image. Simply +run the [`built-in.sh`](built-in.sh) script with the path to your kernel +source directory as an argument. It will symlink the lttng-modules directory +in the kernel sources and add an include in the kernel Makefile. + +Then configure your kernel as usual and enable the `CONFIG_LTTNG` option. + + ### Required kernel config options Make sure your target kernel has the following config options enabled: - - `CONFIG_MODULES`: loadable module support + - `CONFIG_MODULES`: loadable module support (not strictly required + when built into the kernel) - `CONFIG_KALLSYMS`: see files in [`wrapper`](wrapper); this is necessary until the few required missing symbols are exported to GPL modules from mainline @@ -83,7 +94,7 @@ number and name -Using +Usage ----- Use [LTTng-tools](https://lttng.org/download) to control the tracer. diff -Nru lttng-modules-2.7.1/rt-patch-version.sh lttng-modules-2.8.0/rt-patch-version.sh --- lttng-modules-2.7.1/rt-patch-version.sh 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/rt-patch-version.sh 2016-05-20 01:34:50.000000000 +0000 @@ -0,0 +1,25 @@ +#!/bin/sh + +# First argument is the path to the kernel headers. +KPATH=$1 + +VERSIONFILE="" + +if [ -f "${KPATH}/localversion-rt" ]; then + VERSIONFILE="${KPATH}/localversion-rt" + +elif [ -f "${KPATH}/source/localversion-rt" ]; then + VERSIONFILE="${KPATH}/source/localversion-rt" +else + echo 0 + exit 0 +fi + +RT_PATCH_VERSION=$(sed -rn 's/^-rt([0-9]+)$/\1/p' "${VERSIONFILE}") + +if [ "x${RT_PATCH_VERSION}" = "x" ]; then + echo 0 + exit 0 +fi + +echo ${RT_PATCH_VERSION} diff -Nru lttng-modules-2.7.1/tests/clock-plugin/lttng-clock-plugin-test.c lttng-modules-2.8.0/tests/clock-plugin/lttng-clock-plugin-test.c --- lttng-modules-2.7.1/tests/clock-plugin/lttng-clock-plugin-test.c 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/tests/clock-plugin/lttng-clock-plugin-test.c 2016-05-20 01:34:54.000000000 +0000 @@ -0,0 +1,81 @@ +/* + * lttng-clock-plugin-test.c + * + * Copyright (C) 2014, 2016 Mathieu Desnoyers + * + * 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 +#include +#include +#include + +#include /* From lttng-modules */ + +static u64 trace_clock_read64_example(void) +{ + /* Freeze time. */ + return 0; +} + +static u64 trace_clock_freq_example(void) +{ + return 1000; /* 1KHz */ +} + +static int trace_clock_uuid_example(char *uuid) +{ + const char myuuid[] = "83c63deb-7aa4-48fb-abda-946f400d76e6"; + memcpy(uuid, myuuid, LTTNG_MODULES_UUID_STR_LEN); + return 0; +} + +static const char *trace_clock_name_example(void) +{ + return "lttng_test_clock_override"; +} + +static const char *trace_clock_description_example(void) +{ + return "Freeze time with 1KHz for regression test"; +} + +static +struct lttng_trace_clock ltc = { + .read64 = trace_clock_read64_example, + .freq = trace_clock_freq_example, + .uuid = trace_clock_uuid_example, + .name = trace_clock_name_example, + .description = trace_clock_description_example, +}; + +static __init +int lttng_clock_plugin_init(void) +{ + return lttng_clock_register_plugin(<c, THIS_MODULE); +} +module_init(lttng_clock_plugin_init); + +static __exit +void lttng_clock_plugin_exit(void) +{ + lttng_clock_unregister_plugin(<c, THIS_MODULE); +} +module_exit(lttng_clock_plugin_exit); + +MODULE_LICENSE("GPL and additional rights"); +MODULE_AUTHOR("Mathieu Desnoyers "); +MODULE_DESCRIPTION("LTTng Clock Plugin Example"); diff -Nru lttng-modules-2.7.1/tests/Kbuild lttng-modules-2.8.0/tests/Kbuild --- lttng-modules-2.7.1/tests/Kbuild 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/tests/Kbuild 2016-05-20 01:34:54.000000000 +0000 @@ -0,0 +1,11 @@ +TOP_LTTNG_MODULES_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))/.. + +include $(TOP_LTTNG_MODULES_DIR)/Makefile.ABI.workarounds + +ccflags-y += -I$(TOP_LTTNG_MODULES_DIR) + +obj-$(CONFIG_LTTNG) += probes/lttng-test.o + +obj-$(CONFIG_LTTNG) += clock-plugin/lttng-clock-plugin-test.o + +# vim:syntax=make diff -Nru lttng-modules-2.7.1/tests/probes/lttng-test.c lttng-modules-2.8.0/tests/probes/lttng-test.c --- lttng-modules-2.7.1/tests/probes/lttng-test.c 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/tests/probes/lttng-test.c 2016-05-20 01:34:54.000000000 +0000 @@ -0,0 +1,142 @@ +/* + * lttng-test.c + * + * Linux Trace Toolkit Next Generation Test Module + * + * Copyright 2015 Mathieu Desnoyers + * + * 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 +#include +#include +#include + +#include +#include +#include +#include + +#define TP_MODULE_NOAUTOLOAD +#define LTTNG_PACKAGE_BUILD +#define CREATE_TRACE_POINTS +#define TRACE_INCLUDE_PATH instrumentation/events/lttng-module +#define TRACE_INCLUDE_FILE lttng-test +#define LTTNG_INSTRUMENTATION +#include + +DEFINE_TRACE(lttng_test_filter_event); + +#define LTTNG_TEST_FILTER_EVENT_FILE "lttng-test-filter-event" + +#define LTTNG_WRITE_COUNT_MAX 64 + +static struct proc_dir_entry *lttng_test_filter_event_dentry; + +static +void trace_test_event(unsigned int nr_iter) +{ + int i, netint; + long values[] = { 1, 2, 3 }; + char text[10] = "test"; + char escape[10] = "\\*"; + + for (i = 0; i < nr_iter; i++) { + netint = htonl(i); + trace_lttng_test_filter_event(i, netint, values, text, strlen(text), escape); + } +} + +/** + * lttng_filter_event_write - trigger a lttng_test_filter_event + * @file: file pointer + * @user_buf: user string + * @count: length to copy + * + * Return -1 on error, with EFAULT errno. Returns count on success. + */ +static +ssize_t lttng_test_filter_event_write(struct file *file, const char __user *user_buf, + size_t count, loff_t *ppos) +{ + unsigned int nr_iter; + ssize_t written; + int ret; + + /* Get the number of iterations */ + ret = lttng_kstrtouint_from_user(user_buf, count, 10, &nr_iter); + if (ret) { + written = ret; + goto end; + } + /* Trace the event */ + trace_test_event(nr_iter); + written = count; + *ppos += written; +end: + return written; +} + +static const struct file_operations lttng_test_filter_event_operations = { + .write = lttng_test_filter_event_write, +}; + +static +int __init lttng_test_init(void) +{ + int ret = 0; + + (void) wrapper_lttng_fixup_sig(THIS_MODULE); + wrapper_vmalloc_sync_all(); + lttng_test_filter_event_dentry = + proc_create_data(LTTNG_TEST_FILTER_EVENT_FILE, + S_IRUGO | S_IWUGO, NULL, + <tng_test_filter_event_operations, NULL); + if (!lttng_test_filter_event_dentry) { + printk(KERN_ERR "Error creating LTTng test filter file\n"); + ret = -ENOMEM; + goto error; + } + ret = __lttng_events_init__lttng_test(); + if (ret) + goto error_events; + return ret; + +error_events: + remove_proc_entry(LTTNG_TEST_FILTER_EVENT_FILE, NULL); +error: + return ret; +} + +module_init(lttng_test_init); + +static +void __exit lttng_test_exit(void) +{ + __lttng_events_exit__lttng_test(); + if (lttng_test_filter_event_dentry) + remove_proc_entry(LTTNG_TEST_FILTER_EVENT_FILE, NULL); +} + +module_exit(lttng_test_exit); + +MODULE_LICENSE("GPL and additional rights"); +MODULE_AUTHOR("Mathieu Desnoyers "); +MODULE_DESCRIPTION("LTTng Test"); +MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "." + __stringify(LTTNG_MODULES_MINOR_VERSION) "." + __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION) + LTTNG_MODULES_EXTRAVERSION); diff -Nru lttng-modules-2.7.1/wrapper/fdtable.c lttng-modules-2.8.0/wrapper/fdtable.c --- lttng-modules-2.7.1/wrapper/fdtable.c 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/fdtable.c 2016-05-20 01:34:54.000000000 +0000 @@ -20,7 +20,7 @@ #include #include -#include "fdtable.h" +#include #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)) diff -Nru lttng-modules-2.7.1/wrapper/ftrace.h lttng-modules-2.8.0/wrapper/ftrace.h --- lttng-modules-2.7.1/wrapper/ftrace.h 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/ftrace.h 2016-05-20 01:34:54.000000000 +0000 @@ -30,7 +30,7 @@ #ifdef CONFIG_KALLSYMS #include -#include "kallsyms.h" +#include static inline int wrapper_register_ftrace_function_probe(char *glob, diff -Nru lttng-modules-2.7.1/wrapper/genhd.h lttng-modules-2.8.0/wrapper/genhd.h --- lttng-modules-2.7.1/wrapper/genhd.h 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/genhd.h 2016-05-20 01:34:54.000000000 +0000 @@ -30,7 +30,7 @@ #ifdef CONFIG_KALLSYMS #include -#include "kallsyms.h" +#include static inline char *wrapper_disk_name(struct gendisk *hd, int partno, char *buf) diff -Nru lttng-modules-2.7.1/wrapper/irqdesc.c lttng-modules-2.8.0/wrapper/irqdesc.c --- lttng-modules-2.7.1/wrapper/irqdesc.c 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/irqdesc.c 2016-05-20 01:34:54.000000000 +0000 @@ -27,8 +27,8 @@ #include #include #include -#include "kallsyms.h" -#include "irqdesc.h" +#include +#include static struct irq_desc *(*irq_to_desc_sym)(unsigned int irq); diff -Nru lttng-modules-2.7.1/wrapper/irqflags.h lttng-modules-2.8.0/wrapper/irqflags.h --- lttng-modules-2.7.1/wrapper/irqflags.h 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/irqflags.h 2016-05-20 01:34:54.000000000 +0000 @@ -0,0 +1,53 @@ +#ifndef _LTTNG_WRAPPER_IRQFLAGS_H +#define _LTTNG_WRAPPER_IRQFLAGS_H + +/* + * wrapper/irqflags.h + * + * wrapper around IRQ flags. + * + * Copyright (C) 2015 Mathieu Desnoyers + * + * 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 +#include + +#ifdef CONFIG_X86 + +static inline +int lttng_regs_irqs_disabled(struct pt_regs *regs) +{ + unsigned long flags = regs->flags; + + return raw_irqs_disabled_flags(flags); +} + +#else +/* + * lttng_regs_irqs_disabled() returns -1 if irqoff state is unknown. + * TODO: should implement lttng_regs_irqs_disabled for each architecture + * to add interruptible context for kprobes and kretprobes. + */ + +static inline +int lttng_regs_irqs_disabled(struct pt_regs *regs) +{ + return -1; +} +#endif + +#endif /* _LTTNG_WRAPPER_IRQFLAGS_H */ diff -Nru lttng-modules-2.7.1/wrapper/kallsyms.h lttng-modules-2.8.0/wrapper/kallsyms.h --- lttng-modules-2.7.1/wrapper/kallsyms.h 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/kallsyms.h 2016-05-20 01:34:50.000000000 +0000 @@ -28,6 +28,16 @@ #include +/* + * PowerPC ABIv1 needs KALLSYMS_ALL to get the function descriptor, + * which is needed to perform the function call. + */ +#if defined(CONFIG_PPC64) && (!defined(_CALL_ELF) || _CALL_ELF < 2) +# ifndef CONFIG_KALLSYMS_ALL +# error "LTTng-modules requires CONFIG_KALLSYMS_ALL on PowerPC ABIv1" +# endif +#endif + static inline unsigned long kallsyms_lookup_funcptr(const char *name) { diff -Nru lttng-modules-2.7.1/wrapper/kref.h lttng-modules-2.8.0/wrapper/kref.h --- lttng-modules-2.7.1/wrapper/kref.h 1970-01-01 00:00:00.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/kref.h 2016-05-20 01:34:50.000000000 +0000 @@ -0,0 +1,46 @@ +#ifndef _LTTNG_WRAPPER_KREF_H +#define _LTTNG_WRAPPER_KREF_H + +/* + * wrapper/kref.h + * + * wrapper around linux/kref.h. + * + * Copyright (C) 2016 Mathieu Desnoyers + * + * This program 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; only version 2 of the License. + * + * This program 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * This wrapper code is derived from Linux 3.19.2 include/linux/list.h + * and include/linux/rculist.h, hence the GPLv2 license applied to this + * file. + */ + +#include +#include + +/* + * lttng_kref_get: get reference count, checking for overflow. + * + * Return 1 if reference is taken, 0 otherwise (overflow). + */ +static inline int lttng_kref_get(struct kref *kref) +{ + if (atomic_add_unless(&kref->refcount, 1, INT_MAX) != INT_MAX) { + return 1; + } else { + return 0; + } +} + +#endif /* _LTTNG_WRAPPER_KREF_H */ diff -Nru lttng-modules-2.7.1/wrapper/page_alloc.c lttng-modules-2.8.0/wrapper/page_alloc.c --- lttng-modules-2.7.1/wrapper/page_alloc.c 2015-10-24 07:33:20.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/page_alloc.c 2016-05-20 01:34:54.000000000 +0000 @@ -23,17 +23,20 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "../lttng-kernel-version.h" +#include #if (defined(CONFIG_KALLSYMS) \ - && (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,2) \ - || LTTNG_DEBIAN_KERNEL_RANGE(3,16,7,9,0,0, 3,17,0,0,0,0))) + && (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,2) \ + || LTTNG_KERNEL_RANGE(3,14,36, 3,15,0) \ + || LTTNG_KERNEL_RANGE(3,18,10, 3,19,0) \ + || LTTNG_DEBIAN_KERNEL_RANGE(3,16,7,9,0,0, 3,17,0,0,0,0) \ + || LTTNG_UBUNTU_KERNEL_RANGE(3,16,7,34, 3,17,0,0))) #include #include #include -#include "kallsyms.h" -#include "page_alloc.h" +#include +#include static unsigned long (*get_pfnblock_flags_mask_sym)(struct page *page, @@ -76,8 +79,8 @@ #include #include #include -#include "kallsyms.h" -#include "page_alloc.h" +#include +#include static unsigned long (*get_pageblock_flags_mask_sym)(struct page *page, diff -Nru lttng-modules-2.7.1/wrapper/page_alloc.h lttng-modules-2.8.0/wrapper/page_alloc.h --- lttng-modules-2.7.1/wrapper/page_alloc.h 2015-10-24 07:33:20.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/page_alloc.h 2016-05-20 01:34:54.000000000 +0000 @@ -25,15 +25,18 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "../lttng-kernel-version.h" +#include /* * We need to redefine get_pfnblock_flags_mask to our wrapper, because * the get_pageblock_migratetype() macro uses it. */ #if (defined(CONFIG_KALLSYMS) \ - && (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,2) \ - || LTTNG_DEBIAN_KERNEL_RANGE(3,16,7,9,0,0, 3,17,0,0,0,0))) + && (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,2) \ + || LTTNG_KERNEL_RANGE(3,14,36, 3,15,0) \ + || LTTNG_KERNEL_RANGE(3,18,10, 3,19,0) \ + || LTTNG_DEBIAN_KERNEL_RANGE(3,16,7,9,0,0, 3,17,0,0,0,0) \ + || LTTNG_UBUNTU_KERNEL_RANGE(3,16,7,34, 3,17,0,0))) #define get_pfnblock_flags_mask wrapper_get_pfnblock_flags_mask diff -Nru lttng-modules-2.7.1/wrapper/random.c lttng-modules-2.8.0/wrapper/random.c --- lttng-modules-2.7.1/wrapper/random.c 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/random.c 2016-05-20 19:51:59.000000000 +0000 @@ -29,7 +29,7 @@ #include #include #include -#include "random.h" +#include /* * Returns string boot id. diff -Nru lttng-modules-2.7.1/wrapper/random.h lttng-modules-2.8.0/wrapper/random.h --- lttng-modules-2.7.1/wrapper/random.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/random.h 2016-05-20 01:34:54.000000000 +0000 @@ -25,7 +25,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define BOOT_ID_LEN 37 +#include + +#define BOOT_ID_LEN LTTNG_MODULES_UUID_STR_LEN int wrapper_get_bootid(char *bootid); diff -Nru lttng-modules-2.7.1/wrapper/rcu.h lttng-modules-2.8.0/wrapper/rcu.h --- lttng-modules-2.7.1/wrapper/rcu.h 2015-12-05 08:35:19.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/rcu.h 2016-05-20 01:34:54.000000000 +0000 @@ -26,7 +26,7 @@ #include #include #include -#include "list.h" +#include #ifndef rcu_dereference_raw_notrace #define rcu_dereference_raw_notrace(p) rcu_dereference_raw(p) diff -Nru lttng-modules-2.7.1/wrapper/ringbuffer/api.h lttng-modules-2.8.0/wrapper/ringbuffer/api.h --- lttng-modules-2.7.1/wrapper/ringbuffer/api.h 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/ringbuffer/api.h 2016-05-20 01:34:54.000000000 +0000 @@ -1 +1 @@ -#include "../../lib/ringbuffer/api.h" +#include diff -Nru lttng-modules-2.7.1/wrapper/ringbuffer/backend.h lttng-modules-2.8.0/wrapper/ringbuffer/backend.h --- lttng-modules-2.7.1/wrapper/ringbuffer/backend.h 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/ringbuffer/backend.h 2016-05-20 01:34:54.000000000 +0000 @@ -1 +1 @@ -#include "../../lib/ringbuffer/backend.h" +#include diff -Nru lttng-modules-2.7.1/wrapper/ringbuffer/backend_internal.h lttng-modules-2.8.0/wrapper/ringbuffer/backend_internal.h --- lttng-modules-2.7.1/wrapper/ringbuffer/backend_internal.h 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/ringbuffer/backend_internal.h 2016-05-20 01:34:54.000000000 +0000 @@ -1,2 +1,2 @@ -#include "../../wrapper/inline_memcpy.h" -#include "../../lib/ringbuffer/backend_internal.h" +#include +#include diff -Nru lttng-modules-2.7.1/wrapper/ringbuffer/backend_types.h lttng-modules-2.8.0/wrapper/ringbuffer/backend_types.h --- lttng-modules-2.7.1/wrapper/ringbuffer/backend_types.h 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/ringbuffer/backend_types.h 2016-05-20 01:34:54.000000000 +0000 @@ -1 +1 @@ -#include "../../lib/ringbuffer/backend_types.h" +#include diff -Nru lttng-modules-2.7.1/wrapper/ringbuffer/config.h lttng-modules-2.8.0/wrapper/ringbuffer/config.h --- lttng-modules-2.7.1/wrapper/ringbuffer/config.h 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/ringbuffer/config.h 2016-05-20 01:34:54.000000000 +0000 @@ -1 +1 @@ -#include "../../lib/ringbuffer/config.h" +#include diff -Nru lttng-modules-2.7.1/wrapper/ringbuffer/frontend_api.h lttng-modules-2.8.0/wrapper/ringbuffer/frontend_api.h --- lttng-modules-2.7.1/wrapper/ringbuffer/frontend_api.h 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/ringbuffer/frontend_api.h 2016-05-20 01:34:54.000000000 +0000 @@ -1 +1 @@ -#include "../../lib/ringbuffer/frontend_api.h" +#include diff -Nru lttng-modules-2.7.1/wrapper/ringbuffer/frontend.h lttng-modules-2.8.0/wrapper/ringbuffer/frontend.h --- lttng-modules-2.7.1/wrapper/ringbuffer/frontend.h 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/ringbuffer/frontend.h 2016-05-20 01:34:54.000000000 +0000 @@ -1 +1 @@ -#include "../../lib/ringbuffer/frontend.h" +#include diff -Nru lttng-modules-2.7.1/wrapper/ringbuffer/frontend_internal.h lttng-modules-2.8.0/wrapper/ringbuffer/frontend_internal.h --- lttng-modules-2.7.1/wrapper/ringbuffer/frontend_internal.h 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/ringbuffer/frontend_internal.h 2016-05-20 01:34:54.000000000 +0000 @@ -1 +1 @@ -#include "../../lib/ringbuffer/frontend_internal.h" +#include diff -Nru lttng-modules-2.7.1/wrapper/ringbuffer/frontend_types.h lttng-modules-2.8.0/wrapper/ringbuffer/frontend_types.h --- lttng-modules-2.7.1/wrapper/ringbuffer/frontend_types.h 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/ringbuffer/frontend_types.h 2016-05-20 01:34:54.000000000 +0000 @@ -1 +1 @@ -#include "../../lib/ringbuffer/frontend_types.h" +#include diff -Nru lttng-modules-2.7.1/wrapper/ringbuffer/iterator.h lttng-modules-2.8.0/wrapper/ringbuffer/iterator.h --- lttng-modules-2.7.1/wrapper/ringbuffer/iterator.h 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/ringbuffer/iterator.h 2016-05-20 01:34:54.000000000 +0000 @@ -1 +1 @@ -#include "../../lib/ringbuffer/iterator.h" +#include diff -Nru lttng-modules-2.7.1/wrapper/ringbuffer/nohz.h lttng-modules-2.8.0/wrapper/ringbuffer/nohz.h --- lttng-modules-2.7.1/wrapper/ringbuffer/nohz.h 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/ringbuffer/nohz.h 2016-05-20 01:34:54.000000000 +0000 @@ -1 +1 @@ -#include "../../lib/ringbuffer/nohz.h" +#include diff -Nru lttng-modules-2.7.1/wrapper/ringbuffer/vatomic.h lttng-modules-2.8.0/wrapper/ringbuffer/vatomic.h --- lttng-modules-2.7.1/wrapper/ringbuffer/vatomic.h 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/ringbuffer/vatomic.h 2016-05-20 01:34:54.000000000 +0000 @@ -1 +1 @@ -#include "../../lib/ringbuffer/vatomic.h" +#include diff -Nru lttng-modules-2.7.1/wrapper/ringbuffer/vfs.h lttng-modules-2.8.0/wrapper/ringbuffer/vfs.h --- lttng-modules-2.7.1/wrapper/ringbuffer/vfs.h 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/ringbuffer/vfs.h 2016-05-20 01:34:54.000000000 +0000 @@ -1 +1 @@ -#include "../../lib/ringbuffer/vfs.h" +#include diff -Nru lttng-modules-2.7.1/wrapper/splice.c lttng-modules-2.8.0/wrapper/splice.c --- lttng-modules-2.7.1/wrapper/splice.c 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/splice.c 2016-05-20 01:34:54.000000000 +0000 @@ -27,7 +27,7 @@ #include #include #include -#include "kallsyms.h" +#include static ssize_t (*splice_to_pipe_sym)(struct pipe_inode_info *pipe, diff -Nru lttng-modules-2.7.1/wrapper/trace-clock.c lttng-modules-2.8.0/wrapper/trace-clock.c --- lttng-modules-2.7.1/wrapper/trace-clock.c 2015-09-24 20:47:34.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/trace-clock.c 2016-05-20 01:34:54.000000000 +0000 @@ -21,7 +21,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "trace-clock.h" +#include #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)) DEFINE_PER_CPU(local_t, lttng_last_tsc); diff -Nru lttng-modules-2.7.1/wrapper/trace-clock.h lttng-modules-2.8.0/wrapper/trace-clock.h --- lttng-modules-2.7.1/wrapper/trace-clock.h 2016-01-05 18:23:28.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/trace-clock.h 2016-05-20 01:34:54.000000000 +0000 @@ -35,15 +35,18 @@ #include #include #include -#include "../lttng-kernel-version.h" -#include "percpu-defs.h" -#include "random.h" +#include +#include +#include +#include -#if ((LTTNG_KERNEL_RANGE(3,10,0, 3,10,14) && !LTTNG_RHEL_KERNEL_RANGE(3,10,0,7,0, 3,10,14,0,0)) \ +#if ((LTTNG_KERNEL_RANGE(3,10,0, 3,10,14) && !LTTNG_RHEL_KERNEL_RANGE(3,10,0,123,0,0, 3,10,14,0,0,0)) \ || LTTNG_KERNEL_RANGE(3,11,0, 3,11,3)) #error "Linux kernels 3.10 and 3.11 introduce a deadlock in the timekeeping subsystem. Fixed by commit 7bd36014460f793c19e7d6c94dab67b0afcfcb7f \"timekeeping: Fix HRTICK related deadlock from ntp lock changes\" in Linux." #endif +extern struct lttng_trace_clock *lttng_trace_clock; + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)) DECLARE_PER_CPU(local_t, lttng_last_tsc); @@ -144,21 +147,31 @@ } #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)) */ -static inline u64 trace_clock_read64(void) +static inline u64 trace_clock_read64_monotonic(void) { return (u64) trace_clock_monotonic_wrapper(); } -static inline u64 trace_clock_freq(void) +static inline u64 trace_clock_freq_monotonic(void) { return (u64) NSEC_PER_SEC; } -static inline int trace_clock_uuid(char *uuid) +static inline int trace_clock_uuid_monotonic(char *uuid) { return wrapper_get_bootid(uuid); } +static inline const char *trace_clock_name_monotonic(void) +{ + return "monotonic"; +} + +static inline const char *trace_clock_description_monotonic(void) +{ + return "Monotonic Clock"; +} + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)) static inline int get_trace_clock(void) { @@ -177,6 +190,67 @@ { } +static inline u64 trace_clock_read64(void) +{ + struct lttng_trace_clock *ltc = ACCESS_ONCE(lttng_trace_clock); + + if (likely(!ltc)) { + return trace_clock_read64_monotonic(); + } else { + read_barrier_depends(); /* load ltc before content */ + return ltc->read64(); + } +} + +static inline u64 trace_clock_freq(void) +{ + struct lttng_trace_clock *ltc = ACCESS_ONCE(lttng_trace_clock); + + if (!ltc) { + return trace_clock_freq_monotonic(); + } else { + read_barrier_depends(); /* load ltc before content */ + return ltc->freq(); + } +} + +static inline int trace_clock_uuid(char *uuid) +{ + struct lttng_trace_clock *ltc = ACCESS_ONCE(lttng_trace_clock); + + read_barrier_depends(); /* load ltc before content */ + /* Use default UUID cb when NULL */ + if (!ltc || !ltc->uuid) { + return trace_clock_uuid_monotonic(uuid); + } else { + return ltc->uuid(uuid); + } +} + +static inline const char *trace_clock_name(void) +{ + struct lttng_trace_clock *ltc = ACCESS_ONCE(lttng_trace_clock); + + if (!ltc) { + return trace_clock_name_monotonic(); + } else { + read_barrier_depends(); /* load ltc before content */ + return ltc->name(); + } +} + +static inline const char *trace_clock_description(void) +{ + struct lttng_trace_clock *ltc = ACCESS_ONCE(lttng_trace_clock); + + if (!ltc) { + return trace_clock_description_monotonic(); + } else { + read_barrier_depends(); /* load ltc before content */ + return ltc->description(); + } +} + #endif /* CONFIG_HAVE_TRACE_CLOCK */ #endif /* _LTTNG_TRACE_CLOCK_H */ diff -Nru lttng-modules-2.7.1/wrapper/tracepoint.h lttng-modules-2.8.0/wrapper/tracepoint.h --- lttng-modules-2.7.1/wrapper/tracepoint.h 2015-09-04 20:37:48.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/tracepoint.h 2016-05-20 01:34:54.000000000 +0000 @@ -42,7 +42,7 @@ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) -#include "../lttng-tracepoint.h" +#include #define lttng_wrapper_tracepoint_probe_register lttng_tracepoint_probe_register #define lttng_wrapper_tracepoint_probe_unregister lttng_tracepoint_probe_unregister @@ -68,7 +68,7 @@ #ifdef CONFIG_MODULE_SIG #include -#include "kallsyms.h" +#include static inline int wrapper_tracepoint_module_notify(struct notifier_block *nb, diff -Nru lttng-modules-2.7.1/wrapper/vmalloc.h lttng-modules-2.8.0/wrapper/vmalloc.h --- lttng-modules-2.7.1/wrapper/vmalloc.h 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/vmalloc.h 2016-05-20 01:34:54.000000000 +0000 @@ -28,7 +28,7 @@ #ifdef CONFIG_KALLSYMS #include -#include "kallsyms.h" +#include static inline void wrapper_vmalloc_sync_all(void) diff -Nru lttng-modules-2.7.1/wrapper/writeback.h lttng-modules-2.8.0/wrapper/writeback.h --- lttng-modules-2.7.1/wrapper/writeback.h 2014-04-26 10:31:07.000000000 +0000 +++ lttng-modules-2.8.0/wrapper/writeback.h 2016-05-20 01:34:54.000000000 +0000 @@ -28,7 +28,7 @@ #ifdef CONFIG_KALLSYMS_ALL #include -#include "kallsyms.h" +#include static unsigned long *global_dirty_limit_sym;