Cleanup: Move headers from toplevel to include/lttng/
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 6 May 2020 14:18:46 +0000 (10:18 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 6 May 2020 14:39:17 +0000 (10:39 -0400)
- Remove extra "lttng-" from filename (now implied by the path).
- Adapt includes accordingly.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
161 files changed:
LICENSE
blacklist/kprobes.h
blacklist/timekeeping.h
filter-bytecode.h [deleted file]
include/lttng/abi-old.h [new file with mode: 0644]
include/lttng/abi.h [new file with mode: 0644]
include/lttng/bitfield.h
include/lttng/clock.h [new file with mode: 0644]
include/lttng/cpuhotplug.h [new file with mode: 0644]
include/lttng/endian.h [new file with mode: 0644]
include/lttng/events.h [new file with mode: 0644]
include/lttng/filter-bytecode.h [new file with mode: 0644]
include/lttng/filter.h [new file with mode: 0644]
include/lttng/kernel-version.h [new file with mode: 0644]
include/lttng/string-utils.h [new file with mode: 0644]
include/lttng/tp-mempool.h [new file with mode: 0644]
include/lttng/tracepoint-event-impl.h
include/lttng/tracepoint.h [new file with mode: 0644]
include/lttng/tracer-core.h [new file with mode: 0644]
include/lttng/tracer.h [new file with mode: 0644]
include/lttng/types.h
include/ringbuffer/backend_types.h
include/ringbuffer/config.h
include/ringbuffer/frontend_types.h
instrumentation/events/lttng-module/net.h
lib/ringbuffer/ring_buffer_vfs.c
lttng-abi-old.h [deleted file]
lttng-abi.c
lttng-abi.h [deleted file]
lttng-calibrate.c
lttng-clock.c
lttng-clock.h [deleted file]
lttng-context-callstack.c
lttng-context-cgroup-ns.c
lttng-context-cpu-id.c
lttng-context-egid.c
lttng-context-euid.c
lttng-context-gid.c
lttng-context-hostname.c
lttng-context-interruptible.c
lttng-context-ipc-ns.c
lttng-context-migratable.c
lttng-context-mnt-ns.c
lttng-context-need-reschedule.c
lttng-context-net-ns.c
lttng-context-nice.c
lttng-context-perf-counters.c
lttng-context-pid-ns.c
lttng-context-pid.c
lttng-context-ppid.c
lttng-context-preemptible.c
lttng-context-prio.c
lttng-context-procname.c
lttng-context-sgid.c
lttng-context-suid.c
lttng-context-tid.c
lttng-context-uid.c
lttng-context-user-ns.c
lttng-context-uts-ns.c
lttng-context-vegid.c
lttng-context-veuid.c
lttng-context-vgid.c
lttng-context-vpid.c
lttng-context-vppid.c
lttng-context-vsgid.c
lttng-context-vsuid.c
lttng-context-vtid.c
lttng-context-vuid.c
lttng-context.c
lttng-cpuhotplug.h [deleted file]
lttng-endian.h [deleted file]
lttng-events.c
lttng-events.h [deleted file]
lttng-filter-interpreter.c
lttng-filter-specialize.c
lttng-filter-validator.c
lttng-filter.c
lttng-filter.h [deleted file]
lttng-kernel-version.h [deleted file]
lttng-probes.c
lttng-ring-buffer-client-discard.c
lttng-ring-buffer-client-mmap-discard.c
lttng-ring-buffer-client-mmap-overwrite.c
lttng-ring-buffer-client-overwrite.c
lttng-ring-buffer-client.h
lttng-ring-buffer-metadata-client.c
lttng-ring-buffer-metadata-client.h
lttng-ring-buffer-metadata-mmap-client.c
lttng-statedump-impl.c
lttng-string-utils.c
lttng-string-utils.h [deleted file]
lttng-syscalls.c
lttng-tp-mempool.c
lttng-tp-mempool.h [deleted file]
lttng-tracepoint.c
lttng-tracepoint.h [deleted file]
lttng-tracer-core.h [deleted file]
lttng-tracer.h [deleted file]
lttng-tracker-id.c
lttng-wrapper-impl.c
probes/lttng-kprobes.c
probes/lttng-kretprobes.c
probes/lttng-probe-9p.c
probes/lttng-probe-asoc.c
probes/lttng-probe-block.c
probes/lttng-probe-btrfs.c
probes/lttng-probe-compaction.c
probes/lttng-probe-ext3.c
probes/lttng-probe-ext4.c
probes/lttng-probe-gpio.c
probes/lttng-probe-i2c.c
probes/lttng-probe-irq.c
probes/lttng-probe-jbd.c
probes/lttng-probe-jbd2.c
probes/lttng-probe-kmem.c
probes/lttng-probe-kvm-x86-mmu.c
probes/lttng-probe-kvm-x86.c
probes/lttng-probe-kvm.c
probes/lttng-probe-lock.c
probes/lttng-probe-module.c
probes/lttng-probe-napi.c
probes/lttng-probe-net.c
probes/lttng-probe-power.c
probes/lttng-probe-preemptirq.c
probes/lttng-probe-printk.c
probes/lttng-probe-random.c
probes/lttng-probe-rcu.c
probes/lttng-probe-regmap.c
probes/lttng-probe-regulator.c
probes/lttng-probe-rpm.c
probes/lttng-probe-sched.c
probes/lttng-probe-scsi.c
probes/lttng-probe-signal.c
probes/lttng-probe-skb.c
probes/lttng-probe-sock.c
probes/lttng-probe-statedump.c
probes/lttng-probe-sunrpc.c
probes/lttng-probe-timer.c
probes/lttng-probe-udp.c
probes/lttng-probe-v4l2.c
probes/lttng-probe-vmscan.c
probes/lttng-probe-workqueue.c
probes/lttng-probe-writeback.c
probes/lttng-probe-x86-exceptions.c
probes/lttng-probe-x86-irq-vectors.c
probes/lttng-uprobes.c
probes/lttng.c
tests/clock-plugin/lttng-clock-plugin-test.c
tests/probes/lttng-test.c
wrapper/irqdesc.c
wrapper/mm.h
wrapper/page_alloc.c
wrapper/page_alloc.h
wrapper/random.h
wrapper/splice.c
wrapper/syscall.h
wrapper/timer.h
wrapper/trace-clock.h
wrapper/tracepoint.h
wrapper/uaccess.h
wrapper/writeback.h

diff --git a/LICENSE b/LICENSE
index caf91c662e8ac7623ee2b13bc892e472d451ce3d..04013e663acf021b86ae6a5b691f35286bea716e 100644 (file)
--- a/LICENSE
+++ b/LICENSE
@@ -24,11 +24,11 @@ These files are licensed under an MIT-style license. See LICENSES/MIT
 for details.
 
 include/lttng/prio_heap.h
-lib/prio_heap/lttng_prio_heap.c
 include/lttng/bitfield.h
-filter-bytecode.h
+include/lttng/filter-bytecode.h
+include/filter.h
+lib/prio_heap/lttng_prio_heap.c
 lttng-filter-interpreter.c
 lttng-filter-specialize.c
 lttng-filter-validator.c
 lttng-filter.c
-lttng-filter.h
index 5740d8d79792697fc4b1973b3b2e9795fa7025aa..4c52c3d9b5ffdf334145e3efefe7f85373418401 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef _LTTNG_BLACKLIST_KPROBES_H
 #define _LTTNG_BLACKLIST_KPROBES_H
 
-#include <lttng-kernel-version.h>
+#include <lttng/kernel-version.h>
 
 #if LTTNG_KERNEL_RANGE(4,20,0, 4,20,13) \
        || LTTNG_KERNEL_RANGE(4,19,9, 4,19,26) \
index ac8081a3b6ffd267e34f77cc0409bc151a351c20..96e55d1e7bcff3a89721f2ea49f7368b8e060bb9 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef _LTTNG_BLACKLIST_TIMEKEEPING_H
 #define _LTTNG_BLACKLIST_TIMEKEEPING_H
 
-#include <lttng-kernel-version.h>
+#include <lttng/kernel-version.h>
 
 #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))
diff --git a/filter-bytecode.h b/filter-bytecode.h
deleted file mode 100644 (file)
index 65d34f0..0000000
+++ /dev/null
@@ -1,225 +0,0 @@
-/* SPDX-License-Identifier: MIT
- *
- * filter-bytecode.h
- *
- * LTTng filter bytecode
- *
- * Copyright 2012-2016 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- */
-
-#ifndef _FILTER_BYTECODE_H
-#define _FILTER_BYTECODE_H
-
-/*
- * offsets are absolute from start of bytecode.
- */
-
-struct field_ref {
-       /* Initially, symbol offset. After link, field offset. */
-       uint16_t offset;
-} __attribute__((packed));
-
-struct get_symbol {
-       /* Symbol offset. */
-       uint16_t offset;
-} __attribute__((packed));
-
-struct get_index_u16 {
-       uint16_t index;
-} __attribute__((packed));
-
-struct get_index_u64 {
-       uint64_t index;
-} __attribute__((packed));
-
-struct literal_numeric {
-       int64_t v;
-} __attribute__((packed));
-
-struct literal_double {
-       double v;
-} __attribute__((packed));
-
-struct literal_string {
-       char string[0];
-} __attribute__((packed));
-
-enum filter_op {
-       FILTER_OP_UNKNOWN                       = 0,
-
-       FILTER_OP_RETURN                        = 1,
-
-       /* binary */
-       FILTER_OP_MUL                           = 2,
-       FILTER_OP_DIV                           = 3,
-       FILTER_OP_MOD                           = 4,
-       FILTER_OP_PLUS                          = 5,
-       FILTER_OP_MINUS                         = 6,
-       FILTER_OP_BIT_RSHIFT                    = 7,
-       FILTER_OP_BIT_LSHIFT                    = 8,
-       FILTER_OP_BIT_AND                       = 9,
-       FILTER_OP_BIT_OR                        = 10,
-       FILTER_OP_BIT_XOR                       = 11,
-
-       /* binary comparators */
-       FILTER_OP_EQ                            = 12,
-       FILTER_OP_NE                            = 13,
-       FILTER_OP_GT                            = 14,
-       FILTER_OP_LT                            = 15,
-       FILTER_OP_GE                            = 16,
-       FILTER_OP_LE                            = 17,
-
-       /* string binary comparator: apply to  */
-       FILTER_OP_EQ_STRING                     = 18,
-       FILTER_OP_NE_STRING                     = 19,
-       FILTER_OP_GT_STRING                     = 20,
-       FILTER_OP_LT_STRING                     = 21,
-       FILTER_OP_GE_STRING                     = 22,
-       FILTER_OP_LE_STRING                     = 23,
-
-       /* s64 binary comparator */
-       FILTER_OP_EQ_S64                        = 24,
-       FILTER_OP_NE_S64                        = 25,
-       FILTER_OP_GT_S64                        = 26,
-       FILTER_OP_LT_S64                        = 27,
-       FILTER_OP_GE_S64                        = 28,
-       FILTER_OP_LE_S64                        = 29,
-
-       /* double binary comparator */
-       FILTER_OP_EQ_DOUBLE                     = 30,
-       FILTER_OP_NE_DOUBLE                     = 31,
-       FILTER_OP_GT_DOUBLE                     = 32,
-       FILTER_OP_LT_DOUBLE                     = 33,
-       FILTER_OP_GE_DOUBLE                     = 34,
-       FILTER_OP_LE_DOUBLE                     = 35,
-
-       /* Mixed S64-double binary comparators */
-       FILTER_OP_EQ_DOUBLE_S64                 = 36,
-       FILTER_OP_NE_DOUBLE_S64                 = 37,
-       FILTER_OP_GT_DOUBLE_S64                 = 38,
-       FILTER_OP_LT_DOUBLE_S64                 = 39,
-       FILTER_OP_GE_DOUBLE_S64                 = 40,
-       FILTER_OP_LE_DOUBLE_S64                 = 41,
-
-       FILTER_OP_EQ_S64_DOUBLE                 = 42,
-       FILTER_OP_NE_S64_DOUBLE                 = 43,
-       FILTER_OP_GT_S64_DOUBLE                 = 44,
-       FILTER_OP_LT_S64_DOUBLE                 = 45,
-       FILTER_OP_GE_S64_DOUBLE                 = 46,
-       FILTER_OP_LE_S64_DOUBLE                 = 47,
-
-       /* unary */
-       FILTER_OP_UNARY_PLUS                    = 48,
-       FILTER_OP_UNARY_MINUS                   = 49,
-       FILTER_OP_UNARY_NOT                     = 50,
-       FILTER_OP_UNARY_PLUS_S64                = 51,
-       FILTER_OP_UNARY_MINUS_S64               = 52,
-       FILTER_OP_UNARY_NOT_S64                 = 53,
-       FILTER_OP_UNARY_PLUS_DOUBLE             = 54,
-       FILTER_OP_UNARY_MINUS_DOUBLE            = 55,
-       FILTER_OP_UNARY_NOT_DOUBLE              = 56,
-
-       /* logical */
-       FILTER_OP_AND                           = 57,
-       FILTER_OP_OR                            = 58,
-
-       /* load field ref */
-       FILTER_OP_LOAD_FIELD_REF                = 59,
-       FILTER_OP_LOAD_FIELD_REF_STRING         = 60,
-       FILTER_OP_LOAD_FIELD_REF_SEQUENCE       = 61,
-       FILTER_OP_LOAD_FIELD_REF_S64            = 62,
-       FILTER_OP_LOAD_FIELD_REF_DOUBLE         = 63,
-
-       /* load immediate from operand */
-       FILTER_OP_LOAD_STRING                   = 64,
-       FILTER_OP_LOAD_S64                      = 65,
-       FILTER_OP_LOAD_DOUBLE                   = 66,
-
-       /* cast */
-       FILTER_OP_CAST_TO_S64                   = 67,
-       FILTER_OP_CAST_DOUBLE_TO_S64            = 68,
-       FILTER_OP_CAST_NOP                      = 69,
-
-       /* get context ref */
-       FILTER_OP_GET_CONTEXT_REF               = 70,
-       FILTER_OP_GET_CONTEXT_REF_STRING        = 71,
-       FILTER_OP_GET_CONTEXT_REF_S64           = 72,
-       FILTER_OP_GET_CONTEXT_REF_DOUBLE        = 73,
-
-       /* load userspace field ref */
-       FILTER_OP_LOAD_FIELD_REF_USER_STRING    = 74,
-       FILTER_OP_LOAD_FIELD_REF_USER_SEQUENCE  = 75,
-
-       /*
-        * load immediate star globbing pattern (literal string)
-        * from immediate
-        */
-       FILTER_OP_LOAD_STAR_GLOB_STRING         = 76,
-
-       /* globbing pattern binary operator: apply to */
-       FILTER_OP_EQ_STAR_GLOB_STRING           = 77,
-       FILTER_OP_NE_STAR_GLOB_STRING           = 78,
-
-       /*
-        * Instructions for recursive traversal through composed types.
-        */
-       FILTER_OP_GET_CONTEXT_ROOT              = 79,
-       FILTER_OP_GET_APP_CONTEXT_ROOT          = 80,
-       FILTER_OP_GET_PAYLOAD_ROOT              = 81,
-
-       FILTER_OP_GET_SYMBOL                    = 82,
-       FILTER_OP_GET_SYMBOL_FIELD              = 83,
-       FILTER_OP_GET_INDEX_U16                 = 84,
-       FILTER_OP_GET_INDEX_U64                 = 85,
-
-       FILTER_OP_LOAD_FIELD                    = 86,
-       FILTER_OP_LOAD_FIELD_S8                 = 87,
-       FILTER_OP_LOAD_FIELD_S16                = 88,
-       FILTER_OP_LOAD_FIELD_S32                = 89,
-       FILTER_OP_LOAD_FIELD_S64                = 90,
-       FILTER_OP_LOAD_FIELD_U8                 = 91,
-       FILTER_OP_LOAD_FIELD_U16                = 92,
-       FILTER_OP_LOAD_FIELD_U32                = 93,
-       FILTER_OP_LOAD_FIELD_U64                = 94,
-       FILTER_OP_LOAD_FIELD_STRING             = 95,
-       FILTER_OP_LOAD_FIELD_SEQUENCE           = 96,
-       FILTER_OP_LOAD_FIELD_DOUBLE             = 97,
-
-       FILTER_OP_UNARY_BIT_NOT                 = 98,
-
-       FILTER_OP_RETURN_S64                    = 99,
-
-       NR_FILTER_OPS,
-};
-
-typedef uint8_t filter_opcode_t;
-
-struct load_op {
-       filter_opcode_t op;
-       char data[0];
-       /* data to load. Size known by enum filter_opcode and null-term char. */
-} __attribute__((packed));
-
-struct binary_op {
-       filter_opcode_t op;
-} __attribute__((packed));
-
-struct unary_op {
-       filter_opcode_t op;
-} __attribute__((packed));
-
-/* skip_offset is absolute from start of bytecode */
-struct logical_op {
-       filter_opcode_t op;
-       uint16_t skip_offset;   /* bytecode insn, if skip second test */
-} __attribute__((packed));
-
-struct cast_op {
-       filter_opcode_t op;
-} __attribute__((packed));
-
-struct return_op {
-       filter_opcode_t op;
-} __attribute__((packed));
-
-#endif /* _FILTER_BYTECODE_H */
diff --git a/include/lttng/abi-old.h b/include/lttng/abi-old.h
new file mode 100644 (file)
index 0000000..ac8d938
--- /dev/null
@@ -0,0 +1,128 @@
+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
+ *
+ * lttng/abi-old.h
+ *
+ * LTTng old ABI header (without support for compat 32/64 bits)
+ *
+ * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ */
+
+#ifndef _LTTNG_ABI_OLD_H
+#define _LTTNG_ABI_OLD_H
+
+#include <linux/fs.h>
+#include <lttng/abi.h>
+
+/*
+ * LTTng DebugFS ABI structures.
+ */
+#define LTTNG_KERNEL_OLD_CHANNEL_PADDING       LTTNG_KERNEL_SYM_NAME_LEN + 32
+struct lttng_kernel_old_channel {
+       int overwrite;                          /* 1: overwrite, 0: discard */
+       uint64_t subbuf_size;                   /* in bytes */
+       uint64_t num_subbuf;
+       unsigned int switch_timer_interval;     /* usecs */
+       unsigned int read_timer_interval;       /* usecs */
+       enum lttng_kernel_output output;        /* splice, mmap */
+       char padding[LTTNG_KERNEL_OLD_CHANNEL_PADDING];
+};
+
+struct lttng_kernel_old_kretprobe {
+       uint64_t addr;
+
+       uint64_t offset;
+       char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
+};
+
+/*
+ * Either addr is used, or symbol_name and offset.
+ */
+struct lttng_kernel_old_kprobe {
+       uint64_t addr;
+
+       uint64_t offset;
+       char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
+};
+
+struct lttng_kernel_old_function_tracer {
+       char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
+};
+
+/*
+ * For syscall tracing, name = '\0' means "enable all".
+ */
+#define LTTNG_KERNEL_OLD_EVENT_PADDING1        16
+#define LTTNG_KERNEL_OLD_EVENT_PADDING2        LTTNG_KERNEL_SYM_NAME_LEN + 32
+struct lttng_kernel_old_event {
+       char name[LTTNG_KERNEL_SYM_NAME_LEN];   /* event name */
+       enum lttng_kernel_instrumentation instrumentation;
+       char padding[LTTNG_KERNEL_OLD_EVENT_PADDING1];
+
+       /* Per instrumentation type configuration */
+       union {
+               struct lttng_kernel_old_kretprobe kretprobe;
+               struct lttng_kernel_old_kprobe kprobe;
+               struct lttng_kernel_old_function_tracer ftrace;
+               char padding[LTTNG_KERNEL_OLD_EVENT_PADDING2];
+       } u;
+};
+
+struct lttng_kernel_old_tracer_version {
+       uint32_t major;
+       uint32_t minor;
+       uint32_t patchlevel;
+};
+
+struct lttng_kernel_old_calibrate {
+       enum lttng_kernel_calibrate_type type;  /* type (input) */
+};
+
+struct lttng_kernel_old_perf_counter_ctx {
+       uint32_t type;
+       uint64_t config;
+       char name[LTTNG_KERNEL_SYM_NAME_LEN];
+};
+
+#define LTTNG_KERNEL_OLD_CONTEXT_PADDING1      16
+#define LTTNG_KERNEL_OLD_CONTEXT_PADDING2      LTTNG_KERNEL_SYM_NAME_LEN + 32
+struct lttng_kernel_old_context {
+       enum lttng_kernel_context_type ctx;
+       char padding[LTTNG_KERNEL_OLD_CONTEXT_PADDING1];
+
+       union {
+               struct lttng_kernel_old_perf_counter_ctx perf_counter;
+               char padding[LTTNG_KERNEL_OLD_CONTEXT_PADDING2];
+       } u;
+};
+
+/* LTTng file descriptor ioctl */
+#define LTTNG_KERNEL_OLD_SESSION               _IO(0xF6, 0x40)
+#define LTTNG_KERNEL_OLD_TRACER_VERSION                \
+       _IOR(0xF6, 0x41, struct lttng_kernel_old_tracer_version)
+#define LTTNG_KERNEL_OLD_TRACEPOINT_LIST       _IO(0xF6, 0x42)
+#define LTTNG_KERNEL_OLD_WAIT_QUIESCENT                _IO(0xF6, 0x43)
+#define LTTNG_KERNEL_OLD_CALIBRATE             \
+       _IOWR(0xF6, 0x44, struct lttng_kernel_old_calibrate)
+
+/* Session FD ioctl */
+#define LTTNG_KERNEL_OLD_METADATA              \
+       _IOW(0xF6, 0x50, struct lttng_kernel_old_channel)
+#define LTTNG_KERNEL_OLD_CHANNEL               \
+       _IOW(0xF6, 0x51, struct lttng_kernel_old_channel)
+#define LTTNG_KERNEL_OLD_SESSION_START         _IO(0xF6, 0x52)
+#define LTTNG_KERNEL_OLD_SESSION_STOP          _IO(0xF6, 0x53)
+
+/* Channel FD ioctl */
+#define LTTNG_KERNEL_OLD_STREAM                        _IO(0xF6, 0x60)
+#define LTTNG_KERNEL_OLD_EVENT                 \
+       _IOW(0xF6, 0x61, struct lttng_kernel_old_event)
+
+/* Event and Channel FD ioctl */
+#define LTTNG_KERNEL_OLD_CONTEXT               \
+       _IOW(0xF6, 0x70, struct lttng_kernel_old_context)
+
+/* Event, Channel and Session ioctl */
+#define LTTNG_KERNEL_OLD_ENABLE                        _IO(0xF6, 0x80)
+#define LTTNG_KERNEL_OLD_DISABLE               _IO(0xF6, 0x81)
+
+#endif /* _LTTNG_ABI_OLD_H */
diff --git a/include/lttng/abi.h b/include/lttng/abi.h
new file mode 100644 (file)
index 0000000..b8e2db3
--- /dev/null
@@ -0,0 +1,354 @@
+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
+ *
+ * lttng/abi.h
+ *
+ * LTTng ABI header
+ *
+ * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ */
+
+#ifndef _LTTNG_ABI_H
+#define _LTTNG_ABI_H
+
+#include <linux/fs.h>
+
+/*
+ * Major/minor version of ABI exposed to lttng tools. Major number
+ * should be increased when an incompatible ABI change is done.
+ */
+#define LTTNG_MODULES_ABI_MAJOR_VERSION                2
+#define LTTNG_MODULES_ABI_MINOR_VERSION                5
+
+#define LTTNG_KERNEL_SYM_NAME_LEN      256
+#define LTTNG_KERNEL_SESSION_NAME_LEN  256
+#define LTTNG_KERNEL_SESSION_CREATION_TIME_ISO8601_LEN 26
+
+enum lttng_kernel_instrumentation {
+       LTTNG_KERNEL_TRACEPOINT = 0,
+       LTTNG_KERNEL_KPROBE     = 1,
+       LTTNG_KERNEL_FUNCTION   = 2,
+       LTTNG_KERNEL_KRETPROBE  = 3,
+       LTTNG_KERNEL_NOOP       = 4,    /* not hooked */
+       LTTNG_KERNEL_SYSCALL    = 5,
+       LTTNG_KERNEL_UPROBE     = 6,
+};
+
+/*
+ * LTTng consumer mode
+ */
+enum lttng_kernel_output {
+       LTTNG_KERNEL_SPLICE     = 0,
+       LTTNG_KERNEL_MMAP       = 1,
+};
+
+/*
+ * LTTng DebugFS ABI structures.
+ */
+#define LTTNG_KERNEL_CHANNEL_PADDING   LTTNG_KERNEL_SYM_NAME_LEN + 32
+struct lttng_kernel_channel {
+       uint64_t subbuf_size;                   /* in bytes */
+       uint64_t num_subbuf;
+       unsigned int switch_timer_interval;     /* usecs */
+       unsigned int read_timer_interval;       /* usecs */
+       enum lttng_kernel_output output;        /* splice, mmap */
+       int overwrite;                          /* 1: overwrite, 0: discard */
+       char padding[LTTNG_KERNEL_CHANNEL_PADDING];
+} __attribute__((packed));
+
+struct lttng_kernel_kretprobe {
+       uint64_t addr;
+
+       uint64_t offset;
+       char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
+} __attribute__((packed));
+
+/*
+ * Either addr is used, or symbol_name and offset.
+ */
+struct lttng_kernel_kprobe {
+       uint64_t addr;
+
+       uint64_t offset;
+       char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
+} __attribute__((packed));
+
+struct lttng_kernel_function_tracer {
+       char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
+} __attribute__((packed));
+
+struct lttng_kernel_uprobe {
+       int fd;
+} __attribute__((packed));
+
+struct lttng_kernel_event_callsite_uprobe {
+       uint64_t offset;
+} __attribute__((packed));
+
+struct lttng_kernel_event_callsite {
+       union {
+               struct lttng_kernel_event_callsite_uprobe uprobe;
+       } u;
+} __attribute__((packed));
+
+/*
+ * For syscall tracing, name = "*" means "enable all".
+ */
+#define LTTNG_KERNEL_EVENT_PADDING1    16
+#define LTTNG_KERNEL_EVENT_PADDING2    LTTNG_KERNEL_SYM_NAME_LEN + 32
+struct lttng_kernel_event {
+       char name[LTTNG_KERNEL_SYM_NAME_LEN];   /* event name */
+       enum lttng_kernel_instrumentation instrumentation;
+       char padding[LTTNG_KERNEL_EVENT_PADDING1];
+
+       /* Per instrumentation type configuration */
+       union {
+               struct lttng_kernel_kretprobe kretprobe;
+               struct lttng_kernel_kprobe kprobe;
+               struct lttng_kernel_function_tracer ftrace;
+               struct lttng_kernel_uprobe uprobe;
+               char padding[LTTNG_KERNEL_EVENT_PADDING2];
+       } u;
+} __attribute__((packed));
+
+struct lttng_kernel_tracer_version {
+       uint32_t major;
+       uint32_t minor;
+       uint32_t patchlevel;
+} __attribute__((packed));
+
+struct lttng_kernel_tracer_abi_version {
+       uint32_t major;
+       uint32_t minor;
+} __attribute__((packed));
+
+struct lttng_kernel_session_name {
+       char name[LTTNG_KERNEL_SESSION_NAME_LEN];
+} __attribute__((packed));
+
+struct lttng_kernel_session_creation_time {
+       char iso8601[LTTNG_KERNEL_SESSION_CREATION_TIME_ISO8601_LEN];
+} __attribute__((packed));
+
+enum lttng_kernel_calibrate_type {
+       LTTNG_KERNEL_CALIBRATE_KRETPROBE,
+};
+
+struct lttng_kernel_calibrate {
+       enum lttng_kernel_calibrate_type type;  /* type (input) */
+} __attribute__((packed));
+
+struct lttng_kernel_syscall_mask {
+       uint32_t len;   /* in bits */
+       char mask[];
+} __attribute__((packed));
+
+enum lttng_kernel_context_type {
+       LTTNG_KERNEL_CONTEXT_PID                = 0,
+       LTTNG_KERNEL_CONTEXT_PERF_COUNTER       = 1,
+       LTTNG_KERNEL_CONTEXT_PROCNAME           = 2,
+       LTTNG_KERNEL_CONTEXT_PRIO               = 3,
+       LTTNG_KERNEL_CONTEXT_NICE               = 4,
+       LTTNG_KERNEL_CONTEXT_VPID               = 5,
+       LTTNG_KERNEL_CONTEXT_TID                = 6,
+       LTTNG_KERNEL_CONTEXT_VTID               = 7,
+       LTTNG_KERNEL_CONTEXT_PPID               = 8,
+       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,
+       LTTNG_KERNEL_CONTEXT_CALLSTACK_KERNEL   = 16,
+       LTTNG_KERNEL_CONTEXT_CALLSTACK_USER     = 17,
+       LTTNG_KERNEL_CONTEXT_CGROUP_NS          = 18,
+       LTTNG_KERNEL_CONTEXT_IPC_NS             = 19,
+       LTTNG_KERNEL_CONTEXT_MNT_NS             = 20,
+       LTTNG_KERNEL_CONTEXT_NET_NS             = 21,
+       LTTNG_KERNEL_CONTEXT_PID_NS             = 22,
+       LTTNG_KERNEL_CONTEXT_USER_NS            = 23,
+       LTTNG_KERNEL_CONTEXT_UTS_NS             = 24,
+       LTTNG_KERNEL_CONTEXT_UID                = 25,
+       LTTNG_KERNEL_CONTEXT_EUID               = 26,
+       LTTNG_KERNEL_CONTEXT_SUID               = 27,
+       LTTNG_KERNEL_CONTEXT_GID                = 28,
+       LTTNG_KERNEL_CONTEXT_EGID               = 29,
+       LTTNG_KERNEL_CONTEXT_SGID               = 30,
+       LTTNG_KERNEL_CONTEXT_VUID               = 31,
+       LTTNG_KERNEL_CONTEXT_VEUID              = 32,
+       LTTNG_KERNEL_CONTEXT_VSUID              = 33,
+       LTTNG_KERNEL_CONTEXT_VGID               = 34,
+       LTTNG_KERNEL_CONTEXT_VEGID              = 35,
+       LTTNG_KERNEL_CONTEXT_VSGID              = 36,
+};
+
+struct lttng_kernel_perf_counter_ctx {
+       uint32_t type;
+       uint64_t config;
+       char name[LTTNG_KERNEL_SYM_NAME_LEN];
+} __attribute__((packed));
+
+#define LTTNG_KERNEL_CONTEXT_PADDING1  16
+#define LTTNG_KERNEL_CONTEXT_PADDING2  LTTNG_KERNEL_SYM_NAME_LEN + 32
+struct lttng_kernel_context {
+       enum lttng_kernel_context_type ctx;
+       char padding[LTTNG_KERNEL_CONTEXT_PADDING1];
+
+       union {
+               struct lttng_kernel_perf_counter_ctx perf_counter;
+               char padding[LTTNG_KERNEL_CONTEXT_PADDING2];
+       } u;
+} __attribute__((packed));
+
+#define LTTNG_KERNEL_FILTER_BYTECODE_MAX_LEN           65536
+struct lttng_kernel_filter_bytecode {
+       uint32_t len;
+       uint32_t reloc_offset;
+       uint64_t seqnum;
+       char data[0];
+} __attribute__((packed));
+
+enum lttng_kernel_tracker_type {
+       LTTNG_KERNEL_TRACKER_UNKNOWN            = -1,
+
+       LTTNG_KERNEL_TRACKER_PID                = 0,
+       LTTNG_KERNEL_TRACKER_VPID               = 1,
+       LTTNG_KERNEL_TRACKER_UID                = 2,
+       LTTNG_KERNEL_TRACKER_VUID               = 3,
+       LTTNG_KERNEL_TRACKER_GID                = 4,
+       LTTNG_KERNEL_TRACKER_VGID               = 5,
+};
+
+struct lttng_kernel_tracker_args {
+       enum lttng_kernel_tracker_type type;
+       int32_t id;
+};
+
+/* LTTng file descriptor ioctl */
+/* lttng/abi-old.h reserve 0x40, 0x41, 0x42, 0x43, and 0x44. */
+#define LTTNG_KERNEL_SESSION                   _IO(0xF6, 0x45)
+#define LTTNG_KERNEL_TRACER_VERSION            \
+       _IOR(0xF6, 0x46, struct lttng_kernel_tracer_version)
+#define LTTNG_KERNEL_TRACEPOINT_LIST           _IO(0xF6, 0x47)
+#define LTTNG_KERNEL_WAIT_QUIESCENT            _IO(0xF6, 0x48)
+#define LTTNG_KERNEL_CALIBRATE                 \
+       _IOWR(0xF6, 0x49, struct lttng_kernel_calibrate)
+#define LTTNG_KERNEL_SYSCALL_LIST              _IO(0xF6, 0x4A)
+#define LTTNG_KERNEL_TRACER_ABI_VERSION                \
+       _IOR(0xF6, 0x4B, struct lttng_kernel_tracer_abi_version)
+
+/* Session FD ioctl */
+/* lttng/abi-old.h reserve 0x50, 0x51, 0x52, and 0x53. */
+#define LTTNG_KERNEL_METADATA                  \
+       _IOW(0xF6, 0x54, struct lttng_kernel_channel)
+#define LTTNG_KERNEL_CHANNEL                   \
+       _IOW(0xF6, 0x55, struct lttng_kernel_channel)
+#define LTTNG_KERNEL_SESSION_START             _IO(0xF6, 0x56)
+#define LTTNG_KERNEL_SESSION_STOP              _IO(0xF6, 0x57)
+#define LTTNG_KERNEL_SESSION_TRACK_PID         \
+       _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)
+
+/* lttng/abi-old.h reserve 0x5A and 0x5B. */
+#define LTTNG_KERNEL_SESSION_STATEDUMP         _IO(0xF6, 0x5C)
+#define LTTNG_KERNEL_SESSION_SET_NAME          \
+       _IOR(0xF6, 0x5D, struct lttng_kernel_session_name)
+#define LTTNG_KERNEL_SESSION_SET_CREATION_TIME         \
+       _IOR(0xF6, 0x5E, struct lttng_kernel_session_creation_time)
+
+/* Channel FD ioctl */
+/* lttng/abi-old.h reserve 0x60 and 0x61. */
+#define LTTNG_KERNEL_STREAM                    _IO(0xF6, 0x62)
+#define LTTNG_KERNEL_EVENT                     \
+       _IOW(0xF6, 0x63, struct lttng_kernel_event)
+#define LTTNG_KERNEL_SYSCALL_MASK              \
+       _IOWR(0xF6, 0x64, struct lttng_kernel_syscall_mask)
+
+/* Event and Channel FD ioctl */
+/* lttng/abi-old.h reserve 0x70. */
+#define LTTNG_KERNEL_CONTEXT                   \
+       _IOW(0xF6, 0x71, struct lttng_kernel_context)
+
+/* Event, Channel and Session ioctl */
+/* lttng/abi-old.h reserve 0x80 and 0x81. */
+#define LTTNG_KERNEL_ENABLE                    _IO(0xF6, 0x82)
+#define LTTNG_KERNEL_DISABLE                   _IO(0xF6, 0x83)
+
+/* Event FD ioctl */
+#define LTTNG_KERNEL_FILTER                    _IO(0xF6, 0x90)
+#define LTTNG_KERNEL_ADD_CALLSITE              _IO(0xF6, 0x91)
+
+/* Session FD ioctl (continued) */
+#define LTTNG_KERNEL_SESSION_LIST_TRACKER_IDS  \
+       _IOR(0xF6, 0xA0, struct lttng_kernel_tracker_args)
+#define LTTNG_KERNEL_SESSION_TRACK_ID          \
+       _IOR(0xF6, 0xA1, struct lttng_kernel_tracker_args)
+#define LTTNG_KERNEL_SESSION_UNTRACK_ID                \
+       _IOR(0xF6, 0xA2, struct lttng_kernel_tracker_args)
+
+/*
+ * LTTng-specific ioctls for the lib ringbuffer.
+ *
+ * Operations applying to the current sub-buffer need to occur between
+ * a get/put or get_next/put_next ioctl pair.
+ */
+
+/* returns the timestamp begin of the current sub-buffer */
+#define LTTNG_RING_BUFFER_GET_TIMESTAMP_BEGIN  _IOR(0xF6, 0x20, uint64_t)
+/* returns the timestamp end of the current sub-buffer */
+#define LTTNG_RING_BUFFER_GET_TIMESTAMP_END    _IOR(0xF6, 0x21, uint64_t)
+/* returns the number of events discarded of the current sub-buffer */
+#define LTTNG_RING_BUFFER_GET_EVENTS_DISCARDED _IOR(0xF6, 0x22, uint64_t)
+/* returns the packet payload size of the current sub-buffer */
+#define LTTNG_RING_BUFFER_GET_CONTENT_SIZE     _IOR(0xF6, 0x23, uint64_t)
+/* returns the packet size of the current sub-buffer*/
+#define LTTNG_RING_BUFFER_GET_PACKET_SIZE      _IOR(0xF6, 0x24, uint64_t)
+/* returns the stream id (invariant for the stream) */
+#define LTTNG_RING_BUFFER_GET_STREAM_ID                _IOR(0xF6, 0x25, uint64_t)
+/* returns the current timestamp as perceived from the tracer */
+#define LTTNG_RING_BUFFER_GET_CURRENT_TIMESTAMP        _IOR(0xF6, 0x26, uint64_t)
+/* returns the packet sequence number of the current sub-buffer */
+#define LTTNG_RING_BUFFER_GET_SEQ_NUM          _IOR(0xF6, 0x27, uint64_t)
+/* returns the stream instance id (invariant for the stream) */
+#define LTTNG_RING_BUFFER_INSTANCE_ID          _IOR(0xF6, 0x28, uint64_t)
+
+#ifdef CONFIG_COMPAT
+/* returns the timestamp begin of the current sub-buffer */
+#define LTTNG_RING_BUFFER_COMPAT_GET_TIMESTAMP_BEGIN \
+       LTTNG_RING_BUFFER_GET_TIMESTAMP_BEGIN
+/* returns the timestamp end of the current sub-buffer */
+#define LTTNG_RING_BUFFER_COMPAT_GET_TIMESTAMP_END \
+       LTTNG_RING_BUFFER_GET_TIMESTAMP_END
+/* returns the number of events discarded of the current sub-buffer */
+#define LTTNG_RING_BUFFER_COMPAT_GET_EVENTS_DISCARDED \
+       LTTNG_RING_BUFFER_GET_EVENTS_DISCARDED
+/* returns the packet payload size of the current sub-buffer */
+#define LTTNG_RING_BUFFER_COMPAT_GET_CONTENT_SIZE \
+       LTTNG_RING_BUFFER_GET_CONTENT_SIZE
+/* returns the packet size of the current sub-buffer */
+#define LTTNG_RING_BUFFER_COMPAT_GET_PACKET_SIZE \
+       LTTNG_RING_BUFFER_GET_PACKET_SIZE
+/* returns the stream id (invariant for the stream) */
+#define LTTNG_RING_BUFFER_COMPAT_GET_STREAM_ID \
+       LTTNG_RING_BUFFER_GET_STREAM_ID
+/* returns the current timestamp as perceived from the tracer */
+#define LTTNG_RING_BUFFER_COMPAT_GET_CURRENT_TIMESTAMP \
+       LTTNG_RING_BUFFER_GET_CURRENT_TIMESTAMP
+/* returns the packet sequence number of the current sub-buffer */
+#define LTTNG_RING_BUFFER_COMPAT_GET_SEQ_NUM   \
+       LTTNG_RING_BUFFER_GET_SEQ_NUM
+/* returns the stream instance id (invariant for the stream) */
+#define LTTNG_RING_BUFFER_COMPAT_INSTANCE_ID   \
+       LTTNG_RING_BUFFER_INSTANCE_ID
+#endif /* CONFIG_COMPAT */
+
+#endif /* _LTTNG_ABI_H */
index 7d5eaeaa068ddadb7631d9f88750453bc9aa47a2..8ccb108d734b1c1ed09a3e2ab6ad444fa9eb20a1 100644 (file)
@@ -7,7 +7,7 @@
 #define _BABELTRACE_BITFIELD_H
 
 #include <linux/types.h>
-#include <lttng-endian.h>
+#include <lttng/endian.h>
 
 #ifndef CHAR_BIT
 #define CHAR_BIT 8
diff --git a/include/lttng/clock.h b/include/lttng/clock.h
new file mode 100644 (file)
index 0000000..01d3570
--- /dev/null
@@ -0,0 +1,28 @@
+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
+ *
+ * lttng/clock.h
+ *
+ * Copyright (C) 2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ */
+
+#ifndef _LTTNG_CLOCK_H
+#define _LTTNG_CLOCK_H
+
+#include <linux/module.h>
+
+#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 --git a/include/lttng/cpuhotplug.h b/include/lttng/cpuhotplug.h
new file mode 100644 (file)
index 0000000..5c2f256
--- /dev/null
@@ -0,0 +1,52 @@
+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
+ *
+ * lttng/cpuhotplug.h
+ *
+ * Copyright (C) 2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ */
+
+#ifndef LTTNG_CPUHOTPLUG_H
+#define LTTNG_CPUHOTPLUG_H
+
+struct lttng_cpuhp_node;
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+
+#include <linux/cpuhotplug.h>
+
+enum lttng_cpuhp_component {
+       LTTNG_RING_BUFFER_FRONTEND,
+       LTTNG_RING_BUFFER_BACKEND,
+       LTTNG_RING_BUFFER_ITER,
+       LTTNG_CONTEXT_PERF_COUNTERS,
+};
+
+struct lttng_cpuhp_node {
+       enum lttng_cpuhp_component component;
+       struct hlist_node node;
+};
+
+extern enum cpuhp_state lttng_hp_prepare;
+extern enum cpuhp_state lttng_hp_online;
+
+int lttng_cpuhp_rb_backend_prepare(unsigned int cpu,
+                struct lttng_cpuhp_node *node);
+int lttng_cpuhp_rb_frontend_dead(unsigned int cpu,
+               struct lttng_cpuhp_node *node);
+int lttng_cpuhp_rb_frontend_online(unsigned int cpu,
+               struct lttng_cpuhp_node *node);
+int lttng_cpuhp_rb_frontend_offline(unsigned int cpu,
+               struct lttng_cpuhp_node *node);
+int lttng_cpuhp_rb_iter_online(unsigned int cpu,
+               struct lttng_cpuhp_node *node);
+
+/* Ring buffer is a separate library. */
+void lttng_rb_set_hp_prepare(enum cpuhp_state val);
+void lttng_rb_set_hp_online(enum cpuhp_state val);
+
+extern enum cpuhp_state lttng_rb_hp_prepare;
+extern enum cpuhp_state lttng_rb_hp_online;
+
+#endif
+
+#endif /* LTTNG_CPUHOTPLUG_H */
diff --git a/include/lttng/endian.h b/include/lttng/endian.h
new file mode 100644 (file)
index 0000000..399ec20
--- /dev/null
@@ -0,0 +1,30 @@
+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) */
+#ifndef _LTTNG_ENDIAN_H
+#define _LTTNG_ENDIAN_H
+
+/*
+ * lttng/endian.h
+ *
+ * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ */
+
+#ifdef __KERNEL__
+# include <asm/byteorder.h>
+# ifdef __BIG_ENDIAN
+#  define __BYTE_ORDER __BIG_ENDIAN
+# elif defined(__LITTLE_ENDIAN)
+#  define __BYTE_ORDER __LITTLE_ENDIAN
+# else
+#  error "unknown endianness"
+# endif
+#ifndef __BIG_ENDIAN
+# define __BIG_ENDIAN 4321
+#endif
+#ifndef __LITTLE_ENDIAN
+# define __LITTLE_ENDIAN 1234
+#endif
+#else
+# include <endian.h>
+#endif
+
+#endif /* _LTTNG_ENDIAN_H */
diff --git a/include/lttng/events.h b/include/lttng/events.h
new file mode 100644 (file)
index 0000000..c9d664f
--- /dev/null
@@ -0,0 +1,982 @@
+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
+ *
+ * lttng/events.h
+ *
+ * Holds LTTng per-session event registry.
+ *
+ * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ */
+
+#ifndef _LTTNG_EVENTS_H
+#define _LTTNG_EVENTS_H
+
+#include <linux/version.h>
+#include <linux/list.h>
+#include <linux/kprobes.h>
+#include <linux/kref.h>
+#include <linux/uuid.h>
+#include <wrapper/uprobes.h>
+#include <lttng/cpuhotplug.h>
+#include <lttng/tracer.h>
+#include <lttng/abi.h>
+#include <lttng/abi-old.h>
+#include <lttng/endian.h>
+
+#define lttng_is_signed_type(type)     (((type)(-1)) < 0)
+
+struct lttng_channel;
+struct lttng_session;
+struct lttng_metadata_cache;
+struct lib_ring_buffer_ctx;
+struct perf_event;
+struct perf_event_attr;
+struct lib_ring_buffer_config;
+
+/* Type description */
+
+enum abstract_types {
+       atype_integer,
+       atype_string,
+       atype_enum_nestable,
+       atype_array_nestable,
+       atype_sequence_nestable,
+       atype_struct_nestable,
+       atype_variant_nestable,
+       NR_ABSTRACT_TYPES,
+};
+
+enum lttng_string_encodings {
+       lttng_encode_none = 0,
+       lttng_encode_UTF8 = 1,
+       lttng_encode_ASCII = 2,
+       NR_STRING_ENCODINGS,
+};
+
+enum channel_type {
+       PER_CPU_CHANNEL,
+       METADATA_CHANNEL,
+};
+
+struct lttng_enum_value {
+       unsigned long long value;
+       unsigned int signedness:1;
+};
+
+struct lttng_enum_entry {
+       struct lttng_enum_value start, end;     /* start and end are inclusive */
+       const char *string;
+       struct {
+               unsigned int is_auto:1;
+       } options;
+};
+
+#define __type_integer(_type, _size, _alignment, _signedness,  \
+               _byte_order, _base, _encoding)  \
+       {                                                       \
+           .atype = atype_integer,                             \
+           .u.integer =                                        \
+               {                                               \
+                 .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,         \
+               },                                              \
+       }                                                       \
+
+struct lttng_integer_type {
+       unsigned int size;              /* in bits */
+       unsigned short alignment;       /* in bits */
+       unsigned int signedness:1,
+               reverse_byte_order:1;
+       unsigned int base;              /* 2, 8, 10, 16, for pretty print */
+       enum lttng_string_encodings encoding;
+};
+
+struct lttng_type {
+       enum abstract_types atype;
+       union {
+               struct lttng_integer_type integer;
+               struct {
+                       enum lttng_string_encodings encoding;
+               } string;
+               struct {
+                       const struct lttng_enum_desc *desc;     /* Enumeration mapping */
+                       const struct lttng_type *container_type;
+               } enum_nestable;
+               struct {
+                       const struct lttng_type *elem_type;
+                       unsigned int length;                    /* Num. elems. */
+                       unsigned int alignment;
+               } array_nestable;
+               struct {
+                       const char *length_name;                /* Length field name. */
+                       const struct lttng_type *elem_type;
+                       unsigned int alignment;                 /* Alignment before elements. */
+               } sequence_nestable;
+               struct {
+                       unsigned int nr_fields;
+                       const struct lttng_event_field *fields; /* Array of fields. */
+                       unsigned int alignment;
+               } struct_nestable;
+               struct {
+                       const char *tag_name;
+                       const struct lttng_event_field *choices; /* Array of fields. */
+                       unsigned int nr_choices;
+                       unsigned int alignment;
+               } variant_nestable;
+       } u;
+};
+
+struct lttng_enum_desc {
+       const char *name;
+       const struct lttng_enum_entry *entries;
+       unsigned int nr_entries;
+};
+
+/* Event field description */
+
+struct lttng_event_field {
+       const char *name;
+       struct lttng_type type;
+       unsigned int nowrite:1,         /* do not write into trace */
+                       user:1,         /* fetch from user-space */
+                       nofilter:1;     /* do not consider for filter */
+};
+
+union lttng_ctx_value {
+       int64_t s64;
+       const char *str;
+       double d;
+};
+
+/*
+ * We need to keep this perf counter field separately from struct
+ * lttng_ctx_field because cpu hotplug needs fixed-location addresses.
+ */
+struct lttng_perf_counter_field {
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+       struct lttng_cpuhp_node cpuhp_prepare;
+       struct lttng_cpuhp_node cpuhp_online;
+#else
+       struct notifier_block nb;
+       int hp_enable;
+#endif
+       struct perf_event_attr *attr;
+       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);
+       size_t (*get_size_arg)(size_t offset, struct lttng_ctx_field *field,
+                              struct lib_ring_buffer_ctx *ctx,
+                              struct lttng_channel *chan);
+       void (*record)(struct lttng_ctx_field *field,
+                      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;
+       } u;
+       void (*destroy)(struct lttng_ctx_field *field);
+       /*
+        * Private data to keep state between get_size and record.
+        * User must perform its own synchronization to protect against
+        * concurrent and reentrant contexts.
+        */
+       void *priv;
+};
+
+struct lttng_ctx {
+       struct lttng_ctx_field *fields;
+       unsigned int nr_fields;
+       unsigned int allocated_fields;
+       size_t largest_align;   /* in bytes */
+};
+
+struct lttng_event_desc {
+       const char *name;               /* lttng-modules name */
+       const char *kname;              /* Linux kernel name (tracepoints) */
+       void *probe_callback;
+       const struct lttng_event_ctx *ctx;      /* context */
+       const struct lttng_event_field *fields; /* event payload */
+       unsigned int nr_fields;
+       struct module *owner;
+};
+
+struct lttng_probe_desc {
+       const char *provider;
+       const struct lttng_event_desc **event_desc;
+       unsigned int nr_events;
+       struct list_head head;                  /* chain registered probes */
+       struct list_head lazy_init_head;
+       int lazy;                               /* lazy registration */
+};
+
+struct lttng_krp;                              /* Kretprobe handling */
+
+enum lttng_event_type {
+       LTTNG_TYPE_EVENT = 0,
+       LTTNG_TYPE_ENABLER = 1,
+};
+
+struct lttng_filter_bytecode_node {
+       struct list_head node;
+       struct lttng_enabler *enabler;
+       /*
+        * struct lttng_kernel_filter_bytecode has var. sized array, must be
+        * last field.
+        */
+       struct lttng_kernel_filter_bytecode bc;
+};
+
+/*
+ * Filter return value masks.
+ */
+enum lttng_filter_ret {
+       LTTNG_FILTER_DISCARD = 0,
+       LTTNG_FILTER_RECORD_FLAG = (1ULL << 0),
+       /* Other bits are kept for future use. */
+};
+
+struct lttng_bytecode_runtime {
+       /* Associated bytecode */
+       struct lttng_filter_bytecode_node *bc;
+       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 */
+       struct lttng_event *event;
+};
+
+/*
+ * Objects in a linked-list of enablers, owned by an event.
+ */
+struct lttng_enabler_ref {
+       struct list_head node;                  /* enabler ref list */
+       struct lttng_enabler *ref;              /* backward ref */
+};
+
+struct lttng_uprobe_handler {
+       struct lttng_event *event;
+       loff_t offset;
+       struct uprobe_consumer up_consumer;
+       struct list_head node;
+};
+
+/*
+ * lttng_event structure is referred to by the tracing fast path. It must be
+ * kept small.
+ */
+struct lttng_event {
+       enum lttng_event_type evtype;   /* First field. */
+       unsigned int id;
+       struct lttng_channel *chan;
+       int enabled;
+       const struct lttng_event_desc *desc;
+       void *filter;
+       struct lttng_ctx *ctx;
+       enum lttng_kernel_instrumentation instrumentation;
+       union {
+               struct {
+                       struct kprobe kp;
+                       char *symbol_name;
+               } kprobe;
+               struct {
+                       struct lttng_krp *lttng_krp;
+                       char *symbol_name;
+               } kretprobe;
+               struct {
+                       struct inode *inode;
+                       struct list_head head;
+               } uprobe;
+       } u;
+       struct list_head list;          /* Event list in session */
+       unsigned int metadata_dumped:1;
+
+       /* Backward references: list of lttng_enabler_ref (ref to enablers) */
+       struct list_head enablers_ref_head;
+       struct hlist_node hlist;        /* session ht of events */
+       int registered;                 /* has reg'd tracepoint probe */
+       /* list of struct lttng_bytecode_runtime, sorted by seqnum */
+       struct list_head bytecode_runtime_head;
+       int has_enablers_without_bytecode;
+};
+
+enum lttng_enabler_type {
+       LTTNG_ENABLER_STAR_GLOB,
+       LTTNG_ENABLER_NAME,
+};
+
+/*
+ * Enabler field, within whatever object is enabling an event. Target of
+ * backward reference.
+ */
+struct lttng_enabler {
+       enum lttng_event_type evtype;   /* First field. */
+
+       enum lttng_enabler_type type;
+
+       struct list_head node;  /* per-session list of enablers */
+       /* head list of struct lttng_ust_filter_bytecode_node */
+       struct list_head filter_bytecode_head;
+
+       struct lttng_kernel_event event_param;
+       struct lttng_channel *chan;
+       struct lttng_ctx *ctx;
+       unsigned int enabled:1;
+};
+
+struct lttng_channel_ops {
+       struct channel *(*channel_create)(const char *name,
+                               struct lttng_channel *lttng_chan,
+                               void *buf_addr,
+                               size_t subbuf_size, size_t num_subbuf,
+                               unsigned int switch_timer_interval,
+                               unsigned int read_timer_interval);
+       void (*channel_destroy)(struct channel *chan);
+       struct lib_ring_buffer *(*buffer_read_open)(struct channel *chan);
+       int (*buffer_has_read_closed_stream)(struct channel *chan);
+       void (*buffer_read_close)(struct lib_ring_buffer *buf);
+       int (*event_reserve)(struct lib_ring_buffer_ctx *ctx,
+                            uint32_t event_id);
+       void (*event_commit)(struct lib_ring_buffer_ctx *ctx);
+       void (*event_write)(struct lib_ring_buffer_ctx *ctx, const void *src,
+                           size_t len);
+       void (*event_write_from_user)(struct lib_ring_buffer_ctx *ctx,
+                                     const void *src, size_t len);
+       void (*event_memset)(struct lib_ring_buffer_ctx *ctx,
+                            int c, size_t len);
+       void (*event_strcpy)(struct lib_ring_buffer_ctx *ctx, const char *src,
+                            size_t len);
+       void (*event_strcpy_from_user)(struct lib_ring_buffer_ctx *ctx,
+                                      const char __user *src, size_t len);
+       /*
+        * packet_avail_size returns the available size in the current
+        * packet. Note that the size returned is only a hint, since it
+        * may change due to concurrent writes.
+        */
+       size_t (*packet_avail_size)(struct channel *chan);
+       wait_queue_head_t *(*get_writer_buf_wait_queue)(struct channel *chan, int cpu);
+       wait_queue_head_t *(*get_hp_wait_queue)(struct channel *chan);
+       int (*is_finalized)(struct channel *chan);
+       int (*is_disabled)(struct channel *chan);
+       int (*timestamp_begin) (const struct lib_ring_buffer_config *config,
+                       struct lib_ring_buffer *bufb,
+                       uint64_t *timestamp_begin);
+       int (*timestamp_end) (const struct lib_ring_buffer_config *config,
+                       struct lib_ring_buffer *bufb,
+                       uint64_t *timestamp_end);
+       int (*events_discarded) (const struct lib_ring_buffer_config *config,
+                       struct lib_ring_buffer *bufb,
+                       uint64_t *events_discarded);
+       int (*content_size) (const struct lib_ring_buffer_config *config,
+                       struct lib_ring_buffer *bufb,
+                       uint64_t *content_size);
+       int (*packet_size) (const struct lib_ring_buffer_config *config,
+                       struct lib_ring_buffer *bufb,
+                       uint64_t *packet_size);
+       int (*stream_id) (const struct lib_ring_buffer_config *config,
+                       struct lib_ring_buffer *bufb,
+                       uint64_t *stream_id);
+       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 {
+       char *name;
+       struct module *owner;
+       struct list_head node;
+       struct lttng_channel_ops ops;
+};
+
+struct lttng_syscall_filter;
+
+#define LTTNG_EVENT_HT_BITS            12
+#define LTTNG_EVENT_HT_SIZE            (1U << LTTNG_EVENT_HT_BITS)
+
+struct lttng_event_ht {
+       struct hlist_head table[LTTNG_EVENT_HT_SIZE];
+};
+
+struct lttng_channel {
+       unsigned int id;
+       struct channel *chan;           /* Channel buffers */
+       int enabled;
+       struct lttng_ctx *ctx;
+       /* Event ID management */
+       struct lttng_session *session;
+       struct file *file;              /* File associated to channel */
+       unsigned int free_event_id;     /* Next event ID to allocate */
+       struct list_head list;          /* Channel list */
+       struct lttng_channel_ops *ops;
+       struct lttng_transport *transport;
+       struct lttng_event **sc_table;  /* for syscall tracing */
+       struct lttng_event **compat_sc_table;
+       struct lttng_event **sc_exit_table;     /* for syscall exit tracing */
+       struct lttng_event **compat_sc_exit_table;
+       struct lttng_event *sc_unknown; /* for unknown syscalls */
+       struct lttng_event *sc_compat_unknown;
+       struct lttng_event *sc_exit_unknown;
+       struct lttng_event *compat_sc_exit_unknown;
+       struct lttng_syscall_filter *sc_filter;
+       int header_type;                /* 0: unset, 1: compact, 2: large */
+       enum channel_type channel_type;
+       unsigned int metadata_dumped:1,
+               sys_enter_registered:1,
+               sys_exit_registered:1,
+               syscall_all:1,
+               tstate:1;               /* Transient enable state */
+};
+
+struct lttng_metadata_stream {
+       void *priv;                     /* Ring buffer private data */
+       struct lttng_metadata_cache *metadata_cache;
+       unsigned int metadata_in;       /* Bytes read from the cache */
+       unsigned int metadata_out;      /* Bytes consumed from stream */
+       int finalized;                  /* Has channel been finalized */
+       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 */
+};
+
+#define LTTNG_DYNAMIC_LEN_STACK_SIZE   128
+
+struct lttng_dynamic_len_stack {
+       size_t stack[LTTNG_DYNAMIC_LEN_STACK_SIZE];
+       size_t offset;
+};
+
+DECLARE_PER_CPU(struct lttng_dynamic_len_stack, lttng_dynamic_len_stack);
+
+/*
+ * struct lttng_id_tracker declared in header due to deferencing of *v
+ * in RCU_INITIALIZER(v).
+ */
+#define LTTNG_ID_HASH_BITS     6
+#define LTTNG_ID_TABLE_SIZE    (1 << LTTNG_ID_HASH_BITS)
+
+enum tracker_type {
+       TRACKER_PID,
+       TRACKER_VPID,
+       TRACKER_UID,
+       TRACKER_VUID,
+       TRACKER_GID,
+       TRACKER_VGID,
+
+       TRACKER_UNKNOWN,
+};
+
+struct lttng_id_tracker_rcu {
+       struct hlist_head id_hash[LTTNG_ID_TABLE_SIZE];
+};
+
+struct lttng_id_tracker {
+       struct lttng_session *session;
+       enum tracker_type tracker_type;
+       struct lttng_id_tracker_rcu *p; /* RCU dereferenced. */
+};
+
+struct lttng_id_hash_node {
+       struct hlist_node hlist;
+       int id;
+};
+
+struct lttng_session {
+       int active;                     /* Is trace session active ? */
+       int been_active;                /* Has trace session been active ? */
+       struct file *file;              /* File associated to session */
+       struct list_head chan;          /* Channel list head */
+       struct list_head events;        /* Event list head */
+       struct list_head list;          /* Session list */
+       unsigned int free_chan_id;      /* Next chan ID to allocate */
+       uuid_le uuid;                   /* Trace session unique ID */
+       struct lttng_metadata_cache *metadata_cache;
+       struct lttng_id_tracker pid_tracker;
+       struct lttng_id_tracker vpid_tracker;
+       struct lttng_id_tracker uid_tracker;
+       struct lttng_id_tracker vuid_tracker;
+       struct lttng_id_tracker gid_tracker;
+       struct lttng_id_tracker vgid_tracker;
+       unsigned int metadata_dumped:1,
+               tstate:1;               /* Transient enable state */
+       /* List of enablers */
+       struct list_head enablers_head;
+       /* Hash table of events */
+       struct lttng_event_ht events_ht;
+       char name[LTTNG_KERNEL_SESSION_NAME_LEN];
+       char creation_time[LTTNG_KERNEL_SESSION_CREATION_TIME_ISO8601_LEN];
+};
+
+struct lttng_metadata_cache {
+       char *data;                     /* Metadata cache */
+       unsigned int cache_alloc;       /* Metadata allocated size (bytes) */
+       unsigned int metadata_written;  /* Number of bytes written in metadata cache */
+       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;              /* Produce/consume lock */
+       uint64_t version;               /* Current version of the metadata */
+};
+
+void lttng_lock_sessions(void);
+void lttng_unlock_sessions(void);
+
+struct list_head *lttng_get_probe_list_head(void);
+
+struct lttng_enabler *lttng_enabler_create(enum lttng_enabler_type type,
+               struct lttng_kernel_event *event_param,
+               struct lttng_channel *chan);
+
+int lttng_enabler_enable(struct lttng_enabler *enabler);
+int lttng_enabler_disable(struct lttng_enabler *enabler);
+int lttng_fix_pending_events(void);
+int lttng_session_active(void);
+
+struct lttng_session *lttng_session_create(void);
+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);
+int lttng_session_statedump(struct lttng_session *session);
+void metadata_cache_destroy(struct kref *kref);
+
+struct lttng_channel *lttng_channel_create(struct lttng_session *session,
+                                      const char *transport_name,
+                                      void *buf_addr,
+                                      size_t subbuf_size, size_t num_subbuf,
+                                      unsigned int switch_timer_interval,
+                                      unsigned int read_timer_interval,
+                                      enum channel_type channel_type);
+struct lttng_channel *lttng_global_channel_create(struct lttng_session *session,
+                                      int overwrite, void *buf_addr,
+                                      size_t subbuf_size, size_t num_subbuf,
+                                      unsigned int switch_timer_interval,
+                                      unsigned int read_timer_interval);
+
+void lttng_metadata_channel_destroy(struct lttng_channel *chan);
+struct lttng_event *lttng_event_create(struct lttng_channel *chan,
+                               struct lttng_kernel_event *event_param,
+                               void *filter,
+                               const struct lttng_event_desc *event_desc,
+                               enum lttng_kernel_instrumentation itype);
+struct lttng_event *_lttng_event_create(struct lttng_channel *chan,
+                               struct lttng_kernel_event *event_param,
+                               void *filter,
+                               const struct lttng_event_desc *event_desc,
+                               enum lttng_kernel_instrumentation itype);
+struct lttng_event *lttng_event_compat_old_create(struct lttng_channel *chan,
+               struct lttng_kernel_old_event *old_event_param,
+               void *filter,
+               const struct lttng_event_desc *internal_desc);
+
+int lttng_channel_enable(struct lttng_channel *channel);
+int lttng_channel_disable(struct lttng_channel *channel);
+int lttng_event_enable(struct lttng_event *event);
+int lttng_event_disable(struct lttng_event *event);
+
+void lttng_transport_register(struct lttng_transport *transport);
+void lttng_transport_unregister(struct lttng_transport *transport);
+
+void synchronize_trace(void);
+int lttng_abi_init(void);
+int lttng_abi_compat_old_init(void);
+void lttng_abi_exit(void);
+void lttng_abi_compat_old_exit(void);
+
+int lttng_probe_register(struct lttng_probe_desc *desc);
+void lttng_probe_unregister(struct lttng_probe_desc *desc);
+const struct lttng_event_desc *lttng_event_get(const char *name);
+void lttng_event_put(const struct lttng_event_desc *desc);
+int lttng_probes_init(void);
+void lttng_probes_exit(void);
+
+int lttng_metadata_output_channel(struct lttng_metadata_stream *stream,
+               struct channel *chan);
+
+int lttng_id_tracker_get_node_id(const struct lttng_id_hash_node *node);
+int lttng_id_tracker_empty_set(struct lttng_id_tracker *lf);
+void lttng_id_tracker_destroy(struct lttng_id_tracker *lf, bool rcu);
+bool lttng_id_tracker_lookup(struct lttng_id_tracker_rcu *p, int id);
+int lttng_id_tracker_add(struct lttng_id_tracker *lf, int id);
+int lttng_id_tracker_del(struct lttng_id_tracker *lf, int id);
+
+int lttng_session_track_id(struct lttng_session *session,
+               enum tracker_type tracker_type, int id);
+int lttng_session_untrack_id(struct lttng_session *session,
+               enum tracker_type tracker_type, int id);
+
+int lttng_session_list_tracker_ids(struct lttng_session *session,
+               enum tracker_type tracker_type);
+
+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);
+int lttng_syscall_filter_enable(struct lttng_channel *chan,
+               const char *name);
+int lttng_syscall_filter_disable(struct lttng_channel *chan,
+               const char *name);
+long lttng_channel_syscall_mask(struct lttng_channel *channel,
+               struct lttng_kernel_syscall_mask __user *usyscall_mask);
+#else
+static inline int lttng_syscalls_register(struct lttng_channel *chan, void *filter)
+{
+       return -ENOSYS;
+}
+
+static inline int lttng_syscalls_unregister(struct lttng_channel *chan)
+{
+       return 0;
+}
+
+static inline int lttng_syscall_filter_enable(struct lttng_channel *chan,
+               const char *name)
+{
+       return -ENOSYS;
+}
+
+static inline int lttng_syscall_filter_disable(struct lttng_channel *chan,
+               const char *name)
+{
+       return -ENOSYS;
+}
+
+static inline long lttng_channel_syscall_mask(struct lttng_channel *channel,
+               struct lttng_kernel_syscall_mask __user *usyscall_mask)
+{
+       return -ENOSYS;
+}
+#endif
+
+void lttng_filter_sync_state(struct lttng_bytecode_runtime *runtime);
+int lttng_enabler_attach_bytecode(struct lttng_enabler *enabler,
+               struct lttng_kernel_filter_bytecode __user *bytecode);
+void lttng_enabler_event_link_bytecode(struct lttng_event *event,
+               struct lttng_enabler *enabler);
+
+int lttng_probes_init(void);
+
+extern struct lttng_ctx *lttng_static_ctx;
+
+int lttng_context_init(void);
+void lttng_context_exit(void);
+struct lttng_ctx_field *lttng_append_context(struct lttng_ctx **ctx);
+void lttng_context_update(struct lttng_ctx *ctx);
+int lttng_find_context(struct lttng_ctx *ctx, const char *name);
+int lttng_get_context_index(struct lttng_ctx *ctx, const char *name);
+void lttng_remove_context_field(struct lttng_ctx **ctx,
+                               struct lttng_ctx_field *field);
+void lttng_destroy_context(struct lttng_ctx *ctx);
+int lttng_add_pid_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_cpu_id_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_procname_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_prio_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_nice_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_vpid_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_tid_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_vtid_to_ctx(struct lttng_ctx **ctx);
+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
+
+int lttng_add_callstack_to_ctx(struct lttng_ctx **ctx, int type);
+
+#if defined(CONFIG_CGROUPS) && \
+       ((LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)) || \
+        LTTNG_UBUNTU_KERNEL_RANGE(4,4,0,0, 4,5,0,0))
+int lttng_add_cgroup_ns_to_ctx(struct lttng_ctx **ctx);
+#else
+static inline
+int lttng_add_cgroup_ns_to_ctx(struct lttng_ctx **ctx)
+{
+       return -ENOSYS;
+}
+#endif
+
+#if defined(CONFIG_IPC_NS) && \
+       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+int lttng_add_ipc_ns_to_ctx(struct lttng_ctx **ctx);
+#else
+static inline
+int lttng_add_ipc_ns_to_ctx(struct lttng_ctx **ctx)
+{
+       return -ENOSYS;
+}
+#endif
+
+#if !defined(LTTNG_MNT_NS_MISSING_HEADER) && \
+       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+int lttng_add_mnt_ns_to_ctx(struct lttng_ctx **ctx);
+#else
+static inline
+int lttng_add_mnt_ns_to_ctx(struct lttng_ctx **ctx)
+{
+       return -ENOSYS;
+}
+#endif
+
+#if defined(CONFIG_NET_NS) && \
+       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+int lttng_add_net_ns_to_ctx(struct lttng_ctx **ctx);
+#else
+static inline
+int lttng_add_net_ns_to_ctx(struct lttng_ctx **ctx)
+{
+       return -ENOSYS;
+}
+#endif
+
+#if defined(CONFIG_PID_NS) && \
+       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+int lttng_add_pid_ns_to_ctx(struct lttng_ctx **ctx);
+#else
+static inline
+int lttng_add_pid_ns_to_ctx(struct lttng_ctx **ctx)
+{
+       return -ENOSYS;
+}
+#endif
+
+#if defined(CONFIG_USER_NS) && \
+       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+int lttng_add_user_ns_to_ctx(struct lttng_ctx **ctx);
+#else
+static inline
+int lttng_add_user_ns_to_ctx(struct lttng_ctx **ctx)
+{
+       return -ENOSYS;
+}
+#endif
+
+#if defined(CONFIG_UTS_NS) && \
+       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+int lttng_add_uts_ns_to_ctx(struct lttng_ctx **ctx);
+#else
+static inline
+int lttng_add_uts_ns_to_ctx(struct lttng_ctx **ctx)
+{
+       return -ENOSYS;
+}
+#endif
+
+int lttng_add_uid_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_euid_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_suid_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_gid_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_egid_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_sgid_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_vuid_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_veuid_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_vsuid_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_vgid_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_vegid_to_ctx(struct lttng_ctx **ctx);
+int lttng_add_vsgid_to_ctx(struct lttng_ctx **ctx);
+
+#if defined(CONFIG_PERF_EVENTS)
+int lttng_add_perf_counter_to_ctx(uint32_t type,
+                                 uint64_t config,
+                                 const char *name,
+                                 struct lttng_ctx **ctx);
+int lttng_cpuhp_perf_counter_online(unsigned int cpu,
+               struct lttng_cpuhp_node *node);
+int lttng_cpuhp_perf_counter_dead(unsigned int cpu,
+               struct lttng_cpuhp_node *node);
+#else
+static inline
+int lttng_add_perf_counter_to_ctx(uint32_t type,
+                                 uint64_t config,
+                                 const char *name,
+                                 struct lttng_ctx **ctx)
+{
+       return -ENOSYS;
+}
+static inline
+int lttng_cpuhp_perf_counter_online(unsigned int cpu,
+               struct lttng_cpuhp_node *node)
+{
+       return 0;
+}
+static inline
+int lttng_cpuhp_perf_counter_dead(unsigned int cpu,
+               struct lttng_cpuhp_node *node)
+{
+       return 0;
+}
+#endif
+
+int lttng_logger_init(void);
+void lttng_logger_exit(void);
+
+extern int lttng_statedump_start(struct lttng_session *session);
+
+#ifdef CONFIG_KPROBES
+int lttng_kprobes_register(const char *name,
+               const char *symbol_name,
+               uint64_t offset,
+               uint64_t addr,
+               struct lttng_event *event);
+void lttng_kprobes_unregister(struct lttng_event *event);
+void lttng_kprobes_destroy_private(struct lttng_event *event);
+#else
+static inline
+int lttng_kprobes_register(const char *name,
+               const char *symbol_name,
+               uint64_t offset,
+               uint64_t addr,
+               struct lttng_event *event)
+{
+       return -ENOSYS;
+}
+
+static inline
+void lttng_kprobes_unregister(struct lttng_event *event)
+{
+}
+
+static inline
+void lttng_kprobes_destroy_private(struct lttng_event *event)
+{
+}
+#endif
+
+int lttng_event_add_callsite(struct lttng_event *event,
+       struct lttng_kernel_event_callsite *callsite);
+
+#ifdef CONFIG_UPROBES
+int lttng_uprobes_register(const char *name,
+       int fd, struct lttng_event *event);
+int lttng_uprobes_add_callsite(struct lttng_event *event,
+       struct lttng_kernel_event_callsite *callsite);
+void lttng_uprobes_unregister(struct lttng_event *event);
+void lttng_uprobes_destroy_private(struct lttng_event *event);
+#else
+static inline
+int lttng_uprobes_register(const char *name,
+       int fd, struct lttng_event *event)
+{
+       return -ENOSYS;
+}
+
+static inline
+int lttng_uprobes_add_callsite(struct lttng_event *event,
+       struct lttng_kernel_event_callsite *callsite)
+{
+       return -ENOSYS;
+}
+
+static inline
+void lttng_uprobes_unregister(struct lttng_event *event)
+{
+}
+
+static inline
+void lttng_uprobes_destroy_private(struct lttng_event *event)
+{
+}
+#endif
+
+#ifdef CONFIG_KRETPROBES
+int lttng_kretprobes_register(const char *name,
+               const char *symbol_name,
+               uint64_t offset,
+               uint64_t addr,
+               struct lttng_event *event_entry,
+               struct lttng_event *event_exit);
+void lttng_kretprobes_unregister(struct lttng_event *event);
+void lttng_kretprobes_destroy_private(struct lttng_event *event);
+int lttng_kretprobes_event_enable_state(struct lttng_event *event,
+       int enable);
+#else
+static inline
+int lttng_kretprobes_register(const char *name,
+               const char *symbol_name,
+               uint64_t offset,
+               uint64_t addr,
+               struct lttng_event *event_entry,
+               struct lttng_event *event_exit)
+{
+       return -ENOSYS;
+}
+
+static inline
+void lttng_kretprobes_unregister(struct lttng_event *event)
+{
+}
+
+static inline
+void lttng_kretprobes_destroy_private(struct lttng_event *event)
+{
+}
+
+static inline
+int lttng_kretprobes_event_enable_state(struct lttng_event *event,
+       int enable)
+{
+       return -ENOSYS;
+}
+#endif
+
+int lttng_calibrate(struct lttng_kernel_calibrate *calibrate);
+
+extern const struct file_operations lttng_tracepoint_list_fops;
+extern const struct file_operations lttng_syscall_list_fops;
+
+#define TRACEPOINT_HAS_DATA_ARG
+
+static inline bool lttng_is_bytewise_integer(const struct lttng_type *type)
+{
+       if (type->atype != atype_integer)
+               return false;
+       switch (type->u.integer.size) {
+       case 8:         /* Fall-through. */
+       case 16:        /* Fall-through. */
+       case 32:        /* Fall-through. */
+       case 64:
+               break;
+       default:
+               return false;
+       }
+       return true;
+}
+
+#endif /* _LTTNG_EVENTS_H */
diff --git a/include/lttng/filter-bytecode.h b/include/lttng/filter-bytecode.h
new file mode 100644 (file)
index 0000000..cc1a841
--- /dev/null
@@ -0,0 +1,225 @@
+/* SPDX-License-Identifier: MIT
+ *
+ * lttng/filter-bytecode.h
+ *
+ * LTTng filter bytecode
+ *
+ * Copyright 2012-2016 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ */
+
+#ifndef _FILTER_BYTECODE_H
+#define _FILTER_BYTECODE_H
+
+/*
+ * offsets are absolute from start of bytecode.
+ */
+
+struct field_ref {
+       /* Initially, symbol offset. After link, field offset. */
+       uint16_t offset;
+} __attribute__((packed));
+
+struct get_symbol {
+       /* Symbol offset. */
+       uint16_t offset;
+} __attribute__((packed));
+
+struct get_index_u16 {
+       uint16_t index;
+} __attribute__((packed));
+
+struct get_index_u64 {
+       uint64_t index;
+} __attribute__((packed));
+
+struct literal_numeric {
+       int64_t v;
+} __attribute__((packed));
+
+struct literal_double {
+       double v;
+} __attribute__((packed));
+
+struct literal_string {
+       char string[0];
+} __attribute__((packed));
+
+enum filter_op {
+       FILTER_OP_UNKNOWN                       = 0,
+
+       FILTER_OP_RETURN                        = 1,
+
+       /* binary */
+       FILTER_OP_MUL                           = 2,
+       FILTER_OP_DIV                           = 3,
+       FILTER_OP_MOD                           = 4,
+       FILTER_OP_PLUS                          = 5,
+       FILTER_OP_MINUS                         = 6,
+       FILTER_OP_BIT_RSHIFT                    = 7,
+       FILTER_OP_BIT_LSHIFT                    = 8,
+       FILTER_OP_BIT_AND                       = 9,
+       FILTER_OP_BIT_OR                        = 10,
+       FILTER_OP_BIT_XOR                       = 11,
+
+       /* binary comparators */
+       FILTER_OP_EQ                            = 12,
+       FILTER_OP_NE                            = 13,
+       FILTER_OP_GT                            = 14,
+       FILTER_OP_LT                            = 15,
+       FILTER_OP_GE                            = 16,
+       FILTER_OP_LE                            = 17,
+
+       /* string binary comparator: apply to  */
+       FILTER_OP_EQ_STRING                     = 18,
+       FILTER_OP_NE_STRING                     = 19,
+       FILTER_OP_GT_STRING                     = 20,
+       FILTER_OP_LT_STRING                     = 21,
+       FILTER_OP_GE_STRING                     = 22,
+       FILTER_OP_LE_STRING                     = 23,
+
+       /* s64 binary comparator */
+       FILTER_OP_EQ_S64                        = 24,
+       FILTER_OP_NE_S64                        = 25,
+       FILTER_OP_GT_S64                        = 26,
+       FILTER_OP_LT_S64                        = 27,
+       FILTER_OP_GE_S64                        = 28,
+       FILTER_OP_LE_S64                        = 29,
+
+       /* double binary comparator */
+       FILTER_OP_EQ_DOUBLE                     = 30,
+       FILTER_OP_NE_DOUBLE                     = 31,
+       FILTER_OP_GT_DOUBLE                     = 32,
+       FILTER_OP_LT_DOUBLE                     = 33,
+       FILTER_OP_GE_DOUBLE                     = 34,
+       FILTER_OP_LE_DOUBLE                     = 35,
+
+       /* Mixed S64-double binary comparators */
+       FILTER_OP_EQ_DOUBLE_S64                 = 36,
+       FILTER_OP_NE_DOUBLE_S64                 = 37,
+       FILTER_OP_GT_DOUBLE_S64                 = 38,
+       FILTER_OP_LT_DOUBLE_S64                 = 39,
+       FILTER_OP_GE_DOUBLE_S64                 = 40,
+       FILTER_OP_LE_DOUBLE_S64                 = 41,
+
+       FILTER_OP_EQ_S64_DOUBLE                 = 42,
+       FILTER_OP_NE_S64_DOUBLE                 = 43,
+       FILTER_OP_GT_S64_DOUBLE                 = 44,
+       FILTER_OP_LT_S64_DOUBLE                 = 45,
+       FILTER_OP_GE_S64_DOUBLE                 = 46,
+       FILTER_OP_LE_S64_DOUBLE                 = 47,
+
+       /* unary */
+       FILTER_OP_UNARY_PLUS                    = 48,
+       FILTER_OP_UNARY_MINUS                   = 49,
+       FILTER_OP_UNARY_NOT                     = 50,
+       FILTER_OP_UNARY_PLUS_S64                = 51,
+       FILTER_OP_UNARY_MINUS_S64               = 52,
+       FILTER_OP_UNARY_NOT_S64                 = 53,
+       FILTER_OP_UNARY_PLUS_DOUBLE             = 54,
+       FILTER_OP_UNARY_MINUS_DOUBLE            = 55,
+       FILTER_OP_UNARY_NOT_DOUBLE              = 56,
+
+       /* logical */
+       FILTER_OP_AND                           = 57,
+       FILTER_OP_OR                            = 58,
+
+       /* load field ref */
+       FILTER_OP_LOAD_FIELD_REF                = 59,
+       FILTER_OP_LOAD_FIELD_REF_STRING         = 60,
+       FILTER_OP_LOAD_FIELD_REF_SEQUENCE       = 61,
+       FILTER_OP_LOAD_FIELD_REF_S64            = 62,
+       FILTER_OP_LOAD_FIELD_REF_DOUBLE         = 63,
+
+       /* load immediate from operand */
+       FILTER_OP_LOAD_STRING                   = 64,
+       FILTER_OP_LOAD_S64                      = 65,
+       FILTER_OP_LOAD_DOUBLE                   = 66,
+
+       /* cast */
+       FILTER_OP_CAST_TO_S64                   = 67,
+       FILTER_OP_CAST_DOUBLE_TO_S64            = 68,
+       FILTER_OP_CAST_NOP                      = 69,
+
+       /* get context ref */
+       FILTER_OP_GET_CONTEXT_REF               = 70,
+       FILTER_OP_GET_CONTEXT_REF_STRING        = 71,
+       FILTER_OP_GET_CONTEXT_REF_S64           = 72,
+       FILTER_OP_GET_CONTEXT_REF_DOUBLE        = 73,
+
+       /* load userspace field ref */
+       FILTER_OP_LOAD_FIELD_REF_USER_STRING    = 74,
+       FILTER_OP_LOAD_FIELD_REF_USER_SEQUENCE  = 75,
+
+       /*
+        * load immediate star globbing pattern (literal string)
+        * from immediate
+        */
+       FILTER_OP_LOAD_STAR_GLOB_STRING         = 76,
+
+       /* globbing pattern binary operator: apply to */
+       FILTER_OP_EQ_STAR_GLOB_STRING           = 77,
+       FILTER_OP_NE_STAR_GLOB_STRING           = 78,
+
+       /*
+        * Instructions for recursive traversal through composed types.
+        */
+       FILTER_OP_GET_CONTEXT_ROOT              = 79,
+       FILTER_OP_GET_APP_CONTEXT_ROOT          = 80,
+       FILTER_OP_GET_PAYLOAD_ROOT              = 81,
+
+       FILTER_OP_GET_SYMBOL                    = 82,
+       FILTER_OP_GET_SYMBOL_FIELD              = 83,
+       FILTER_OP_GET_INDEX_U16                 = 84,
+       FILTER_OP_GET_INDEX_U64                 = 85,
+
+       FILTER_OP_LOAD_FIELD                    = 86,
+       FILTER_OP_LOAD_FIELD_S8                 = 87,
+       FILTER_OP_LOAD_FIELD_S16                = 88,
+       FILTER_OP_LOAD_FIELD_S32                = 89,
+       FILTER_OP_LOAD_FIELD_S64                = 90,
+       FILTER_OP_LOAD_FIELD_U8                 = 91,
+       FILTER_OP_LOAD_FIELD_U16                = 92,
+       FILTER_OP_LOAD_FIELD_U32                = 93,
+       FILTER_OP_LOAD_FIELD_U64                = 94,
+       FILTER_OP_LOAD_FIELD_STRING             = 95,
+       FILTER_OP_LOAD_FIELD_SEQUENCE           = 96,
+       FILTER_OP_LOAD_FIELD_DOUBLE             = 97,
+
+       FILTER_OP_UNARY_BIT_NOT                 = 98,
+
+       FILTER_OP_RETURN_S64                    = 99,
+
+       NR_FILTER_OPS,
+};
+
+typedef uint8_t filter_opcode_t;
+
+struct load_op {
+       filter_opcode_t op;
+       char data[0];
+       /* data to load. Size known by enum filter_opcode and null-term char. */
+} __attribute__((packed));
+
+struct binary_op {
+       filter_opcode_t op;
+} __attribute__((packed));
+
+struct unary_op {
+       filter_opcode_t op;
+} __attribute__((packed));
+
+/* skip_offset is absolute from start of bytecode */
+struct logical_op {
+       filter_opcode_t op;
+       uint16_t skip_offset;   /* bytecode insn, if skip second test */
+} __attribute__((packed));
+
+struct cast_op {
+       filter_opcode_t op;
+} __attribute__((packed));
+
+struct return_op {
+       filter_opcode_t op;
+} __attribute__((packed));
+
+#endif /* _FILTER_BYTECODE_H */
diff --git a/include/lttng/filter.h b/include/lttng/filter.h
new file mode 100644 (file)
index 0000000..eb70fe3
--- /dev/null
@@ -0,0 +1,248 @@
+/* SPDX-License-Identifier: MIT
+ *
+ * lttng/filter.h
+ *
+ * LTTng modules filter header.
+ *
+ * Copyright (C) 2010-2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ */
+
+#ifndef _LTTNG_FILTER_H
+#define _LTTNG_FILTER_H
+
+#include <linux/kernel.h>
+
+#include <lttng/events.h>
+#include <lttng/filter-bytecode.h>
+
+/* Filter stack length, in number of entries */
+#define FILTER_STACK_LEN       10      /* includes 2 dummy */
+#define FILTER_STACK_EMPTY     1
+
+#define FILTER_MAX_DATA_LEN    65536
+
+#ifdef DEBUG
+#define dbg_printk(fmt, args...)                               \
+       printk(KERN_DEBUG "[debug bytecode in %s:%s@%u] " fmt,          \
+               __FILE__, __func__, __LINE__, ## args)
+#else
+#define dbg_printk(fmt, args...)                               \
+do {                                                           \
+       /* do nothing but check printf format */                \
+       if (0)                                                  \
+               printk(KERN_DEBUG "[debug bytecode in %s:%s@%u] " fmt,  \
+                       __FILE__, __func__, __LINE__, ## args); \
+} while (0)
+#endif
+
+/* Linked bytecode. Child of struct lttng_bytecode_runtime. */
+struct bytecode_runtime {
+       struct lttng_bytecode_runtime p;
+       size_t data_len;
+       size_t data_alloc_len;
+       char *data;
+       uint16_t len;
+       char code[0];
+};
+
+enum entry_type {
+       REG_S64,
+       REG_DOUBLE,
+       REG_STRING,
+       REG_STAR_GLOB_STRING,
+       REG_TYPE_UNKNOWN,
+       REG_PTR,
+};
+
+enum load_type {
+       LOAD_ROOT_CONTEXT,
+       LOAD_ROOT_APP_CONTEXT,
+       LOAD_ROOT_PAYLOAD,
+       LOAD_OBJECT,
+};
+
+enum object_type {
+       OBJECT_TYPE_S8,
+       OBJECT_TYPE_S16,
+       OBJECT_TYPE_S32,
+       OBJECT_TYPE_S64,
+       OBJECT_TYPE_U8,
+       OBJECT_TYPE_U16,
+       OBJECT_TYPE_U32,
+       OBJECT_TYPE_U64,
+
+       OBJECT_TYPE_DOUBLE,
+       OBJECT_TYPE_STRING,
+       OBJECT_TYPE_STRING_SEQUENCE,
+
+       OBJECT_TYPE_SEQUENCE,
+       OBJECT_TYPE_ARRAY,
+       OBJECT_TYPE_STRUCT,
+       OBJECT_TYPE_VARIANT,
+
+       OBJECT_TYPE_DYNAMIC,
+};
+
+struct filter_get_index_data {
+       uint64_t offset;        /* in bytes */
+       size_t ctx_index;
+       size_t array_len;
+       struct {
+               size_t len;
+               enum object_type type;
+               bool rev_bo;    /* reverse byte order */
+       } elem;
+};
+
+/* Validation stack */
+struct vstack_load {
+       enum load_type type;
+       enum object_type object_type;
+       const struct lttng_event_field *field;
+       bool rev_bo;    /* reverse byte order */
+};
+
+struct vstack_entry {
+       enum entry_type type;
+       struct vstack_load load;
+};
+
+struct vstack {
+       int top;        /* top of stack */
+       struct vstack_entry e[FILTER_STACK_LEN];
+};
+
+static inline
+void vstack_init(struct vstack *stack)
+{
+       stack->top = -1;
+}
+
+static inline
+struct vstack_entry *vstack_ax(struct vstack *stack)
+{
+       if (unlikely(stack->top < 0))
+               return NULL;
+       return &stack->e[stack->top];
+}
+
+static inline
+struct vstack_entry *vstack_bx(struct vstack *stack)
+{
+       if (unlikely(stack->top < 1))
+               return NULL;
+       return &stack->e[stack->top - 1];
+}
+
+static inline
+int vstack_push(struct vstack *stack)
+{
+       if (stack->top >= FILTER_STACK_LEN - 1) {
+               printk(KERN_WARNING "Stack full\n");
+               return -EINVAL;
+       }
+       ++stack->top;
+       return 0;
+}
+
+static inline
+int vstack_pop(struct vstack *stack)
+{
+       if (unlikely(stack->top < 0)) {
+               printk(KERN_WARNING "Stack empty\n");
+               return -EINVAL;
+       }
+       stack->top--;
+       return 0;
+}
+
+/* Execution stack */
+enum estack_string_literal_type {
+       ESTACK_STRING_LITERAL_TYPE_NONE,
+       ESTACK_STRING_LITERAL_TYPE_PLAIN,
+       ESTACK_STRING_LITERAL_TYPE_STAR_GLOB,
+};
+
+struct load_ptr {
+       enum load_type type;
+       enum object_type object_type;
+       const void *ptr;
+       bool rev_bo;
+       /* Temporary place-holders for contexts. */
+       union {
+               int64_t s64;
+               uint64_t u64;
+               double d;
+       } u;
+       /*
+        * "field" is only needed when nested under a variant, in which
+        * case we cannot specialize the nested operations.
+        */
+       const struct lttng_event_field *field;
+};
+
+struct estack_entry {
+       union {
+               int64_t v;
+
+               struct {
+                       const char *str;
+                       const char __user *user_str;
+                       size_t seq_len;
+                       enum estack_string_literal_type literal_type;
+                       int user;               /* is string from userspace ? */
+               } s;
+               struct load_ptr ptr;
+       } u;
+};
+
+struct estack {
+       int top;        /* top of stack */
+       struct estack_entry e[FILTER_STACK_LEN];
+};
+
+#define estack_ax_v    ax
+#define estack_bx_v    bx
+
+#define estack_ax(stack, top)                                  \
+       ({                                                      \
+               BUG_ON((top) <= FILTER_STACK_EMPTY);            \
+               &(stack)->e[top];                               \
+       })
+
+#define estack_bx(stack, top)                                  \
+       ({                                                      \
+               BUG_ON((top) <= FILTER_STACK_EMPTY + 1);        \
+               &(stack)->e[(top) - 1];                         \
+       })
+
+#define estack_push(stack, top, ax, bx)                                \
+       do {                                                    \
+               BUG_ON((top) >= FILTER_STACK_LEN - 1);          \
+               (stack)->e[(top) - 1].u.v = (bx);               \
+               (bx) = (ax);                                    \
+               ++(top);                                        \
+       } while (0)
+
+#define estack_pop(stack, top, ax, bx)                         \
+       do {                                                    \
+               BUG_ON((top) <= FILTER_STACK_EMPTY);            \
+               (ax) = (bx);                                    \
+               (bx) = (stack)->e[(top) - 2].u.v;               \
+               (top)--;                                        \
+       } while (0)
+
+const char *lttng_filter_print_op(enum filter_op op);
+
+int lttng_filter_validate_bytecode(struct bytecode_runtime *bytecode);
+int lttng_filter_specialize_bytecode(struct lttng_event *event,
+               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 --git a/include/lttng/kernel-version.h b/include/lttng/kernel-version.h
new file mode 100644 (file)
index 0000000..a97cc02
--- /dev/null
@@ -0,0 +1,138 @@
+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
+ *
+ * lttng/kernel-version.h
+ *
+ * Contains helpers to check more complex kernel version conditions.
+ *
+ * Copyright (C) 2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ */
+
+#ifndef _LTTNG_KERNEL_VERSION_H
+#define _LTTNG_KERNEL_VERSION_H
+
+#include <linux/version.h>
+#include <generated/utsrelease.h>
+
+/*
+ * This macro checks if the kernel version is between the two specified
+ * versions (lower limit inclusive, upper limit exclusive).
+ */
+#define LTTNG_KERNEL_RANGE(a_low, b_low, c_low, a_high, b_high, c_high) \
+       (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))
+
+#ifdef UTS_UBUNTU_RELEASE_ABI
+#define LTTNG_UBUNTU_VERSION_CODE \
+       ((LINUX_VERSION_CODE << 8) + UTS_UBUNTU_RELEASE_ABI)
+#else
+#define LTTNG_UBUNTU_VERSION_CODE      0
+#endif
+
+#define LTTNG_UBUNTU_KERNEL_RANGE(a_low, b_low, c_low, d_low, \
+               a_high, b_high, c_high, d_high) \
+       (LTTNG_UBUNTU_VERSION_CODE >= \
+               LTTNG_UBUNTU_KERNEL_VERSION(a_low, b_low, c_low, d_low) && \
+               LTTNG_UBUNTU_VERSION_CODE < \
+               LTTNG_UBUNTU_KERNEL_VERSION(a_high, b_high, c_high, d_high))
+
+/* Debian */
+
+#define LTTNG_DEBIAN_KERNEL_VERSION(a, b, c, d, e, f) \
+       (((((a) << 16) + ((b) << 8) + (c)) * 1000000ULL) + ((d) * 10000) + ((e) * 100) + (f))
+
+#ifdef DEBIAN_API_VERSION
+#define LTTNG_DEBIAN_VERSION_CODE \
+       ((LINUX_VERSION_CODE * 1000000ULL) + DEBIAN_API_VERSION)
+#else
+#define LTTNG_DEBIAN_VERSION_CODE      0
+#endif
+
+#define LTTNG_DEBIAN_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_DEBIAN_VERSION_CODE >= \
+               LTTNG_DEBIAN_KERNEL_VERSION(a_low, b_low, c_low, d_low, e_low, f_low) && \
+               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, f) \
+       (((((a) << 16) + ((b) << 8) + (c)) * 10000000ULL) + ((d) * 10000) + ((e) * 100) + (f))
+
+/* RHEL */
+
+#ifdef RHEL_API_VERSION
+#define LTTNG_RHEL_VERSION_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, 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, f_low) && \
+               LTTNG_RHEL_VERSION_CODE < \
+               LTTNG_RHEL_KERNEL_VERSION(a_high, b_high, c_high, d_high, e_high, f_high))
+
+/* SUSE Linux enterprise */
+
+#define LTTNG_SLE_KERNEL_VERSION(a, b, c, d, e, f) \
+       (((((a) << 16) + ((b) << 8) + (c)) * 10000000ULL) + ((d) * 10000) + ((e) * 100) + (f))
+
+#ifdef SLE_API_VERSION
+#define LTTNG_SLE_VERSION_CODE \
+       ((LINUX_VERSION_CODE * 10000000ULL) + SLE_API_VERSION)
+#else
+#define LTTNG_SLE_VERSION_CODE         0
+#endif
+
+#define LTTNG_SLE_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_SLE_VERSION_CODE >= \
+               LTTNG_SLE_KERNEL_VERSION(a_low, b_low, c_low, d_low, e_low, f_low) && \
+               LTTNG_SLE_VERSION_CODE < \
+               LTTNG_SLE_KERNEL_VERSION(a_high, b_high, c_high, d_high, e_high, f_high))
+
+/* Fedora */
+
+#define LTTNG_FEDORA_KERNEL_VERSION(a, b, c, d) \
+        (((((a) << 16) + ((b) << 8) + (c)) * 10000ULL) + (d))
+
+#ifdef FEDORA_REVISION_VERSION
+#define LTTNG_FEDORA_VERSION_CODE \
+        ((LINUX_VERSION_CODE * 10000ULL) + FEDORA_REVISION_VERSION)
+#else
+#define LTTNG_FEDORA_VERSION_CODE         0
+#endif
+
+#define LTTNG_FEDORA_KERNEL_RANGE(a_low, b_low, c_low, d_low, \
+                a_high, b_high, c_high, d_high) \
+        (LTTNG_FEDORA_VERSION_CODE >= \
+                LTTNG_FEDORA_KERNEL_VERSION(a_low, b_low, c_low, d_low) && \
+                LTTNG_FEDORA_VERSION_CODE < \
+                LTTNG_FEDORA_KERNEL_VERSION(a_high, b_high, c_high, d_high))
+
+/* RT patch */
+
+#define LTTNG_RT_KERNEL_VERSION(a, b, c, d) \
+       (((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 --git a/include/lttng/string-utils.h b/include/lttng/string-utils.h
new file mode 100644 (file)
index 0000000..3e7267e
--- /dev/null
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) */
+#ifndef _LTTNG_STRING_UTILS_H
+#define _LTTNG_STRING_UTILS_H
+
+/*
+ * Copyright (C) 2017 Philippe Proulx <pproulx@efficios.com>
+ */
+
+#include <stdbool.h>
+
+typedef char (*strutils_get_char_at_cb)(size_t, void *);
+
+bool strutils_is_star_glob_pattern(const char *pattern);
+bool strutils_is_star_at_the_end_only_glob_pattern(const char *pattern);
+bool strutils_star_glob_match(const char *pattern, size_t pattern_len,
+               const char *candidate, size_t candidate_len);
+bool strutils_star_glob_match_char_cb(
+               strutils_get_char_at_cb pattern_get_char_at_cb,
+               void *pattern_get_char_at_cb_data,
+               strutils_get_char_at_cb candidate_get_char_at_cb,
+               void *candidate_get_char_at_cb_data);
+
+#endif /* _LTTNG_STRING_UTILS_H */
diff --git a/include/lttng/tp-mempool.h b/include/lttng/tp-mempool.h
new file mode 100644 (file)
index 0000000..587e9bd
--- /dev/null
@@ -0,0 +1,50 @@
+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
+ *
+ * lttng/tp-mempool.h
+ *
+ * Copyright (C) 2018 Julien Desfossez <jdesfossez@efficios.com>
+ */
+
+#ifndef LTTNG_TP_MEMPOOL_H
+#define LTTNG_TP_MEMPOOL_H
+
+#include <linux/percpu.h>
+
+#define LTTNG_TP_MEMPOOL_NR_BUF_PER_CPU 4
+#define LTTNG_TP_MEMPOOL_BUF_SIZE 4096
+
+/*
+ * Initialize the pool, only performed once. The pool is a set of
+ * LTTNG_TP_MEMPOOL_NR_BUF_PER_CPU buffers of size LTTNG_TP_MEMPOOL_BUF_SIZE
+ * per-cpu.
+ *
+ * Returns 0 on success, a negative value on error.
+ */
+int lttng_tp_mempool_init(void);
+
+/*
+ * Destroy the pool and free all the memory allocated.
+ */
+void lttng_tp_mempool_destroy(void);
+
+/*
+ * Ask for a buffer on the current cpu.
+ *
+ * The pool is per-cpu, but there is no exclusive access guarantee on the
+ * per-cpu free-list, the caller needs to ensure it cannot get preempted or
+ * interrupted while performing the allocation.
+ *
+ * The maximum size that can be allocated is LTTNG_TP_MEMPOOL_BUF_SIZE, and the
+ * maximum number of buffers allocated simultaneously on the same CPU is
+ * LTTNG_TP_MEMPOOL_NR_BUF_PER_CPU.
+ *
+ * Return a pointer to a buffer on success, NULL on error.
+ */
+void *lttng_tp_mempool_alloc(size_t size);
+
+/*
+ * Release the memory reserved. Same concurrency limitations as the allocation.
+ */
+void lttng_tp_mempool_free(void *ptr);
+
+#endif /* LTTNG_TP_MEMPOOL_H */
index 25077772d77419b47346b9c4ad0f43df04f83ca5..b5094619176e6764ae1ff01afda5ce726a4afe97 100644 (file)
 #include <asm/byteorder.h>
 #include <linux/swab.h>
 
-#include <lttng/types.h>
-#include <lttng/probe-user.h>
 #include <wrapper/vmalloc.h>   /* for wrapper_vmalloc_sync_mappings() */
 #include <ringbuffer/frontend_types.h>
 #include <ringbuffer/backend.h>
 #include <wrapper/rcu.h>
 #include <wrapper/user_namespace.h>
-#include <lttng-events.h>
-#include <lttng-tracer-core.h>
-#include <lttng-tp-mempool.h>
+#include <lttng/types.h>
+#include <lttng/probe-user.h>
+#include <lttng/events.h>
+#include <lttng/tracer-core.h>
+#include <lttng/tp-mempool.h>
 
 #define __LTTNG_NULL_STRING    "(null)"
 
diff --git a/include/lttng/tracepoint.h b/include/lttng/tracepoint.h
new file mode 100644 (file)
index 0000000..a2316b6
--- /dev/null
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
+ *
+ * lttng/tracepoint.h
+ *
+ * LTTng adaptation layer for Linux kernel 3.15+ tracepoints.
+ *
+ * Copyright (C) 2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ */
+
+#ifndef _LTTNG_TRACEPOINT_H
+#define _LTTNG_TRACEPOINT_H
+
+int lttng_tracepoint_probe_register(const char *name, void *probe, void *data);
+int lttng_tracepoint_probe_unregister(const char *name, void *probe, void *data);
+int lttng_tracepoint_init(void);
+void lttng_tracepoint_exit(void);
+
+#endif /* _LTTNG_TRACEPOINT_H */
diff --git a/include/lttng/tracer-core.h b/include/lttng/tracer-core.h
new file mode 100644 (file)
index 0000000..d8049aa
--- /dev/null
@@ -0,0 +1,28 @@
+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
+ *
+ * lttng/tracer-core.h
+ *
+ * This contains the core definitions for the Linux Trace Toolkit Next
+ * Generation tracer.
+ *
+ * Copyright (C) 2005-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ */
+
+#ifndef LTTNG_TRACER_CORE_H
+#define LTTNG_TRACER_CORE_H
+
+#include <linux/list.h>
+#include <linux/percpu.h>
+
+#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
+/* Align data on its natural alignment */
+#define RING_BUFFER_ALIGN
+#endif
+
+#include <ringbuffer/config.h>
+
+struct lttng_session;
+struct lttng_channel;
+struct lttng_event;
+
+#endif /* LTTNG_TRACER_CORE_H */
diff --git a/include/lttng/tracer.h b/include/lttng/tracer.h
new file mode 100644 (file)
index 0000000..671a39c
--- /dev/null
@@ -0,0 +1,69 @@
+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) */
+#ifndef _LTTNG_TRACER_H
+#define _LTTNG_TRACER_H
+
+/*
+ * lttng/tracer.h
+ *
+ * This contains the definitions for the Linux Trace Toolkit Next
+ * Generation tracer.
+ *
+ * Copyright (C) 2005-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ */
+
+#include <stdarg.h>
+#include <linux/types.h>
+#include <linux/limits.h>
+#include <linux/list.h>
+#include <linux/cache.h>
+#include <linux/timex.h>
+#include <linux/wait.h>
+#include <asm/atomic.h>
+#include <asm/local.h>
+
+#include <wrapper/trace-clock.h>
+#include <wrapper/compiler.h>
+#include <wrapper/vmalloc.h>
+#include <lttng/tracer-core.h>
+#include <lttng/events.h>
+
+#define LTTNG_MODULES_MAJOR_VERSION 2
+#define LTTNG_MODULES_MINOR_VERSION 12
+#define LTTNG_MODULES_PATCHLEVEL_VERSION 0
+#define LTTNG_MODULES_EXTRAVERSION "-rc1"
+
+#define LTTNG_VERSION_NAME             "(Ta) Meilleure"
+#define LTTNG_VERSION_DESCRIPTION      "Ta Meilleure is a Northeast IPA beer brewed by Lagabière. Translating to \"Your best one\", this beer gives out strong aromas of passion fruit, lemon, and peaches. Tastewise, expect a lot of fruit, a creamy texture, and a smooth lingering hop bitterness."
+
+#ifndef CHAR_BIT
+#define CHAR_BIT 8
+#endif
+
+/* Number of bytes to log with a read/write event */
+#define LTTNG_LOG_RW_SIZE              32L
+#define LTTNG_MAX_SMALL_SIZE           0xFFFFU
+
+#ifdef RING_BUFFER_ALIGN
+#define lttng_alignof(type)    __alignof__(type)
+#else
+#define lttng_alignof(type)    1
+#endif
+
+/* Tracer properties */
+#define CTF_MAGIC_NUMBER               0xC1FC1FC1
+#define TSDL_MAGIC_NUMBER              0x75D11D57
+
+/* CTF specification version followed */
+#define CTF_SPEC_MAJOR                 1
+#define CTF_SPEC_MINOR                 8
+
+/*
+ * Number of milliseconds to retry before failing metadata writes on buffer full
+ * condition. (10 seconds)
+ */
+#define LTTNG_METADATA_TIMEOUT_MSEC    10000
+
+#define LTTNG_RFLAG_EXTENDED           RING_BUFFER_RFLAG_END
+#define LTTNG_RFLAG_END                        (LTTNG_RFLAG_EXTENDED << 1)
+
+#endif /* _LTTNG_TRACER_H */
index fa09dce3ca5e4f4dc99fc70c25d2cab2c43ca8c4..e5e25e0eecefa0ee7a3b4ee4504de293b46fb090 100644 (file)
@@ -15,9 +15,9 @@
 #define _LTTNG_PROBES_LTTNG_TYPES_H
 
 #include <linux/seq_file.h>
-#include <lttng-events.h>
-#include <lttng-tracer.h>
-#include <lttng-endian.h>
+#include <lttng/events.h>
+#include <lttng/tracer.h>
+#include <lttng/endian.h>
 
 #endif /* _LTTNG_PROBES_LTTNG_TYPES_H */
 
index cfeecf4fe8e5344cdd665e5de30960f41391841c..37a3bb8c2a363ccb25859409598da73e7705fe35 100644 (file)
@@ -12,8 +12,8 @@
 
 #include <linux/cpumask.h>
 #include <linux/types.h>
-#include <lttng-kernel-version.h>
-#include <lttng-cpuhotplug.h>
+#include <lttng/kernel-version.h>
+#include <lttng/cpuhotplug.h>
 
 struct lib_ring_buffer_backend_page {
        void *virt;                     /* page virtual address (cached) */
index 1549c1089e09a9d9ba399fe42195ad027c15a612..a17d22024ddc13f0374e6bb7c18ba6ba0b2eaa27 100644 (file)
@@ -14,7 +14,7 @@
 #include <linux/types.h>
 #include <linux/percpu.h>
 #include <lttng/align.h>
-#include <lttng-tracer-core.h>
+#include <lttng/tracer-core.h>
 
 struct lib_ring_buffer;
 struct channel;
@@ -234,7 +234,7 @@ void lib_ring_buffer_ctx_init(struct lib_ring_buffer_ctx *ctx,
 #define RING_BUFFER_RFLAG_END                  (1U << 1)
 
 #ifndef LTTNG_TRACER_CORE_H
-#error "lttng-tracer-core.h is needed for RING_BUFFER_ALIGN define"
+#error "lttng/tracer-core.h is needed for RING_BUFFER_ALIGN define"
 #endif
 
 /*
index d5c4916b79b5113f7fdfb6c48733f8d16a040061..07be81aacf95c98de11c3763f1bc9e7e4bcdd1bd 100644 (file)
@@ -16,7 +16,7 @@
 #include <ringbuffer/config.h>
 #include <ringbuffer/backend_types.h>
 #include <lttng/prio_heap.h>   /* For per-CPU read-side iterator */
-#include <lttng-cpuhotplug.h>
+#include <lttng/cpuhotplug.h>
 
 /*
  * A switch is done during tracing or as a final flush after tracing (so it
index e42fb2ec18b53eb0b38e721e556361b9bacd63f0..c2d8c67be0cd2779259af44df300dfc85b3e0bfe 100644 (file)
@@ -14,7 +14,7 @@
 #include <linux/udp.h>
 #include <linux/icmp.h>
 #include <linux/version.h>
-#include <lttng-endian.h>
+#include <lttng/endian.h>
 #include <net/sock.h>
 
 #ifndef ONCE_LTTNG_NET_H
index 2be550c41ddaa8a662bc6c0ac32f5aa35bd37e20..e5d6a70177467d55555bd125a5a748a78ab7c9de 100644 (file)
@@ -15,7 +15,7 @@
 #include <ringbuffer/frontend.h>
 #include <ringbuffer/vfs.h>
 #include <wrapper/poll.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 static int put_ulong(unsigned long val, unsigned long arg)
 {
diff --git a/lttng-abi-old.h b/lttng-abi-old.h
deleted file mode 100644 (file)
index 0b1c7b1..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
- *
- * lttng-abi-old.h
- *
- * LTTng old ABI header (without support for compat 32/64 bits)
- *
- * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- */
-
-#ifndef _LTTNG_ABI_OLD_H
-#define _LTTNG_ABI_OLD_H
-
-#include <linux/fs.h>
-#include <lttng-abi.h>
-
-/*
- * LTTng DebugFS ABI structures.
- */
-#define LTTNG_KERNEL_OLD_CHANNEL_PADDING       LTTNG_KERNEL_SYM_NAME_LEN + 32
-struct lttng_kernel_old_channel {
-       int overwrite;                          /* 1: overwrite, 0: discard */
-       uint64_t subbuf_size;                   /* in bytes */
-       uint64_t num_subbuf;
-       unsigned int switch_timer_interval;     /* usecs */
-       unsigned int read_timer_interval;       /* usecs */
-       enum lttng_kernel_output output;        /* splice, mmap */
-       char padding[LTTNG_KERNEL_OLD_CHANNEL_PADDING];
-};
-
-struct lttng_kernel_old_kretprobe {
-       uint64_t addr;
-
-       uint64_t offset;
-       char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
-};
-
-/*
- * Either addr is used, or symbol_name and offset.
- */
-struct lttng_kernel_old_kprobe {
-       uint64_t addr;
-
-       uint64_t offset;
-       char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
-};
-
-struct lttng_kernel_old_function_tracer {
-       char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
-};
-
-/*
- * For syscall tracing, name = '\0' means "enable all".
- */
-#define LTTNG_KERNEL_OLD_EVENT_PADDING1        16
-#define LTTNG_KERNEL_OLD_EVENT_PADDING2        LTTNG_KERNEL_SYM_NAME_LEN + 32
-struct lttng_kernel_old_event {
-       char name[LTTNG_KERNEL_SYM_NAME_LEN];   /* event name */
-       enum lttng_kernel_instrumentation instrumentation;
-       char padding[LTTNG_KERNEL_OLD_EVENT_PADDING1];
-
-       /* Per instrumentation type configuration */
-       union {
-               struct lttng_kernel_old_kretprobe kretprobe;
-               struct lttng_kernel_old_kprobe kprobe;
-               struct lttng_kernel_old_function_tracer ftrace;
-               char padding[LTTNG_KERNEL_OLD_EVENT_PADDING2];
-       } u;
-};
-
-struct lttng_kernel_old_tracer_version {
-       uint32_t major;
-       uint32_t minor;
-       uint32_t patchlevel;
-};
-
-struct lttng_kernel_old_calibrate {
-       enum lttng_kernel_calibrate_type type;  /* type (input) */
-};
-
-struct lttng_kernel_old_perf_counter_ctx {
-       uint32_t type;
-       uint64_t config;
-       char name[LTTNG_KERNEL_SYM_NAME_LEN];
-};
-
-#define LTTNG_KERNEL_OLD_CONTEXT_PADDING1      16
-#define LTTNG_KERNEL_OLD_CONTEXT_PADDING2      LTTNG_KERNEL_SYM_NAME_LEN + 32
-struct lttng_kernel_old_context {
-       enum lttng_kernel_context_type ctx;
-       char padding[LTTNG_KERNEL_OLD_CONTEXT_PADDING1];
-
-       union {
-               struct lttng_kernel_old_perf_counter_ctx perf_counter;
-               char padding[LTTNG_KERNEL_OLD_CONTEXT_PADDING2];
-       } u;
-};
-
-/* LTTng file descriptor ioctl */
-#define LTTNG_KERNEL_OLD_SESSION               _IO(0xF6, 0x40)
-#define LTTNG_KERNEL_OLD_TRACER_VERSION                \
-       _IOR(0xF6, 0x41, struct lttng_kernel_old_tracer_version)
-#define LTTNG_KERNEL_OLD_TRACEPOINT_LIST       _IO(0xF6, 0x42)
-#define LTTNG_KERNEL_OLD_WAIT_QUIESCENT                _IO(0xF6, 0x43)
-#define LTTNG_KERNEL_OLD_CALIBRATE             \
-       _IOWR(0xF6, 0x44, struct lttng_kernel_old_calibrate)
-
-/* Session FD ioctl */
-#define LTTNG_KERNEL_OLD_METADATA              \
-       _IOW(0xF6, 0x50, struct lttng_kernel_old_channel)
-#define LTTNG_KERNEL_OLD_CHANNEL               \
-       _IOW(0xF6, 0x51, struct lttng_kernel_old_channel)
-#define LTTNG_KERNEL_OLD_SESSION_START         _IO(0xF6, 0x52)
-#define LTTNG_KERNEL_OLD_SESSION_STOP          _IO(0xF6, 0x53)
-
-/* Channel FD ioctl */
-#define LTTNG_KERNEL_OLD_STREAM                        _IO(0xF6, 0x60)
-#define LTTNG_KERNEL_OLD_EVENT                 \
-       _IOW(0xF6, 0x61, struct lttng_kernel_old_event)
-
-/* Event and Channel FD ioctl */
-#define LTTNG_KERNEL_OLD_CONTEXT               \
-       _IOW(0xF6, 0x70, struct lttng_kernel_old_context)
-
-/* Event, Channel and Session ioctl */
-#define LTTNG_KERNEL_OLD_ENABLE                        _IO(0xF6, 0x80)
-#define LTTNG_KERNEL_OLD_DISABLE               _IO(0xF6, 0x81)
-
-#endif /* _LTTNG_ABI_OLD_H */
index 1b5239e51164112932c87bbc47637db9d54d23d3..01eb4d55addea3ea41b5def0ed79ca9efd91fcf1 100644 (file)
 #include <wrapper/poll.h>
 #include <wrapper/file.h>
 #include <wrapper/kref.h>
-#include <lttng-string-utils.h>
-#include <lttng-abi.h>
-#include <lttng-abi-old.h>
-#include <lttng-events.h>
-#include <lttng-tracer.h>
-#include <lttng-tp-mempool.h>
+#include <lttng/string-utils.h>
+#include <lttng/abi.h>
+#include <lttng/abi-old.h>
+#include <lttng/events.h>
+#include <lttng/tracer.h>
+#include <lttng/tp-mempool.h>
 #include <ringbuffer/frontend_types.h>
 
 /*
diff --git a/lttng-abi.h b/lttng-abi.h
deleted file mode 100644 (file)
index a26c7ee..0000000
+++ /dev/null
@@ -1,354 +0,0 @@
-/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
- *
- * lttng-abi.h
- *
- * LTTng ABI header
- *
- * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- */
-
-#ifndef _LTTNG_ABI_H
-#define _LTTNG_ABI_H
-
-#include <linux/fs.h>
-
-/*
- * Major/minor version of ABI exposed to lttng tools. Major number
- * should be increased when an incompatible ABI change is done.
- */
-#define LTTNG_MODULES_ABI_MAJOR_VERSION                2
-#define LTTNG_MODULES_ABI_MINOR_VERSION                5
-
-#define LTTNG_KERNEL_SYM_NAME_LEN      256
-#define LTTNG_KERNEL_SESSION_NAME_LEN  256
-#define LTTNG_KERNEL_SESSION_CREATION_TIME_ISO8601_LEN 26
-
-enum lttng_kernel_instrumentation {
-       LTTNG_KERNEL_TRACEPOINT = 0,
-       LTTNG_KERNEL_KPROBE     = 1,
-       LTTNG_KERNEL_FUNCTION   = 2,
-       LTTNG_KERNEL_KRETPROBE  = 3,
-       LTTNG_KERNEL_NOOP       = 4,    /* not hooked */
-       LTTNG_KERNEL_SYSCALL    = 5,
-       LTTNG_KERNEL_UPROBE     = 6,
-};
-
-/*
- * LTTng consumer mode
- */
-enum lttng_kernel_output {
-       LTTNG_KERNEL_SPLICE     = 0,
-       LTTNG_KERNEL_MMAP       = 1,
-};
-
-/*
- * LTTng DebugFS ABI structures.
- */
-#define LTTNG_KERNEL_CHANNEL_PADDING   LTTNG_KERNEL_SYM_NAME_LEN + 32
-struct lttng_kernel_channel {
-       uint64_t subbuf_size;                   /* in bytes */
-       uint64_t num_subbuf;
-       unsigned int switch_timer_interval;     /* usecs */
-       unsigned int read_timer_interval;       /* usecs */
-       enum lttng_kernel_output output;        /* splice, mmap */
-       int overwrite;                          /* 1: overwrite, 0: discard */
-       char padding[LTTNG_KERNEL_CHANNEL_PADDING];
-} __attribute__((packed));
-
-struct lttng_kernel_kretprobe {
-       uint64_t addr;
-
-       uint64_t offset;
-       char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
-} __attribute__((packed));
-
-/*
- * Either addr is used, or symbol_name and offset.
- */
-struct lttng_kernel_kprobe {
-       uint64_t addr;
-
-       uint64_t offset;
-       char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
-} __attribute__((packed));
-
-struct lttng_kernel_function_tracer {
-       char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
-} __attribute__((packed));
-
-struct lttng_kernel_uprobe {
-       int fd;
-} __attribute__((packed));
-
-struct lttng_kernel_event_callsite_uprobe {
-       uint64_t offset;
-} __attribute__((packed));
-
-struct lttng_kernel_event_callsite {
-       union {
-               struct lttng_kernel_event_callsite_uprobe uprobe;
-       } u;
-} __attribute__((packed));
-
-/*
- * For syscall tracing, name = "*" means "enable all".
- */
-#define LTTNG_KERNEL_EVENT_PADDING1    16
-#define LTTNG_KERNEL_EVENT_PADDING2    LTTNG_KERNEL_SYM_NAME_LEN + 32
-struct lttng_kernel_event {
-       char name[LTTNG_KERNEL_SYM_NAME_LEN];   /* event name */
-       enum lttng_kernel_instrumentation instrumentation;
-       char padding[LTTNG_KERNEL_EVENT_PADDING1];
-
-       /* Per instrumentation type configuration */
-       union {
-               struct lttng_kernel_kretprobe kretprobe;
-               struct lttng_kernel_kprobe kprobe;
-               struct lttng_kernel_function_tracer ftrace;
-               struct lttng_kernel_uprobe uprobe;
-               char padding[LTTNG_KERNEL_EVENT_PADDING2];
-       } u;
-} __attribute__((packed));
-
-struct lttng_kernel_tracer_version {
-       uint32_t major;
-       uint32_t minor;
-       uint32_t patchlevel;
-} __attribute__((packed));
-
-struct lttng_kernel_tracer_abi_version {
-       uint32_t major;
-       uint32_t minor;
-} __attribute__((packed));
-
-struct lttng_kernel_session_name {
-       char name[LTTNG_KERNEL_SESSION_NAME_LEN];
-} __attribute__((packed));
-
-struct lttng_kernel_session_creation_time {
-       char iso8601[LTTNG_KERNEL_SESSION_CREATION_TIME_ISO8601_LEN];
-} __attribute__((packed));
-
-enum lttng_kernel_calibrate_type {
-       LTTNG_KERNEL_CALIBRATE_KRETPROBE,
-};
-
-struct lttng_kernel_calibrate {
-       enum lttng_kernel_calibrate_type type;  /* type (input) */
-} __attribute__((packed));
-
-struct lttng_kernel_syscall_mask {
-       uint32_t len;   /* in bits */
-       char mask[];
-} __attribute__((packed));
-
-enum lttng_kernel_context_type {
-       LTTNG_KERNEL_CONTEXT_PID                = 0,
-       LTTNG_KERNEL_CONTEXT_PERF_COUNTER       = 1,
-       LTTNG_KERNEL_CONTEXT_PROCNAME           = 2,
-       LTTNG_KERNEL_CONTEXT_PRIO               = 3,
-       LTTNG_KERNEL_CONTEXT_NICE               = 4,
-       LTTNG_KERNEL_CONTEXT_VPID               = 5,
-       LTTNG_KERNEL_CONTEXT_TID                = 6,
-       LTTNG_KERNEL_CONTEXT_VTID               = 7,
-       LTTNG_KERNEL_CONTEXT_PPID               = 8,
-       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,
-       LTTNG_KERNEL_CONTEXT_CALLSTACK_KERNEL   = 16,
-       LTTNG_KERNEL_CONTEXT_CALLSTACK_USER     = 17,
-       LTTNG_KERNEL_CONTEXT_CGROUP_NS          = 18,
-       LTTNG_KERNEL_CONTEXT_IPC_NS             = 19,
-       LTTNG_KERNEL_CONTEXT_MNT_NS             = 20,
-       LTTNG_KERNEL_CONTEXT_NET_NS             = 21,
-       LTTNG_KERNEL_CONTEXT_PID_NS             = 22,
-       LTTNG_KERNEL_CONTEXT_USER_NS            = 23,
-       LTTNG_KERNEL_CONTEXT_UTS_NS             = 24,
-       LTTNG_KERNEL_CONTEXT_UID                = 25,
-       LTTNG_KERNEL_CONTEXT_EUID               = 26,
-       LTTNG_KERNEL_CONTEXT_SUID               = 27,
-       LTTNG_KERNEL_CONTEXT_GID                = 28,
-       LTTNG_KERNEL_CONTEXT_EGID               = 29,
-       LTTNG_KERNEL_CONTEXT_SGID               = 30,
-       LTTNG_KERNEL_CONTEXT_VUID               = 31,
-       LTTNG_KERNEL_CONTEXT_VEUID              = 32,
-       LTTNG_KERNEL_CONTEXT_VSUID              = 33,
-       LTTNG_KERNEL_CONTEXT_VGID               = 34,
-       LTTNG_KERNEL_CONTEXT_VEGID              = 35,
-       LTTNG_KERNEL_CONTEXT_VSGID              = 36,
-};
-
-struct lttng_kernel_perf_counter_ctx {
-       uint32_t type;
-       uint64_t config;
-       char name[LTTNG_KERNEL_SYM_NAME_LEN];
-} __attribute__((packed));
-
-#define LTTNG_KERNEL_CONTEXT_PADDING1  16
-#define LTTNG_KERNEL_CONTEXT_PADDING2  LTTNG_KERNEL_SYM_NAME_LEN + 32
-struct lttng_kernel_context {
-       enum lttng_kernel_context_type ctx;
-       char padding[LTTNG_KERNEL_CONTEXT_PADDING1];
-
-       union {
-               struct lttng_kernel_perf_counter_ctx perf_counter;
-               char padding[LTTNG_KERNEL_CONTEXT_PADDING2];
-       } u;
-} __attribute__((packed));
-
-#define LTTNG_KERNEL_FILTER_BYTECODE_MAX_LEN           65536
-struct lttng_kernel_filter_bytecode {
-       uint32_t len;
-       uint32_t reloc_offset;
-       uint64_t seqnum;
-       char data[0];
-} __attribute__((packed));
-
-enum lttng_kernel_tracker_type {
-       LTTNG_KERNEL_TRACKER_UNKNOWN            = -1,
-
-       LTTNG_KERNEL_TRACKER_PID                = 0,
-       LTTNG_KERNEL_TRACKER_VPID               = 1,
-       LTTNG_KERNEL_TRACKER_UID                = 2,
-       LTTNG_KERNEL_TRACKER_VUID               = 3,
-       LTTNG_KERNEL_TRACKER_GID                = 4,
-       LTTNG_KERNEL_TRACKER_VGID               = 5,
-};
-
-struct lttng_kernel_tracker_args {
-       enum lttng_kernel_tracker_type type;
-       int32_t id;
-};
-
-/* LTTng file descriptor ioctl */
-/* lttng-abi-old.h reserve 0x40, 0x41, 0x42, 0x43, and 0x44. */
-#define LTTNG_KERNEL_SESSION                   _IO(0xF6, 0x45)
-#define LTTNG_KERNEL_TRACER_VERSION            \
-       _IOR(0xF6, 0x46, struct lttng_kernel_tracer_version)
-#define LTTNG_KERNEL_TRACEPOINT_LIST           _IO(0xF6, 0x47)
-#define LTTNG_KERNEL_WAIT_QUIESCENT            _IO(0xF6, 0x48)
-#define LTTNG_KERNEL_CALIBRATE                 \
-       _IOWR(0xF6, 0x49, struct lttng_kernel_calibrate)
-#define LTTNG_KERNEL_SYSCALL_LIST              _IO(0xF6, 0x4A)
-#define LTTNG_KERNEL_TRACER_ABI_VERSION                \
-       _IOR(0xF6, 0x4B, struct lttng_kernel_tracer_abi_version)
-
-/* Session FD ioctl */
-/* lttng-abi-old.h reserve 0x50, 0x51, 0x52, and 0x53. */
-#define LTTNG_KERNEL_METADATA                  \
-       _IOW(0xF6, 0x54, struct lttng_kernel_channel)
-#define LTTNG_KERNEL_CHANNEL                   \
-       _IOW(0xF6, 0x55, struct lttng_kernel_channel)
-#define LTTNG_KERNEL_SESSION_START             _IO(0xF6, 0x56)
-#define LTTNG_KERNEL_SESSION_STOP              _IO(0xF6, 0x57)
-#define LTTNG_KERNEL_SESSION_TRACK_PID         \
-       _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)
-
-/* lttng-abi-old.h reserve 0x5A and 0x5B. */
-#define LTTNG_KERNEL_SESSION_STATEDUMP         _IO(0xF6, 0x5C)
-#define LTTNG_KERNEL_SESSION_SET_NAME          \
-       _IOR(0xF6, 0x5D, struct lttng_kernel_session_name)
-#define LTTNG_KERNEL_SESSION_SET_CREATION_TIME         \
-       _IOR(0xF6, 0x5E, struct lttng_kernel_session_creation_time)
-
-/* Channel FD ioctl */
-/* lttng-abi-old.h reserve 0x60 and 0x61. */
-#define LTTNG_KERNEL_STREAM                    _IO(0xF6, 0x62)
-#define LTTNG_KERNEL_EVENT                     \
-       _IOW(0xF6, 0x63, struct lttng_kernel_event)
-#define LTTNG_KERNEL_SYSCALL_MASK              \
-       _IOWR(0xF6, 0x64, struct lttng_kernel_syscall_mask)
-
-/* Event and Channel FD ioctl */
-/* lttng-abi-old.h reserve 0x70. */
-#define LTTNG_KERNEL_CONTEXT                   \
-       _IOW(0xF6, 0x71, struct lttng_kernel_context)
-
-/* Event, Channel and Session ioctl */
-/* lttng-abi-old.h reserve 0x80 and 0x81. */
-#define LTTNG_KERNEL_ENABLE                    _IO(0xF6, 0x82)
-#define LTTNG_KERNEL_DISABLE                   _IO(0xF6, 0x83)
-
-/* Event FD ioctl */
-#define LTTNG_KERNEL_FILTER                    _IO(0xF6, 0x90)
-#define LTTNG_KERNEL_ADD_CALLSITE              _IO(0xF6, 0x91)
-
-/* Session FD ioctl (continued) */
-#define LTTNG_KERNEL_SESSION_LIST_TRACKER_IDS  \
-       _IOR(0xF6, 0xA0, struct lttng_kernel_tracker_args)
-#define LTTNG_KERNEL_SESSION_TRACK_ID          \
-       _IOR(0xF6, 0xA1, struct lttng_kernel_tracker_args)
-#define LTTNG_KERNEL_SESSION_UNTRACK_ID                \
-       _IOR(0xF6, 0xA2, struct lttng_kernel_tracker_args)
-
-/*
- * LTTng-specific ioctls for the lib ringbuffer.
- *
- * Operations applying to the current sub-buffer need to occur between
- * a get/put or get_next/put_next ioctl pair.
- */
-
-/* returns the timestamp begin of the current sub-buffer */
-#define LTTNG_RING_BUFFER_GET_TIMESTAMP_BEGIN  _IOR(0xF6, 0x20, uint64_t)
-/* returns the timestamp end of the current sub-buffer */
-#define LTTNG_RING_BUFFER_GET_TIMESTAMP_END    _IOR(0xF6, 0x21, uint64_t)
-/* returns the number of events discarded of the current sub-buffer */
-#define LTTNG_RING_BUFFER_GET_EVENTS_DISCARDED _IOR(0xF6, 0x22, uint64_t)
-/* returns the packet payload size of the current sub-buffer */
-#define LTTNG_RING_BUFFER_GET_CONTENT_SIZE     _IOR(0xF6, 0x23, uint64_t)
-/* returns the packet size of the current sub-buffer*/
-#define LTTNG_RING_BUFFER_GET_PACKET_SIZE      _IOR(0xF6, 0x24, uint64_t)
-/* returns the stream id (invariant for the stream) */
-#define LTTNG_RING_BUFFER_GET_STREAM_ID                _IOR(0xF6, 0x25, uint64_t)
-/* returns the current timestamp as perceived from the tracer */
-#define LTTNG_RING_BUFFER_GET_CURRENT_TIMESTAMP        _IOR(0xF6, 0x26, uint64_t)
-/* returns the packet sequence number of the current sub-buffer */
-#define LTTNG_RING_BUFFER_GET_SEQ_NUM          _IOR(0xF6, 0x27, uint64_t)
-/* returns the stream instance id (invariant for the stream) */
-#define LTTNG_RING_BUFFER_INSTANCE_ID          _IOR(0xF6, 0x28, uint64_t)
-
-#ifdef CONFIG_COMPAT
-/* returns the timestamp begin of the current sub-buffer */
-#define LTTNG_RING_BUFFER_COMPAT_GET_TIMESTAMP_BEGIN \
-       LTTNG_RING_BUFFER_GET_TIMESTAMP_BEGIN
-/* returns the timestamp end of the current sub-buffer */
-#define LTTNG_RING_BUFFER_COMPAT_GET_TIMESTAMP_END \
-       LTTNG_RING_BUFFER_GET_TIMESTAMP_END
-/* returns the number of events discarded of the current sub-buffer */
-#define LTTNG_RING_BUFFER_COMPAT_GET_EVENTS_DISCARDED \
-       LTTNG_RING_BUFFER_GET_EVENTS_DISCARDED
-/* returns the packet payload size of the current sub-buffer */
-#define LTTNG_RING_BUFFER_COMPAT_GET_CONTENT_SIZE \
-       LTTNG_RING_BUFFER_GET_CONTENT_SIZE
-/* returns the packet size of the current sub-buffer */
-#define LTTNG_RING_BUFFER_COMPAT_GET_PACKET_SIZE \
-       LTTNG_RING_BUFFER_GET_PACKET_SIZE
-/* returns the stream id (invariant for the stream) */
-#define LTTNG_RING_BUFFER_COMPAT_GET_STREAM_ID \
-       LTTNG_RING_BUFFER_GET_STREAM_ID
-/* returns the current timestamp as perceived from the tracer */
-#define LTTNG_RING_BUFFER_COMPAT_GET_CURRENT_TIMESTAMP \
-       LTTNG_RING_BUFFER_GET_CURRENT_TIMESTAMP
-/* returns the packet sequence number of the current sub-buffer */
-#define LTTNG_RING_BUFFER_COMPAT_GET_SEQ_NUM   \
-       LTTNG_RING_BUFFER_GET_SEQ_NUM
-/* returns the stream instance id (invariant for the stream) */
-#define LTTNG_RING_BUFFER_COMPAT_INSTANCE_ID   \
-       LTTNG_RING_BUFFER_INSTANCE_ID
-#endif /* CONFIG_COMPAT */
-
-#endif /* _LTTNG_ABI_H */
index ef6c6121c5bd11d13c4cb36d1f5eaaca2fe03f07..38863194672aafbc6c88d2b1f6d67758fe5e54bb 100644 (file)
@@ -7,8 +7,8 @@
  * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#include <lttng-abi.h>
-#include <lttng-events.h>
+#include <lttng/abi.h>
+#include <lttng/events.h>
 
 noinline
 void lttng_calibrate_kretprobe(void)
index 1fe37b80384ae81c1eda2eefb4de72ac4bfa3767..7512a3f4be074000b78bad96d973a76a4069f0b2 100644 (file)
@@ -10,8 +10,8 @@
 #include <linux/mutex.h>
 
 #include <wrapper/trace-clock.h>
-#include <lttng-events.h>
-#include <lttng-tracer.h>
+#include <lttng/events.h>
+#include <lttng/tracer.h>
 
 struct lttng_trace_clock *lttng_trace_clock;
 EXPORT_SYMBOL_GPL(lttng_trace_clock);
diff --git a/lttng-clock.h b/lttng-clock.h
deleted file mode 100644 (file)
index cac3c72..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
- *
- * lttng-clock.h
- *
- * Copyright (C) 2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- */
-
-#ifndef _LTTNG_CLOCK_H
-#define _LTTNG_CLOCK_H
-
-#include <linux/module.h>
-
-#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 */
index e8be78faab37c97c25d4cfbd8a300837d909d581..7b9e651272e4c3e5271928b8f051f96552401ba8 100644 (file)
 #include <linux/utsname.h>
 #include <linux/stacktrace.h>
 #include <linux/spinlock.h>
-#include "lttng-events.h"
 #include <ringbuffer/backend.h>
 #include <ringbuffer/frontend.h>
+#include <lttng/events.h>
+#include <lttng/tracer.h>
+#include <lttng/endian.h>
 #include "wrapper/vmalloc.h"
-#include "lttng-tracer.h"
-#include "lttng-endian.h"
 
 #ifdef CONFIG_ARCH_STACKWALK
 #include "lttng-context-callstack-stackwalk-impl.h"
index eebedeb5ef04291a5a85e8956e2c8d25f58f4371..27f00f6bd78dd7e309cad8ff0252b6bc0e39a88a 100644 (file)
 #include <linux/slab.h>
 #include <linux/sched.h>
 #include <linux/cgroup.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
 #include <wrapper/namespace.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 #if defined(CONFIG_CGROUPS) && \
        ((LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)) || \
index 1f79a5e98fab0282603df04c209fe1b57702eb4e..498dfcf09eb3f54052265405b101038baf0406a7 100644 (file)
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/sched.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 static
 size_t cpu_id_get_size(size_t offset)
index 535402a2c923bd8d7fd3184314a6a30cf4ebb6d8..e649fec841da36a5852c1a322ba813c73cd7b91d 100644 (file)
@@ -11,8 +11,8 @@
 
 #include <linux/module.h>
 #include <linux/sched.h>
-#include <lttng-events.h>
-#include <lttng-tracer.h>
+#include <lttng/events.h>
+#include <lttng/tracer.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
 #include <wrapper/user_namespace.h>
index 3e6d03f988535422b52eecbc711fcfcb5d4e4839..79faf3acbb955fe51ba23c3388cf3cb0dc04bacc 100644 (file)
@@ -11,8 +11,8 @@
 
 #include <linux/module.h>
 #include <linux/sched.h>
-#include <lttng-events.h>
-#include <lttng-tracer.h>
+#include <lttng/events.h>
+#include <lttng/tracer.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
 #include <wrapper/user_namespace.h>
index 0508c9ba38bad7a46fb9da78faa064908429b694..5620469d386d2f12523c16abdd063b5bf3065c8d 100644 (file)
@@ -11,8 +11,8 @@
 
 #include <linux/module.h>
 #include <linux/sched.h>
-#include <lttng-events.h>
-#include <lttng-tracer.h>
+#include <lttng/events.h>
+#include <lttng/tracer.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
 #include <wrapper/user_namespace.h>
index b8fa5149993c7a69f52b75b2b77c869cc4e3a0f7..86c5d021dd9c42f4cfedbfc250d889a691e5a7f9 100644 (file)
 #include <linux/slab.h>
 #include <linux/sched.h>
 #include <linux/utsname.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 #define LTTNG_HOSTNAME_CTX_LEN (__NEW_UTS_LEN + 1)
 
index 62e8583d31d412e8c8da73ce1b62c67d1a4eca76..9fbf266d5b76522a3949cfbac758366a4525c13d 100644 (file)
 #include <linux/slab.h>
 #include <linux/sched.h>
 #include <linux/irqflags.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Interruptible at value -1 means "unknown".
index 61c193ca7cad3384af1d075944fd2f2584b86c4e..a11292252002fec03d4d102979b028c991f8607e 100644 (file)
 #include <linux/slab.h>
 #include <linux/sched.h>
 #include <linux/ipc_namespace.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
 #include <wrapper/namespace.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 #if defined(CONFIG_IPC_NS) && \
        (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
index 1e7cdeab8b5a657c59b4b926f7ebbb09813577c3..207e02ffd8bee82b3ea5178718b358e58fe62119 100644 (file)
 #include <linux/slab.h>
 #include <linux/sched.h>
 #include <linux/irqflags.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 static
 size_t migratable_get_size(size_t offset)
index 5d396aef614fb43d79f2e84e3dde730221b2d6a6..7fce5dd151d16b30fc743eeea3cb31617fed09e9 100644 (file)
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/sched.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 #include <linux/nsproxy.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
 #include <wrapper/namespace.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 #if !defined(LTTNG_MNT_NS_MISSING_HEADER) && \
        (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
index 2b16c270ce6eecee80a5434aea2b3e92895bac65..7f8deec24461d00cce6ea410a4653a4244f9fff9 100644 (file)
 #include <linux/slab.h>
 #include <linux/sched.h>
 #include <linux/irqflags.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 static
 size_t need_reschedule_get_size(size_t offset)
index 74cf8f82418b7e334b5a7c1dac9ff4ebc7d1b464..879a61bd45dd71ef8c5ef0c972024f97cfb0bf00 100644 (file)
 #include <linux/sched.h>
 #include <linux/nsproxy.h>
 #include <net/net_namespace.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
 #include <wrapper/namespace.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 #if defined(CONFIG_NET_NS) && \
        (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
index 095462ebdbef2698844d7073924e3fd92a1fbbca..aaa3643e947cec603b37101fc153a500dd717702 100644 (file)
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/sched.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 static
 size_t nice_get_size(size_t offset)
index 05a28ab55077506b96505be242a70a5389cc9bc5..5784f75e30625e52693769902a578fa21ae13063 100644 (file)
 #include <linux/list.h>
 #include <linux/string.h>
 #include <linux/cpu.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
 #include <wrapper/perf.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 static
 size_t perf_counter_get_size(size_t offset)
index e0f5636ab72a5ca3a7c7b02b9350adad10ddf09a..721485dfafdccae6082439fb57563b9f8ef26a6e 100644 (file)
 #include <linux/slab.h>
 #include <linux/sched.h>
 #include <linux/pid_namespace.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
 #include <wrapper/namespace.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 #if defined(CONFIG_PID_NS) && \
        (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
index a84a284c36ef174f103c86c4698db003a9bbcff7..f3e4aef11b21520dcd0bdc630ca7444306bbff2b 100644 (file)
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/sched.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 static
 size_t pid_get_size(size_t offset)
index 44956c7e1979c6de39d1d2c2ea93d5c2d454781a..854c5159d69fe2d92d28dd8716fad170d192527c 100644 (file)
 #include <linux/slab.h>
 #include <linux/sched.h>
 #include <linux/syscalls.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 static
 size_t ppid_get_size(size_t offset)
index 0bd8e9127513cd914e1775c28a0576477eaa9c8e..6130a1a26d4acf4313b76c356ad0cda12c7754ac 100644 (file)
 #include <linux/slab.h>
 #include <linux/sched.h>
 #include <linux/irqflags.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * We nest twice in preempt disabling within LTTng: one nesting is done
index 84d5c5bf06ec917f624f6afb274a6ec4760da410..d300445546d443443f103a3f8607b96a3e6895ad 100644 (file)
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/sched.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
 #include <wrapper/kallsyms.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 static
 int (*wrapper_task_prio_sym)(struct task_struct *t);
index 3fd8236914e9b66b7d8a4447461e20c57d857189..fb5c36b8314390742e63670597bf21b756902c50 100644 (file)
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/sched.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
-#include <lttng-tracer.h>
-#include <lttng-endian.h>
+#include <lttng/tracer.h>
+#include <lttng/endian.h>
 
 static
 size_t procname_get_size(size_t offset)
index a729d0bbbb884d54b2cc22684c03ea69fd32bf35..18f1b837ec8ed33d468c716438bc90b33319bdff 100644 (file)
@@ -11,8 +11,8 @@
 
 #include <linux/module.h>
 #include <linux/sched.h>
-#include <lttng-events.h>
-#include <lttng-tracer.h>
+#include <lttng/events.h>
+#include <lttng/tracer.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
 #include <wrapper/user_namespace.h>
index 790874717da19f616f08b96bcef16c80ce41178c..1aa52dc54aca7ea4002400037f3725bad1fc0f9b 100644 (file)
@@ -11,8 +11,8 @@
 
 #include <linux/module.h>
 #include <linux/sched.h>
-#include <lttng-events.h>
-#include <lttng-tracer.h>
+#include <lttng/events.h>
+#include <lttng/tracer.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
 #include <wrapper/user_namespace.h>
index 144b081bc2bc7b1a6817b429a936cd79256aace5..311613085afedd2e3bed7b5a41703e3d65712353 100644 (file)
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/sched.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 static
 size_t tid_get_size(size_t offset)
index c639dc186a15b5d0f026e53d67b79c6c2568a801..c48bd0a6e6b6773b0659b028e3d6d9ade558e2e5 100644 (file)
@@ -11,8 +11,8 @@
 
 #include <linux/module.h>
 #include <linux/sched.h>
-#include <lttng-events.h>
-#include <lttng-tracer.h>
+#include <lttng/events.h>
+#include <lttng/tracer.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
 #include <wrapper/user_namespace.h>
index 3bee6d6510f55593e00b40295d71c5154a7d0379..b2c1189dd03ead3f63ff4dc138f7047d21690f68 100644 (file)
 #include <linux/slab.h>
 #include <linux/sched.h>
 #include <linux/user_namespace.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
 #include <wrapper/namespace.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 #if defined(CONFIG_USER_NS) && \
        (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
index 02192e7fb7fde703cd09b5f28dc7c9b192c3918e..b4284a5c5cf0d4fe854437fdf20c6cef06b88a3c 100644 (file)
 #include <linux/slab.h>
 #include <linux/sched.h>
 #include <linux/utsname.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
 #include <wrapper/namespace.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 #if defined(CONFIG_UTS_NS) && \
        (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
index abd81aa385101a52a3145ffe9e013802564112d7..6207e61cb7ffe3aba9b3c65a3531460e87d00522 100644 (file)
@@ -11,8 +11,8 @@
 
 #include <linux/module.h>
 #include <linux/sched.h>
-#include <lttng-events.h>
-#include <lttng-tracer.h>
+#include <lttng/events.h>
+#include <lttng/tracer.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
 #include <wrapper/user_namespace.h>
index f032b3a6d47495f0cceb0139c45061c9b4aacbd3..a24982080afe39aa6ac9b5532e2c24d5669986de 100644 (file)
@@ -11,8 +11,8 @@
 
 #include <linux/module.h>
 #include <linux/sched.h>
-#include <lttng-events.h>
-#include <lttng-tracer.h>
+#include <lttng/events.h>
+#include <lttng/tracer.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
 #include <wrapper/user_namespace.h>
index 5c70003c0e204119143800a1d68a3c79e9c581d4..a833915f89cb9fa9f2fd4cdd3c3d92cf12778981 100644 (file)
@@ -11,8 +11,8 @@
 
 #include <linux/module.h>
 #include <linux/sched.h>
-#include <lttng-events.h>
-#include <lttng-tracer.h>
+#include <lttng/events.h>
+#include <lttng/tracer.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
 #include <wrapper/user_namespace.h>
index 979d52aa899b381d6464add54a31266f7e344359..28178b9ead50bc3cb3b8b100bb675269cadafbe7 100644 (file)
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/sched.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 static
 size_t vpid_get_size(size_t offset)
index cedf68043250791b14b6a9a4b2fda0e4804d302f..8757eb29f423ca1cf70f579ef2d4e428807f1882 100644 (file)
 #include <linux/slab.h>
 #include <linux/sched.h>
 #include <linux/syscalls.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 static
 size_t vppid_get_size(size_t offset)
index 82ada63745b1774dfe410890f6f6bc13ebb8e1fb..c6a6ea7c8a30571b94c65ce5680e0f8283e8b680 100644 (file)
@@ -11,8 +11,8 @@
 
 #include <linux/module.h>
 #include <linux/sched.h>
-#include <lttng-events.h>
-#include <lttng-tracer.h>
+#include <lttng/events.h>
+#include <lttng/tracer.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
 #include <wrapper/user_namespace.h>
index fab50726dc0253d6251a715d07af129885ea67fe..c22d43043a7ca3953003644bcdc58dc239f7cce4 100644 (file)
@@ -11,8 +11,8 @@
 
 #include <linux/module.h>
 #include <linux/sched.h>
-#include <lttng-events.h>
-#include <lttng-tracer.h>
+#include <lttng/events.h>
+#include <lttng/tracer.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
 #include <wrapper/user_namespace.h>
index 74198d02ba62ddecb424105ee213914ef6eb5db3..3b0cadc4c3f01a679cf91d9d3062f8302b1c0ef9 100644 (file)
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/sched.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 static
 size_t vtid_get_size(size_t offset)
index 13fb70ef85514c3d16554f308ebcead6aa21f80c..e83f8989d456cf44d909ca6c6d36e90440760f2a 100644 (file)
@@ -11,8 +11,8 @@
 
 #include <linux/module.h>
 #include <linux/sched.h>
-#include <lttng-events.h>
-#include <lttng-tracer.h>
+#include <lttng/events.h>
+#include <lttng/tracer.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
 #include <wrapper/user_namespace.h>
index b4a60038ecc320672c9fc9198d687332fcae1b6a..eb5e5d113cd6bad3bc65a6c77f758ec9e9828ccb 100644 (file)
@@ -12,8 +12,8 @@
 #include <linux/mutex.h>
 #include <linux/slab.h>
 #include <wrapper/vmalloc.h>   /* for wrapper_vmalloc_sync_mappings() */
-#include <lttng-events.h>
-#include <lttng-tracer.h>
+#include <lttng/events.h>
+#include <lttng/tracer.h>
 
 /*
  * The filter implementation requires that two consecutive "get" for the
diff --git a/lttng-cpuhotplug.h b/lttng-cpuhotplug.h
deleted file mode 100644 (file)
index 4e25b39..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
- *
- * lttng-cpuhotplug.h
- *
- * Copyright (C) 2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- */
-
-#ifndef LTTNG_CPUHOTPLUG_H
-#define LTTNG_CPUHOTPLUG_H
-
-struct lttng_cpuhp_node;
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
-
-#include <linux/cpuhotplug.h>
-
-enum lttng_cpuhp_component {
-       LTTNG_RING_BUFFER_FRONTEND,
-       LTTNG_RING_BUFFER_BACKEND,
-       LTTNG_RING_BUFFER_ITER,
-       LTTNG_CONTEXT_PERF_COUNTERS,
-};
-
-struct lttng_cpuhp_node {
-       enum lttng_cpuhp_component component;
-       struct hlist_node node;
-};
-
-extern enum cpuhp_state lttng_hp_prepare;
-extern enum cpuhp_state lttng_hp_online;
-
-int lttng_cpuhp_rb_backend_prepare(unsigned int cpu,
-                struct lttng_cpuhp_node *node);
-int lttng_cpuhp_rb_frontend_dead(unsigned int cpu,
-               struct lttng_cpuhp_node *node);
-int lttng_cpuhp_rb_frontend_online(unsigned int cpu,
-               struct lttng_cpuhp_node *node);
-int lttng_cpuhp_rb_frontend_offline(unsigned int cpu,
-               struct lttng_cpuhp_node *node);
-int lttng_cpuhp_rb_iter_online(unsigned int cpu,
-               struct lttng_cpuhp_node *node);
-
-/* Ring buffer is a separate library. */
-void lttng_rb_set_hp_prepare(enum cpuhp_state val);
-void lttng_rb_set_hp_online(enum cpuhp_state val);
-
-extern enum cpuhp_state lttng_rb_hp_prepare;
-extern enum cpuhp_state lttng_rb_hp_online;
-
-#endif
-
-#endif /* LTTNG_CPUHOTPLUG_H */
diff --git a/lttng-endian.h b/lttng-endian.h
deleted file mode 100644 (file)
index 12f55d1..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) */
-#ifndef _LTTNG_ENDIAN_H
-#define _LTTNG_ENDIAN_H
-
-/*
- * lttng-endian.h
- *
- * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- */
-
-#ifdef __KERNEL__
-# include <asm/byteorder.h>
-# ifdef __BIG_ENDIAN
-#  define __BYTE_ORDER __BIG_ENDIAN
-# elif defined(__LITTLE_ENDIAN)
-#  define __BYTE_ORDER __LITTLE_ENDIAN
-# else
-#  error "unknown endianness"
-# endif
-#ifndef __BIG_ENDIAN
-# define __BIG_ENDIAN 4321
-#endif
-#ifndef __LITTLE_ENDIAN
-# define __LITTLE_ENDIAN 1234
-#endif
-#else
-# include <endian.h>
-#endif
-
-#endif /* _LTTNG_ENDIAN_H */
index d22bf327ca2cba79a38da92067344427a07abb6d..e22cc8112253b6b48547c5dd499ee64a9e78f694 100644 (file)
 #include <wrapper/tracepoint.h>
 #include <wrapper/list.h>
 #include <wrapper/types.h>
-#include <lttng-kernel-version.h>
-#include <lttng-events.h>
-#include <lttng-tracer.h>
-#include <lttng-abi-old.h>
-#include <lttng-endian.h>
-#include <lttng-string-utils.h>
+#include <lttng/kernel-version.h>
+#include <lttng/events.h>
+#include <lttng/tracer.h>
+#include <lttng/abi-old.h>
+#include <lttng/endian.h>
+#include <lttng/string-utils.h>
 #include <ringbuffer/backend.h>
 #include <ringbuffer/frontend.h>
 #include <wrapper/time.h>
diff --git a/lttng-events.h b/lttng-events.h
deleted file mode 100644 (file)
index 8197eb8..0000000
+++ /dev/null
@@ -1,982 +0,0 @@
-/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
- *
- * lttng-events.h
- *
- * Holds LTTng per-session event registry.
- *
- * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- */
-
-#ifndef _LTTNG_EVENTS_H
-#define _LTTNG_EVENTS_H
-
-#include <linux/version.h>
-#include <linux/list.h>
-#include <linux/kprobes.h>
-#include <linux/kref.h>
-#include <lttng-cpuhotplug.h>
-#include <linux/uuid.h>
-#include <wrapper/uprobes.h>
-#include <lttng-tracer.h>
-#include <lttng-abi.h>
-#include <lttng-abi-old.h>
-#include <lttng-endian.h>
-
-#define lttng_is_signed_type(type)     (((type)(-1)) < 0)
-
-struct lttng_channel;
-struct lttng_session;
-struct lttng_metadata_cache;
-struct lib_ring_buffer_ctx;
-struct perf_event;
-struct perf_event_attr;
-struct lib_ring_buffer_config;
-
-/* Type description */
-
-enum abstract_types {
-       atype_integer,
-       atype_string,
-       atype_enum_nestable,
-       atype_array_nestable,
-       atype_sequence_nestable,
-       atype_struct_nestable,
-       atype_variant_nestable,
-       NR_ABSTRACT_TYPES,
-};
-
-enum lttng_string_encodings {
-       lttng_encode_none = 0,
-       lttng_encode_UTF8 = 1,
-       lttng_encode_ASCII = 2,
-       NR_STRING_ENCODINGS,
-};
-
-enum channel_type {
-       PER_CPU_CHANNEL,
-       METADATA_CHANNEL,
-};
-
-struct lttng_enum_value {
-       unsigned long long value;
-       unsigned int signedness:1;
-};
-
-struct lttng_enum_entry {
-       struct lttng_enum_value start, end;     /* start and end are inclusive */
-       const char *string;
-       struct {
-               unsigned int is_auto:1;
-       } options;
-};
-
-#define __type_integer(_type, _size, _alignment, _signedness,  \
-               _byte_order, _base, _encoding)  \
-       {                                                       \
-           .atype = atype_integer,                             \
-           .u.integer =                                        \
-               {                                               \
-                 .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,         \
-               },                                              \
-       }                                                       \
-
-struct lttng_integer_type {
-       unsigned int size;              /* in bits */
-       unsigned short alignment;       /* in bits */
-       unsigned int signedness:1,
-               reverse_byte_order:1;
-       unsigned int base;              /* 2, 8, 10, 16, for pretty print */
-       enum lttng_string_encodings encoding;
-};
-
-struct lttng_type {
-       enum abstract_types atype;
-       union {
-               struct lttng_integer_type integer;
-               struct {
-                       enum lttng_string_encodings encoding;
-               } string;
-               struct {
-                       const struct lttng_enum_desc *desc;     /* Enumeration mapping */
-                       const struct lttng_type *container_type;
-               } enum_nestable;
-               struct {
-                       const struct lttng_type *elem_type;
-                       unsigned int length;                    /* Num. elems. */
-                       unsigned int alignment;
-               } array_nestable;
-               struct {
-                       const char *length_name;                /* Length field name. */
-                       const struct lttng_type *elem_type;
-                       unsigned int alignment;                 /* Alignment before elements. */
-               } sequence_nestable;
-               struct {
-                       unsigned int nr_fields;
-                       const struct lttng_event_field *fields; /* Array of fields. */
-                       unsigned int alignment;
-               } struct_nestable;
-               struct {
-                       const char *tag_name;
-                       const struct lttng_event_field *choices; /* Array of fields. */
-                       unsigned int nr_choices;
-                       unsigned int alignment;
-               } variant_nestable;
-       } u;
-};
-
-struct lttng_enum_desc {
-       const char *name;
-       const struct lttng_enum_entry *entries;
-       unsigned int nr_entries;
-};
-
-/* Event field description */
-
-struct lttng_event_field {
-       const char *name;
-       struct lttng_type type;
-       unsigned int nowrite:1,         /* do not write into trace */
-                       user:1,         /* fetch from user-space */
-                       nofilter:1;     /* do not consider for filter */
-};
-
-union lttng_ctx_value {
-       int64_t s64;
-       const char *str;
-       double d;
-};
-
-/*
- * We need to keep this perf counter field separately from struct
- * lttng_ctx_field because cpu hotplug needs fixed-location addresses.
- */
-struct lttng_perf_counter_field {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
-       struct lttng_cpuhp_node cpuhp_prepare;
-       struct lttng_cpuhp_node cpuhp_online;
-#else
-       struct notifier_block nb;
-       int hp_enable;
-#endif
-       struct perf_event_attr *attr;
-       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);
-       size_t (*get_size_arg)(size_t offset, struct lttng_ctx_field *field,
-                              struct lib_ring_buffer_ctx *ctx,
-                              struct lttng_channel *chan);
-       void (*record)(struct lttng_ctx_field *field,
-                      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;
-       } u;
-       void (*destroy)(struct lttng_ctx_field *field);
-       /*
-        * Private data to keep state between get_size and record.
-        * User must perform its own synchronization to protect against
-        * concurrent and reentrant contexts.
-        */
-       void *priv;
-};
-
-struct lttng_ctx {
-       struct lttng_ctx_field *fields;
-       unsigned int nr_fields;
-       unsigned int allocated_fields;
-       size_t largest_align;   /* in bytes */
-};
-
-struct lttng_event_desc {
-       const char *name;               /* lttng-modules name */
-       const char *kname;              /* Linux kernel name (tracepoints) */
-       void *probe_callback;
-       const struct lttng_event_ctx *ctx;      /* context */
-       const struct lttng_event_field *fields; /* event payload */
-       unsigned int nr_fields;
-       struct module *owner;
-};
-
-struct lttng_probe_desc {
-       const char *provider;
-       const struct lttng_event_desc **event_desc;
-       unsigned int nr_events;
-       struct list_head head;                  /* chain registered probes */
-       struct list_head lazy_init_head;
-       int lazy;                               /* lazy registration */
-};
-
-struct lttng_krp;                              /* Kretprobe handling */
-
-enum lttng_event_type {
-       LTTNG_TYPE_EVENT = 0,
-       LTTNG_TYPE_ENABLER = 1,
-};
-
-struct lttng_filter_bytecode_node {
-       struct list_head node;
-       struct lttng_enabler *enabler;
-       /*
-        * struct lttng_kernel_filter_bytecode has var. sized array, must be
-        * last field.
-        */
-       struct lttng_kernel_filter_bytecode bc;
-};
-
-/*
- * Filter return value masks.
- */
-enum lttng_filter_ret {
-       LTTNG_FILTER_DISCARD = 0,
-       LTTNG_FILTER_RECORD_FLAG = (1ULL << 0),
-       /* Other bits are kept for future use. */
-};
-
-struct lttng_bytecode_runtime {
-       /* Associated bytecode */
-       struct lttng_filter_bytecode_node *bc;
-       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 */
-       struct lttng_event *event;
-};
-
-/*
- * Objects in a linked-list of enablers, owned by an event.
- */
-struct lttng_enabler_ref {
-       struct list_head node;                  /* enabler ref list */
-       struct lttng_enabler *ref;              /* backward ref */
-};
-
-struct lttng_uprobe_handler {
-       struct lttng_event *event;
-       loff_t offset;
-       struct uprobe_consumer up_consumer;
-       struct list_head node;
-};
-
-/*
- * lttng_event structure is referred to by the tracing fast path. It must be
- * kept small.
- */
-struct lttng_event {
-       enum lttng_event_type evtype;   /* First field. */
-       unsigned int id;
-       struct lttng_channel *chan;
-       int enabled;
-       const struct lttng_event_desc *desc;
-       void *filter;
-       struct lttng_ctx *ctx;
-       enum lttng_kernel_instrumentation instrumentation;
-       union {
-               struct {
-                       struct kprobe kp;
-                       char *symbol_name;
-               } kprobe;
-               struct {
-                       struct lttng_krp *lttng_krp;
-                       char *symbol_name;
-               } kretprobe;
-               struct {
-                       struct inode *inode;
-                       struct list_head head;
-               } uprobe;
-       } u;
-       struct list_head list;          /* Event list in session */
-       unsigned int metadata_dumped:1;
-
-       /* Backward references: list of lttng_enabler_ref (ref to enablers) */
-       struct list_head enablers_ref_head;
-       struct hlist_node hlist;        /* session ht of events */
-       int registered;                 /* has reg'd tracepoint probe */
-       /* list of struct lttng_bytecode_runtime, sorted by seqnum */
-       struct list_head bytecode_runtime_head;
-       int has_enablers_without_bytecode;
-};
-
-enum lttng_enabler_type {
-       LTTNG_ENABLER_STAR_GLOB,
-       LTTNG_ENABLER_NAME,
-};
-
-/*
- * Enabler field, within whatever object is enabling an event. Target of
- * backward reference.
- */
-struct lttng_enabler {
-       enum lttng_event_type evtype;   /* First field. */
-
-       enum lttng_enabler_type type;
-
-       struct list_head node;  /* per-session list of enablers */
-       /* head list of struct lttng_ust_filter_bytecode_node */
-       struct list_head filter_bytecode_head;
-
-       struct lttng_kernel_event event_param;
-       struct lttng_channel *chan;
-       struct lttng_ctx *ctx;
-       unsigned int enabled:1;
-};
-
-struct lttng_channel_ops {
-       struct channel *(*channel_create)(const char *name,
-                               struct lttng_channel *lttng_chan,
-                               void *buf_addr,
-                               size_t subbuf_size, size_t num_subbuf,
-                               unsigned int switch_timer_interval,
-                               unsigned int read_timer_interval);
-       void (*channel_destroy)(struct channel *chan);
-       struct lib_ring_buffer *(*buffer_read_open)(struct channel *chan);
-       int (*buffer_has_read_closed_stream)(struct channel *chan);
-       void (*buffer_read_close)(struct lib_ring_buffer *buf);
-       int (*event_reserve)(struct lib_ring_buffer_ctx *ctx,
-                            uint32_t event_id);
-       void (*event_commit)(struct lib_ring_buffer_ctx *ctx);
-       void (*event_write)(struct lib_ring_buffer_ctx *ctx, const void *src,
-                           size_t len);
-       void (*event_write_from_user)(struct lib_ring_buffer_ctx *ctx,
-                                     const void *src, size_t len);
-       void (*event_memset)(struct lib_ring_buffer_ctx *ctx,
-                            int c, size_t len);
-       void (*event_strcpy)(struct lib_ring_buffer_ctx *ctx, const char *src,
-                            size_t len);
-       void (*event_strcpy_from_user)(struct lib_ring_buffer_ctx *ctx,
-                                      const char __user *src, size_t len);
-       /*
-        * packet_avail_size returns the available size in the current
-        * packet. Note that the size returned is only a hint, since it
-        * may change due to concurrent writes.
-        */
-       size_t (*packet_avail_size)(struct channel *chan);
-       wait_queue_head_t *(*get_writer_buf_wait_queue)(struct channel *chan, int cpu);
-       wait_queue_head_t *(*get_hp_wait_queue)(struct channel *chan);
-       int (*is_finalized)(struct channel *chan);
-       int (*is_disabled)(struct channel *chan);
-       int (*timestamp_begin) (const struct lib_ring_buffer_config *config,
-                       struct lib_ring_buffer *bufb,
-                       uint64_t *timestamp_begin);
-       int (*timestamp_end) (const struct lib_ring_buffer_config *config,
-                       struct lib_ring_buffer *bufb,
-                       uint64_t *timestamp_end);
-       int (*events_discarded) (const struct lib_ring_buffer_config *config,
-                       struct lib_ring_buffer *bufb,
-                       uint64_t *events_discarded);
-       int (*content_size) (const struct lib_ring_buffer_config *config,
-                       struct lib_ring_buffer *bufb,
-                       uint64_t *content_size);
-       int (*packet_size) (const struct lib_ring_buffer_config *config,
-                       struct lib_ring_buffer *bufb,
-                       uint64_t *packet_size);
-       int (*stream_id) (const struct lib_ring_buffer_config *config,
-                       struct lib_ring_buffer *bufb,
-                       uint64_t *stream_id);
-       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 {
-       char *name;
-       struct module *owner;
-       struct list_head node;
-       struct lttng_channel_ops ops;
-};
-
-struct lttng_syscall_filter;
-
-#define LTTNG_EVENT_HT_BITS            12
-#define LTTNG_EVENT_HT_SIZE            (1U << LTTNG_EVENT_HT_BITS)
-
-struct lttng_event_ht {
-       struct hlist_head table[LTTNG_EVENT_HT_SIZE];
-};
-
-struct lttng_channel {
-       unsigned int id;
-       struct channel *chan;           /* Channel buffers */
-       int enabled;
-       struct lttng_ctx *ctx;
-       /* Event ID management */
-       struct lttng_session *session;
-       struct file *file;              /* File associated to channel */
-       unsigned int free_event_id;     /* Next event ID to allocate */
-       struct list_head list;          /* Channel list */
-       struct lttng_channel_ops *ops;
-       struct lttng_transport *transport;
-       struct lttng_event **sc_table;  /* for syscall tracing */
-       struct lttng_event **compat_sc_table;
-       struct lttng_event **sc_exit_table;     /* for syscall exit tracing */
-       struct lttng_event **compat_sc_exit_table;
-       struct lttng_event *sc_unknown; /* for unknown syscalls */
-       struct lttng_event *sc_compat_unknown;
-       struct lttng_event *sc_exit_unknown;
-       struct lttng_event *compat_sc_exit_unknown;
-       struct lttng_syscall_filter *sc_filter;
-       int header_type;                /* 0: unset, 1: compact, 2: large */
-       enum channel_type channel_type;
-       unsigned int metadata_dumped:1,
-               sys_enter_registered:1,
-               sys_exit_registered:1,
-               syscall_all:1,
-               tstate:1;               /* Transient enable state */
-};
-
-struct lttng_metadata_stream {
-       void *priv;                     /* Ring buffer private data */
-       struct lttng_metadata_cache *metadata_cache;
-       unsigned int metadata_in;       /* Bytes read from the cache */
-       unsigned int metadata_out;      /* Bytes consumed from stream */
-       int finalized;                  /* Has channel been finalized */
-       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 */
-};
-
-#define LTTNG_DYNAMIC_LEN_STACK_SIZE   128
-
-struct lttng_dynamic_len_stack {
-       size_t stack[LTTNG_DYNAMIC_LEN_STACK_SIZE];
-       size_t offset;
-};
-
-DECLARE_PER_CPU(struct lttng_dynamic_len_stack, lttng_dynamic_len_stack);
-
-/*
- * struct lttng_id_tracker declared in header due to deferencing of *v
- * in RCU_INITIALIZER(v).
- */
-#define LTTNG_ID_HASH_BITS     6
-#define LTTNG_ID_TABLE_SIZE    (1 << LTTNG_ID_HASH_BITS)
-
-enum tracker_type {
-       TRACKER_PID,
-       TRACKER_VPID,
-       TRACKER_UID,
-       TRACKER_VUID,
-       TRACKER_GID,
-       TRACKER_VGID,
-
-       TRACKER_UNKNOWN,
-};
-
-struct lttng_id_tracker_rcu {
-       struct hlist_head id_hash[LTTNG_ID_TABLE_SIZE];
-};
-
-struct lttng_id_tracker {
-       struct lttng_session *session;
-       enum tracker_type tracker_type;
-       struct lttng_id_tracker_rcu *p; /* RCU dereferenced. */
-};
-
-struct lttng_id_hash_node {
-       struct hlist_node hlist;
-       int id;
-};
-
-struct lttng_session {
-       int active;                     /* Is trace session active ? */
-       int been_active;                /* Has trace session been active ? */
-       struct file *file;              /* File associated to session */
-       struct list_head chan;          /* Channel list head */
-       struct list_head events;        /* Event list head */
-       struct list_head list;          /* Session list */
-       unsigned int free_chan_id;      /* Next chan ID to allocate */
-       uuid_le uuid;                   /* Trace session unique ID */
-       struct lttng_metadata_cache *metadata_cache;
-       struct lttng_id_tracker pid_tracker;
-       struct lttng_id_tracker vpid_tracker;
-       struct lttng_id_tracker uid_tracker;
-       struct lttng_id_tracker vuid_tracker;
-       struct lttng_id_tracker gid_tracker;
-       struct lttng_id_tracker vgid_tracker;
-       unsigned int metadata_dumped:1,
-               tstate:1;               /* Transient enable state */
-       /* List of enablers */
-       struct list_head enablers_head;
-       /* Hash table of events */
-       struct lttng_event_ht events_ht;
-       char name[LTTNG_KERNEL_SESSION_NAME_LEN];
-       char creation_time[LTTNG_KERNEL_SESSION_CREATION_TIME_ISO8601_LEN];
-};
-
-struct lttng_metadata_cache {
-       char *data;                     /* Metadata cache */
-       unsigned int cache_alloc;       /* Metadata allocated size (bytes) */
-       unsigned int metadata_written;  /* Number of bytes written in metadata cache */
-       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;              /* Produce/consume lock */
-       uint64_t version;               /* Current version of the metadata */
-};
-
-void lttng_lock_sessions(void);
-void lttng_unlock_sessions(void);
-
-struct list_head *lttng_get_probe_list_head(void);
-
-struct lttng_enabler *lttng_enabler_create(enum lttng_enabler_type type,
-               struct lttng_kernel_event *event_param,
-               struct lttng_channel *chan);
-
-int lttng_enabler_enable(struct lttng_enabler *enabler);
-int lttng_enabler_disable(struct lttng_enabler *enabler);
-int lttng_fix_pending_events(void);
-int lttng_session_active(void);
-
-struct lttng_session *lttng_session_create(void);
-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);
-int lttng_session_statedump(struct lttng_session *session);
-void metadata_cache_destroy(struct kref *kref);
-
-struct lttng_channel *lttng_channel_create(struct lttng_session *session,
-                                      const char *transport_name,
-                                      void *buf_addr,
-                                      size_t subbuf_size, size_t num_subbuf,
-                                      unsigned int switch_timer_interval,
-                                      unsigned int read_timer_interval,
-                                      enum channel_type channel_type);
-struct lttng_channel *lttng_global_channel_create(struct lttng_session *session,
-                                      int overwrite, void *buf_addr,
-                                      size_t subbuf_size, size_t num_subbuf,
-                                      unsigned int switch_timer_interval,
-                                      unsigned int read_timer_interval);
-
-void lttng_metadata_channel_destroy(struct lttng_channel *chan);
-struct lttng_event *lttng_event_create(struct lttng_channel *chan,
-                               struct lttng_kernel_event *event_param,
-                               void *filter,
-                               const struct lttng_event_desc *event_desc,
-                               enum lttng_kernel_instrumentation itype);
-struct lttng_event *_lttng_event_create(struct lttng_channel *chan,
-                               struct lttng_kernel_event *event_param,
-                               void *filter,
-                               const struct lttng_event_desc *event_desc,
-                               enum lttng_kernel_instrumentation itype);
-struct lttng_event *lttng_event_compat_old_create(struct lttng_channel *chan,
-               struct lttng_kernel_old_event *old_event_param,
-               void *filter,
-               const struct lttng_event_desc *internal_desc);
-
-int lttng_channel_enable(struct lttng_channel *channel);
-int lttng_channel_disable(struct lttng_channel *channel);
-int lttng_event_enable(struct lttng_event *event);
-int lttng_event_disable(struct lttng_event *event);
-
-void lttng_transport_register(struct lttng_transport *transport);
-void lttng_transport_unregister(struct lttng_transport *transport);
-
-void synchronize_trace(void);
-int lttng_abi_init(void);
-int lttng_abi_compat_old_init(void);
-void lttng_abi_exit(void);
-void lttng_abi_compat_old_exit(void);
-
-int lttng_probe_register(struct lttng_probe_desc *desc);
-void lttng_probe_unregister(struct lttng_probe_desc *desc);
-const struct lttng_event_desc *lttng_event_get(const char *name);
-void lttng_event_put(const struct lttng_event_desc *desc);
-int lttng_probes_init(void);
-void lttng_probes_exit(void);
-
-int lttng_metadata_output_channel(struct lttng_metadata_stream *stream,
-               struct channel *chan);
-
-int lttng_id_tracker_get_node_id(const struct lttng_id_hash_node *node);
-int lttng_id_tracker_empty_set(struct lttng_id_tracker *lf);
-void lttng_id_tracker_destroy(struct lttng_id_tracker *lf, bool rcu);
-bool lttng_id_tracker_lookup(struct lttng_id_tracker_rcu *p, int id);
-int lttng_id_tracker_add(struct lttng_id_tracker *lf, int id);
-int lttng_id_tracker_del(struct lttng_id_tracker *lf, int id);
-
-int lttng_session_track_id(struct lttng_session *session,
-               enum tracker_type tracker_type, int id);
-int lttng_session_untrack_id(struct lttng_session *session,
-               enum tracker_type tracker_type, int id);
-
-int lttng_session_list_tracker_ids(struct lttng_session *session,
-               enum tracker_type tracker_type);
-
-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);
-int lttng_syscall_filter_enable(struct lttng_channel *chan,
-               const char *name);
-int lttng_syscall_filter_disable(struct lttng_channel *chan,
-               const char *name);
-long lttng_channel_syscall_mask(struct lttng_channel *channel,
-               struct lttng_kernel_syscall_mask __user *usyscall_mask);
-#else
-static inline int lttng_syscalls_register(struct lttng_channel *chan, void *filter)
-{
-       return -ENOSYS;
-}
-
-static inline int lttng_syscalls_unregister(struct lttng_channel *chan)
-{
-       return 0;
-}
-
-static inline int lttng_syscall_filter_enable(struct lttng_channel *chan,
-               const char *name)
-{
-       return -ENOSYS;
-}
-
-static inline int lttng_syscall_filter_disable(struct lttng_channel *chan,
-               const char *name)
-{
-       return -ENOSYS;
-}
-
-static inline long lttng_channel_syscall_mask(struct lttng_channel *channel,
-               struct lttng_kernel_syscall_mask __user *usyscall_mask)
-{
-       return -ENOSYS;
-}
-#endif
-
-void lttng_filter_sync_state(struct lttng_bytecode_runtime *runtime);
-int lttng_enabler_attach_bytecode(struct lttng_enabler *enabler,
-               struct lttng_kernel_filter_bytecode __user *bytecode);
-void lttng_enabler_event_link_bytecode(struct lttng_event *event,
-               struct lttng_enabler *enabler);
-
-int lttng_probes_init(void);
-
-extern struct lttng_ctx *lttng_static_ctx;
-
-int lttng_context_init(void);
-void lttng_context_exit(void);
-struct lttng_ctx_field *lttng_append_context(struct lttng_ctx **ctx);
-void lttng_context_update(struct lttng_ctx *ctx);
-int lttng_find_context(struct lttng_ctx *ctx, const char *name);
-int lttng_get_context_index(struct lttng_ctx *ctx, const char *name);
-void lttng_remove_context_field(struct lttng_ctx **ctx,
-                               struct lttng_ctx_field *field);
-void lttng_destroy_context(struct lttng_ctx *ctx);
-int lttng_add_pid_to_ctx(struct lttng_ctx **ctx);
-int lttng_add_cpu_id_to_ctx(struct lttng_ctx **ctx);
-int lttng_add_procname_to_ctx(struct lttng_ctx **ctx);
-int lttng_add_prio_to_ctx(struct lttng_ctx **ctx);
-int lttng_add_nice_to_ctx(struct lttng_ctx **ctx);
-int lttng_add_vpid_to_ctx(struct lttng_ctx **ctx);
-int lttng_add_tid_to_ctx(struct lttng_ctx **ctx);
-int lttng_add_vtid_to_ctx(struct lttng_ctx **ctx);
-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
-
-int lttng_add_callstack_to_ctx(struct lttng_ctx **ctx, int type);
-
-#if defined(CONFIG_CGROUPS) && \
-       ((LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)) || \
-        LTTNG_UBUNTU_KERNEL_RANGE(4,4,0,0, 4,5,0,0))
-int lttng_add_cgroup_ns_to_ctx(struct lttng_ctx **ctx);
-#else
-static inline
-int lttng_add_cgroup_ns_to_ctx(struct lttng_ctx **ctx)
-{
-       return -ENOSYS;
-}
-#endif
-
-#if defined(CONFIG_IPC_NS) && \
-       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
-int lttng_add_ipc_ns_to_ctx(struct lttng_ctx **ctx);
-#else
-static inline
-int lttng_add_ipc_ns_to_ctx(struct lttng_ctx **ctx)
-{
-       return -ENOSYS;
-}
-#endif
-
-#if !defined(LTTNG_MNT_NS_MISSING_HEADER) && \
-       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
-int lttng_add_mnt_ns_to_ctx(struct lttng_ctx **ctx);
-#else
-static inline
-int lttng_add_mnt_ns_to_ctx(struct lttng_ctx **ctx)
-{
-       return -ENOSYS;
-}
-#endif
-
-#if defined(CONFIG_NET_NS) && \
-       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
-int lttng_add_net_ns_to_ctx(struct lttng_ctx **ctx);
-#else
-static inline
-int lttng_add_net_ns_to_ctx(struct lttng_ctx **ctx)
-{
-       return -ENOSYS;
-}
-#endif
-
-#if defined(CONFIG_PID_NS) && \
-       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
-int lttng_add_pid_ns_to_ctx(struct lttng_ctx **ctx);
-#else
-static inline
-int lttng_add_pid_ns_to_ctx(struct lttng_ctx **ctx)
-{
-       return -ENOSYS;
-}
-#endif
-
-#if defined(CONFIG_USER_NS) && \
-       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
-int lttng_add_user_ns_to_ctx(struct lttng_ctx **ctx);
-#else
-static inline
-int lttng_add_user_ns_to_ctx(struct lttng_ctx **ctx)
-{
-       return -ENOSYS;
-}
-#endif
-
-#if defined(CONFIG_UTS_NS) && \
-       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
-int lttng_add_uts_ns_to_ctx(struct lttng_ctx **ctx);
-#else
-static inline
-int lttng_add_uts_ns_to_ctx(struct lttng_ctx **ctx)
-{
-       return -ENOSYS;
-}
-#endif
-
-int lttng_add_uid_to_ctx(struct lttng_ctx **ctx);
-int lttng_add_euid_to_ctx(struct lttng_ctx **ctx);
-int lttng_add_suid_to_ctx(struct lttng_ctx **ctx);
-int lttng_add_gid_to_ctx(struct lttng_ctx **ctx);
-int lttng_add_egid_to_ctx(struct lttng_ctx **ctx);
-int lttng_add_sgid_to_ctx(struct lttng_ctx **ctx);
-int lttng_add_vuid_to_ctx(struct lttng_ctx **ctx);
-int lttng_add_veuid_to_ctx(struct lttng_ctx **ctx);
-int lttng_add_vsuid_to_ctx(struct lttng_ctx **ctx);
-int lttng_add_vgid_to_ctx(struct lttng_ctx **ctx);
-int lttng_add_vegid_to_ctx(struct lttng_ctx **ctx);
-int lttng_add_vsgid_to_ctx(struct lttng_ctx **ctx);
-
-#if defined(CONFIG_PERF_EVENTS)
-int lttng_add_perf_counter_to_ctx(uint32_t type,
-                                 uint64_t config,
-                                 const char *name,
-                                 struct lttng_ctx **ctx);
-int lttng_cpuhp_perf_counter_online(unsigned int cpu,
-               struct lttng_cpuhp_node *node);
-int lttng_cpuhp_perf_counter_dead(unsigned int cpu,
-               struct lttng_cpuhp_node *node);
-#else
-static inline
-int lttng_add_perf_counter_to_ctx(uint32_t type,
-                                 uint64_t config,
-                                 const char *name,
-                                 struct lttng_ctx **ctx)
-{
-       return -ENOSYS;
-}
-static inline
-int lttng_cpuhp_perf_counter_online(unsigned int cpu,
-               struct lttng_cpuhp_node *node)
-{
-       return 0;
-}
-static inline
-int lttng_cpuhp_perf_counter_dead(unsigned int cpu,
-               struct lttng_cpuhp_node *node)
-{
-       return 0;
-}
-#endif
-
-int lttng_logger_init(void);
-void lttng_logger_exit(void);
-
-extern int lttng_statedump_start(struct lttng_session *session);
-
-#ifdef CONFIG_KPROBES
-int lttng_kprobes_register(const char *name,
-               const char *symbol_name,
-               uint64_t offset,
-               uint64_t addr,
-               struct lttng_event *event);
-void lttng_kprobes_unregister(struct lttng_event *event);
-void lttng_kprobes_destroy_private(struct lttng_event *event);
-#else
-static inline
-int lttng_kprobes_register(const char *name,
-               const char *symbol_name,
-               uint64_t offset,
-               uint64_t addr,
-               struct lttng_event *event)
-{
-       return -ENOSYS;
-}
-
-static inline
-void lttng_kprobes_unregister(struct lttng_event *event)
-{
-}
-
-static inline
-void lttng_kprobes_destroy_private(struct lttng_event *event)
-{
-}
-#endif
-
-int lttng_event_add_callsite(struct lttng_event *event,
-       struct lttng_kernel_event_callsite *callsite);
-
-#ifdef CONFIG_UPROBES
-int lttng_uprobes_register(const char *name,
-       int fd, struct lttng_event *event);
-int lttng_uprobes_add_callsite(struct lttng_event *event,
-       struct lttng_kernel_event_callsite *callsite);
-void lttng_uprobes_unregister(struct lttng_event *event);
-void lttng_uprobes_destroy_private(struct lttng_event *event);
-#else
-static inline
-int lttng_uprobes_register(const char *name,
-       int fd, struct lttng_event *event)
-{
-       return -ENOSYS;
-}
-
-static inline
-int lttng_uprobes_add_callsite(struct lttng_event *event,
-       struct lttng_kernel_event_callsite *callsite)
-{
-       return -ENOSYS;
-}
-
-static inline
-void lttng_uprobes_unregister(struct lttng_event *event)
-{
-}
-
-static inline
-void lttng_uprobes_destroy_private(struct lttng_event *event)
-{
-}
-#endif
-
-#ifdef CONFIG_KRETPROBES
-int lttng_kretprobes_register(const char *name,
-               const char *symbol_name,
-               uint64_t offset,
-               uint64_t addr,
-               struct lttng_event *event_entry,
-               struct lttng_event *event_exit);
-void lttng_kretprobes_unregister(struct lttng_event *event);
-void lttng_kretprobes_destroy_private(struct lttng_event *event);
-int lttng_kretprobes_event_enable_state(struct lttng_event *event,
-       int enable);
-#else
-static inline
-int lttng_kretprobes_register(const char *name,
-               const char *symbol_name,
-               uint64_t offset,
-               uint64_t addr,
-               struct lttng_event *event_entry,
-               struct lttng_event *event_exit)
-{
-       return -ENOSYS;
-}
-
-static inline
-void lttng_kretprobes_unregister(struct lttng_event *event)
-{
-}
-
-static inline
-void lttng_kretprobes_destroy_private(struct lttng_event *event)
-{
-}
-
-static inline
-int lttng_kretprobes_event_enable_state(struct lttng_event *event,
-       int enable)
-{
-       return -ENOSYS;
-}
-#endif
-
-int lttng_calibrate(struct lttng_kernel_calibrate *calibrate);
-
-extern const struct file_operations lttng_tracepoint_list_fops;
-extern const struct file_operations lttng_syscall_list_fops;
-
-#define TRACEPOINT_HAS_DATA_ARG
-
-static inline bool lttng_is_bytewise_integer(const struct lttng_type *type)
-{
-       if (type->atype != atype_integer)
-               return false;
-       switch (type->u.integer.size) {
-       case 8:         /* Fall-through. */
-       case 16:        /* Fall-through. */
-       case 32:        /* Fall-through. */
-       case 64:
-               break;
-       default:
-               return false;
-       }
-       return true;
-}
-
-#endif /* _LTTNG_EVENTS_H */
index c7ce7d331bd2dc4eb8639751d7b38377ed451fca..5ba7e230094458fd864bc7500ce60bf6988dc391 100644 (file)
@@ -12,8 +12,8 @@
 #include <wrapper/types.h>
 #include <linux/swab.h>
 
-#include <lttng-filter.h>
-#include <lttng-string-utils.h>
+#include <lttng/filter.h>
+#include <lttng/string-utils.h>
 
 LTTNG_STACK_FRAME_NON_STANDARD(lttng_filter_interpret_bytecode);
 
index f0da47edf495080cb308a48c95398db76fbff8f5..ccc458351e65e145d810797a2da4c0f3e18b29a3 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <linux/slab.h>
-#include <lttng-filter.h>
+#include <lttng/filter.h>
 #include <lttng/align.h>
 
 static ssize_t bytecode_reserve_data(struct bytecode_runtime *runtime,
index c479af08153c1d152793f2a4a9260ac7b11b21ed..38d6ed07bb531da45e1ca83ca9c1373acb71837f 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/slab.h>
 
 #include <wrapper/list.h>
-#include <lttng-filter.h>
+#include <lttng/filter.h>
 
 #define MERGE_POINT_TABLE_BITS         7
 #define MERGE_POINT_TABLE_SIZE         (1U << MERGE_POINT_TABLE_BITS)
index 6ff6be8f2a6888b4ecd7a61bce8ef25ff9830738..12c22644f26989f942c6f20f9527ade9c3a3a0a9 100644 (file)
@@ -10,7 +10,7 @@
 #include <linux/list.h>
 #include <linux/slab.h>
 
-#include <lttng-filter.h>
+#include <lttng/filter.h>
 
 static const char *opnames[] = {
        [ FILTER_OP_UNKNOWN ] = "UNKNOWN",
diff --git a/lttng-filter.h b/lttng-filter.h
deleted file mode 100644 (file)
index fec2db1..0000000
+++ /dev/null
@@ -1,248 +0,0 @@
-/* SPDX-License-Identifier: MIT
- *
- * lttng-filter.h
- *
- * LTTng modules filter header.
- *
- * Copyright (C) 2010-2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- */
-
-#ifndef _LTTNG_FILTER_H
-#define _LTTNG_FILTER_H
-
-#include <linux/kernel.h>
-
-#include <lttng-events.h>
-#include <filter-bytecode.h>
-
-/* Filter stack length, in number of entries */
-#define FILTER_STACK_LEN       10      /* includes 2 dummy */
-#define FILTER_STACK_EMPTY     1
-
-#define FILTER_MAX_DATA_LEN    65536
-
-#ifdef DEBUG
-#define dbg_printk(fmt, args...)                               \
-       printk(KERN_DEBUG "[debug bytecode in %s:%s@%u] " fmt,          \
-               __FILE__, __func__, __LINE__, ## args)
-#else
-#define dbg_printk(fmt, args...)                               \
-do {                                                           \
-       /* do nothing but check printf format */                \
-       if (0)                                                  \
-               printk(KERN_DEBUG "[debug bytecode in %s:%s@%u] " fmt,  \
-                       __FILE__, __func__, __LINE__, ## args); \
-} while (0)
-#endif
-
-/* Linked bytecode. Child of struct lttng_bytecode_runtime. */
-struct bytecode_runtime {
-       struct lttng_bytecode_runtime p;
-       size_t data_len;
-       size_t data_alloc_len;
-       char *data;
-       uint16_t len;
-       char code[0];
-};
-
-enum entry_type {
-       REG_S64,
-       REG_DOUBLE,
-       REG_STRING,
-       REG_STAR_GLOB_STRING,
-       REG_TYPE_UNKNOWN,
-       REG_PTR,
-};
-
-enum load_type {
-       LOAD_ROOT_CONTEXT,
-       LOAD_ROOT_APP_CONTEXT,
-       LOAD_ROOT_PAYLOAD,
-       LOAD_OBJECT,
-};
-
-enum object_type {
-       OBJECT_TYPE_S8,
-       OBJECT_TYPE_S16,
-       OBJECT_TYPE_S32,
-       OBJECT_TYPE_S64,
-       OBJECT_TYPE_U8,
-       OBJECT_TYPE_U16,
-       OBJECT_TYPE_U32,
-       OBJECT_TYPE_U64,
-
-       OBJECT_TYPE_DOUBLE,
-       OBJECT_TYPE_STRING,
-       OBJECT_TYPE_STRING_SEQUENCE,
-
-       OBJECT_TYPE_SEQUENCE,
-       OBJECT_TYPE_ARRAY,
-       OBJECT_TYPE_STRUCT,
-       OBJECT_TYPE_VARIANT,
-
-       OBJECT_TYPE_DYNAMIC,
-};
-
-struct filter_get_index_data {
-       uint64_t offset;        /* in bytes */
-       size_t ctx_index;
-       size_t array_len;
-       struct {
-               size_t len;
-               enum object_type type;
-               bool rev_bo;    /* reverse byte order */
-       } elem;
-};
-
-/* Validation stack */
-struct vstack_load {
-       enum load_type type;
-       enum object_type object_type;
-       const struct lttng_event_field *field;
-       bool rev_bo;    /* reverse byte order */
-};
-
-struct vstack_entry {
-       enum entry_type type;
-       struct vstack_load load;
-};
-
-struct vstack {
-       int top;        /* top of stack */
-       struct vstack_entry e[FILTER_STACK_LEN];
-};
-
-static inline
-void vstack_init(struct vstack *stack)
-{
-       stack->top = -1;
-}
-
-static inline
-struct vstack_entry *vstack_ax(struct vstack *stack)
-{
-       if (unlikely(stack->top < 0))
-               return NULL;
-       return &stack->e[stack->top];
-}
-
-static inline
-struct vstack_entry *vstack_bx(struct vstack *stack)
-{
-       if (unlikely(stack->top < 1))
-               return NULL;
-       return &stack->e[stack->top - 1];
-}
-
-static inline
-int vstack_push(struct vstack *stack)
-{
-       if (stack->top >= FILTER_STACK_LEN - 1) {
-               printk(KERN_WARNING "Stack full\n");
-               return -EINVAL;
-       }
-       ++stack->top;
-       return 0;
-}
-
-static inline
-int vstack_pop(struct vstack *stack)
-{
-       if (unlikely(stack->top < 0)) {
-               printk(KERN_WARNING "Stack empty\n");
-               return -EINVAL;
-       }
-       stack->top--;
-       return 0;
-}
-
-/* Execution stack */
-enum estack_string_literal_type {
-       ESTACK_STRING_LITERAL_TYPE_NONE,
-       ESTACK_STRING_LITERAL_TYPE_PLAIN,
-       ESTACK_STRING_LITERAL_TYPE_STAR_GLOB,
-};
-
-struct load_ptr {
-       enum load_type type;
-       enum object_type object_type;
-       const void *ptr;
-       bool rev_bo;
-       /* Temporary place-holders for contexts. */
-       union {
-               int64_t s64;
-               uint64_t u64;
-               double d;
-       } u;
-       /*
-        * "field" is only needed when nested under a variant, in which
-        * case we cannot specialize the nested operations.
-        */
-       const struct lttng_event_field *field;
-};
-
-struct estack_entry {
-       union {
-               int64_t v;
-
-               struct {
-                       const char *str;
-                       const char __user *user_str;
-                       size_t seq_len;
-                       enum estack_string_literal_type literal_type;
-                       int user;               /* is string from userspace ? */
-               } s;
-               struct load_ptr ptr;
-       } u;
-};
-
-struct estack {
-       int top;        /* top of stack */
-       struct estack_entry e[FILTER_STACK_LEN];
-};
-
-#define estack_ax_v    ax
-#define estack_bx_v    bx
-
-#define estack_ax(stack, top)                                  \
-       ({                                                      \
-               BUG_ON((top) <= FILTER_STACK_EMPTY);            \
-               &(stack)->e[top];                               \
-       })
-
-#define estack_bx(stack, top)                                  \
-       ({                                                      \
-               BUG_ON((top) <= FILTER_STACK_EMPTY + 1);        \
-               &(stack)->e[(top) - 1];                         \
-       })
-
-#define estack_push(stack, top, ax, bx)                                \
-       do {                                                    \
-               BUG_ON((top) >= FILTER_STACK_LEN - 1);          \
-               (stack)->e[(top) - 1].u.v = (bx);               \
-               (bx) = (ax);                                    \
-               ++(top);                                        \
-       } while (0)
-
-#define estack_pop(stack, top, ax, bx)                         \
-       do {                                                    \
-               BUG_ON((top) <= FILTER_STACK_EMPTY);            \
-               (ax) = (bx);                                    \
-               (bx) = (stack)->e[(top) - 2].u.v;               \
-               (top)--;                                        \
-       } while (0)
-
-const char *lttng_filter_print_op(enum filter_op op);
-
-int lttng_filter_validate_bytecode(struct bytecode_runtime *bytecode);
-int lttng_filter_specialize_bytecode(struct lttng_event *event,
-               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 --git a/lttng-kernel-version.h b/lttng-kernel-version.h
deleted file mode 100644 (file)
index cb96a32..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
- *
- * lttng-kernel-version.h
- *
- * Contains helpers to check more complex kernel version conditions.
- *
- * Copyright (C) 2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- */
-
-#ifndef _LTTNG_KERNEL_VERSION_H
-#define _LTTNG_KERNEL_VERSION_H
-
-#include <linux/version.h>
-#include <generated/utsrelease.h>
-
-/*
- * This macro checks if the kernel version is between the two specified
- * versions (lower limit inclusive, upper limit exclusive).
- */
-#define LTTNG_KERNEL_RANGE(a_low, b_low, c_low, a_high, b_high, c_high) \
-       (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))
-
-#ifdef UTS_UBUNTU_RELEASE_ABI
-#define LTTNG_UBUNTU_VERSION_CODE \
-       ((LINUX_VERSION_CODE << 8) + UTS_UBUNTU_RELEASE_ABI)
-#else
-#define LTTNG_UBUNTU_VERSION_CODE      0
-#endif
-
-#define LTTNG_UBUNTU_KERNEL_RANGE(a_low, b_low, c_low, d_low, \
-               a_high, b_high, c_high, d_high) \
-       (LTTNG_UBUNTU_VERSION_CODE >= \
-               LTTNG_UBUNTU_KERNEL_VERSION(a_low, b_low, c_low, d_low) && \
-               LTTNG_UBUNTU_VERSION_CODE < \
-               LTTNG_UBUNTU_KERNEL_VERSION(a_high, b_high, c_high, d_high))
-
-/* Debian */
-
-#define LTTNG_DEBIAN_KERNEL_VERSION(a, b, c, d, e, f) \
-       (((((a) << 16) + ((b) << 8) + (c)) * 1000000ULL) + ((d) * 10000) + ((e) * 100) + (f))
-
-#ifdef DEBIAN_API_VERSION
-#define LTTNG_DEBIAN_VERSION_CODE \
-       ((LINUX_VERSION_CODE * 1000000ULL) + DEBIAN_API_VERSION)
-#else
-#define LTTNG_DEBIAN_VERSION_CODE      0
-#endif
-
-#define LTTNG_DEBIAN_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_DEBIAN_VERSION_CODE >= \
-               LTTNG_DEBIAN_KERNEL_VERSION(a_low, b_low, c_low, d_low, e_low, f_low) && \
-               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, f) \
-       (((((a) << 16) + ((b) << 8) + (c)) * 10000000ULL) + ((d) * 10000) + ((e) * 100) + (f))
-
-/* RHEL */
-
-#ifdef RHEL_API_VERSION
-#define LTTNG_RHEL_VERSION_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, 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, f_low) && \
-               LTTNG_RHEL_VERSION_CODE < \
-               LTTNG_RHEL_KERNEL_VERSION(a_high, b_high, c_high, d_high, e_high, f_high))
-
-/* SUSE Linux enterprise */
-
-#define LTTNG_SLE_KERNEL_VERSION(a, b, c, d, e, f) \
-       (((((a) << 16) + ((b) << 8) + (c)) * 10000000ULL) + ((d) * 10000) + ((e) * 100) + (f))
-
-#ifdef SLE_API_VERSION
-#define LTTNG_SLE_VERSION_CODE \
-       ((LINUX_VERSION_CODE * 10000000ULL) + SLE_API_VERSION)
-#else
-#define LTTNG_SLE_VERSION_CODE         0
-#endif
-
-#define LTTNG_SLE_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_SLE_VERSION_CODE >= \
-               LTTNG_SLE_KERNEL_VERSION(a_low, b_low, c_low, d_low, e_low, f_low) && \
-               LTTNG_SLE_VERSION_CODE < \
-               LTTNG_SLE_KERNEL_VERSION(a_high, b_high, c_high, d_high, e_high, f_high))
-
-/* Fedora */
-
-#define LTTNG_FEDORA_KERNEL_VERSION(a, b, c, d) \
-        (((((a) << 16) + ((b) << 8) + (c)) * 10000ULL) + (d))
-
-#ifdef FEDORA_REVISION_VERSION
-#define LTTNG_FEDORA_VERSION_CODE \
-        ((LINUX_VERSION_CODE * 10000ULL) + FEDORA_REVISION_VERSION)
-#else
-#define LTTNG_FEDORA_VERSION_CODE         0
-#endif
-
-#define LTTNG_FEDORA_KERNEL_RANGE(a_low, b_low, c_low, d_low, \
-                a_high, b_high, c_high, d_high) \
-        (LTTNG_FEDORA_VERSION_CODE >= \
-                LTTNG_FEDORA_KERNEL_VERSION(a_low, b_low, c_low, d_low) && \
-                LTTNG_FEDORA_VERSION_CODE < \
-                LTTNG_FEDORA_KERNEL_VERSION(a_high, b_high, c_high, d_high))
-
-/* RT patch */
-
-#define LTTNG_RT_KERNEL_VERSION(a, b, c, d) \
-       (((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 */
index bf6615b74f35a265a47ab135735b6f64cd46c5a3..4a2bb630e8503412c3524ddc468aef749c7f2280 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/mutex.h>
 #include <linux/seq_file.h>
 
-#include <lttng-events.h>
+#include <lttng/events.h>
 
 /*
  * probe list is protected by sessions lock.
index 64d7e9ec2e79229babf7809f61504a9bdfa126ca..c9d617ad65f20b52f9fa749cfea6bb2fa9fd7f2f 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 #define RING_BUFFER_MODE_TEMPLATE              RING_BUFFER_DISCARD
 #define RING_BUFFER_MODE_TEMPLATE_STRING       "discard"
index 9147e58bfe936c3846b1af352387c3bc5bad4c85..c79ab66a1e604228f5bd83af02761b6579f6dfed 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 #define RING_BUFFER_MODE_TEMPLATE              RING_BUFFER_DISCARD
 #define RING_BUFFER_MODE_TEMPLATE_STRING       "discard-mmap"
index 4494ac4bbfc8545873c04a3e4266d3d7aab12c9f..1166fc709cb5a10e034c50a94ed034efb47f6b7c 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 #define RING_BUFFER_MODE_TEMPLATE              RING_BUFFER_OVERWRITE
 #define RING_BUFFER_MODE_TEMPLATE_STRING       "overwrite-mmap"
index d45662962fcc5b8655c8aca40b01e9dc103edd3a..c4a7c5eb1333f53c1ffd72972fe3dafde9dfa8be 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 #define RING_BUFFER_MODE_TEMPLATE              RING_BUFFER_OVERWRITE
 #define RING_BUFFER_MODE_TEMPLATE_STRING       "overwrite"
index 67804d3a832d429abc3e68d8e2f8b753694c0371..aad7955f8accfcdea845b14858b431adab3cf69c 100644 (file)
@@ -12,8 +12,8 @@
 #include <lttng/bitfield.h>
 #include <wrapper/vmalloc.h>   /* for wrapper_vmalloc_sync_mappings() */
 #include <wrapper/trace-clock.h>
-#include <lttng-events.h>
-#include <lttng-tracer.h>
+#include <lttng/events.h>
+#include <lttng/tracer.h>
 #include <ringbuffer/frontend_types.h>
 
 #define LTTNG_COMPACT_EVENT_BITS       5
index 7a785677ae4b97055892cbf2939981e5473f1ea2..2d5249229d386b6521f56c33d940b951be478cc3 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 #define RING_BUFFER_MODE_TEMPLATE              RING_BUFFER_DISCARD
 #define RING_BUFFER_MODE_TEMPLATE_STRING       "metadata"
index 9b9ac2c2ae0d39fca6a2b534c3ada6bc3766b9b0..0f68b38538779c2abe404cb59eca9394fead5358 100644 (file)
@@ -10,8 +10,8 @@
 #include <linux/module.h>
 #include <linux/types.h>
 #include <wrapper/vmalloc.h>   /* for wrapper_vmalloc_sync_mappings() */
-#include <lttng-events.h>
-#include <lttng-tracer.h>
+#include <lttng/events.h>
+#include <lttng/tracer.h>
 
 static struct lttng_transport lttng_relay_transport;
 
index fc33f99ba08d58475afa36699022aa55c9d2ac42..15975b41e4eb3564f77cd7dab573fbee7df387d9 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 #define RING_BUFFER_MODE_TEMPLATE              RING_BUFFER_DISCARD
 #define RING_BUFFER_MODE_TEMPLATE_STRING       "metadata-mmap"
index 9dc0eb199f90c4c61048223ba58dff651a815e47..da05924f0397f48ad96755b9bc10b134edef2784 100644 (file)
@@ -33,8 +33,8 @@
 #include <linux/mutex.h>
 #include <linux/device.h>
 
-#include <lttng-events.h>
-#include <lttng-tracer.h>
+#include <lttng/events.h>
+#include <lttng/tracer.h>
 #include <wrapper/irqdesc.h>
 #include <wrapper/fdtable.h>
 #include <wrapper/namespace.h>
index 1f126185ee5c07cc1cbb1d6e46e2fa359d379e5e..d944790312e635ec7490c02a245b491ca5fda630 100644 (file)
@@ -5,7 +5,7 @@
 
 #include <linux/types.h>
 
-#include <lttng-string-utils.h>
+#include <lttng/string-utils.h>
 
 enum star_glob_pattern_type_flags {
        STAR_GLOB_PATTERN_TYPE_FLAG_NONE        = 0,
diff --git a/lttng-string-utils.h b/lttng-string-utils.h
deleted file mode 100644 (file)
index 3e7267e..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) */
-#ifndef _LTTNG_STRING_UTILS_H
-#define _LTTNG_STRING_UTILS_H
-
-/*
- * Copyright (C) 2017 Philippe Proulx <pproulx@efficios.com>
- */
-
-#include <stdbool.h>
-
-typedef char (*strutils_get_char_at_cb)(size_t, void *);
-
-bool strutils_is_star_glob_pattern(const char *pattern);
-bool strutils_is_star_at_the_end_only_glob_pattern(const char *pattern);
-bool strutils_star_glob_match(const char *pattern, size_t pattern_len,
-               const char *candidate, size_t candidate_len);
-bool strutils_star_glob_match_char_cb(
-               strutils_get_char_at_cb pattern_get_char_at_cb,
-               void *pattern_get_char_at_cb_data,
-               strutils_get_char_at_cb candidate_get_char_at_cb,
-               void *candidate_get_char_at_cb_data);
-
-#endif /* _LTTNG_STRING_UTILS_H */
index a376bcbe0531cb652858af01384e3c9e877251bd..a5b5f403fe359e6531650111fc05cb82a6c60aba 100644 (file)
@@ -27,7 +27,7 @@
 #include <wrapper/file.h>
 #include <wrapper/rcu.h>
 #include <wrapper/syscall.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 
 #ifndef CONFIG_COMPAT
 # ifndef is_compat_task
index 7e1b51d3cf7ff2ac9f5b0e996444e09ab2cb9c2b..70ee5cc6b9d7cfef42e3a8b91b480f8097e28c01 100644 (file)
@@ -8,7 +8,7 @@
 #include <linux/slab.h>
 #include <linux/percpu.h>
 
-#include <lttng-tp-mempool.h>
+#include <lttng/tp-mempool.h>
 
 struct lttng_tp_buf_entry {
        int cpu; /* To make sure we return the entry to the right pool. */
diff --git a/lttng-tp-mempool.h b/lttng-tp-mempool.h
deleted file mode 100644 (file)
index f925efa..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
- *
- * lttng-tp-mempool.h
- *
- * Copyright (C) 2018 Julien Desfossez <jdesfossez@efficios.com>
- */
-
-#ifndef LTTNG_TP_MEMPOOL_H
-#define LTTNG_TP_MEMPOOL_H
-
-#include <linux/percpu.h>
-
-#define LTTNG_TP_MEMPOOL_NR_BUF_PER_CPU 4
-#define LTTNG_TP_MEMPOOL_BUF_SIZE 4096
-
-/*
- * Initialize the pool, only performed once. The pool is a set of
- * LTTNG_TP_MEMPOOL_NR_BUF_PER_CPU buffers of size LTTNG_TP_MEMPOOL_BUF_SIZE
- * per-cpu.
- *
- * Returns 0 on success, a negative value on error.
- */
-int lttng_tp_mempool_init(void);
-
-/*
- * Destroy the pool and free all the memory allocated.
- */
-void lttng_tp_mempool_destroy(void);
-
-/*
- * Ask for a buffer on the current cpu.
- *
- * The pool is per-cpu, but there is no exclusive access guarantee on the
- * per-cpu free-list, the caller needs to ensure it cannot get preempted or
- * interrupted while performing the allocation.
- *
- * The maximum size that can be allocated is LTTNG_TP_MEMPOOL_BUF_SIZE, and the
- * maximum number of buffers allocated simultaneously on the same CPU is
- * LTTNG_TP_MEMPOOL_NR_BUF_PER_CPU.
- *
- * Return a pointer to a buffer on success, NULL on error.
- */
-void *lttng_tp_mempool_alloc(size_t size);
-
-/*
- * Release the memory reserved. Same concurrency limitations as the allocation.
- */
-void lttng_tp_mempool_free(void *ptr);
-
-#endif /* LTTNG_TP_MEMPOOL_H */
index 42bae9ae0eeb6868b73394226b0cc22b7c10cc2e..ed78a1770e16c13de50f51b620ca589deece0bc5 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/jhash.h>
 #include <linux/module.h>
 
-#include <lttng-tracepoint.h>
+#include <lttng/tracepoint.h>
 #include <wrapper/list.h>
 #include <wrapper/tracepoint.h>
 
diff --git a/lttng-tracepoint.h b/lttng-tracepoint.h
deleted file mode 100644 (file)
index 12cc595..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
- *
- * lttng-tracepoint.h
- *
- * LTTng adaptation layer for Linux kernel 3.15+ tracepoints.
- *
- * Copyright (C) 2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- */
-
-#ifndef _LTTNG_TRACEPOINT_H
-#define _LTTNG_TRACEPOINT_H
-
-int lttng_tracepoint_probe_register(const char *name, void *probe, void *data);
-int lttng_tracepoint_probe_unregister(const char *name, void *probe, void *data);
-int lttng_tracepoint_init(void);
-void lttng_tracepoint_exit(void);
-
-#endif /* _LTTNG_TRACEPOINT_H */
diff --git a/lttng-tracer-core.h b/lttng-tracer-core.h
deleted file mode 100644 (file)
index 1871673..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
- *
- * lttng-tracer-core.h
- *
- * This contains the core definitions for the Linux Trace Toolkit Next
- * Generation tracer.
- *
- * Copyright (C) 2005-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- */
-
-#ifndef LTTNG_TRACER_CORE_H
-#define LTTNG_TRACER_CORE_H
-
-#include <linux/list.h>
-#include <linux/percpu.h>
-
-#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
-/* Align data on its natural alignment */
-#define RING_BUFFER_ALIGN
-#endif
-
-#include <ringbuffer/config.h>
-
-struct lttng_session;
-struct lttng_channel;
-struct lttng_event;
-
-#endif /* LTTNG_TRACER_CORE_H */
diff --git a/lttng-tracer.h b/lttng-tracer.h
deleted file mode 100644 (file)
index 197e28a..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only) */
-#ifndef _LTTNG_TRACER_H
-#define _LTTNG_TRACER_H
-
-/*
- * lttng-tracer.h
- *
- * This contains the definitions for the Linux Trace Toolkit Next
- * Generation tracer.
- *
- * Copyright (C) 2005-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- */
-
-#include <stdarg.h>
-#include <linux/types.h>
-#include <linux/limits.h>
-#include <linux/list.h>
-#include <linux/cache.h>
-#include <linux/timex.h>
-#include <linux/wait.h>
-#include <asm/atomic.h>
-#include <asm/local.h>
-
-#include <wrapper/trace-clock.h>
-#include <wrapper/compiler.h>
-#include <wrapper/vmalloc.h>
-#include <lttng-tracer-core.h>
-#include <lttng-events.h>
-
-#define LTTNG_MODULES_MAJOR_VERSION 2
-#define LTTNG_MODULES_MINOR_VERSION 12
-#define LTTNG_MODULES_PATCHLEVEL_VERSION 0
-#define LTTNG_MODULES_EXTRAVERSION "-rc1"
-
-#define LTTNG_VERSION_NAME             "(Ta) Meilleure"
-#define LTTNG_VERSION_DESCRIPTION      "Ta Meilleure is a Northeast IPA beer brewed by Lagabière. Translating to \"Your best one\", this beer gives out strong aromas of passion fruit, lemon, and peaches. Tastewise, expect a lot of fruit, a creamy texture, and a smooth lingering hop bitterness."
-
-#ifndef CHAR_BIT
-#define CHAR_BIT 8
-#endif
-
-/* Number of bytes to log with a read/write event */
-#define LTTNG_LOG_RW_SIZE              32L
-#define LTTNG_MAX_SMALL_SIZE           0xFFFFU
-
-#ifdef RING_BUFFER_ALIGN
-#define lttng_alignof(type)    __alignof__(type)
-#else
-#define lttng_alignof(type)    1
-#endif
-
-/* Tracer properties */
-#define CTF_MAGIC_NUMBER               0xC1FC1FC1
-#define TSDL_MAGIC_NUMBER              0x75D11D57
-
-/* CTF specification version followed */
-#define CTF_SPEC_MAJOR                 1
-#define CTF_SPEC_MINOR                 8
-
-/*
- * Number of milliseconds to retry before failing metadata writes on buffer full
- * condition. (10 seconds)
- */
-#define LTTNG_METADATA_TIMEOUT_MSEC    10000
-
-#define LTTNG_RFLAG_EXTENDED           RING_BUFFER_RFLAG_END
-#define LTTNG_RFLAG_END                        (LTTNG_RFLAG_EXTENDED << 1)
-
-#endif /* _LTTNG_TRACER_H */
index 2248acd6d49148fa140a6a94e21f8d2e39ffb400..205c4af4d9dffb5e2af65f0a0a5c9f78d967f106 100644 (file)
@@ -18,7 +18,7 @@
 #include <wrapper/tracepoint.h>
 #include <wrapper/rcu.h>
 #include <wrapper/list.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 
 /*
  * Hash table is allocated and freed when there are no possible
index 613196994d4d941d038983b3417501c9a8b36538..cef4fc7ae20e98272d00841f6f23f2fcac949cea 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 static int __init lttng_wrapper_init(void)
 {
index 6a1347321fed1f05d531b201b8ab1b3b3e010305..a2474d0d6e9da08c2a8518bf3f86eeaf1dd0be9b 100644 (file)
 #include <linux/module.h>
 #include <linux/kprobes.h>
 #include <linux/slab.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
 #include <wrapper/irqflags.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 #include <blacklist/kprobes.h>
 
 static
index e95ef7d5fb76f1a4ab8d91f773815577a23253c4..00675937a22416b9150bf24cf78925ed8ae07926 100644 (file)
 #include <linux/kprobes.h>
 #include <linux/slab.h>
 #include <linux/kref.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/vmalloc.h>
 #include <wrapper/irqflags.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 #include <blacklist/kprobes.h>
 
 enum lttng_kretprobe_type {
index 7d464104b235eb6da73e4b1c30865b59852f4c3f..0da7cf4a46be2400bfc8ad58123bf764f841c9c5 100644 (file)
@@ -11,7 +11,7 @@
 #include <linux/module.h>
 #include <net/9p/9p.h>
 #include <net/9p/client.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index af82cdb862eb4f7bb4716db50df9da70b87826fc..ce73cea5d2656e48a49af6eaab09fc26004fc9fe 100644 (file)
@@ -11,7 +11,7 @@
 #include <linux/module.h>
 #include <sound/jack.h>
 #include <sound/soc.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index 1838491b2c1b40673b16f5ab9ed15af0d3b46710..eceed5df5cc8586330bba2d67046914dc52361be 100644 (file)
@@ -9,8 +9,8 @@
 
 #include <linux/module.h>
 #include <linux/blktrace_api.h>
-#include <lttng-tracer.h>
-#include <lttng-kernel-version.h>
+#include <lttng/tracer.h>
+#include <lttng/kernel-version.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index afb3acb35edf7b227c367b3a12bc5fe5bedc0f20..b6a38eee9b1c3f68713d562a9bc0fe954461e488 100644 (file)
@@ -18,7 +18,7 @@
 #include <../fs/btrfs/block-group.h>
 #endif
 #include <linux/dcache.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index b7d5052e82f8a92540aa3da5859a3fa6fc9411c9..225eef45fe70d927bcba3a659b617b34be7427c7 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index 541478b3a2089ae3a3aeb2565f38b54c2f491076..a66241fee000298e6c21210951df48166f04216c 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/fs.h>
 #include <linux/dcache.h>
 #include <linux/version.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
 #include <../fs/ext3/ext3.h>
index 7b6f02e467efe9c04f96dea5faf85438b381a8e6..4f089f6f64fafa77ca219d81d03222258c2df111 100644 (file)
@@ -14,7 +14,7 @@
 #include <../fs/ext4/mballoc.h>
 #include <../fs/ext4/ext4_extents.h>
 #include <linux/dcache.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
@@ -22,7 +22,7 @@
  */
 #include <trace/events/ext4.h>
 
-#include <lttng-kernel-version.h>
+#include <lttng/kernel-version.h>
 #include <wrapper/tracepoint.h>
 
 /*
index 0b90c8645f752eb9462234f30051312529c5358d..e3c99efcc46787c7e5bac39d4aeac63f8db085fd 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index 2867d17308bf9145c5c395ebd24ff6bb12e9cade..7c99bf86390c309783f18de0dcecaa989a0c0b2f 100644 (file)
@@ -10,7 +10,7 @@
 
 #include <linux/module.h>
 #include <linux/moduleparam.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index 7f95fd61b10ed1f48021e3b12b4cda152b4a33d9..fec727661183a388c45c43b05cf7b6c49ff97609 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <linux/module.h>
 #include <linux/interrupt.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index 25b34e732602591a1e81b0ade525db6f344c150e..f6f893365b2f34757a01d82a48279fafaaeeeaa4 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index 4688279af0ff38b4eaf042abe22da6ad37fb2e5a..007cf1e147b560d5b6abeffae02fb1f85002cc73 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index 9573018fbbb8a103c10a5e2006e87db9db50dcc7..96340b04fdccaad092a6090b214b2bf2cefbb41c 100644 (file)
@@ -15,7 +15,7 @@
 #include <wrapper/page_alloc.h>
 #include <linux/module.h>
 #include <linux/mm.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index 03e9929f574f8a2295b727b596fb36cf21e2d6a2..b915d365d8eb798c7130b9e0886ba93273195741 100644 (file)
@@ -9,8 +9,8 @@
 
 #include <linux/module.h>
 #include <linux/kvm_host.h>
-#include <lttng-tracer.h>
-#include <lttng-kernel-version.h>
+#include <lttng/tracer.h>
+#include <lttng/kernel-version.h>
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0))
 #include <kvm/iodev.h>
index bb4ffcd6d147e79e750d2495831456b92c06a98f..30a6cc0cc35c93afdfa66cca2d2ad5b0fcb6a684 100644 (file)
@@ -9,8 +9,8 @@
 
 #include <linux/module.h>
 #include <linux/kvm_host.h>
-#include <lttng-tracer.h>
-#include <lttng-kernel-version.h>
+#include <lttng/tracer.h>
+#include <lttng/kernel-version.h>
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
 #include <kvm_emulate.h>
index 38603d80a2a056cff68a97db61f19127afc777a7..930446571b647fdbd8aaf08f0dead1ffead9691a 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <linux/module.h>
 #include <linux/kvm_host.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index 12e0194b6ed7ce0544eaa62db28b2fb84e9711f9..0890e591321e5fe988e2249eb29cc128b19c65b1 100644 (file)
@@ -10,7 +10,7 @@
 
 #include <linux/module.h>
 #include <linux/version.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index b422e0e85a2c0aff7426eea51b2827f9705f4e2c..c0ddf43eef159bec503f2c365eba826e6dd8c242 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index c0c208522b9240c25502618a2bf6aa7c14b64e95..35a8e10982c3c4053a0fe83726b2c67300b93eb8 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index c69bc1abcb810b3aff579b93c60a0d14d4fad3af..c6e7fc569e6df5d6c5551614a9c0d966a00a1139 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index 8d806b814f04798e58807305ebaa797b54f39829..b72d30084f8acc08ab0785fa181484e40b1119ad 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index 73ea22bd14a6906515c2e18f28961d42b76cb0e8..d47152f7a3b66d0a97d5c3cd2d31b77c203f59e5 100644 (file)
@@ -10,7 +10,7 @@
 
 #include <linux/module.h>
 #include <linux/uaccess.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index 3476bed82afb15972d3494c4e4920ec6feca26f6..db32ac60fbac41e4976728348ea1c3bf9dbd883a 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index 918b4c2023bb1c1537e6cdbd2dcd763ae9af74e6..6f7787a7517c00b2e953a1cdb3b0a61d575311d7 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index df7ddcbf2774dbcc87960fc37afd06cf134877c8..0d9f0f53e3535853d31382b93f3db5d276a67061 100644 (file)
@@ -10,7 +10,7 @@
 
 #include <linux/module.h>
 #include <linux/rcupdate.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index 24a03e037f008270a5ee47d5d2c6465267fa21cd..30aab4f3b33868dab1cc8435bb93485a0ef06ec9 100644 (file)
@@ -10,8 +10,8 @@
 
 #include <linux/module.h>
 #include <linux/device.h>
-#include <lttng-kernel-version.h>
-#include <lttng-tracer.h>
+#include <lttng/kernel-version.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index 51a1e04bdc0f3b4157e043c7fdef6716ca2b73ab..4a7b24b9b46602bdfcc406272cbbeb36d713c1c0 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index 00ccd91a29681c396b875fb6a80b374fdd3ea000..bb0b58a99ebc2e3262e714848914ef195963a77b 100644 (file)
@@ -10,7 +10,7 @@
 
 #include <linux/module.h>
 #include <linux/device.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index 577cb4088a9d8406d35029a3f7593f00eb362043..f369d810cbec24c9931445de90477d37de630f80 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index 89e4327385fc16d52a5b4d99b399472e5a5e007c..f220cfe849534b86d2d0cf665cf2d6c8ae0431c3 100644 (file)
@@ -10,7 +10,7 @@
 
 #include <linux/module.h>
 #include <scsi/scsi_device.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index fcbfca13a15044a5418e7fd1623a568022151483..3c270f90c4157d6838e08cb35814477eda2d1326 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index d8d88f268fc44481ede39186ae1ed965ebbb92a8..f471fd3e467c662c7c08b24452678b7f86926f6f 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index 1d3a49390e6f3b4f57ec4137cb9b4f99ada2335f..2f57d81312d686aa33eeae54b88c2f2c57a95a65 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index cade847111481cc5cb16659545349ed983e635af..ea07697fd9d662359e8687bd33b6efbc54f2691f 100644 (file)
@@ -15,8 +15,8 @@
 #include <linux/netdevice.h>
 #include <linux/inetdevice.h>
 #include <linux/sched.h>
-#include <lttng-events.h>
-#include <lttng-tracer.h>
+#include <lttng/events.h>
+#include <lttng/tracer.h>
 
 /*
  * Create LTTng tracepoint probes.
index bd911a9c533d9ddafc12fe9496281ccaa7f6c70f..3953d8c59b63a0cc52d29627fed2953a9272ab09 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index 60e5a0f2348559a262c6c52c81eb5820af8933fd..b5ef884b1a0fb7677dd69b945c911f9a3566b17c 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index a9fa382b7a74ab394b90204c34037eae415896e0..495c0afdf28a24ba299f8081238f91c7182b4abc 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index 783344771d6210ccc5c6c592844b0a0eef6b4f93..b5ebffabe9d672334d026e9429977502aac74174 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/videodev2.h>
 #include <media/videobuf2-core.h>
 #include <media/v4l2-common.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
  * trace event macros match the kernel we run on.
index 2cafb965731861412dba432a38427fd7c4ee6342..eb41c545eea63c4ce2e108a48bf01c120707735a 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
@@ -17,7 +17,7 @@
  */
 #include <trace/events/vmscan.h>
 
-#include <lttng-kernel-version.h>
+#include <lttng/kernel-version.h>
 
 /*
  * Create LTTng tracepoint probes.
index 6a365300559153611068955377a99b64b17a15cc..dd5308ea036573eaa695d4b5d81f45506632abc0 100644 (file)
@@ -10,7 +10,7 @@
 
 #include <linux/module.h>
 #include <linux/idr.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 struct cpu_workqueue_struct;
 struct pool_workqueue;
index 38d1341c5efe2e20a399ea80a4fbea418d520137..5db92f6e31a581023ca3dd2999832f6102fb4a72 100644 (file)
@@ -11,7 +11,7 @@
 #include <linux/module.h>
 #include <linux/device.h>
 #include <linux/mm.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
@@ -19,7 +19,7 @@
  */
 #include <trace/events/writeback.h>
 
-#include <lttng-kernel-version.h>
+#include <lttng/kernel-version.h>
 #include <wrapper/writeback.h>
 
 /* #if <check version number if global_dirty_limit will be exported> */
index 5428798f5205df32aa29c354113037fc417d8fdb..b7ded80277111ffb0d8d8c931cc4b0285b6ed89d 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index 3c760c1c2bc9905a0f932844d8ee3bad0977a493..5a3da8684d751a23b24827f3153da549a927b45a 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <linux/module.h>
-#include <lttng-tracer.h>
+#include <lttng/tracer.h>
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index c29e18144d181381ec05ffd11a3547f9f0880e8a..c0f6e7c31c2a81c749735de4094637a75294b757 100644 (file)
@@ -15,8 +15,8 @@
 #include <linux/namei.h>
 #include <linux/slab.h>
 #include <linux/uaccess.h>
-#include <lttng-events.h>
-#include <lttng-tracer.h>
+#include <lttng/events.h>
+#include <lttng/tracer.h>
 #include <wrapper/irqflags.h>
 #include <ringbuffer/frontend_types.h>
 #include <wrapper/uprobes.h>
index e571ceea6795433324d35c6f18fa00846b98439e..0d3182ffb4f947a1208b38781c229a035d84076d 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/mm.h>
 #include <linux/miscdevice.h>
 #include <wrapper/vmalloc.h>
-#include <lttng-events.h>
+#include <lttng/events.h>
 
 #define TP_MODULE_NOAUTOLOAD
 #define LTTNG_PACKAGE_BUILD
index f0ae221161fb4df32a6a078b0f6d3ee749658fab..6c4213bdc01a783a171cb5a1ca3a257e66aeeb76 100644 (file)
@@ -10,8 +10,8 @@
 #include <linux/hrtimer.h>
 #include <linux/time.h>
 
-#include <lttng-tracer.h>
-#include <lttng-clock.h>       /* From lttng-modules */
+#include <lttng/tracer.h>
+#include <lttng/clock.h>       /* From lttng-modules */
 
 static u64 trace_clock_read64_example(void)
 {
index 79743b80b2a6c9d35eac437769412c401d30aa09..ea27389372c9584ae7d50054ae7b29944e41d6a6 100644 (file)
@@ -13,8 +13,8 @@
 #include <linux/byteorder/generic.h>
 #include <asm/byteorder.h>
 
-#include <lttng-events.h>
-#include <lttng-tracer.h>
+#include <lttng/events.h>
+#include <lttng/tracer.h>
 #include <wrapper/tracepoint.h>
 
 #define TP_MODULE_NOAUTOLOAD
index 365b6e1111016517533a4e08f69c458691273a90..397624b564c2617d8fd1d19818a1d32a4b28a7d0 100644 (file)
@@ -9,7 +9,7 @@
  * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#include <lttng-kernel-version.h>
+#include <lttng/kernel-version.h>
 
 #if (defined(CONFIG_KALLSYMS) \
        && (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)))
index e4bc403577e800363355e2493ba22d17a0c0b136..12b58be782fd65786a9d406175b262d10aa7348f 100644 (file)
@@ -11,7 +11,7 @@
 #include <linux/mm.h>
 #include <linux/oom.h>
 
-#include <lttng-kernel-version.h>
+#include <lttng/kernel-version.h>
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0) \
                || LTTNG_UBUNTU_KERNEL_RANGE(4,4,25,44, 4,5,0,0))
index 512e09f98ec0ee1308e1a75b54c6bf32df1e076c..93504c993883244cb692ab192abef040148737d6 100644 (file)
@@ -9,7 +9,7 @@
  * Copyright (C) 2015 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#include <lttng-kernel-version.h>
+#include <lttng/kernel-version.h>
 
 #if (defined(CONFIG_KALLSYMS) \
        && (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,2)        \
index af9c053687aa4509f97c9ba45c9c9d69a941900f..7669125ae4fef03c9868b7c9cc03b383aab71b24 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef _LTTNG_WRAPPER_PAGE_ALLOC_H
 #define _LTTNG_WRAPPER_PAGE_ALLOC_H
 
-#include <lttng-kernel-version.h>
+#include <lttng/kernel-version.h>
 
 /*
  * We need to redefine get_pfnblock_flags_mask to our wrapper, because
index 073a09a24957601320fe71aafbe08140b10874e2..d438e1bad960403bdf4597e1b1c4317bc9fccf29 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef _LTTNG_WRAPPER_RANDOM_H
 #define _LTTNG_WRAPPER_RANDOM_H
 
-#include <lttng-clock.h>
+#include <lttng/clock.h>
 
 #define BOOT_ID_LEN    LTTNG_MODULES_UUID_STR_LEN
 
index 96fdf1d03ffff0aa09a2efea02bb45ae7cec24d7..33e3aaa53b9bb08fdd5857f16819e6775085e0ed 100644 (file)
@@ -9,7 +9,7 @@
  * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#include <lttng-kernel-version.h>
+#include <lttng/kernel-version.h>
 
 #if (defined(CONFIG_KALLSYMS) \
        && (LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)))
index 671562b40b39246da333d15b55a32cfa7051f936..cecd800d18c8719f498592735498c110d83b9e03 100644 (file)
@@ -11,7 +11,7 @@
 #define _LTTNG_WRAPPER_SYSCALL_H
 
 #include <asm/syscall.h>
-#include <lttng-kernel-version.h>
+#include <lttng/kernel-version.h>
 
 #define LTTNG_SYSCALL_NR_ARGS 6
 
index 02f60dceb532df3a9f2b0fa1b1a9a8d810c80698..76c8a572bf9fddb597e1e45adbd6d342daa5a00a 100644 (file)
@@ -12,7 +12,7 @@
 
 #include <linux/version.h>
 #include <linux/timer.h>
-#include <lttng-kernel-version.h>
+#include <lttng/kernel-version.h>
 
 /*
  * In the olden days, pinned timers were initialized normaly with init_timer()
index a08c6a8b65345d20918ca604eec29bdfe767760a..7cef08df3176f60d8a27bfd779384452c75e5da3 100644 (file)
@@ -22,8 +22,8 @@
 #include <linux/percpu.h>
 #include <linux/version.h>
 #include <asm/local.h>
-#include <lttng-kernel-version.h>
-#include <lttng-clock.h>
+#include <lttng/kernel-version.h>
+#include <lttng/clock.h>
 #include <wrapper/compiler.h>
 #include <wrapper/percpu-defs.h>
 #include <wrapper/random.h>
index 7b3190600f560fb40f8debfb3cb93284c73249ea..880638b9d9f2ceb742b6618c4c07ed2d1e60d54e 100644 (file)
@@ -23,7 +23,7 @@
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
 
-#include <lttng-tracepoint.h>
+#include <lttng/tracepoint.h>
 
 #define lttng_wrapper_tracepoint_probe_register lttng_tracepoint_probe_register
 #define lttng_wrapper_tracepoint_probe_unregister lttng_tracepoint_probe_unregister
index 7abe5e5038de7ce2a344fcfcee838425ecbce4f0..ffbc46a15a1405772e20663665bfd60253d44a57 100644 (file)
@@ -11,7 +11,7 @@
 #define _LTTNG_WRAPPER_UACCESS_H
 
 #include <linux/uaccess.h>
-#include <lttng-kernel-version.h>
+#include <lttng/kernel-version.h>
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) || \
        LTTNG_RHEL_KERNEL_RANGE(4,18,0,147,0,0, 4,19,0,0,0,0))
index c37bd8be8475e626b914d5b2bba642e0dfc80794..e5f36c258534a211ba76d8b3a316c2dc4bdb3ce1 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef _LTTNG_WRAPPER_WRITEBACK_H
 #define _LTTNG_WRAPPER_WRITEBACK_H
 
-#include <lttng-kernel-version.h>
+#include <lttng/kernel-version.h>
 
 #ifdef CONFIG_KALLSYMS_ALL
 #include <linux/kallsyms.h>
This page took 0.127049 seconds and 4 git commands to generate.