Namespace kernel version macros
authorMichael Jeanson <mjeanson@efficios.com>
Fri, 5 Feb 2021 19:31:51 +0000 (14:31 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 8 Feb 2021 19:10:27 +0000 (14:10 -0500)
This patch replaces all uses of the LINUX_VERSION_CODE and
KERNEL_VERSION macros by an 'LTTNG_' prefixed version, this will allow
us to override them.

Change-Id: If8fab7fe341dd35e2211d30427519a48dfb708f9
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
102 files changed:
include/instrumentation/events/9p.h
include/instrumentation/events/arch/x86/exceptions.h
include/instrumentation/events/arch/x86/irq_vectors.h
include/instrumentation/events/arch/x86/kvm/mmutrace.h
include/instrumentation/events/arch/x86/kvm/trace.h
include/instrumentation/events/asoc.h
include/instrumentation/events/block.h
include/instrumentation/events/btrfs.h
include/instrumentation/events/compaction.h
include/instrumentation/events/ext3.h
include/instrumentation/events/ext4.h
include/instrumentation/events/jbd.h
include/instrumentation/events/jbd2.h
include/instrumentation/events/kmem.h
include/instrumentation/events/kvm.h
include/instrumentation/events/lttng-statedump.h
include/instrumentation/events/lttng-test.h
include/instrumentation/events/mm_vmscan.h
include/instrumentation/events/module.h
include/instrumentation/events/napi.h
include/instrumentation/events/net.h
include/instrumentation/events/power.h
include/instrumentation/events/preemptirq.h
include/instrumentation/events/printk.h
include/instrumentation/events/random.h
include/instrumentation/events/rcu.h
include/instrumentation/events/regmap.h
include/instrumentation/events/rpc.h
include/instrumentation/events/sched.h
include/instrumentation/events/scsi.h
include/instrumentation/events/signal.h
include/instrumentation/events/skb.h
include/instrumentation/events/sock.h
include/instrumentation/events/timer.h
include/instrumentation/events/v4l2.h
include/instrumentation/events/workqueue.h
include/instrumentation/events/writeback.h
include/instrumentation/syscalls/headers/syscalls_integers_override.h
include/instrumentation/syscalls/headers/syscalls_pointers_override.h
include/lttng/cpuhotplug.h
include/lttng/events.h
include/lttng/kernel-version.h
include/ringbuffer/backend_types.h
include/ringbuffer/frontend_types.h
include/wrapper/atomic.h
include/wrapper/barrier.h
include/wrapper/compiler.h
include/wrapper/fdtable.h
include/wrapper/file.h
include/wrapper/fs.h
include/wrapper/irq.h
include/wrapper/irqflags.h
include/wrapper/kallsyms.h
include/wrapper/kprobes.h
include/wrapper/kref.h
include/wrapper/mm.h
include/wrapper/namespace.h
include/wrapper/objtool.h
include/wrapper/page_alloc.h
include/wrapper/percpu-defs.h
include/wrapper/perf.h
include/wrapper/rcu.h
include/wrapper/syscall.h
include/wrapper/time.h
include/wrapper/timer.h
include/wrapper/trace-clock.h
include/wrapper/tracepoint.h
include/wrapper/uaccess.h
include/wrapper/uprobes.h
include/wrapper/user_namespace.h
include/wrapper/uuid.h
include/wrapper/vmalloc.h
include/wrapper/writeback.h
src/lib/ringbuffer/ring_buffer_backend.c
src/lib/ringbuffer/ring_buffer_frontend.c
src/lib/ringbuffer/ring_buffer_iterator.c
src/lib/ringbuffer/ring_buffer_mmap.c
src/lib/ringbuffer/ring_buffer_splice.c
src/lttng-abi.c
src/lttng-context-cgroup-ns.c
src/lttng-context-ipc-ns.c
src/lttng-context-mnt-ns.c
src/lttng-context-net-ns.c
src/lttng-context-perf-counters.c
src/lttng-context-pid-ns.c
src/lttng-context-user-ns.c
src/lttng-context-uts-ns.c
src/lttng-events.c
src/lttng-statedump-impl.c
src/lttng-syscalls.c
src/probes/lttng-probe-btrfs.c
src/probes/lttng-probe-ext3.c
src/probes/lttng-probe-kvm-x86-mmu.c
src/probes/lttng-probe-kvm-x86.c
src/probes/lttng-probe-lock.c
src/probes/lttng.c
src/wrapper/fdtable.c
src/wrapper/irqdesc.c
src/wrapper/kallsyms.c
src/wrapper/page_alloc.c
src/wrapper/splice.c
tests/probes/lttng-test.c

index 0123bbfc9b564ed23ca3f224a2ebeb3e40800fec..209943bc2f102a2f3747141b0e31fa6feaa35c8b 100644 (file)
@@ -6,9 +6,9 @@
 #define LTTNG_TRACE_9P_H
 
 #include <lttng/tracepoint-event.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
 LTTNG_TRACEPOINT_EVENT(9p_client_req,
 
        TP_PROTO(struct p9_client *clnt, int8_t type, int tag),
index 3c124638ec7c45847472ccc050b08c3f2d5eef00..53c554f44b54c859b51a9905cf985fa2daae0588 100644 (file)
@@ -3,11 +3,11 @@
 #define LTTNG_TRACE_EXCEPTIONS_H
 
 #include <lttng/tracepoint-event.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0))
 #include <../arch/x86/include/asm/traps.h>
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0)) */
 
 /* Only define this enum once. */
 
@@ -20,14 +20,14 @@ enum {
        X86_PF_USER =   1 << 2,
        X86_PF_RSVD =   1 << 3,
        X86_PF_INSTR =  1 << 4,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,6,0))
        X86_PF_PK =     1 << 5,
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)) */
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,6,0)) */
 };
 
 #endif /* ONCE_LTTNG_EXCEPTIONS_H */
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0)) */
 
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM x86_exceptions
@@ -39,9 +39,9 @@ LTTNG_TRACEPOINT_ENUM(lttng_x86_pf_error_code,
                ctf_enum_value("USER_MODE",             X86_PF_USER)
                ctf_enum_value("RESERVED_BIT",          X86_PF_RSVD)
                ctf_enum_value("INSTRUCTION_FETCH",     X86_PF_INSTR)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,6,0))
                ctf_enum_value("PROTECTION_KEYS_BLOCK", X86_PF_PK)
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)) */
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,6,0)) */
        )
 )
 
index dc0e002b5ab61b3d0d9b3470e6813365917eae73..7bc5cbe9da3f3cf7412eb8ba01218c125d0e7dd2 100644 (file)
@@ -3,7 +3,7 @@
 #define LTTNG_TRACE_IRQ_VECTORS_H
 
 #include <lttng/tracepoint-event.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM x86_irq_vectors
index f585d027972c241f3a0921bdffc437a17e5ce6e0..b2c0ff4fa37407418f209e9def504b7c79b511ca 100644 (file)
@@ -3,18 +3,18 @@
 #define LTTNG_TRACE_KVM_MMU_H
 
 #include <lttng/tracepoint-event.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0))
 #include <linux/trace_events.h>
-#else /* if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)) */
+#else /* if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0)) */
 #include <linux/ftrace_event.h>
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0)) */
 
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM kvm_mmu
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,1,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,1,0) || \
        LTTNG_RHEL_KERNEL_RANGE(4,18,0,147,0,0, 4,19,0,0,0,0))
 
 #define LTTNG_KVM_MMU_PAGE_FIELDS \
@@ -23,7 +23,7 @@
        ctf_integer(__u32, root_count, (sp)->root_count) \
        ctf_integer(bool, unsync, (sp)->unsync)
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,11,0))
 
 #define LTTNG_KVM_MMU_PAGE_FIELDS \
        ctf_integer(unsigned long, mmu_valid_gen, (sp)->mmu_valid_gen) \
@@ -32,7 +32,7 @@
        ctf_integer(__u32, root_count, (sp)->root_count) \
        ctf_integer(bool, unsync, (sp)->unsync)
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,11,0)) */
 
 #define LTTNG_KVM_MMU_PAGE_FIELDS \
        ctf_integer(__u64, gfn, (sp)->gfn) \
@@ -40,9 +40,9 @@
        ctf_integer(__u32, root_count, (sp)->root_count) \
        ctf_integer(bool, unsync, (sp)->unsync)
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,11,0)) */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,6,0))
 /*
  * A pagetable walk has started
  */
@@ -56,7 +56,7 @@ LTTNG_TRACEPOINT_EVENT(
                ctf_integer(__u32, pferr, pferr)
        )
 )
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,6,0)) */
 /*
  * A pagetable walk has started
  */
@@ -72,7 +72,7 @@ LTTNG_TRACEPOINT_EVENT(
                        | (!!fetch_fault << 4))
        )
 )
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,6,0)) */
 
 /* We just walked a paging element */
 LTTNG_TRACEPOINT_EVENT(
@@ -163,7 +163,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(kvm_mmu_page_class, kvm_mmu_prepare_zap_page,
        TP_ARGS(sp)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0))
 
 LTTNG_TRACEPOINT_EVENT_MAP(
        mark_mmio_spte,
@@ -181,7 +181,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(
        )
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,11,0))
 
 LTTNG_TRACEPOINT_EVENT_MAP(
        mark_mmio_spte,
@@ -199,7 +199,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(
        )
 )
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,11,0)) */
 
 LTTNG_TRACEPOINT_EVENT_MAP(
        mark_mmio_spte,
@@ -216,7 +216,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(
        )
 )
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,11,0)) */
 
 LTTNG_TRACEPOINT_EVENT_MAP(
        handle_mmio_page_fault,
@@ -233,7 +233,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0))
 LTTNG_TRACEPOINT_EVENT_MAP(
        fast_page_fault,
 
@@ -253,7 +253,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(
                ctf_integer(int, ret, ret)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) || \
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0) || \
        LTTNG_KERNEL_RANGE(4,19,103, 4,20,0) || \
        LTTNG_KERNEL_RANGE(5,4,19, 5,5,0) || \
        LTTNG_KERNEL_RANGE(5,5,3, 5,6,0) || \
index 24dd4c5215bacc95c7f4db95bc902690548b37ef..af6e579488ccb27ac739601676d5553d803df48c 100644 (file)
@@ -5,10 +5,10 @@
 #include <lttng/tracepoint-event.h>
 #include <asm/vmx.h>
 #include <asm/svm.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
 #include <asm/clocksource.h>
 #endif
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 #include <../arch/x86/kvm/lapic.h>
 #include <../arch/x86/kvm/kvm_cache_regs.h>
 
@@ -115,7 +115,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(kvm_apic, kvm_x86_apic,
 /*
  * Tracepoint for kvm guest exit:
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0))
 LTTNG_TRACEPOINT_EVENT_CODE_MAP(kvm_exit, kvm_x86_exit,
        TP_PROTO(unsigned int exit_reason, struct kvm_vcpu *vcpu, u32 isa),
        TP_ARGS(exit_reason, vcpu, isa),
@@ -145,7 +145,7 @@ LTTNG_TRACEPOINT_EVENT_CODE_MAP(kvm_exit, kvm_x86_exit,
 
        TP_code_post()
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,7,0))
 LTTNG_TRACEPOINT_EVENT_CODE_MAP(kvm_exit, kvm_x86_exit,
        TP_PROTO(unsigned int exit_reason, struct kvm_vcpu *vcpu, u32 isa),
        TP_ARGS(exit_reason, vcpu, isa),
@@ -480,21 +480,21 @@ LTTNG_TRACEPOINT_EVENT_MAP(kvm_emulate_insn, kvm_x86_emulate_insn,
        TP_ARGS(vcpu, failed),
 
        TP_FIELDS(
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,1,0))
                ctf_integer(__u64, rip, vcpu->arch.emulate_ctxt.decode.fetch.start)
                ctf_integer(__u32, csbase, kvm_x86_ops->get_segment_base(vcpu, VCPU_SREG_CS))
                ctf_integer(__u8, len, vcpu->arch.emulate_ctxt.decode.eip
                                - vcpu->arch.emulate_ctxt.decode.fetch.start)
                ctf_array(__u8, insn, vcpu->arch.emulate_ctxt.decode.fetch.data, 15)
                ctf_integer(__u8, flags, kei_decode_mode(vcpu->arch.emulate_ctxt.mode))
-#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0))
+#elif (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,17,0))
                ctf_integer(__u64, rip, vcpu->arch.emulate_ctxt.fetch.start)
                ctf_integer(__u32, csbase, kvm_x86_ops->get_segment_base(vcpu, VCPU_SREG_CS))
                ctf_integer(__u8, len, vcpu->arch.emulate_ctxt._eip
                                - vcpu->arch.emulate_ctxt.fetch.start)
                ctf_array(__u8, insn, vcpu->arch.emulate_ctxt.fetch.data, 15)
                ctf_integer(__u8, flags, kei_decode_mode(vcpu->arch.emulate_ctxt.mode))
-#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5,7,0))
+#elif (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(5,7,0))
                ctf_integer(__u64, rip, vcpu->arch.emulate_ctxt._eip -
                                (vcpu->arch.emulate_ctxt.fetch.ptr -
                                        vcpu->arch.emulate_ctxt.fetch.data))
@@ -533,7 +533,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,11,0))
 LTTNG_TRACEPOINT_EVENT_MAP(kvm_write_tsc_offset, kvm_x86_write_tsc_offset,
        TP_PROTO(unsigned int vcpu_id, __u64 previous_tsc_offset,
                 __u64 next_tsc_offset),
@@ -547,7 +547,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(kvm_write_tsc_offset, kvm_x86_write_tsc_offset,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
 #ifdef CONFIG_X86_64
 
 LTTNG_TRACEPOINT_EVENT_MAP(kvm_update_master_clock, kvm_x86_update_master_clock,
@@ -578,7 +578,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(kvm_track_tsc, kvm_x86_track_tsc,
 )
 
 #endif /* CONFIG_X86_64 */
-#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0) */
+#endif /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0) */
 
 #endif /* LTTNG_TRACE_KVM_H */
 
index 7d86af876058a34908f77878698f5d610ab46d3c..63d849dccf6538d9344cb36d13dab44a7bb9cef5 100644 (file)
@@ -7,28 +7,28 @@
 
 #include <lttng/tracepoint-event.h>
 #include <linux/ktime.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 #define DAPM_DIRECT "(direct)"
 
 #ifndef _TRACE_ASOC_DEF
 #define _TRACE_ASOC_DEF
 struct snd_soc_jack;
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,19,0))
 struct snd_soc_codec;
 #endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0) && \
-       LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,1,0) && \
+       LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,16,0))
 struct snd_soc_platform;
 #endif
 struct snd_soc_card;
 struct snd_soc_dapm_widget;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,5,0))
 struct snd_soc_dapm_path;
 #endif
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,16,0) \
        || LTTNG_RHEL_KERNEL_RANGE(3,10,0,514,0,0, 3,11,0,0,0,0))
 #define CODEC_NAME_FIELD component.name
 #define CODEC_ID_FIELD component.id
@@ -37,7 +37,7 @@ struct snd_soc_dapm_path;
 #define CODEC_ID_FIELD id
 #endif
 
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,16,0))
 /*
  * Log register events
  */
@@ -79,8 +79,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_reg, snd_soc_reg_read,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0) && \
-       LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,1,0) && \
+       LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,16,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_preg,
 
        TP_PROTO(struct snd_soc_platform *platform, unsigned int reg,
@@ -224,7 +224,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_widget, snd_soc_dapm_widge
 
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,2,0))
 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_walk_done,
 
        asoc_snd_soc_dapm_walk_done,
@@ -242,7 +242,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_walk_done,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0))
 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_path,
 
        asoc_snd_soc_dapm_path,
@@ -262,7 +262,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_path,
                ctf_integer(int, path_dir, dir)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,5,0))
 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_output_path,
 
        asoc_snd_soc_dapm_output_path,
@@ -300,7 +300,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_input_path,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,5,0))
 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_connected,
 
        asoc_snd_soc_dapm_connected,
@@ -329,7 +329,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_irq,
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,5,0))
 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_report,
 
        asoc_snd_soc_jack_report,
@@ -389,7 +389,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_notify,
 )
 #endif
 
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,19,0))
 LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_cache_sync,
 
        asoc_snd_soc_cache_sync,
index e782c33b4c36d582ea0c84427557141b7d292896..087c0177707475dcd3192225157f04a84a3192c7 100644 (file)
@@ -9,11 +9,11 @@
 #include <linux/blktrace_api.h>
 #include <linux/blkdev.h>
 #include <linux/trace_seq.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
 #include <scsi/scsi_request.h>
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
+#endif /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */
 
 #ifndef _TRACE_BLOCK_DEF_
 #define _TRACE_BLOCK_DEF_
@@ -50,7 +50,7 @@ LTTNG_TRACEPOINT_ENUM(block_rq_type,
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
@@ -78,7 +78,7 @@ LTTNG_TRACEPOINT_ENUM(block_rq_type,
                        | ((rw) & REQ_PREFLUSH ? RWBS_FLAG_PREFLUSH : 0)      \
                        | ((rw) & REQ_FUA ? RWBS_FLAG_FUA : 0))
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,1,0))
 
 #define lttng_req_op(rq)
 #define lttng_req_rw(rq)       ((rq)->cmd_flags)
@@ -116,7 +116,7 @@ LTTNG_TRACEPOINT_ENUM(block_rq_type,
 
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(block_buffer,
 
        TP_PROTO(struct buffer_head *bh),
@@ -157,9 +157,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(block_buffer, block_dirty_buffer,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
 /* block_rq_with_error event class removed in kernel 4.12 */
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
 LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq_with_error,
 
        TP_PROTO(struct request_queue *q, struct request *rq),
@@ -202,7 +202,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq_with_error,
 
        TP_code_post()
 )
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */
 LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq_with_error,
 
        TP_PROTO(struct request_queue *q, struct request *rq),
@@ -245,9 +245,9 @@ LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq_with_error,
 
        TP_code_post()
 )
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */
 
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,12,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(4,12,0))
 /**
  * block_rq_abort - abort block operation request
  * @q: queue containing the block operation request
@@ -266,7 +266,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq_with_error, block_rq_abort,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
 /**
  * block_rq_requeue - place block IO request back on a queue
  * @rq: block IO operation request
@@ -290,7 +290,7 @@ LTTNG_TRACEPOINT_EVENT(block_rq_requeue,
                        lttng_req_op(rq), lttng_req_rw(rq), blk_rq_bytes(rq))
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
 /**
  * block_rq_requeue - place block IO request back on a queue
  * @q: queue holding operation
@@ -336,7 +336,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq_with_error, block_rq_requeue,
  * do for the request. If @rq->bio is non-NULL then there is
  * additional work required to complete the request.
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
 LTTNG_TRACEPOINT_EVENT(block_rq_complete,
 
        TP_PROTO(struct request *rq, int error, unsigned int nr_bytes),
@@ -353,7 +353,7 @@ LTTNG_TRACEPOINT_EVENT(block_rq_complete,
                        lttng_req_op(rq), lttng_req_rw(rq), nr_bytes)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
 LTTNG_TRACEPOINT_EVENT_CODE(block_rq_complete,
 
        TP_PROTO(struct request_queue *q, struct request *rq,
@@ -391,7 +391,7 @@ LTTNG_TRACEPOINT_EVENT_CODE(block_rq_complete,
 
        TP_code_post()
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,5)    \
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,5)        \
        || LTTNG_KERNEL_RANGE(3,12,21, 3,13,0)          \
        || LTTNG_KERNEL_RANGE(3,10,41, 3,11,0)          \
        || LTTNG_KERNEL_RANGE(3,4,91, 3,5,0)            \
@@ -436,7 +436,7 @@ LTTNG_TRACEPOINT_EVENT_CODE(block_rq_complete,
        TP_code_post()
 )
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,15,0)) */
 
 /**
  * block_rq_complete - block IO operation completed by device driver
@@ -456,9 +456,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq_with_error, block_rq_complete,
        TP_ARGS(q, rq)
 )
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,15,0)) */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(block_rq,
 
        TP_PROTO(struct request *rq),
@@ -477,7 +477,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(block_rq,
                ctf_array_text(char, comm, current->comm, TASK_COMM_LEN)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(block_rq,
 
        TP_PROTO(struct request_queue *q, struct request *rq),
@@ -496,7 +496,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(block_rq,
                ctf_array_text(char, comm, current->comm, TASK_COMM_LEN)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
 LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq,
 
        TP_PROTO(struct request_queue *q, struct request *rq),
@@ -544,7 +544,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq,
 
        TP_code_post()
 )
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */
 LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq,
 
        TP_PROTO(struct request_queue *q, struct request *rq),
@@ -591,9 +591,9 @@ LTTNG_TRACEPOINT_EVENT_CLASS_CODE(block_rq,
 
        TP_code_post()
 )
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
 /**
  * block_rq_insert - insert block operation request into queue
  * @rq: block IO operation request
@@ -628,7 +628,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq, block_rq_insert,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
 /**
  * block_rq_issue - issue pending block IO request operation to device driver
  * @rq: block IO operation operation request
@@ -659,7 +659,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq, block_rq_issue,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
 /**
  * block_rq_merge - merge request with another one in the elevator
  * @rq: block IO operation operation request
@@ -673,7 +673,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq, block_rq_merge,
 
        TP_ARGS(rq)
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,9,0))
 /**
  * block_rq_merge - merge request with another one in the elevator
  * @q: queue holding operation
@@ -690,7 +690,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(block_rq, block_rq_merge,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,8,0))
 /**
  * block_bio_complete - completed all work on the block operation
  * @q: queue holding the block operation
@@ -716,7 +716,7 @@ LTTNG_TRACEPOINT_EVENT(block_bio_complete,
                        bio->bi_iter.bi_size)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
 /**
  * block_bio_complete - completed all work on the block operation
  * @q: queue holding the block operation
@@ -742,7 +742,7 @@ LTTNG_TRACEPOINT_EVENT(block_bio_complete,
                        bio->bi_iter.bi_size)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
 /**
  * block_bio_complete - completed all work on the block operation
  * @q: queue holding the block operation
@@ -795,7 +795,7 @@ LTTNG_TRACEPOINT_EVENT(block_bio_complete,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(block_bio,
 
        TP_PROTO(struct bio *bio),
@@ -813,7 +813,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(block_bio,
                ctf_array_text(char, comm, current->comm, TASK_COMM_LEN)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(block_bio_merge,
 
        TP_PROTO(struct request_queue *q, struct request *rq, struct bio *bio),
@@ -831,7 +831,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(block_bio_merge,
                ctf_array_text(char, comm, current->comm, TASK_COMM_LEN)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(block_bio_merge,
 
        TP_PROTO(struct request_queue *q, struct request *rq, struct bio *bio),
@@ -849,7 +849,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(block_bio_merge,
                ctf_array_text(char, comm, current->comm, TASK_COMM_LEN)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(block_bio_merge,
 
        TP_PROTO(struct request_queue *q, struct request *rq, struct bio *bio),
@@ -870,7 +870,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(block_bio_merge,
 
 
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
 /**
  * block_bio_bounce - used bounce buffer when processing block operation
  * @bio: block operation
@@ -887,7 +887,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio, block_bio_bounce,
 
        TP_ARGS(bio)
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
 /**
  * block_bio_bounce - used bounce buffer when processing block operation
  * @q: queue holding the block operation
@@ -916,7 +916,7 @@ LTTNG_TRACEPOINT_EVENT(block_bio_bounce,
                ctf_array_text(char, comm, current->comm, TASK_COMM_LEN)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
 LTTNG_TRACEPOINT_EVENT(block_bio_bounce,
 
        TP_PROTO(struct request_queue *q, struct bio *bio),
@@ -955,7 +955,7 @@ LTTNG_TRACEPOINT_EVENT(block_bio_bounce,
 #endif
 
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
 /**
  * block_bio_backmerge - merging block operation to the end of an existing operation
  * @bio: new block operation to merge
@@ -994,7 +994,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio, block_bio_queue,
 
        TP_ARGS(bio)
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0))
 /**
  * block_bio_backmerge - merging block operation to the end of an existing operation
  * @q: queue holding operation
@@ -1041,28 +1041,28 @@ LTTNG_TRACEPOINT_EVENT(block_bio_queue,
        TP_ARGS(q, bio),
 
        TP_FIELDS(
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
                ctf_integer(dev_t, dev, bio_dev(bio))
 #else
                ctf_integer(dev_t, dev, bio->bi_bdev->bd_dev)
 #endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
                ctf_integer(sector_t, sector, bio->bi_iter.bi_sector)
                ctf_integer(unsigned int, nr_sector, bio_sectors(bio))
                blk_rwbs_ctf_integer(unsigned int, rwbs,
                        lttng_bio_op(bio), lttng_bio_rw(bio),
                        bio->bi_iter.bi_size)
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0)) */
                ctf_integer(sector_t, sector, bio->bi_sector)
                ctf_integer(unsigned int, nr_sector, bio->bi_size >> 9)
                blk_rwbs_ctf_integer(unsigned int, rwbs,
                        lttng_bio_op(bio), lttng_bio_rw(bio), bio->bi_size)
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0)) */
                ctf_integer(pid_t, tid, current->pid)
                ctf_array_text(char, comm, current->comm, TASK_COMM_LEN)
        )
 )
-#else /* if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) */
+#else /* if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0)) */
 LTTNG_TRACEPOINT_EVENT_CLASS(block_bio,
 
        TP_PROTO(struct request_queue *q, struct bio *bio),
@@ -1123,9 +1123,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(block_bio, block_bio_queue,
 
        TP_ARGS(q, bio)
 )
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0)) */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
 /**
  * block_getrq - get a free request entry in queue for block IO operations
  * @bio: pending block IO operation (can be %NULL)
@@ -1146,12 +1146,12 @@ LTTNG_TRACEPOINT_EVENT_CLASS(block_get_rq,
        TP_ARGS(q, bio, rw),
 
        TP_FIELDS(
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
                ctf_integer(dev_t, dev, bio ? bio_dev(bio) : 0)
 #else
                ctf_integer(dev_t, dev, bio ? bio->bi_bdev->bd_dev : 0)
 #endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
                ctf_integer(sector_t, sector, bio ? bio->bi_iter.bi_sector : 0)
                ctf_integer(unsigned int, nr_sector,
                        bio ? bio_sectors(bio) : 0)
@@ -1159,7 +1159,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(block_get_rq,
                        bio ? lttng_bio_op(bio) : 0,
                        bio ? lttng_bio_rw(bio) : 0,
                        bio ? bio->bi_iter.bi_size : 0)
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0)) */
                ctf_integer(sector_t, sector, bio ? bio->bi_sector : 0)
                ctf_integer(unsigned int, nr_sector,
                        bio ? bio->bi_size >> 9 : 0)
@@ -1167,7 +1167,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(block_get_rq,
                        bio ? lttng_bio_op(bio) : 0,
                        bio ? lttng_bio_rw(bio) : 0,
                        bio ? bio->bi_size : 0)
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0)) */
                ctf_integer(pid_t, tid, current->pid)
                ctf_array_text(char, comm, current->comm, TASK_COMM_LEN)
         )
@@ -1257,7 +1257,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(block_unplug, block_unplug,
        TP_ARGS(q, depth, explicit)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
 /**
  * block_split - split a single bio struct into two bio structs
  * @bio: block operation being split
@@ -1286,7 +1286,7 @@ LTTNG_TRACEPOINT_EVENT(block_split,
        )
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
 /**
  * block_split - split a single bio struct into two bio structs
  * @q: queue containing the bio
@@ -1316,7 +1316,7 @@ LTTNG_TRACEPOINT_EVENT(block_split,
                ctf_array_text(char, comm, current->comm, TASK_COMM_LEN)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
 LTTNG_TRACEPOINT_EVENT(block_split,
 
        TP_PROTO(struct request_queue *q, struct bio *bio,
@@ -1355,7 +1355,7 @@ LTTNG_TRACEPOINT_EVENT(block_split,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
 /**
  * block_bio_remap - map request for a logical device to the raw device
  * @bio: revised operation
@@ -1382,7 +1382,7 @@ LTTNG_TRACEPOINT_EVENT(block_bio_remap,
                ctf_integer(sector_t, old_sector, from)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
 /**
  * block_bio_remap - map request for a logical device to the raw device
  * @q: queue holding the operation
@@ -1411,7 +1411,7 @@ LTTNG_TRACEPOINT_EVENT(block_bio_remap,
                ctf_integer(sector_t, old_sector, from)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
 LTTNG_TRACEPOINT_EVENT(block_bio_remap,
 
        TP_PROTO(struct request_queue *q, struct bio *bio, dev_t dev,
@@ -1450,7 +1450,7 @@ LTTNG_TRACEPOINT_EVENT(block_bio_remap,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
 /**
  * block_rq_remap - map request for a block operation request
  * @rq: block IO operation request
index 8a5d9c572e9219c7971f85632aedd9ffeb50eabb..3e8c7e77efcff2aa764c287f19e13cc690f05766 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <lttng/tracepoint-event.h>
 #include <linux/writeback.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 #ifndef _TRACE_BTRFS_DEF_
 #define _TRACE_BTRFS_DEF_
@@ -20,30 +20,30 @@ struct btrfs_delayed_ref_node;
 struct btrfs_delayed_tree_ref;
 struct btrfs_delayed_data_ref;
 struct btrfs_delayed_ref_head;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
 struct btrfs_block_group;
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
 struct btrfs_block_group_cache;
 #endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
 struct btrfs_free_cluster;
 #endif
 struct map_lookup;
 struct extent_buffer;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0))
 struct extent_state;
 #endif
 #endif
 
 #define BTRFS_UUID_SIZE 16
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,0,0))
 #define lttng_fs_info_fsid fs_info->fs_devices->fsid
 #else
 #define lttng_fs_info_fsid fs_info->fsid
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
@@ -151,7 +151,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode, btrfs_inode_evict,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
 
 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
 
@@ -174,7 +174,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
        )
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
 
 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
 
@@ -197,7 +197,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
        )
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
 
 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
 
@@ -220,7 +220,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
        )
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
 
 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
 
@@ -267,7 +267,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
        )
 )
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 
 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
 
@@ -288,9 +288,9 @@ LTTNG_TRACEPOINT_EVENT(btrfs_get_extent,
        )
 )
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist,
 
        TP_PROTO(const struct btrfs_fs_info *fs_info,
@@ -309,7 +309,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist,
                ctf_integer(u64, len, len)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0))
 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist,
 
        TP_PROTO(struct btrfs_fs_info *fs_info,
@@ -328,7 +328,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist,
                ctf_integer(u64, len, len)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,17,0))
 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist,
 
        TP_PROTO(const struct extent_map *existing, const struct extent_map *map, u64 start, u64 len),
@@ -346,7 +346,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
 
        TP_PROTO(const struct btrfs_inode *inode,
@@ -368,7 +368,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
                ctf_integer(u64, root_objectid, inode->root->root_key.objectid)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
 
        TP_PROTO(const struct inode *inode,
@@ -390,7 +390,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
                                BTRFS_I(inode)->root->root_key.objectid)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
 
        TP_PROTO(const struct inode *inode,
@@ -412,7 +412,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
                                BTRFS_I(inode)->root->root_key.objectid)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
 
        TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
@@ -480,7 +480,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0))
 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_add,
 
        TP_PROTO(const struct btrfs_inode *inode,
@@ -512,7 +512,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
 
        TP_ARGS(inode, ordered)
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
@@ -578,7 +578,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent, btrfs_ordered_extent_put,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
@@ -665,7 +665,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage,
                ctf_integer(long, pages_skipped, wbc->pages_skipped)
                ctf_integer(loff_t, range_start, wbc->range_start)
                ctf_integer(loff_t, range_end, wbc->range_end)
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,1,0))
                ctf_integer(char, nonblocking, wbc->nonblocking)
 #endif
                ctf_integer(char, for_kupdate, wbc->for_kupdate)
@@ -723,7 +723,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_sync_file,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
@@ -741,7 +741,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs,
                ctf_integer(int, wait, wait)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs,
 
        TP_PROTO(struct btrfs_fs_info *fs_info, int wait),
@@ -765,7 +765,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group,
 
        TP_PROTO(const struct btrfs_fs_info *fs_info,
@@ -783,7 +783,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group,
                ctf_integer(int, create, create)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
@@ -825,7 +825,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
@@ -882,7 +882,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
 
        TP_ARGS(fs_info, ref, full_ref, action)
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref,
 
        TP_PROTO(struct btrfs_fs_info *fs_info,
@@ -978,7 +978,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
 
        TP_ARGS(ref, full_ref, action)
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref,
 
        TP_PROTO(struct btrfs_delayed_ref_node *ref,
@@ -1024,7 +1024,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_tree_ref,
 
        TP_ARGS(ref, full_ref, action)
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,7,0))
 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref,
 
        TP_PROTO(struct btrfs_delayed_ref_node *ref,
@@ -1065,7 +1065,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
@@ -1123,7 +1123,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
 
        TP_ARGS(fs_info, ref, full_ref, action)
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref,
 
        TP_PROTO(struct btrfs_fs_info *fs_info,
@@ -1221,7 +1221,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
 
        TP_ARGS(fs_info, ref, full_ref, action)
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref,
 
        TP_PROTO(struct btrfs_delayed_ref_node *ref,
@@ -1268,7 +1268,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_data_ref,
 
        TP_ARGS(fs_info, ref, full_ref, action)
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,7,0))
 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref,
 
        TP_PROTO(struct btrfs_delayed_ref_node *ref,
@@ -1311,7 +1311,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head,
 
        TP_PROTO(const struct btrfs_fs_info *fs_info,
@@ -1354,7 +1354,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
        TP_ARGS(fs_info, head_ref, action)
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
@@ -1408,7 +1408,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
        TP_ARGS(fs_info, ref, head_ref, action)
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head,
 
        TP_PROTO(struct btrfs_fs_info *fs_info,
@@ -1497,7 +1497,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head,
        TP_ARGS(ref, head_ref, action)
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head,
 
        TP_PROTO(struct btrfs_delayed_ref_node *ref,
@@ -1558,7 +1558,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
 
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
 
@@ -1593,7 +1593,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk,  btrfs_chunk_free,
        TP_ARGS(fs_info, map, offset, size)
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
 
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
 
@@ -1666,7 +1666,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk,  btrfs_chunk_free,
        TP_ARGS(root, map, offset, size)
 )
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk,
 
@@ -1701,9 +1701,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk,  btrfs_chunk_free,
        TP_ARGS(root, map, offset, size)
 )
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
@@ -1743,7 +1743,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_cow_block,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
 
        TP_PROTO(const struct btrfs_fs_info *fs_info, const char *type, u64 val,
@@ -1759,7 +1759,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
                ctf_integer(int, reserve, reserve)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
@@ -1779,7 +1779,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
                ctf_integer(int, reserve, reserve)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
 
        TP_PROTO(struct btrfs_fs_info *fs_info, char *type, u64 val,
@@ -1797,7 +1797,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
 
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
 
@@ -1825,7 +1825,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent,  btrfs_reserved_extent_f
        TP_ARGS(fs_info, start, len)
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
 
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
 
@@ -1885,7 +1885,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent,  btrfs_reserved_extent_f
        TP_ARGS(root, start, len)
 )
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent,
 
@@ -1914,9 +1914,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent,  btrfs_reserved_extent_f
        TP_ARGS(root, start, len)
 )
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0) || \
        LTTNG_KERNEL_RANGE(5,9,5, 5,10,0) || \
        LTTNG_KERNEL_RANGE(5,4,78, 5,5,0))
 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
@@ -1937,7 +1937,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
        )
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
 
 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
 
@@ -1956,7 +1956,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
        )
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0))
 
 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
 
@@ -1975,7 +1975,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
        )
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
 
 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
 
@@ -1994,7 +1994,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
        )
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
 
 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
 
@@ -2034,7 +2034,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
                ctf_integer(u64, data, data)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
 
 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
 
@@ -2054,7 +2054,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
 
        TP_PROTO(const struct btrfs_block_group *block_group, u64 start,
@@ -2087,7 +2087,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus
        TP_ARGS(block_group, start, len)
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,18,0))
 
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
 
@@ -2121,7 +2121,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus
        TP_ARGS(block_group, start, len)
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
 
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
 
@@ -2158,7 +2158,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus
        TP_ARGS(fs_info, block_group, start, len)
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
 
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
 
@@ -2233,7 +2233,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus
        TP_ARGS(root, block_group, start, len)
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
 
 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent,
 
@@ -2270,9 +2270,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent, btrfs_reserve_extent_clus
        TP_ARGS(root, block_group, start, len)
 )
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster,
 
        TP_PROTO(const struct btrfs_block_group *block_group, u64 start,
@@ -2317,7 +2317,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster,
                ctf_integer(int, bitmap, bitmap)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
@@ -2366,7 +2366,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster,
                ctf_integer(int, bitmap, bitmap)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster,
 
        TP_PROTO(struct btrfs_block_group_cache *block_group, u64 start,
@@ -2413,7 +2413,7 @@ LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,73,5,0,0, 4,4,73,6,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,82,6,0,0, 4,4,82,7,0,0) || \
        LTTNG_SLE_KERNEL_RANGE(4,4,92,6,0,0, 4,4,92,7,0,0) || \
@@ -2446,7 +2446,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state,
                ctf_integer_hex(unsigned long, ip, IP)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0))
 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state,
 
        btrfs_alloc_extent_state,
index 72925c14d55d98a02f467b75d06fb5206ea67b4d..3cc255379619bf0e47bb3cade499f3dcc05d1909 100644 (file)
@@ -7,9 +7,9 @@
 
 #include <lttng/tracepoint-event.h>
 #include <linux/types.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
+#if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,0,0)
 
 LTTNG_TRACEPOINT_EVENT_CLASS(compaction_isolate_template,
 
@@ -56,7 +56,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(compaction_isolate_template,
        TP_ARGS(start_pfn, end_pfn, nr_scanned, nr_taken)
 )
 
-#else /* #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0) */
+#else /* #if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,0,0) */
 
 LTTNG_TRACEPOINT_EVENT_CLASS(compaction_isolate_template,
 
@@ -95,11 +95,11 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(compaction_isolate_template,
        TP_ARGS(nr_scanned, nr_taken)
 )
 
-#endif /* #else #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0) */
+#endif /* #else #if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,0,0) */
 
 #if LTTNG_KERNEL_RANGE(3,12,30, 3,13,0) || \
        LTTNG_KERNEL_RANGE(3,14,25, 3,15,0) || \
-       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0))
+       (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,16,0))
 LTTNG_TRACEPOINT_EVENT_CODE_MAP(mm_compaction_migratepages,
 
        compaction_migratepages,
@@ -135,7 +135,7 @@ LTTNG_TRACEPOINT_EVENT_CODE_MAP(mm_compaction_migratepages,
 
        TP_code_post()
 )
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,16,0)) */
 LTTNG_TRACEPOINT_EVENT_MAP(mm_compaction_migratepages,
 
        compaction_migratepages,
@@ -150,7 +150,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_compaction_migratepages,
                ctf_integer(unsigned long, nr_failed, nr_failed)
        )
 )
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,16,0)) */
 
 #endif /* LTTNG_TRACE_COMPACTION_H */
 
index 8852a1eea3bcbfbf8bb789d1addc20accee4b5e4..cb1f6884d99f195235c1fb7ae7a1eaf9b775a499 100644 (file)
@@ -6,7 +6,7 @@
 #define LTTNG_TRACE_EXT3_H
 
 #include <lttng/tracepoint-event.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 LTTNG_TRACEPOINT_EVENT(ext3_free_inode,
        TP_PROTO(struct inode *inode),
@@ -17,7 +17,7 @@ LTTNG_TRACEPOINT_EVENT(ext3_free_inode,
                ctf_integer(dev_t, dev, inode->i_sb->s_dev)
                ctf_integer(ino_t, ino, inode->i_ino)
                ctf_integer(umode_t, mode, inode->i_mode)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,5,0))
                ctf_integer(uid_t, uid, i_uid_read(inode))
                ctf_integer(gid_t, gid, i_gid_read(inode))
 #else
@@ -190,7 +190,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op, ext3_releasepage,
        TP_ARGS(page)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,11,0))
 
 LTTNG_TRACEPOINT_EVENT(ext3_invalidatepage,
        TP_PROTO(struct page *page, unsigned int offset, unsigned int length),
index a643abd9ba4dfe95178269622d70e29d196ff2df..513762c009d2a6206ce5cb5b59fa98c791ab9868 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <lttng/tracepoint-event.h>
 #include <linux/writeback.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 #ifndef _TRACE_EXT4_DEF_
 #define _TRACE_EXT4_DEF_
@@ -17,13 +17,13 @@ struct ext4_prealloc_space;
 struct ext4_inode_info;
 struct mpage_da_data;
 struct ext4_map_blocks;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,2,0))
 struct ext4_extent;
 #endif
 #endif
 
 #define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode))
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,1,0))
 #define TP_MODE_T      __u16
 #else
 #define TP_MODE_T      umode_t
@@ -37,7 +37,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_free_inode,
        TP_FIELDS(
                ctf_integer(dev_t, dev, inode->i_sb->s_dev)
                ctf_integer(ino_t, ino, inode->i_ino)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,5,0))
                ctf_integer(uid_t, uid, i_uid_read(inode))
                ctf_integer(gid_t, gid, i_gid_read(inode))
 #else
@@ -220,7 +220,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_da_writepages,
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,11,0))
 
 LTTNG_TRACEPOINT_EVENT(ext4_da_write_pages,
        TP_PROTO(struct inode *inode, pgoff_t first_page,
@@ -259,7 +259,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_da_write_pages,
 
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,11,0))
 
 LTTNG_TRACEPOINT_EVENT(ext4_da_write_pages_extent,
        TP_PROTO(struct inode *inode, struct ext4_map_blocks *map),
@@ -327,7 +327,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__page_op, ext4_releasepage,
        TP_ARGS(page)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,11,0))
 
 LTTNG_TRACEPOINT_EVENT_CLASS(ext4_invalidatepage_op,
        TP_PROTO(struct page *page, unsigned int offset, unsigned int length),
@@ -432,7 +432,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_mb_release_inode_pa,
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
 LTTNG_TRACEPOINT_EVENT(ext4_mb_release_group_pa,
 
        TP_PROTO(struct super_block *sb, struct ext4_prealloc_space *pa),
@@ -460,7 +460,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_mb_release_group_pa,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,9,0) || \
        LTTNG_KERNEL_RANGE(5,8,6, 5,9,0))
 LTTNG_TRACEPOINT_EVENT(ext4_discard_preallocations,
        TP_PROTO(struct inode *inode, unsigned int len, unsigned int needed),
@@ -590,7 +590,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_sync_fs,
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,13,0))
 LTTNG_TRACEPOINT_EVENT(ext4_alloc_da_blocks,
        TP_PROTO(struct inode *inode),
 
@@ -719,7 +719,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_forget,
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,13,0))
 LTTNG_TRACEPOINT_EVENT(ext4_da_update_reserve_space,
        TP_PROTO(struct inode *inode, int used_blocks, int quota_claim),
 
@@ -736,7 +736,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_da_update_reserve_space,
                ctf_integer(TP_MODE_T, mode, inode->i_mode)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,2,0))
 LTTNG_TRACEPOINT_EVENT(ext4_da_update_reserve_space,
        TP_PROTO(struct inode *inode, int used_blocks, int quota_claim),
 
@@ -779,7 +779,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_da_update_reserve_space,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,13,0))
 LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space,
        TP_PROTO(struct inode *inode),
 
@@ -794,7 +794,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space,
                ctf_integer(TP_MODE_T, mode, inode->i_mode)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0))
 LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space,
        TP_PROTO(struct inode *inode),
 
@@ -831,7 +831,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,13,0))
 LTTNG_TRACEPOINT_EVENT(ext4_da_release_space,
        TP_PROTO(struct inode *inode, int freed_blocks),
 
@@ -894,7 +894,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__bitmap_load, ext4_mb_buddy_bitmap_load,
        TP_ARGS(sb, group)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,9,0))
 LTTNG_TRACEPOINT_EVENT(ext4_read_block_bitmap_load,
        TP_PROTO(struct super_block *sb, unsigned long group, bool prefetch),
 
@@ -967,7 +967,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_fallocate_exit,
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,15,0))
 
 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__fallocate_mode,
        TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode),
@@ -1004,7 +1004,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__fallocate_mode, ext4_zero_range,
        TP_ARGS(inode, offset, len, mode)
 )
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,15,0)) */
 
 LTTNG_TRACEPOINT_EVENT(ext4_fallocate_enter,
        TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode),
@@ -1020,7 +1020,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_fallocate_enter,
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,11,0))
 
 LTTNG_TRACEPOINT_EVENT(ext4_punch_hole,
        TP_PROTO(struct inode *inode, loff_t offset, loff_t len),
@@ -1035,9 +1035,9 @@ LTTNG_TRACEPOINT_EVENT(ext4_punch_hole,
        )
 )
 
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) */
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,11,0)) */
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,15,0)) */
 
 LTTNG_TRACEPOINT_EVENT(ext4_unlink_enter,
        TP_PROTO(struct inode *parent, struct dentry *dentry),
@@ -1090,7 +1090,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__truncate, ext4_truncate_exit,
        TP_ARGS(inode)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,2,0))
 /* 'ux' is the uninitialized extent. */
 LTTNG_TRACEPOINT_EVENT(ext4_ext_convert_to_initialized_enter,
        TP_PROTO(struct inode *inode, struct ext4_map_blocks *map,
@@ -1163,7 +1163,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_enter, ext4_ind_map_blocks_ente
        TP_ARGS(inode, lblk, len, flags)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,11,0))
 
 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__map_blocks_exit,
        TP_PROTO(struct inode *inode, unsigned flags, struct ext4_map_blocks *map,
@@ -1197,7 +1197,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit, ext4_ind_map_blocks_exit,
        TP_ARGS(inode, flags, map, ret)
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
 
 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__map_blocks_exit,
        TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int ret),
@@ -1227,7 +1227,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit, ext4_ind_map_blocks_exit,
        TP_ARGS(inode, map, ret)
 )
 
-#else  /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
+#else  /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0)) */
 
 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__map_blocks_exit,
        TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
@@ -1259,7 +1259,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit, ext4_ind_map_blocks_exit,
        TP_ARGS(inode, lblk, pblk, len, ret)
 )
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0)) */
 
 LTTNG_TRACEPOINT_EVENT(ext4_ext_load_extent,
        TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk),
@@ -1274,7 +1274,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_ext_load_extent,
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0))
 LTTNG_TRACEPOINT_EVENT(ext4_load_inode,
        TP_PROTO(struct super_block *sb, unsigned long ino),
 
@@ -1298,7 +1298,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_load_inode,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
 
 LTTNG_TRACEPOINT_EVENT(ext4_journal_start,
        TP_PROTO(struct super_block *sb, int blocks, int rsv_blocks,
@@ -1327,7 +1327,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_journal_start_reserved,
        )
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,11,0))
 
 LTTNG_TRACEPOINT_EVENT(ext4_journal_start,
        TP_PROTO(struct super_block *sb, int blocks, int rsv_blocks,
@@ -1355,7 +1355,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_journal_start_reserved,
        )
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,1,0))
 
 LTTNG_TRACEPOINT_EVENT(ext4_journal_start,
        TP_PROTO(struct super_block *sb, int nblocks, unsigned long IP),
@@ -1407,29 +1407,29 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__trim, ext4_trim_all_free,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,2,0))
 
 LTTNG_TRACEPOINT_EVENT(ext4_ext_handle_uninitialized_extents,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
        TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int flags,
                 unsigned int allocated, ext4_fsblk_t newblock),
 
        TP_ARGS(inode, map, flags, allocated, newblock),
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0)) */
        TP_PROTO(struct inode *inode, struct ext4_map_blocks *map,
                 unsigned int allocated, ext4_fsblk_t newblock),
 
        TP_ARGS(inode, map, allocated, newblock),
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0)) */
 
        TP_FIELDS(
                ctf_integer(dev_t, dev, inode->i_sb->s_dev)
                ctf_integer(ino_t, ino, inode->i_ino)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
                ctf_integer(int, flags, flags)
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0)) */
                ctf_integer(int, flags, map->m_flags)
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0)) */
                ctf_integer(ext4_lblk_t, lblk, map->m_lblk)
                ctf_integer(ext4_fsblk_t, pblk, map->m_pblk)
                ctf_integer(unsigned int, len, map->m_len)
@@ -1526,7 +1526,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_ext_show_extent,
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,20,0) || \
        LTTNG_RHEL_KERNEL_RANGE(4,18,0,147,0,0, 4,19,0,0,0,0))
 
 LTTNG_TRACEPOINT_EVENT(ext4_remove_blocks,
@@ -1550,7 +1550,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_remove_blocks,
        )
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,11,0))
 
 LTTNG_TRACEPOINT_EVENT(ext4_remove_blocks,
            TP_PROTO(struct inode *inode, struct ext4_extent *ex,
@@ -1594,7 +1594,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_remove_blocks,
 
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,20,0) || \
        LTTNG_RHEL_KERNEL_RANGE(4,18,0,147,0,0, 4,19,0,0,0,0))
 
 LTTNG_TRACEPOINT_EVENT(ext4_ext_rm_leaf,
@@ -1617,7 +1617,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_ext_rm_leaf,
        )
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,11,0))
 
 LTTNG_TRACEPOINT_EVENT(ext4_ext_rm_leaf,
        TP_PROTO(struct inode *inode, ext4_lblk_t start,
@@ -1670,7 +1670,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_ext_rm_idx,
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,11,0))
 
 LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space,
        TP_PROTO(struct inode *inode, ext4_lblk_t start,
@@ -1704,7 +1704,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space,
 
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,20,0) || \
        LTTNG_RHEL_KERNEL_RANGE(4,18,0,147,0,0, 4,19,0,0,0,0))
 
 LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space_done,
@@ -1726,7 +1726,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space_done,
        )
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,11,0))
 
 LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space_done,
        TP_PROTO(struct inode *inode, ext4_lblk_t start, ext4_lblk_t end,
@@ -1767,7 +1767,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space_done,
 
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
 
 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__es_extent,
        TP_PROTO(struct inode *inode, struct extent_status *es),
@@ -1796,7 +1796,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__es_extent, ext4_es_cache_extent,
        TP_ARGS(inode, es)
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,11,0))
 
 LTTNG_TRACEPOINT_EVENT(ext4_es_insert_extent,
        TP_PROTO(struct inode *inode, struct extent_status *es),
@@ -1908,7 +1908,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_es_shrink_exit,
 
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0))
 LTTNG_TRACEPOINT_EVENT(ext4_fc_replay_scan,
        TP_PROTO(struct super_block *sb, int error, int off),
 
index e9aabd692cdbcc85d95f10fd3bbc6e9eaed56d8d..7d0e9c8757f4f9c308ed1e7aa5287893bf983e07 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <lttng/tracepoint-event.h>
 #include <linux/jbd.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 LTTNG_TRACEPOINT_EVENT(jbd_checkpoint,
 
@@ -29,7 +29,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(jbd_commit,
 
        TP_FIELDS(
                ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,5,0))
                ctf_integer(char, sync_commit, commit_transaction->t_synchronous_commit)
 #endif
                ctf_integer(int, transaction, commit_transaction->t_tid)
@@ -72,7 +72,7 @@ LTTNG_TRACEPOINT_EVENT(jbd_drop_transaction,
 
        TP_FIELDS(
                ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,5,0))
                ctf_integer(char, sync_commit, commit_transaction->t_synchronous_commit)
 #endif
                ctf_integer(int, transaction, commit_transaction->t_tid)
@@ -86,7 +86,7 @@ LTTNG_TRACEPOINT_EVENT(jbd_end_commit,
 
        TP_FIELDS(
                ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,5,0))
                ctf_integer(char, sync_commit, commit_transaction->t_synchronous_commit)
 #endif
                ctf_integer(int, transaction, commit_transaction->t_tid)
@@ -101,7 +101,7 @@ LTTNG_TRACEPOINT_EVENT(jbd_do_submit_data,
 
        TP_FIELDS(
                ctf_integer(dev_t, dev, journal->j_fs_dev->bd_dev)
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,5,0))
                ctf_integer(char, sync_commit, commit_transaction->t_synchronous_commit)
 #endif
                ctf_integer(int, transaction, commit_transaction->t_tid)
@@ -124,7 +124,7 @@ LTTNG_TRACEPOINT_EVENT(jbd_cleanup_journal_tail,
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,5,0))
 LTTNG_TRACEPOINT_EVENT_MAP(journal_write_superblock,
 
        jbd_journal_write_superblock,
index 04968735c692db2d5a8ce414222a09ae3c8298a9..8ead71ae30ead38ccd4d2d829af9f07aaa0e6be7 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <lttng/tracepoint-event.h>
 #include <linux/jbd2.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 #ifndef _TRACE_JBD2_DEF
 #define _TRACE_JBD2_DEF
@@ -68,7 +68,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd2_commit, jbd2_commit_logging,
        TP_ARGS(journal, commit_transaction)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0))
 LTTNG_TRACEPOINT_EVENT_INSTANCE(jbd2_commit, jbd2_drop_transaction,
 
        TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
@@ -137,7 +137,7 @@ LTTNG_TRACEPOINT_EVENT(jbd2_checkpoint_stats,
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0))
 LTTNG_TRACEPOINT_EVENT(jbd2_update_log_tail,
 #else
 LTTNG_TRACEPOINT_EVENT(jbd2_cleanup_journal_tail,
@@ -157,7 +157,7 @@ LTTNG_TRACEPOINT_EVENT(jbd2_cleanup_journal_tail,
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0))
 LTTNG_TRACEPOINT_EVENT(jbd2_write_superblock,
 
        TP_PROTO(journal_t *journal, int write_op),
index 8f56cc5aea74251be6a34520ffa68c1b56e2603e..0a9ba17f82d0ce6c22d8b779abee0ef63a0b63b3 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <lttng/tracepoint-event.h>
 #include <linux/types.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 LTTNG_TRACEPOINT_EVENT_CLASS(kmem_alloc,
 
@@ -115,7 +115,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(kmem_free, kmem_cache_free,
        TP_ARGS(call_site, ptr)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
 LTTNG_TRACEPOINT_EVENT_MAP(mm_page_free, kmem_mm_page_free,
 #else
 LTTNG_TRACEPOINT_EVENT_MAP(mm_page_free_direct, kmem_mm_page_free_direct,
@@ -132,7 +132,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_page_free_direct, kmem_mm_page_free_direct,
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0))
 LTTNG_TRACEPOINT_EVENT_MAP(mm_page_free_batched, kmem_mm_page_free_batched,
 
        TP_PROTO(struct page *page),
@@ -144,7 +144,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_page_free_batched, kmem_mm_page_free_batched,
                ctf_integer(unsigned long, pfn, page_to_pfn(page))
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
 LTTNG_TRACEPOINT_EVENT_MAP(mm_page_free_batched, kmem_mm_page_free_batched,
 
        TP_PROTO(struct page *page, int cold),
@@ -222,7 +222,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(kmem_mm_page, mm_page_pcpu_drain,
        TP_ARGS(page, order, migratetype)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,2)      \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,19,2)  \
        || LTTNG_KERNEL_RANGE(3,14,36, 3,15,0)          \
        || LTTNG_KERNEL_RANGE(3,16,35, 3,17,0)          \
        || LTTNG_KERNEL_RANGE(3,18,10, 3,19,0)          \
@@ -254,7 +254,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_page_alloc_extfrag,
        )
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,30))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,30))
 
 LTTNG_TRACEPOINT_EVENT_MAP(mm_page_alloc_extfrag,
 
@@ -279,7 +279,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_page_alloc_extfrag,
        )
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
 
 LTTNG_TRACEPOINT_EVENT_MAP(mm_page_alloc_extfrag,
 
@@ -306,7 +306,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_page_alloc_extfrag,
        )
 )
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) */
 
 LTTNG_TRACEPOINT_EVENT_MAP(mm_page_alloc_extfrag,
 
@@ -330,7 +330,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_page_alloc_extfrag,
        )
 )
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) */
 
 #endif /* LTTNG_TRACE_KMEM_H */
 
index b05482ee0c5afa497a9f186dda6d8552ff654743..3df389674cec86e5f67c02a0bddaf37c62b23ddd 100644 (file)
@@ -3,7 +3,7 @@
 #define LTTNG_TRACE_KVM_MAIN_H
 
 #include <lttng/tracepoint-event.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM kvm
@@ -18,7 +18,7 @@ LTTNG_TRACEPOINT_EVENT(kvm_userspace_exit,
        )
 )
 
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,6,0))
 #if defined(__KVM_HAVE_IOAPIC)
 #undef __KVM_HAVE_IRQ_LINE
 #define __KVM_HAVE_IRQ_LINE
@@ -98,7 +98,7 @@ LTTNG_TRACEPOINT_EVENT(kvm_mmio,
        )
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) \
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0) \
        || LTTNG_KERNEL_RANGE(4,14,14, 4,15,0) \
        || LTTNG_DEBIAN_KERNEL_RANGE(4,14,13,0,1,0, 4,15,0,0,0,0) \
        || LTTNG_KERNEL_RANGE(4,9,77, 4,10,0) \
@@ -152,7 +152,7 @@ LTTNG_TRACEPOINT_EVENT(kvm_fpu,
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0) \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,18,0) \
        || LTTNG_RHEL_KERNEL_RANGE(3,10,0,327,0,0, 3,11,0,0,0,0))
 
 LTTNG_TRACEPOINT_EVENT(kvm_age_page,
@@ -236,7 +236,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(kvm_async_pf_nopresent_ready, kvm_async_pf_ready
        TP_ARGS(token, gva)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0) \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,13,0) \
        || LTTNG_RHEL_KERNEL_RANGE(3,10,0,229,0,0, 3,11,0,0,0,0))
 
 LTTNG_TRACEPOINT_EVENT(
@@ -250,7 +250,7 @@ LTTNG_TRACEPOINT_EVENT(
        )
 )
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,13,0)) */
 
 LTTNG_TRACEPOINT_EVENT(
        kvm_async_pf_completed,
@@ -264,7 +264,7 @@ LTTNG_TRACEPOINT_EVENT(
        )
 )
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,13,0)) */
 
 #endif
 
index 451314c9724560f46dcbd0ced776e25bfbcdb5f5..367132e00f46c3964abb72bf121b0989e5f65e60 100644 (file)
 #include <linux/user_namespace.h>
 #include <linux/utsname.h>
 #include <linux/types.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 #include <wrapper/namespace.h>
 #include <wrapper/user_namespace.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
 #include <linux/time_namespace.h>
 #endif
 
@@ -68,7 +68,7 @@ LTTNG_TRACEPOINT_EVENT(lttng_statedump_process_state,
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,6,0))
 LTTNG_TRACEPOINT_EVENT(lttng_statedump_process_cgroup_ns,
        TP_PROTO(struct lttng_session *session,
                struct task_struct *p,
@@ -88,7 +88,7 @@ LTTNG_TRACEPOINT_EVENT(lttng_statedump_process_ipc_ns,
        TP_ARGS(session, p, ipc_ns),
        TP_FIELDS(
                ctf_integer(pid_t, tid, p->pid)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
                ctf_integer(unsigned int, ns_inum, ipc_ns ? ipc_ns->lttng_ns_inum : 0)
 #endif
        )
@@ -102,7 +102,7 @@ LTTNG_TRACEPOINT_EVENT(lttng_statedump_process_mnt_ns,
        TP_ARGS(session, p, mnt_ns),
        TP_FIELDS(
                ctf_integer(pid_t, tid, p->pid)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
                ctf_integer(unsigned int, ns_inum, mnt_ns ? mnt_ns->lttng_ns_inum : 0)
 #endif
        )
@@ -116,7 +116,7 @@ LTTNG_TRACEPOINT_EVENT(lttng_statedump_process_net_ns,
        TP_ARGS(session, p, net_ns),
        TP_FIELDS(
                ctf_integer(pid_t, tid, p->pid)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
                ctf_integer(unsigned int, ns_inum, net_ns ? net_ns->lttng_ns_inum : 0)
 #endif
        )
@@ -145,7 +145,7 @@ LTTNG_TRACEPOINT_EVENT(lttng_statedump_process_pid_ns,
                                ret;
                        }))
                ctf_integer(int, ns_level, pid_ns ? pid_ns->level : 0)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
                ctf_integer(unsigned int, ns_inum, pid_ns ? pid_ns->lttng_ns_inum : 0)
 #endif
        )
@@ -160,10 +160,10 @@ LTTNG_TRACEPOINT_EVENT(lttng_statedump_process_user_ns,
                ctf_integer(pid_t, tid, p->pid)
                ctf_integer(uid_t, vuid, user_ns ? lttng_task_vuid(p, user_ns) : 0)
                ctf_integer(gid_t, vgid, user_ns ? lttng_task_vgid(p, user_ns) : 0)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,11,0))
                ctf_integer(int, ns_level, user_ns ? user_ns->level : 0)
 #endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
                ctf_integer(unsigned int, ns_inum, user_ns ? user_ns->lttng_ns_inum : 0)
 #endif
        )
@@ -176,13 +176,13 @@ LTTNG_TRACEPOINT_EVENT(lttng_statedump_process_uts_ns,
        TP_ARGS(session, p, uts_ns),
        TP_FIELDS(
                ctf_integer(pid_t, tid, p->pid)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
                ctf_integer(unsigned int, ns_inum, uts_ns ? uts_ns->lttng_ns_inum : 0)
 #endif
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
 LTTNG_TRACEPOINT_EVENT(lttng_statedump_process_time_ns,
        TP_PROTO(struct lttng_session *session,
                struct task_struct *p,
index eda5d9fe170478c984533067504ca5a3dce3e27c..a533380412e0d8ad33017804abd8961dfd168255 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <lttng/tracepoint-event.h>
 #include <linux/types.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 LTTNG_TRACEPOINT_ENUM(
        lttng_test_filter_event_enum,
index 8bdd65d2a7a13e2b77a9377ec8e98c3206fc7b8d..1e2ef3fc5d6bb19b701b6c1e4344ea0addcef3a8 100644 (file)
@@ -9,7 +9,7 @@
 #include <linux/types.h>
 #include <linux/mm.h>
 #include <linux/memcontrol.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 #ifndef _TRACE_VMSCAN_DEF
 #define _TRACE_VMSCAN_DEF
 #define RECLAIM_WB_SYNC                0x0004u /* Unused, all reclaim async */
 #define RECLAIM_WB_ASYNC       0x0008u
 
-#if ((LINUX_VERSION_CODE <= KERNEL_VERSION(3,0,38)) || \
+#if ((LTTNG_LINUX_VERSION_CODE <= LTTNG_KERNEL_VERSION(3,0,38)) || \
        LTTNG_KERNEL_RANGE(3,1,0, 3,2,0))
 typedef int isolate_mode_t;
 #endif
 
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,2,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,2,0))
 
 #include <linux/mm_inline.h>
 
@@ -35,7 +35,7 @@ typedef int isolate_mode_t;
        (RECLAIM_WB_ASYNC) \
        )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,5,0))
 
 #include <linux/mm_inline.h>
 
@@ -63,7 +63,7 @@ LTTNG_TRACEPOINT_EVENT(mm_vmscan_kswapd_sleep,
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
 
 LTTNG_TRACEPOINT_EVENT(mm_vmscan_kswapd_wake,
 
@@ -94,7 +94,7 @@ LTTNG_TRACEPOINT_EVENT(mm_vmscan_kswapd_wake,
 
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,17,0))
 LTTNG_TRACEPOINT_EVENT(mm_vmscan_wakeup_kswapd,
 
        TP_PROTO(int nid, int zid, int order, gfp_t gfp_flags),
@@ -123,7 +123,7 @@ LTTNG_TRACEPOINT_EVENT(mm_vmscan_wakeup_kswapd,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,2,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,2,0))
 
 LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_direct_reclaim_begin_template,
 
@@ -158,7 +158,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_begin_template, mm_vmsc
        TP_ARGS(order, gfp_flags)
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
 
 LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_direct_reclaim_begin_template,
 
@@ -265,7 +265,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_end_template, mm_vmscan
        TP_ARGS(nr_reclaimed)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,16,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,16,0))
 LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_start,
 
        mm_vmscan_shrink_slab_start,
@@ -290,7 +290,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_start,
                ctf_integer(int, priority, priority)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,1,0))
 LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_start,
 
        mm_vmscan_shrink_slab_start,
@@ -305,11 +305,11 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_start,
 
        TP_FIELDS(
                ctf_integer_hex(struct shrinker *, shr, shr)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
                ctf_integer_hex(void *, shrink, shr->scan_objects)
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) */
                ctf_integer_hex(void *, shrink, shr->shrink)
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) */
                ctf_integer(long, nr_objects_to_shrink, nr_objects_to_shrink)
                ctf_integer(gfp_t, gfp_flags, sc->gfp_mask)
                ctf_integer(unsigned long, pgs_scanned, pgs_scanned)
@@ -321,7 +321,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_start,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,16,0))
 LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_end,
 
        mm_vmscan_shrink_slab_end,
@@ -342,7 +342,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_end,
                ctf_integer(long, total_scan, total_scan)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,1,0))
 LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_end,
 
        mm_vmscan_shrink_slab_end,
@@ -354,11 +354,11 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_end,
 
        TP_FIELDS(
                ctf_integer_hex(struct shrinker *, shr, shr)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
                ctf_integer_hex(void *, shrink, shr->scan_objects)
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) */
                ctf_integer_hex(void *, shrink, shr->shrink)
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) */
                ctf_integer(long, unused_scan, unused_scan_cnt)
                ctf_integer(long, new_scan, new_scan_cnt)
                ctf_integer(int, retval, shrinker_retval)
@@ -367,7 +367,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_end,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
 LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_isolate,
 
        TP_PROTO(int classzone_idx,
@@ -395,7 +395,7 @@ LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_isolate,
                ctf_integer(int, lru, lru)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_lru_isolate_template,
 
        TP_PROTO(int classzone_idx,
@@ -462,12 +462,12 @@ LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_lru_isolate_template,
                unsigned long nr_requested,
                unsigned long nr_scanned,
                unsigned long nr_taken,
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,5,0))
                unsigned long nr_lumpy_taken,
                unsigned long nr_lumpy_dirty,
                unsigned long nr_lumpy_failed,
 #endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,3,0))
                isolate_mode_t isolate_mode
 #else
                isolate_mode_t isolate_mode,
@@ -476,10 +476,10 @@ LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_lru_isolate_template,
        ),
 
        TP_ARGS(order, nr_requested, nr_scanned, nr_taken,
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,5,0))
                nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed,
 #endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,3,0))
                isolate_mode
 #else
                isolate_mode, file
@@ -492,13 +492,13 @@ LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_lru_isolate_template,
                ctf_integer(unsigned long, nr_requested, nr_requested)
                ctf_integer(unsigned long, nr_scanned, nr_scanned)
                ctf_integer(unsigned long, nr_taken, nr_taken)
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,5,0))
                ctf_integer(unsigned long, nr_lumpy_taken, nr_lumpy_taken)
                ctf_integer(unsigned long, nr_lumpy_dirty, nr_lumpy_dirty)
                ctf_integer(unsigned long, nr_lumpy_failed, nr_lumpy_failed)
 #endif
                ctf_integer(isolate_mode_t, isolate_mode, isolate_mode)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
                ctf_integer(int, file, file)
 #endif
        )
@@ -510,12 +510,12 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_lru_isolate_template, mm_vmscan_lru_is
                unsigned long nr_requested,
                unsigned long nr_scanned,
                unsigned long nr_taken,
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,5,0))
                unsigned long nr_lumpy_taken,
                unsigned long nr_lumpy_dirty,
                unsigned long nr_lumpy_failed,
 #endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,3,0))
                isolate_mode_t isolate_mode
 #else
                isolate_mode_t isolate_mode,
@@ -524,10 +524,10 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_lru_isolate_template, mm_vmscan_lru_is
        ),
 
        TP_ARGS(order, nr_requested, nr_scanned, nr_taken,
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,5,0))
                nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed,
 #endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,3,0))
                isolate_mode
 #else
                isolate_mode, file
@@ -542,12 +542,12 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_lru_isolate_template, mm_vmscan_memcg_
                unsigned long nr_requested,
                unsigned long nr_scanned,
                unsigned long nr_taken,
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,5,0))
                unsigned long nr_lumpy_taken,
                unsigned long nr_lumpy_dirty,
                unsigned long nr_lumpy_failed,
 #endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,3,0))
                isolate_mode_t isolate_mode
 #else
                isolate_mode_t isolate_mode,
@@ -556,10 +556,10 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_lru_isolate_template, mm_vmscan_memcg_
        ),
 
        TP_ARGS(order, nr_requested, nr_scanned, nr_taken,
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,5,0))
                nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed,
 #endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,3,0))
                isolate_mode
 #else
                isolate_mode, file
@@ -568,7 +568,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_lru_isolate_template, mm_vmscan_memcg_
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,7,0))
 LTTNG_TRACEPOINT_EVENT(mm_vmscan_writepage,
 
        TP_PROTO(struct page *page),
@@ -581,7 +581,7 @@ LTTNG_TRACEPOINT_EVENT(mm_vmscan_writepage,
                                page_is_file_lru(page)))
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,2,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,2,0))
 LTTNG_TRACEPOINT_EVENT(mm_vmscan_writepage,
 
        TP_PROTO(struct page *page),
@@ -594,7 +594,7 @@ LTTNG_TRACEPOINT_EVENT(mm_vmscan_writepage,
                                page_is_file_cache(page)))
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,5,0))
 LTTNG_TRACEPOINT_EVENT(mm_vmscan_writepage,
 
        TP_PROTO(struct page *page),
@@ -621,7 +621,7 @@ LTTNG_TRACEPOINT_EVENT(mm_vmscan_writepage,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,2,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,2,0))
 LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
 
        TP_PROTO(int nid,
@@ -646,7 +646,7 @@ LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
                ctf_integer(int, reclaim_flags, trace_reclaim_flags(file))
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,17,0))
 LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
 
        TP_PROTO(int nid,
@@ -670,7 +670,7 @@ LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
                ctf_integer(int, reclaim_flags, trace_shrink_flags(file))
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
 LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
 
        TP_PROTO(int nid,
@@ -700,7 +700,7 @@ LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
                ctf_integer(int, reclaim_flags, trace_shrink_flags(file))
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
 LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
 
        TP_PROTO(int nid,
@@ -717,7 +717,7 @@ LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
                ctf_integer(int, reclaim_flags, trace_shrink_flags(file))
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,5,0))
 LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
 
        TP_PROTO(struct zone *zone,
@@ -755,7 +755,7 @@ LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
 )
 #endif
 
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,5,0))
 LTTNG_TRACEPOINT_EVENT_MAP(replace_swap_token,
 
        mm_vmscan_replace_swap_token,
index 8ef31182f305741f53762bb71f312add76746c0f..06b20c64ae1291bddb7b92ca7156da360961e838 100644 (file)
@@ -16,7 +16,7 @@
 #define LTTNG_TRACE_MODULE_H
 
 #include <lttng/tracepoint-event.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 #include <linux/kernel.h>
 
 #ifdef CONFIG_MODULES
@@ -31,7 +31,7 @@ LTTNG_TRACEPOINT_ENUM(taint,
        TP_ENUM_VALUES(
                ctf_enum_value("PROPRIETARY_MODULE", 1UL << TAINT_PROPRIETARY_MODULE)
                ctf_enum_value("FORCED_MODULE", 1UL << TAINT_FORCED_MODULE)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,15,0))
                ctf_enum_value("CPU_OUT_OF_SPEC", 1UL << TAINT_CPU_OUT_OF_SPEC)
 #else
                ctf_enum_value("UNSAFE_SMP", 1UL << TAINT_UNSAFE_SMP)
@@ -45,22 +45,22 @@ LTTNG_TRACEPOINT_ENUM(taint,
                ctf_enum_value("WARN", 1UL << TAINT_WARN)
                ctf_enum_value("CRAP", 1UL << TAINT_CRAP)
                ctf_enum_value("FIRMWARE_WORKAROUND", 1UL << TAINT_FIRMWARE_WORKAROUND)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,2,0))
                ctf_enum_value("OOT_MODULE", 1UL << TAINT_OOT_MODULE)
 #endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,15,0))
                ctf_enum_value("UNSIGNED_MODULE", 1UL << TAINT_UNSIGNED_MODULE)
 #endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,17,0))
                ctf_enum_value("SOFTLOCKUP", 1UL << TAINT_SOFTLOCKUP)
 #endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,0,0))
                ctf_enum_value("LIVEPATCH", 1UL << TAINT_LIVEPATCH)
 #endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0))
                ctf_enum_value("AUX", 1UL << TAINT_AUX)
 #endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,17,0))
                ctf_enum_value("RANDSTRUCT", 1UL << TAINT_RANDSTRUCT)
 #endif
        )
@@ -100,7 +100,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(module_refcnt,
 
        TP_FIELDS(
                ctf_integer_hex(unsigned long, ip, ip)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,19,0))
                ctf_integer(int, refcnt, atomic_read(&mod->refcnt))
 #else
                ctf_integer(int, refcnt, __this_cpu_read(mod->refptr->incs) + __this_cpu_read(mod->refptr->decs))
index 8a32993f5e6afa5272039498136021e811d71c83..f90b17d12f82eb772e4a3cd63ab3bad0a97826c1 100644 (file)
@@ -11,7 +11,7 @@
 
 #define NO_DEV "(no_device)"
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
 
 LTTNG_TRACEPOINT_EVENT(napi_poll,
 
index c2d8c67be0cd2779259af44df300dfc85b3e0bfe..6fbe86f86b581ab3067eeeab61a9d2025495138d 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/tcp.h>
 #include <linux/udp.h>
 #include <linux/icmp.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 #include <lttng/endian.h>
 #include <net/sock.h>
 
@@ -697,7 +697,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(net_dev_template,
        TP_ARGS(skb)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0))
 
 /* Trace events for the receive entry points */
 LTTNG_TRACEPOINT_EVENT_CLASS(net_dev_receive_entry_template,
@@ -768,7 +768,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(net_dev_receive_entry_template,
 
 #endif /* kernel > 3.14 */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,19,0))
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(net_dev_receive_entry_template,
 
@@ -783,7 +783,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(net_dev_receive_entry_template,
 
 #endif /* kernel > 4.19 */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,0,0))
 
 /* Trace events for the receive exit points */
 LTTNG_TRACEPOINT_EVENT_CLASS(net_dev_receive_exit_template,
index dd03d60a1bdc2c98c082b1e1df94ba258fd559cd..3addd7ef36e9c1fee527e836b543e16312778421 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <lttng/tracepoint-event.h>
 #include <linux/ktime.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 LTTNG_TRACEPOINT_EVENT_CLASS(power_cpu,
 
@@ -59,7 +59,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(machine_suspend,
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,5,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(power_wakeup_source,
 
        TP_PROTO(const char *name, unsigned int state),
@@ -160,7 +160,7 @@ enum {
    events get removed */
 static inline void trace_power_start(u64 type, u64 state, u64 cpuid) {};
 static inline void trace_power_end(u64 cpuid) {};
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0))
 static inline void trace_power_start_rcuidle(u64 type, u64 state, u64 cpuid) {};
 static inline void trace_power_end_rcuidle(u64 cpuid) {};
 #endif
index 36aa36cb73c6b26b1c178e9387d84361a326615f..80bbbac6748bd18a1c150fb953ef61ce96696e4c 100644 (file)
@@ -35,7 +35,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(preemptirq_template,
  */
 #if defined(CONFIG_TRACE_IRQFLAGS)
 #define LTTNG_TRACE_IRQ
-#elif (LINUX_VERSION_CODE < KERNEL_VERSION(4,19,0) && \
+#elif (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(4,19,0) && \
        !defined(CONFIG_PROVE_LOCKING))
 #define LTTNG_TRACE_IRQ
 #endif
@@ -67,7 +67,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(preemptirq_template, irq_enable,
  */
 #if defined(CONFIG_TRACE_PREEMPT_TOGGLE)
 #define LTTNG_TRACE_PREEMPT
-#elif (LINUX_VERSION_CODE < KERNEL_VERSION(4,19,0) && \
+#elif (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(4,19,0) && \
        defined(CONFIG_DEBUG_PREEMPT))
 #define LTTNG_TRACE_PREEMPT
 #endif
index 75b4ee9239c66fd6f9465197ac238302821ea7e8..4e904b6f4b2495b7bdafdb7a7a5950fc6391d657 100644 (file)
@@ -6,9 +6,9 @@
 #define LTTNG_TRACE_PRINTK_H
 
 #include <lttng/tracepoint-event.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,10,0))
 
 LTTNG_TRACEPOINT_EVENT_MAP(console,
 
@@ -23,7 +23,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(console,
        )
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,5,0))
 
 LTTNG_TRACEPOINT_EVENT_MAP(console,
 
@@ -40,7 +40,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(console,
        )
 )
 
-#else /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) */
+#else /* (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,5,0)) */
 
 LTTNG_TRACEPOINT_EVENT_MAP(console,
 
index 7cf0908ff4b75a28c7cee0e3a9b33372c0fde7b9..ed05d26ac2e06fb429976e3fc2ce1624159225e7 100644 (file)
@@ -38,7 +38,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(random__mix_pool_bytes, mix_pool_bytes_noloc
        TP_ARGS(pool_name, bytes, IP)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,2,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,2,0))
 LTTNG_TRACEPOINT_EVENT_MAP(credit_entropy_bits,
 
        random_credit_entropy_bits,
index 0f841dbb97b43c262f22ab65d630006d08e2cc65..3dafbc5de9c18f7c428ecac2c23c2f93b847556b 100644 (file)
@@ -6,7 +6,7 @@
 #define LTTNG_TRACE_RCU_H
 
 #include <lttng/tracepoint-event.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 /*
  * Tracepoint for start/end markers used for utilization calculations.
  */
 LTTNG_TRACEPOINT_EVENT(rcu_utilization,
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
        TP_PROTO(const char *s),
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) */
        TP_PROTO(char *s),
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) */
 
        TP_ARGS(s),
 
@@ -37,7 +37,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_utilization,
 #ifdef CONFIG_RCU_TRACE
 
 #if defined(CONFIG_TREE_RCU) \
-       || (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) \
+       || (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,19,0) \
                && defined(CONFIG_PREEMPT_RCU)) \
        || defined(CONFIG_TREE_PREEMPT_RCU)
 
@@ -50,7 +50,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_utilization,
  * and "cpuofl", respectively), and a CPU being kicked for being too
  * long in dyntick-idle mode ("kick").
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,19,0) || \
        LTTNG_RHEL_KERNEL_RANGE(4,18,0,80,0,0, 4,19,0,0,0,0))
 LTTNG_TRACEPOINT_EVENT(rcu_grace_period,
 
@@ -64,7 +64,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_grace_period,
                ctf_string(gpevent, gpevent)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
 LTTNG_TRACEPOINT_EVENT(rcu_grace_period,
 
        TP_PROTO(const char *rcuname, unsigned long gpnum, const char *gpevent),
@@ -99,7 +99,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_grace_period,
  * rcu_node structure, and the mask of CPUs that will be waited for.
  * All but the type of RCU are extracted from the rcu_node structure.
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,19,0) || \
        LTTNG_RHEL_KERNEL_RANGE(4,18,0,80,0,0, 4,19,0,0,0,0))
 LTTNG_TRACEPOINT_EVENT(rcu_grace_period_init,
 
@@ -117,7 +117,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_grace_period_init,
                ctf_integer(unsigned long, qsmask, qsmask)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
 LTTNG_TRACEPOINT_EVENT(rcu_grace_period_init,
 
        TP_PROTO(const char *rcuname, unsigned long gpnum, u8 level,
@@ -159,7 +159,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_grace_period_init,
  * include SRCU), the grace-period number that the task is blocking
  * (the current or the next), and the task's PID.
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,19,0) || \
        LTTNG_RHEL_KERNEL_RANGE(4,18,0,80,0,0, 4,19,0,0,0,0))
 LTTNG_TRACEPOINT_EVENT(rcu_preempt_task,
 
@@ -173,7 +173,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_preempt_task,
                ctf_integer(int, pid, pid)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
 LTTNG_TRACEPOINT_EVENT(rcu_preempt_task,
 
        TP_PROTO(const char *rcuname, int pid, unsigned long gpnum),
@@ -206,7 +206,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_preempt_task,
  * read-side critical section exiting that critical section.  Track the
  * type of RCU (which one day might include SRCU) and the task's PID.
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,19,0) || \
        LTTNG_RHEL_KERNEL_RANGE(4,18,0,80,0,0, 4,19,0,0,0,0))
 LTTNG_TRACEPOINT_EVENT(rcu_unlock_preempted_task,
 
@@ -220,7 +220,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_unlock_preempted_task,
                ctf_integer(int, pid, pid)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
 LTTNG_TRACEPOINT_EVENT(rcu_unlock_preempted_task,
 
        TP_PROTO(const char *rcuname, unsigned long gpnum, int pid),
@@ -256,7 +256,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_unlock_preempted_task,
  * whether there are any blocked tasks blocking the current grace period.
  * All but the type of RCU are extracted from the rcu_node structure.
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,19,0) || \
        LTTNG_RHEL_KERNEL_RANGE(4,18,0,80,0,0, 4,19,0,0,0,0))
 LTTNG_TRACEPOINT_EVENT(rcu_quiescent_state_report,
 
@@ -277,7 +277,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_quiescent_state_report,
                ctf_integer(u8, gp_tasks, gp_tasks)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
 LTTNG_TRACEPOINT_EVENT(rcu_quiescent_state_report,
 
        TP_PROTO(const char *rcuname, unsigned long gpnum,
@@ -327,7 +327,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_quiescent_state_report,
  * or "kick" when kicking a CPU that has been in dyntick-idle mode for
  * too long.
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,19,0) || \
        LTTNG_RHEL_KERNEL_RANGE(4,18,0,80,0,0, 4,19,0,0,0,0))
 LTTNG_TRACEPOINT_EVENT(rcu_fqs,
 
@@ -342,7 +342,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_fqs,
                ctf_string(qsevent, qsevent)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
 LTTNG_TRACEPOINT_EVENT(rcu_fqs,
 
        TP_PROTO(const char *rcuname, unsigned long gpnum, int cpu, const char *qsevent),
@@ -374,7 +374,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_fqs,
 
 #endif /*
         * #if defined(CONFIG_TREE_RCU)
-        *      || (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
+        *      || (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,19,0)
         *              && defined(CONFIG_PREEMPT_RCU))
         *      || defined(CONFIG_TREE_PREEMPT_RCU)
         */
@@ -392,7 +392,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_fqs,
  * events use the upper bits of each number, while interrupt-related
  * events use the lower bits.
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))      \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))  \
        || LTTNG_KERNEL_RANGE(5,5,6, 5,6,0)             \
        || LTTNG_KERNEL_RANGE(5,4,22, 5,5,0)            \
        || LTTNG_UBUNTU_KERNEL_RANGE(5,0,21,46, 5,1,0,0)
@@ -410,7 +410,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_dyntick,
        )
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,16,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,16,0))
 LTTNG_TRACEPOINT_EVENT(rcu_dyntick,
 
        TP_PROTO(const char *polarity, long oldnesting, long newnesting, atomic_t dynticks),
@@ -425,7 +425,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_dyntick,
        )
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
 LTTNG_TRACEPOINT_EVENT(rcu_dyntick,
 
        TP_PROTO(const char *polarity, long long oldnesting, long long newnesting),
@@ -438,7 +438,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_dyntick,
                ctf_integer(long long, newnesting, newnesting)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
 LTTNG_TRACEPOINT_EVENT(rcu_dyntick,
 
        TP_PROTO(char *polarity, long long oldnesting, long long newnesting),
@@ -465,7 +465,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_dyntick,
 #endif
 
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
 /*
  * Tracepoint for RCU preparation for idle, the goal being to get RCU
  * processing done so that the current CPU can shut off its scheduling
@@ -490,11 +490,11 @@ LTTNG_TRACEPOINT_EVENT(rcu_dyntick,
  */
 LTTNG_TRACEPOINT_EVENT(rcu_prep_idle,
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
        TP_PROTO(const char *reason),
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) */
        TP_PROTO(char *reason),
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) */
 
        TP_ARGS(reason),
 
@@ -511,7 +511,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_prep_idle,
  * number of lazy callbacks queued, and the fourth element is the
  * total number of callbacks queued.
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
 LTTNG_TRACEPOINT_EVENT(rcu_callback,
 
        TP_PROTO(const char *rcuname, struct rcu_head *rhp, long qlen),
@@ -525,7 +525,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_callback,
                ctf_integer(long, qlen, qlen)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
 LTTNG_TRACEPOINT_EVENT(rcu_callback,
 
        TP_PROTO(const char *rcuname, struct rcu_head *rhp, long qlen_lazy,
@@ -541,7 +541,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_callback,
                ctf_integer(long, qlen, qlen)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0))
 LTTNG_TRACEPOINT_EVENT(rcu_callback,
 
        TP_PROTO(char *rcuname, struct rcu_head *rhp, long qlen_lazy,
@@ -582,7 +582,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_callback,
  * the fourth argument is the number of lazy callbacks queued, and the
  * fifth argument is the total number of callbacks queued.
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
 LTTNG_TRACEPOINT_EVENT(rcu_kfree_callback,
 
        TP_PROTO(const char *rcuname, struct rcu_head *rhp, unsigned long offset,
@@ -597,7 +597,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_kfree_callback,
                ctf_integer(long, qlen, qlen)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
 LTTNG_TRACEPOINT_EVENT(rcu_kfree_callback,
 
        TP_PROTO(const char *rcuname, struct rcu_head *rhp, unsigned long offset,
@@ -613,7 +613,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_kfree_callback,
                ctf_integer(long, qlen, qlen)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0))
 LTTNG_TRACEPOINT_EVENT(rcu_kfree_callback,
 
        TP_PROTO(char *rcuname, struct rcu_head *rhp, unsigned long offset,
@@ -653,7 +653,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_kfree_callback,
  * the total number of callbacks queued, and the fourth argument is
  * the current RCU-callback batch limit.
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
 LTTNG_TRACEPOINT_EVENT(rcu_batch_start,
 
        TP_PROTO(const char *rcuname, long qlen, long blimit),
@@ -666,7 +666,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_batch_start,
                ctf_integer(long, blimit, blimit)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
 LTTNG_TRACEPOINT_EVENT(rcu_batch_start,
 
        TP_PROTO(const char *rcuname, long qlen_lazy, long qlen, long blimit),
@@ -680,7 +680,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_batch_start,
                ctf_integer(long, blimit, blimit)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0))
 LTTNG_TRACEPOINT_EVENT(rcu_batch_start,
 
        TP_PROTO(char *rcuname, long qlen_lazy, long qlen, long blimit),
@@ -694,7 +694,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_batch_start,
                ctf_integer(long, blimit, blimit)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0))
 LTTNG_TRACEPOINT_EVENT(rcu_batch_start,
 
        TP_PROTO(char *rcuname, long qlen_lazy, long qlen, int blimit),
@@ -730,11 +730,11 @@ LTTNG_TRACEPOINT_EVENT(rcu_batch_start,
  */
 LTTNG_TRACEPOINT_EVENT(rcu_invoke_callback,
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
        TP_PROTO(const char *rcuname, struct rcu_head *rhp),
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) */
        TP_PROTO(char *rcuname, struct rcu_head *rhp),
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) */
 
        TP_ARGS(rcuname, rhp),
 
@@ -754,11 +754,11 @@ LTTNG_TRACEPOINT_EVENT(rcu_invoke_callback,
  */
 LTTNG_TRACEPOINT_EVENT(rcu_invoke_kfree_callback,
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
        TP_PROTO(const char *rcuname, struct rcu_head *rhp, unsigned long offset),
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) */
        TP_PROTO(char *rcuname, struct rcu_head *rhp, unsigned long offset),
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) */
 
        TP_ARGS(rcuname, rhp, offset),
 
@@ -782,17 +782,17 @@ LTTNG_TRACEPOINT_EVENT(rcu_invoke_kfree_callback,
  */
 LTTNG_TRACEPOINT_EVENT(rcu_batch_end,
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,13,0))
        TP_PROTO(const char *rcuname, int callbacks_invoked,
                 char cb, char nr, char iit, char risk),
 
        TP_ARGS(rcuname, callbacks_invoked, cb, nr, iit, risk),
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
        TP_PROTO(const char *rcuname, int callbacks_invoked,
                 bool cb, bool nr, bool iit, bool risk),
 
        TP_ARGS(rcuname, callbacks_invoked, cb, nr, iit, risk),
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
        TP_PROTO(char *rcuname, int callbacks_invoked,
                 bool cb, bool nr, bool iit, bool risk),
 
@@ -806,12 +806,12 @@ LTTNG_TRACEPOINT_EVENT(rcu_batch_end,
        TP_FIELDS(
                ctf_string(rcuname, rcuname)
                ctf_integer(int, callbacks_invoked, callbacks_invoked)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,13,0))
                ctf_integer(char, cb, cb)
                ctf_integer(char, nr, nr)
                ctf_integer(char, iit, iit)
                ctf_integer(char, risk, risk)
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
                ctf_integer(bool, cb, cb)
                ctf_integer(bool, nr, nr)
                ctf_integer(bool, iit, iit)
@@ -820,7 +820,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_batch_end,
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
 /*
  * Tracepoint for rcutorture readers.  The first argument is the name
  * of the RCU flavor from rcutorture's viewpoint and the second argument
@@ -828,12 +828,12 @@ LTTNG_TRACEPOINT_EVENT(rcu_batch_end,
  */
 LTTNG_TRACEPOINT_EVENT(rcu_torture_read,
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
        TP_PROTO(const char *rcutorturename, struct rcu_head *rhp,
                 unsigned long secs, unsigned long c_old, unsigned long c),
 
        TP_ARGS(rcutorturename, rhp, secs, c_old, c),
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0))
        TP_PROTO(char *rcutorturename, struct rcu_head *rhp,
                 unsigned long secs, unsigned long c_old, unsigned long c),
 
@@ -847,7 +847,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_torture_read,
        TP_FIELDS(
                ctf_string(rcutorturename, rcutorturename)
                ctf_integer_hex(struct rcu_head *, rhp, rhp)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0))
                ctf_integer(unsigned long, secs, secs)
                ctf_integer(unsigned long, c_old, c_old)
                ctf_integer(unsigned long, c, c)
@@ -856,7 +856,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_torture_read,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,6,0))
 /*
  * Tracepoint for _rcu_barrier() execution.  The string "s" describes
  * the _rcu_barrier phase:
@@ -876,11 +876,11 @@ LTTNG_TRACEPOINT_EVENT(rcu_torture_read,
  */
 LTTNG_TRACEPOINT_EVENT(rcu_barrier,
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
        TP_PROTO(const char *rcuname, const char *s, int cpu, int cnt, unsigned long done),
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) */
        TP_PROTO(char *rcuname, char *s, int cpu, int cnt, unsigned long done),
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) */
 
        TP_ARGS(rcuname, s, cpu, cnt, done),
 
@@ -896,7 +896,7 @@ LTTNG_TRACEPOINT_EVENT(rcu_barrier,
 
 #else /* #ifdef CONFIG_RCU_TRACE */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,19,0) || \
        LTTNG_RHEL_KERNEL_RANGE(4,18,0,80,0,0, 4,19,0,0,0,0))
 #define trace_rcu_grace_period(rcuname, gp_seq, gpevent) do { } while (0)
 #define trace_rcu_grace_period_init(rcuname, gp_seq, level, grplo, grphi, \
@@ -919,17 +919,17 @@ LTTNG_TRACEPOINT_EVENT(rcu_barrier,
 #define trace_rcu_fqs(rcuname, gpnum, cpu, qsevent) do { } while (0)
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,16,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,16,0))
 #define trace_rcu_dyntick(polarity, oldnesting, newnesting, dyntick) do { } while (0)
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
 #define trace_rcu_dyntick(polarity, oldnesting, newnesting) do { } while (0)
 #else
 #define trace_rcu_dyntick(polarity) do { } while (0)
 #endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
 #define trace_rcu_prep_idle(reason) do { } while (0)
 #endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0))
 #define trace_rcu_callback(rcuname, rhp, qlen_lazy, qlen) do { } while (0)
 #define trace_rcu_kfree_callback(rcuname, rhp, offset, qlen_lazy, qlen) \
        do { } while (0)
@@ -942,19 +942,19 @@ LTTNG_TRACEPOINT_EVENT(rcu_barrier,
 #endif
 #define trace_rcu_invoke_callback(rcuname, rhp) do { } while (0)
 #define trace_rcu_invoke_kfree_callback(rcuname, rhp, offset) do { } while (0)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
 #define trace_rcu_batch_end(rcuname, callbacks_invoked, cb, nr, iit, risk) \
        do { } while (0)
 #else
 #define trace_rcu_batch_end(rcuname, callbacks_invoked) do { } while (0)
 #endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0))
 #define trace_rcu_torture_read(rcutorturename, rhp, secs, c_old, c) \
        do { } while (0)
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
 #define trace_rcu_torture_read(rcutorturename, rhp) do { } while (0)
 #endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,6,0))
 #define trace_rcu_barrier(name, s, cpu, cnt, done) do { } while (0)
 #endif
 #endif /* #else #ifdef CONFIG_RCU_TRACE */
index 8af4d5aed533c376f0d420a156beb0101c28a2f6..6f46f3887fb9dc6c23ab9585b83381bf7eab29a9 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <lttng/tracepoint-event.h>
 #include <linux/ktime.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 #ifndef _TRACE_REGMAP_DEF_
 #define _TRACE_REGMAP_DEF_
index 90499aee6ae4830bdae27dcd044abc3fe0316b7f..97b30263233c110485a5b9633fc19dbb90fd36d4 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef ONCE_LTTNG_RPC_H
 #define ONCE_LTTNG_RPC_H
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
 static inline
 int lttng_get_clid(const struct rpc_task *task)
 {
@@ -28,11 +28,11 @@ int lttng_get_clid(const struct rpc_task *task)
         */
        return (int) tk_client->cl_clid;
 }
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0)) */
 
 #endif /* ONCE_LTTNG_RPC_H */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,0,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status,
 
        TP_PROTO(const struct rpc_task *task),
@@ -57,7 +57,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_bind_status,
 
        TP_ARGS(task)
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status,
 
        TP_PROTO(struct rpc_task *task),
@@ -109,13 +109,13 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_bind_status,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,0,0))
 LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_connect_status,
        TP_PROTO(const struct rpc_task *task),
 
        TP_ARGS(task)
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,17,0))
 LTTNG_TRACEPOINT_EVENT(rpc_connect_status,
        TP_PROTO(const struct rpc_task *task),
 
@@ -127,7 +127,7 @@ LTTNG_TRACEPOINT_EVENT(rpc_connect_status,
                ctf_integer(int, status, task->tk_status)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
 LTTNG_TRACEPOINT_EVENT(rpc_connect_status,
        TP_PROTO(struct rpc_task *task, int status),
 
@@ -153,7 +153,7 @@ LTTNG_TRACEPOINT_EVENT(rpc_connect_status,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,17,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running,
 
        TP_PROTO(const struct rpc_task *task, const void *action),
@@ -222,7 +222,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_wakeup,
        TP_ARGS(task, q)
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running,
 
        TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action),
index 10da76c9c0aaae748094ad48ccffce2451eb2252..29bce6729b9e5af33a5b7e8eeaaa7f36cf54eee2 100644 (file)
@@ -9,8 +9,8 @@
 #include <linux/sched.h>
 #include <linux/pid_namespace.h>
 #include <linux/binfmts.h>
-#include <linux/version.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
+#include <lttng/kernel-version.h>
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0))
 #include <linux/sched/rt.h>
 #endif
 #include <wrapper/namespace.h>
@@ -20,7 +20,7 @@
 #ifndef _TRACE_SCHED_DEF_
 #define _TRACE_SCHED_DEF_
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0))
 
 static inline long __trace_sched_switch_state(bool preempt, struct task_struct *p)
 {
@@ -48,7 +48,7 @@ static inline long __trace_sched_switch_state(bool preempt, struct task_struct *
         return state ? (1 << (state - 1)) : state;
 }
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
 
 static inline long __trace_sched_switch_state(bool preempt, struct task_struct *p)
 {
@@ -76,7 +76,7 @@ static inline long __trace_sched_switch_state(bool preempt, struct task_struct *
         return state ? (1 << (state - 1)) : state;
 }
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,4,0))
 
 static inline long __trace_sched_switch_state(bool preempt, struct task_struct *p)
 {
@@ -90,7 +90,7 @@ static inline long __trace_sched_switch_state(bool preempt, struct task_struct *
        return preempt ? TASK_RUNNING | TASK_STATE_MAX : p->state;
 }
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,19,0))
 
 static inline long __trace_sched_switch_state(struct task_struct *p)
 {
@@ -110,7 +110,7 @@ static inline long __trace_sched_switch_state(struct task_struct *p)
        return state;
 }
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,13,0))
 
 static inline long __trace_sched_switch_state(struct task_struct *p)
 {
@@ -127,7 +127,7 @@ static inline long __trace_sched_switch_state(struct task_struct *p)
        return state;
 }
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,2,0))
 
 static inline long __trace_sched_switch_state(struct task_struct *p)
 {
@@ -179,21 +179,21 @@ LTTNG_TRACEPOINT_ENUM(task_state,
                ctf_enum_value("EXIT_DEAD", EXIT_DEAD)
                ctf_enum_value("EXIT_ZOMBIE", EXIT_ZOMBIE)
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0))
                ctf_enum_value("TASK_PARKED", TASK_PARKED)
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) */
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0)) */
 
                ctf_enum_value("TASK_DEAD", TASK_DEAD)
                ctf_enum_value("TASK_WAKEKILL", TASK_WAKEKILL)
                ctf_enum_value("TASK_WAKING", TASK_WAKING)
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0))
                ctf_enum_value("TASK_NOLOAD", TASK_NOLOAD)
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)) */
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0)) */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
                ctf_enum_value("TASK_NEW", TASK_NEW)
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)) */
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0)) */
 
                ctf_enum_value("TASK_STATE_MAX", TASK_STATE_MAX)
        )
@@ -231,7 +231,7 @@ LTTNG_TRACEPOINT_EVENT(sched_kthread_stop_ret,
 /*
  * Tracepoint for waking up a task:
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0) || \
        LTTNG_RT_KERNEL_RANGE(4,1,10,11, 4,2,0,0) || \
        LTTNG_RT_KERNEL_RANGE(3,18,27,26, 3,19,0,0) || \
        LTTNG_RT_KERNEL_RANGE(3,14,61,63, 3,15,0,0) || \
@@ -252,7 +252,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(sched_wakeup_template,
                ctf_integer(int, target_cpu, task_cpu(p))
        )
 )
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0)) */
 LTTNG_TRACEPOINT_EVENT_CLASS(sched_wakeup_template,
 
        TP_PROTO(struct task_struct *p, int success),
@@ -267,9 +267,9 @@ LTTNG_TRACEPOINT_EVENT_CLASS(sched_wakeup_template,
                ctf_integer(int, target_cpu, task_cpu(p))
        )
 )
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0)) */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0) || \
        LTTNG_RT_KERNEL_RANGE(4,1,10,11, 4,2,0,0) || \
        LTTNG_RT_KERNEL_RANGE(3,18,27,26, 3,19,0,0) || \
        LTTNG_RT_KERNEL_RANGE(3,14,61,63, 3,15,0,0) || \
@@ -314,14 +314,14 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_wakeup_template, sched_wakeup_new,
             TP_PROTO(struct task_struct *p, int success),
             TP_ARGS(p, success))
 
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) */
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0)) */
 
 /*
  * Tracepoint for task switches, performed by the scheduler:
  */
 LTTNG_TRACEPOINT_EVENT(sched_switch,
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,4,0))
        TP_PROTO(bool preempt,
                 struct task_struct *prev,
                 struct task_struct *next),
@@ -332,13 +332,13 @@ LTTNG_TRACEPOINT_EVENT(sched_switch,
                 struct task_struct *next),
 
        TP_ARGS(prev, next),
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)) */
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,4,0)) */
 
        TP_FIELDS(
                ctf_array_text(char, prev_comm, prev->comm, TASK_COMM_LEN)
                ctf_integer(pid_t, prev_tid, prev->pid)
                ctf_integer(int, prev_prio, prev->prio - MAX_RT_PRIO)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,4,0))
                ctf_enum(task_state, long, prev_state, __trace_sched_switch_state(preempt, prev))
 #else
                ctf_enum(task_state, long, prev_state, __trace_sched_switch_state(prev))
@@ -455,7 +455,7 @@ LTTNG_TRACEPOINT_EVENT_CODE(sched_process_fork,
                ctf_array_text(char, parent_comm, parent->comm, TASK_COMM_LEN)
                ctf_integer(pid_t, parent_tid, parent->pid)
                ctf_integer(pid_t, parent_pid, parent->tgid)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
                ctf_integer(unsigned int, parent_ns_inum,
                        ({
                                unsigned int parent_ns_inum = 0;
@@ -475,7 +475,7 @@ LTTNG_TRACEPOINT_EVENT_CODE(sched_process_fork,
                ctf_integer(pid_t, child_tid, child->pid)
                ctf_sequence(pid_t, vtids, tp_locvar->vtids, u8, tp_locvar->ns_level)
                ctf_integer(pid_t, child_pid, child->tgid)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
                ctf_integer(unsigned int, child_ns_inum,
                        ({
                                unsigned int child_ns_inum = 0;
@@ -496,7 +496,7 @@ LTTNG_TRACEPOINT_EVENT_CODE(sched_process_fork,
        TP_code_post()
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0))
 /*
  * Tracepoint for exec:
  */
@@ -557,7 +557,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_stat_template, sched_stat_iowait,
             TP_PROTO(struct task_struct *tsk, u64 delay),
             TP_ARGS(tsk, delay))
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
 /*
  * Tracepoint for accounting blocked time (time the task is in uninterruptible).
  */
@@ -584,7 +584,7 @@ LTTNG_TRACEPOINT_EVENT(sched_stat_runtime,
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0) || \
        LTTNG_RT_KERNEL_RANGE(4,9,27,18, 4,10,0,0) || \
        LTTNG_RT_KERNEL_RANGE(4,11,5,1, 4,12,0,0))
 /*
index 21637bc111734f79315d29d036571b8af00c9958..52c0ebdffa69f161217d9165463e13d3023694cb 100644 (file)
@@ -9,14 +9,14 @@
 #include <scsi/scsi_cmnd.h>
 #include <scsi/scsi_host.h>
 #include <linux/trace_seq.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 #ifndef _TRACE_SCSI_DEF
 #define _TRACE_SCSI_DEF
 
 #define scsi_opcode_name(opcode)       { opcode, #opcode }
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,7,0) \
        || LTTNG_SLE_KERNEL_RANGE(4,4,9,36,0,0, 4,5,0,0,0,0))
 
 #define show_opcode_name(val)                                  \
                scsi_opcode_name(ATA_16),                       \
                scsi_opcode_name(ATA_12))
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) \
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,19,0) \
        || LTTNG_RHEL_KERNEL_RANGE(3,10,0,327,0,0, 3,11,0,0,0,0))
 
 #define show_opcode_name(val)                                  \
                scsi_opcode_name(ATA_16),                       \
                scsi_opcode_name(ATA_12))
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,19,0)) */
 
 #define show_opcode_name(val)                                  \
        __print_symbolic(val,                                   \
                scsi_opcode_name(ATA_16),                       \
                scsi_opcode_name(ATA_12))
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,19,0)) */
 
 #define scsi_hostbyte_name(result)     { result, #result }
 #define show_hostbyte_name(val)                                        \
index 4a71d14b917aa83f86d67ef21146fd87228f2771..8c0661a1c48df2536f204139ff2ec128abe84fe0 100644 (file)
@@ -6,14 +6,14 @@
 #define LTTNG_TRACE_SIGNAL_H
 
 #include <lttng/tracepoint-event.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 #ifndef _TRACE_SIGNAL_DEF
 #define _TRACE_SIGNAL_DEF
 #include <linux/signal.h>
 #include <linux/sched.h>
 #undef LTTNG_FIELDS_SIGINFO
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,20,0) || \
        LTTNG_RHEL_KERNEL_RANGE(4,18,0,147,0,0, 4,19,0,0,0,0))
 #define LTTNG_FIELDS_SIGINFO(info)                             \
                ctf_integer(int, errno,                         \
@@ -24,7 +24,7 @@
                        (info == SEND_SIG_NOINFO) ?             \
                        SI_USER :                               \
                        ((info == SEND_SIG_PRIV) ? SI_KERNEL : info->si_code))
-#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) */
+#else /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,20,0) */
 #define LTTNG_FIELDS_SIGINFO(info)                             \
                ctf_integer(int, errno,                         \
                        (info == SEND_SIG_NOINFO || info == SEND_SIG_FORCED || info == SEND_SIG_PRIV) ? \
@@ -34,7 +34,7 @@
                        (info == SEND_SIG_NOINFO || info == SEND_SIG_FORCED) ? \
                        SI_USER :                               \
                        ((info == SEND_SIG_PRIV) ? SI_KERNEL : info->si_code))
-#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) */
+#endif /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,20,0) */
 #endif /* _TRACE_SIGNAL_DEF */
 
 /**
@@ -49,7 +49,7 @@
  * SEND_SIG_NOINFO means that si_code is SI_USER, and SEND_SIG_PRIV
  * means that si_code is SI_KERNEL.
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,20,0) || \
        LTTNG_RHEL_KERNEL_RANGE(4,18,0,147,0,0, 4,19,0,0,0,0))
 LTTNG_TRACEPOINT_EVENT(signal_generate,
 
@@ -67,7 +67,7 @@ LTTNG_TRACEPOINT_EVENT(signal_generate,
                ctf_integer(int, result, result)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0))
 LTTNG_TRACEPOINT_EVENT(signal_generate,
 
        TP_PROTO(int sig, struct siginfo *info, struct task_struct *task,
@@ -114,7 +114,7 @@ LTTNG_TRACEPOINT_EVENT(signal_generate,
  * This means, this can show which signals are actually delivered, but
  * matching generated signals and delivered signals may not be correct.
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,20,0) || \
        LTTNG_RHEL_KERNEL_RANGE(4,18,0,147,0,0, 4,19,0,0,0,0))
 LTTNG_TRACEPOINT_EVENT(signal_deliver,
 
@@ -145,7 +145,7 @@ LTTNG_TRACEPOINT_EVENT(signal_deliver,
 )
 #endif
 
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,4,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(signal_queue_overflow,
 
        TP_PROTO(int sig, int group, struct siginfo *info),
index 2be9d83fb4495d937eecd7d3352cdd7f636043e3..d6579363b55866e7ec4c3b81a2c49576d21d92b0 100644 (file)
@@ -8,7 +8,7 @@
 #include <lttng/tracepoint-event.h>
 #include <linux/skbuff.h>
 #include <linux/netdevice.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 /*
  * Tracepoint for free an sk_buff:
index 955bc1a31b5da3a8dc4d0ad985ce4220941c5db8..39d3f549225d1082e32112cd927c8408a97172bb 100644 (file)
@@ -6,7 +6,7 @@
 #define LTTNG_TRACE_SOCK_H
 
 #include <lttng/tracepoint-event.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 #include <net/sock.h>
 
 LTTNG_TRACEPOINT_EVENT(sock_rcvqueue_full,
@@ -22,7 +22,7 @@ LTTNG_TRACEPOINT_EVENT(sock_rcvqueue_full,
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,19,0))
 
 LTTNG_TRACEPOINT_EVENT(sock_exceed_buf_limit,
 
@@ -43,7 +43,7 @@ LTTNG_TRACEPOINT_EVENT(sock_exceed_buf_limit,
        )
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0))
 
 LTTNG_TRACEPOINT_EVENT(sock_exceed_buf_limit,
 
@@ -60,7 +60,7 @@ LTTNG_TRACEPOINT_EVENT(sock_exceed_buf_limit,
        )
 )
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0)) */
 
 LTTNG_TRACEPOINT_EVENT(sock_exceed_buf_limit,
 
@@ -77,7 +77,7 @@ LTTNG_TRACEPOINT_EVENT(sock_exceed_buf_limit,
        )
 )
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0)) */
 
 #endif /* LTTNG_TRACE_SOCK_H */
 
index 503c5bc2bf7656867698a4c82c732da6a777f3a7..62d307d5d06e8fed3bdd54d5b9d3492e1288b3fd 100644 (file)
 #define _TRACE_TIMER_DEF_
 #include <linux/hrtimer.h>
 #include <linux/timer.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 struct timer_list;
 
 #endif /* _TRACE_TIMER_DEF_ */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
 #define lttng_ktime_get_tv64(kt)       (kt)
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 #define lttng_ktime_get_tv64(kt)       ((kt).tv64)
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 
 LTTNG_TRACEPOINT_EVENT_CLASS(timer_class,
 
@@ -45,7 +45,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(timer_class, timer_init,
        TP_ARGS(timer)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0) || \
        LTTNG_RHEL_KERNEL_RANGE(3,10,0,957,0,0, 3,11,0,0,0,0))
 /**
  * timer_start - called when the timer is started
@@ -68,7 +68,7 @@ LTTNG_TRACEPOINT_EVENT(timer_start,
                ctf_integer(unsigned int, flags, flags)
        )
 )
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0)) */
 /**
  * timer_start - called when the timer is started
  * @timer:     pointer to struct timer_list
@@ -87,9 +87,9 @@ LTTNG_TRACEPOINT_EVENT(timer_start,
                ctf_integer(unsigned long, now, jiffies)
        )
 )
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0)) */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,2,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,2,0))
 /**
  * timer_expire_entry - called immediately before the timer callback
  * @timer:     pointer to struct timer_list
@@ -184,7 +184,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(hrtimer_init,
  * hrtimer_start - called when the hrtimer is started
  * @timer: pointer to struct hrtimer
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,16,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,16,0) || \
        LTTNG_RT_KERNEL_RANGE(4,14,0,0, 4,15,0,0))
 LTTNG_TRACEPOINT_EVENT_MAP(hrtimer_start,
 
@@ -294,7 +294,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(timer_hrtimer_class, hrtimer_cancel,
  *             zero, otherwise it is started
  * @expires:   the itimers expiry time
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
 LTTNG_TRACEPOINT_EVENT_MAP(itimer_state,
 
        timer_itimer_state,
@@ -313,7 +313,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(itimer_state,
                ctf_integer(long, interval_nsec, value->it_interval.tv_nsec)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
 LTTNG_TRACEPOINT_EVENT_MAP(itimer_state,
 
        timer_itimer_state,
@@ -332,7 +332,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(itimer_state,
                ctf_integer(long, interval_usec, value->it_interval.tv_usec)
        )
 )
-#else /* if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
+#else /* if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */
 LTTNG_TRACEPOINT_EVENT_MAP(itimer_state,
 
        timer_itimer_state,
@@ -351,7 +351,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(itimer_state,
                ctf_integer(long, interval_usec, value->it_interval.tv_usec)
        )
 )
-#endif /* #else (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
+#endif /* #else (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */
 
 /**
  * itimer_expire - called when itimer expires
@@ -359,7 +359,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(itimer_state,
  * @pid:       pid of the process which owns the timer
  * @now:       current time, used to calculate the latency of itimer
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
 LTTNG_TRACEPOINT_EVENT_MAP(itimer_expire,
 
        timer_itimer_expire,
@@ -374,7 +374,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(itimer_expire,
                ctf_integer(unsigned long long, now, now)
        )
 )
-#else /* if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
+#else /* if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */
 LTTNG_TRACEPOINT_EVENT_MAP(itimer_expire,
 
        timer_itimer_expire,
@@ -389,7 +389,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(itimer_expire,
                ctf_integer(cputime_t, now, now)
        )
 )
-#endif /* #else (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
+#endif /* #else (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */
 
 #endif /*  LTTNG_TRACE_TIMER_H */
 
index dd7551e828428ce984b3ce63a155ca0af9213065..ad16e7ea3f2f799fb0747031e44eae50cf6c64f2 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <lttng/tracepoint-event.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(v4l2_class,
 
        TP_PROTO(int minor, struct v4l2_buffer *buf),
index 8ca0d6bf7a46ae3a43fc213726523d1c320e1b43..023b65a8d8df00b2f62b5ca6a29e57eda0ed8f86 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <lttng/tracepoint-event.h>
 #include <linux/workqueue.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 #ifndef _TRACE_WORKQUEUE_DEF_
 #define _TRACE_WORKQUEUE_DEF_
@@ -40,7 +40,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(workqueue_work,
  */
 LTTNG_TRACEPOINT_EVENT(workqueue_queue_work,
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0))
        TP_PROTO(unsigned int req_cpu, struct pool_workqueue *pwq,
                 struct work_struct *work),
 
@@ -92,7 +92,7 @@ LTTNG_TRACEPOINT_EVENT(workqueue_execute_start,
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
 /**
  * workqueue_execute_end - called immediately after the workqueue callback
  * @work:      pointer to struct work_struct
index 1863ff71857ed11b6271c686e26f34dea3bf1c1c..b6dfd4c0b48ab73cdfb31a3f5dcac1da2aa75288 100644 (file)
@@ -9,7 +9,7 @@
 #include <linux/tracepoint.h>
 #include <linux/backing-dev.h>
 #include <linux/writeback.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 #ifndef _TRACE_WRITEBACK_DEF_
 #define _TRACE_WRITEBACK_DEF_
@@ -22,7 +22,7 @@
  *  commit a212b105b07d75b48b1a166378282e8a77fbf53d which inlines
  *  inode_to_bdi but not sb_is_blkdev_sb making it unusable by modules.
  */
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(4,0,0))
 static inline struct backing_dev_info *lttng_inode_to_bdi(struct inode *inode)
 {
        struct super_block *sb;
@@ -42,11 +42,11 @@ static inline struct backing_dev_info *lttng_inode_to_bdi(struct inode *inode)
 {
        return inode_to_bdi(inode);
 }
-#endif /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)) */
+#endif /* #if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(4,0,0)) */
 
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,9,0))
 #define show_inode_state(state)                                        \
        __print_flags(state, "|",                               \
                {I_DIRTY_SYNC,          "I_DIRTY_SYNC"},        \
@@ -60,7 +60,7 @@ static inline struct backing_dev_info *lttng_inode_to_bdi(struct inode *inode)
                {I_DIRTY_TIME,          "I_DIRTY_TIME"},        \
                {I_REFERENCED,          "I_REFERENCED"}         \
        )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,0,0))
 #define show_inode_state(state)                                        \
        __print_flags(state, "|",                               \
                {I_DIRTY_SYNC,          "I_DIRTY_SYNC"},        \
@@ -75,7 +75,7 @@ static inline struct backing_dev_info *lttng_inode_to_bdi(struct inode *inode)
                {I_DIRTY_TIME_EXPIRED,  "I_DIRTY_TIME_EXPIRED"}, \
                {I_REFERENCED,          "I_REFERENCED"}         \
        )
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,0,0)) */
 #define show_inode_state(state)                                        \
        __print_flags(state, "|",                               \
                {I_DIRTY_SYNC,          "I_DIRTY_SYNC"},        \
@@ -88,9 +88,9 @@ static inline struct backing_dev_info *lttng_inode_to_bdi(struct inode *inode)
                {I_SYNC,                "I_SYNC"},              \
                {I_REFERENCED,          "I_REFERENCED"}         \
        )
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,0,0)) */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,0,0))
 
 LTTNG_TRACEPOINT_EVENT(writeback_dirty_page,
        TP_PROTO(struct page *page, struct address_space *mapping),
@@ -142,7 +142,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_write_inode_template, name, \
 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WRITE_INODE(writeback_write_inode_start)
 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WRITE_INODE(writeback_write_inode)
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0))
 
 LTTNG_TRACEPOINT_EVENT(writeback_dirty_page,
        TP_PROTO(struct page *page, struct address_space *mapping),
@@ -193,9 +193,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_write_inode_template, name, \
 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WRITE_INODE(writeback_write_inode_start)
 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WRITE_INODE(writeback_write_inode)
 
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) */
+#endif /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0)) */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0))
 
 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_work_class,
        TP_PROTO(struct bdi_writeback *wb, struct wb_writeback_work *work),
@@ -206,7 +206,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(writeback_work_class,
        )
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,0,0))
 
 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_work_class,
        TP_PROTO(struct backing_dev_info *bdi, struct wb_writeback_work *work),
@@ -217,7 +217,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(writeback_work_class,
        )
 )
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,0,0)) */
 
 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_work_class,
        TP_PROTO(struct backing_dev_info *bdi, struct wb_writeback_work *work),
@@ -229,28 +229,28 @@ LTTNG_TRACEPOINT_EVENT_CLASS(writeback_work_class,
        )
 )
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,0,0)) */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0))
 
 #define LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(name) \
 LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_work_class, name, \
        TP_PROTO(struct bdi_writeback *wb, struct wb_writeback_work *work), \
        TP_ARGS(wb, work))
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0)) */
 
 #define LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(name) \
 LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_work_class, name, \
        TP_PROTO(struct backing_dev_info *bdi, struct wb_writeback_work *work), \
        TP_ARGS(bdi, work))
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0)) */
 
 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(writeback_nothread)
 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(writeback_queue)
 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(writeback_exec)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,1,0))
 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(writeback_start)
 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(writeback_written)
 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(writeback_wait)
@@ -264,7 +264,7 @@ LTTNG_TRACEPOINT_EVENT(writeback_pages_written,
        )
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0))
 
 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_class,
        TP_PROTO(struct bdi_writeback *wb),
@@ -295,7 +295,7 @@ LTTNG_TRACEPOINT_EVENT(writeback_bdi_register,
        )
 )
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0)) */
 
 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_class,
        TP_PROTO(struct backing_dev_info *bdi),
@@ -319,7 +319,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(writeback_class, name, map, \
 
 DEFINE_WRITEBACK_EVENT(writeback_bdi_register)
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0)) */
 
 DEFINE_WRITEBACK_EVENT(writeback_nowork)
 DEFINE_WRITEBACK_EVENT(writeback_wake_background)
@@ -359,7 +359,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(writeback_wbc_class,
                ctf_integer(int, for_background, wbc->for_background)
                ctf_integer(int, for_reclaim, wbc->for_reclaim)
                ctf_integer(int, range_cyclic, wbc->range_cyclic)
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,1,0))
                ctf_integer(int, more_io, wbc->more_io)
                ctf_integer(unsigned long, older_than_this,
                        wbc->older_than_this ? *wbc->older_than_this : 0)
@@ -374,7 +374,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(writeback_wbc_class,
 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(writeback_wbc_class, name, map, \
        TP_PROTO(struct writeback_control *wbc, struct backing_dev_info *bdi), \
        TP_ARGS(wbc, bdi))
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,1,0))
 LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_writeback_start, writeback_wbc_writeback_start)
 LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_writeback_written, writeback_wbc_writeback_written)
 LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_writeback_wait, writeback_wbc_writeback_wait)
@@ -384,7 +384,7 @@ LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_balance_dirty_wait, writeback_wbc_balanc
 #endif
 LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_writepage, writeback_wbc_writepage)
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,9,0) || \
        LTTNG_KERNEL_RANGE(5,8,6, 5,9,0) || \
        LTTNG_KERNEL_RANGE(5,4,62, 5,5,0) || \
        LTTNG_KERNEL_RANGE(4,19,143, 4,20,0) || \
@@ -404,7 +404,7 @@ LTTNG_TRACEPOINT_EVENT(writeback_queue_io,
                ctf_integer(int, moved, moved)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,2,0))
 LTTNG_TRACEPOINT_EVENT(writeback_queue_io,
        TP_PROTO(struct bdi_writeback *wb,
                 struct wb_writeback_work *work,
@@ -415,7 +415,7 @@ LTTNG_TRACEPOINT_EVENT(writeback_queue_io,
                ctf_integer(int, moved, moved)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,1,0))
 LTTNG_TRACEPOINT_EVENT(writeback_queue_io,
        TP_PROTO(struct bdi_writeback *wb,
                 unsigned long *older_than_this,
@@ -434,7 +434,7 @@ LTTNG_TRACEPOINT_EVENT(writeback_queue_io,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,8,0))
 LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state,
 
        writeback_global_dirty_state,
@@ -457,7 +457,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state,
                ctf_integer(unsigned long, dirty_limit, global_dirty_limit)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
 LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state,
 
        writeback_global_dirty_state,
@@ -481,7 +481,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state,
                ctf_integer(unsigned long, dirty_limit, global_dirty_limit)
        )
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,1,0))
 LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state,
 
        writeback_global_dirty_state,
@@ -507,11 +507,11 @@ LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,2,0))
 
 #define KBps(x)                        ((x) << (PAGE_SHIFT - 10))
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0))
 
 LTTNG_TRACEPOINT_EVENT_MAP(bdi_dirty_ratelimit,
 
@@ -535,7 +535,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(bdi_dirty_ratelimit,
        )
 )
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0))
 
 LTTNG_TRACEPOINT_EVENT_MAP(bdi_dirty_ratelimit,
 
@@ -559,7 +559,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(bdi_dirty_ratelimit,
        )
 )
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0)) */
 
 LTTNG_TRACEPOINT_EVENT_MAP(bdi_dirty_ratelimit,
 
@@ -583,9 +583,9 @@ LTTNG_TRACEPOINT_EVENT_MAP(bdi_dirty_ratelimit,
        )
 )
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0)) */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0))
 
 LTTNG_TRACEPOINT_EVENT_MAP(balance_dirty_pages,
 
@@ -637,7 +637,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(balance_dirty_pages,
        )
 )
 
-#else /* #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) */
+#else /* #if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0)) */
 
 LTTNG_TRACEPOINT_EVENT_MAP(balance_dirty_pages,
 
@@ -652,7 +652,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(balance_dirty_pages,
                 unsigned long dirty_ratelimit,
                 unsigned long task_ratelimit,
                 unsigned long dirtied,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
                 unsigned long period,
 #endif
                 long pause,
@@ -660,7 +660,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(balance_dirty_pages,
 
        TP_ARGS(bdi, thresh, bg_thresh, dirty, bdi_thresh, bdi_dirty,
                dirty_ratelimit, task_ratelimit,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
                dirtied, period, pause, start_time
 #else
                dirtied, pause, start_time
@@ -687,7 +687,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(balance_dirty_pages,
                ctf_integer(unsigned long, paused,
                        (jiffies - start_time) * 1000 / HZ)
                ctf_integer(long, pause, pause * 1000 / HZ)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,3,0))
                ctf_integer(unsigned long, period,
                        period * 1000 / HZ)
                ctf_integer(long, think,
@@ -696,11 +696,11 @@ LTTNG_TRACEPOINT_EVENT_MAP(balance_dirty_pages,
 #endif
        )
 )
-#endif /* #else #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) */
+#endif /* #else #if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,3,0)) */
 
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) */
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,2,0)) */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,5,0))
 LTTNG_TRACEPOINT_EVENT(writeback_sb_inodes_requeue,
 
        TP_PROTO(struct inode *inode),
@@ -742,7 +742,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_congest_waited_template, writeback_wai
        TP_ARGS(usec_timeout, usec_delayed)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,1,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_single_inode_template,
 
        TP_PROTO(struct inode *inode,
@@ -766,7 +766,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(writeback_single_inode_template,
        )
 )
 
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,5,0))
 LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_single_inode_template, writeback_single_inode_requeue,
        TP_PROTO(struct inode *inode,
                struct writeback_control *wbc,
index a97c1d954acceb4b88f67e64c4c02a6caa5589df..84e204902025eff750441c95391d092305738aca 100644 (file)
@@ -29,9 +29,9 @@ SC_LTTNG_TRACEPOINT_ENUM(lttng_mmap_flags_mapping_type,
        TP_ENUM_VALUES(
                ctf_enum_value("MAP_SHARED",            MAP_SHARED)
                ctf_enum_value("MAP_PRIVATE",           MAP_PRIVATE)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0))
                ctf_enum_value("MAP_SHARED_VALIDATE",   MAP_SHARED_VALIDATE)
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)) */
+#endif /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0)) */
        )
 )
 
@@ -52,14 +52,14 @@ SC_LTTNG_TRACEPOINT_ENUM(lttng_mmap_flags_options,
                ctf_enum_value("MAP_EXECUTABLE",        LTTNG_MMAP_FLAGS_TO_CTF(MAP_EXECUTABLE))
                ctf_enum_value("MAP_FIXED",             LTTNG_MMAP_FLAGS_TO_CTF(MAP_FIXED))
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,17,0))
                ctf_enum_value("MAP_FIXED_NOREPLACE",   LTTNG_MMAP_FLAGS_TO_CTF(MAP_FIXED_NOREPLACE))
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0)) */
+#endif /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,17,0)) */
 
                ctf_enum_value("MAP_GROWSDOWN",         LTTNG_MMAP_FLAGS_TO_CTF(MAP_GROWSDOWN))
                ctf_enum_value("MAP_HUGETLB",           LTTNG_MMAP_FLAGS_TO_CTF(MAP_HUGETLB))
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
 
 #if defined (MAP_HUGE_2MB) && MAP_HUGE_2MB != 0
                ctf_enum_value("MAP_HUGE_2MB",          LTTNG_MMAP_FLAGS_TO_CTF(MAP_HUGE_2MB))
@@ -69,7 +69,7 @@ SC_LTTNG_TRACEPOINT_ENUM(lttng_mmap_flags_options,
                ctf_enum_value("MAP_HUGE_1GB",          LTTNG_MMAP_FLAGS_TO_CTF(MAP_HUGE_1GB))
 #endif /* defined (MAP_HUGE_1GB) && MAP_HUGE_1GB != 0 */
 
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
+#endif /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0)) */
 
                ctf_enum_value("MAP_LOCKED",            LTTNG_MMAP_FLAGS_TO_CTF(MAP_LOCKED))
                ctf_enum_value("MAP_NONBLOCK",          LTTNG_MMAP_FLAGS_TO_CTF(MAP_NONBLOCK))
@@ -77,9 +77,9 @@ SC_LTTNG_TRACEPOINT_ENUM(lttng_mmap_flags_options,
                ctf_enum_value("MAP_POPULATE",          LTTNG_MMAP_FLAGS_TO_CTF(MAP_POPULATE))
                ctf_enum_value("MAP_STACK",             LTTNG_MMAP_FLAGS_TO_CTF(MAP_STACK))
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0))
                ctf_enum_value("MAP_SYNC",              LTTNG_MMAP_FLAGS_TO_CTF(MAP_SYNC))
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)) */
+#endif /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0)) */
 
 #if defined (MAP_UNINITIALIZED) && MAP_UNINITIALIZED != 0
                ctf_enum_value("MAP_UNINITIALIZED",     LTTNG_MMAP_FLAGS_TO_CTF(MAP_UNINITIALIZED))
@@ -195,14 +195,14 @@ SC_LTTNG_TRACEPOINT_ENUM(lttng_fcntl_cmd_flags,
 #endif /* #if !defined(CONFIG_64BIT) || defined(CONFIG_COMPAT) */
                ctf_enum_value("F_SETOWN_EX", F_SETOWN_EX)
                ctf_enum_value("F_GETOWN_EX", F_GETOWN_EX)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,6,0))
                ctf_enum_value("F_GETOWNER_UIDS", F_GETOWNER_UIDS)
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,6,0)) */
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,15,0))
                ctf_enum_value("F_OFD_GETLK", F_OFD_GETLK)
                ctf_enum_value("F_OFD_SETLK", F_OFD_SETLK)
                ctf_enum_value("F_OFD_SETLKW", F_OFD_SETLKW)
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */
+#endif /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,15,0)) */
                ctf_enum_value("F_SETLEASE", F_SETLEASE)
                ctf_enum_value("F_GETLEASE", F_GETLEASE)
                ctf_enum_value("F_NOTIFY", F_NOTIFY)
@@ -210,16 +210,16 @@ SC_LTTNG_TRACEPOINT_ENUM(lttng_fcntl_cmd_flags,
                ctf_enum_value("F_DUPFD_CLOEXEC", F_DUPFD_CLOEXEC)
                ctf_enum_value("F_SETPIPE_SZ", F_SETPIPE_SZ)
                ctf_enum_value("F_GETPIPE_SZ", F_GETPIPE_SZ)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,17,0))
                ctf_enum_value("F_ADD_SEALS", F_ADD_SEALS)
                ctf_enum_value("F_GET_SEALS", F_GET_SEALS)
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)) */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,17,0)) */
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
                ctf_enum_value("F_GET_RW_HINT", F_GET_RW_HINT)
                ctf_enum_value("F_SET_RW_HINT", F_SET_RW_HINT)
                ctf_enum_value("F_GET_FILE_RW_HINT", F_GET_FILE_RW_HINT)
                ctf_enum_value("F_SET_FILE_RW_HINT", F_SET_FILE_RW_HINT)
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)) */
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0)) */
        )
 )
 
index 866f7f8399a4245e659300a5f8dfebf6121a3602..8b8be95ae523d8e45257fc78f1b07f5a53811397 100644 (file)
@@ -84,16 +84,16 @@ SC_LTTNG_TRACEPOINT_ENUM(lttng_clone_option_flags,
        TP_ENUM_VALUES(
                ctf_enum_value("CLONE_CHILD_CLEARTID",  LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_CHILD_CLEARTID))
                ctf_enum_value("CLONE_CHILD_SETTID",    LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_CHILD_SETTID))
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0))
                ctf_enum_value("CLONE_CLEAR_SIGHAND",   LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_CLEAR_SIGHAND))
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0)) */
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,5,0)) */
                ctf_enum_value("CLONE_DETACHED",        LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_DETACHED))
                ctf_enum_value("CLONE_FILES",           LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_FILES))
                ctf_enum_value("CLONE_FS",              LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_FS))
                ctf_enum_value("CLONE_IO",              LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_IO))
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,6,0))
                ctf_enum_value("CLONE_NEWCGROUP",       LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_NEWCGROUP))
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)) */
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,6,0)) */
                ctf_enum_value("CLONE_NEWIPC",          LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_NEWIPC))
                ctf_enum_value("CLONE_NEWNET",          LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_NEWNET))
                ctf_enum_value("CLONE_NEWNS",           LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_NEWNS))
@@ -102,9 +102,9 @@ SC_LTTNG_TRACEPOINT_ENUM(lttng_clone_option_flags,
                ctf_enum_value("CLONE_NEWUTS",          LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_NEWUTS))
                ctf_enum_value("CLONE_PARENT",          LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_PARENT))
                ctf_enum_value("CLONE_PARENT_SETTID",   LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_PARENT_SETTID))
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,2,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,2,0))
                ctf_enum_value("CLONE_PIDFD",           LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_PIDFD))
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,2,0)) */
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,2,0)) */
                ctf_enum_value("CLONE_PTRACE",          LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_PTRACE))
                ctf_enum_value("CLONE_SETTLS",          LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_SETTLS))
                ctf_enum_value("CLONE_SIGHAND",         LTTNG_CLONE_OPTIONS_FLAGS_TO_CTF(CLONE_SIGHAND))
@@ -1112,9 +1112,9 @@ SC_LTTNG_TRACEPOINT_ENUM(lttng_file_status_flags,
                ctf_enum_value("O_CLOEXEC", O_CLOEXEC)
                ctf_enum_value("O_SYNC", __O_SYNC)
                ctf_enum_value("O_PATH", O_PATH)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,11,0))
                ctf_enum_value("O_TMPFILE", __O_TMPFILE)
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) */
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,11,0)) */
        )
 )
 
index 5c2f256513c3a47ef86d489f35f083f0998f70a6..5e1ed263e2cb02136f583bfd578cc0d35949d377 100644 (file)
@@ -10,7 +10,7 @@
 
 struct lttng_cpuhp_node;
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
 
 #include <linux/cpuhotplug.h>
 
index 7fa41ac18d1664b7d409cd287d7202cd6af53418..51892335010afea17f1056a7a4a010a19e75f672 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef _LTTNG_EVENTS_H
 #define _LTTNG_EVENTS_H
 
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 #include <linux/list.h>
 #include <linux/kprobes.h>
 #include <linux/kref.h>
@@ -157,7 +157,7 @@ union lttng_ctx_value {
  * lttng_ctx_field because cpu hotplug needs fixed-location addresses.
  */
 struct lttng_perf_counter_field {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
        struct lttng_cpuhp_node cpuhp_prepare;
        struct lttng_cpuhp_node cpuhp_online;
 #else
@@ -1039,7 +1039,7 @@ int lttng_add_migratable_to_ctx(struct lttng_ctx **ctx)
 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_LINUX_VERSION_CODE >= LTTNG_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
@@ -1051,7 +1051,7 @@ int lttng_add_cgroup_ns_to_ctx(struct lttng_ctx **ctx)
 #endif
 
 #if defined(CONFIG_IPC_NS) && \
-       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+       (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
 int lttng_add_ipc_ns_to_ctx(struct lttng_ctx **ctx);
 #else
 static inline
@@ -1062,7 +1062,7 @@ int lttng_add_ipc_ns_to_ctx(struct lttng_ctx **ctx)
 #endif
 
 #if !defined(LTTNG_MNT_NS_MISSING_HEADER) && \
-       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+       (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
 int lttng_add_mnt_ns_to_ctx(struct lttng_ctx **ctx);
 #else
 static inline
@@ -1073,7 +1073,7 @@ int lttng_add_mnt_ns_to_ctx(struct lttng_ctx **ctx)
 #endif
 
 #if defined(CONFIG_NET_NS) && \
-       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+       (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
 int lttng_add_net_ns_to_ctx(struct lttng_ctx **ctx);
 #else
 static inline
@@ -1084,7 +1084,7 @@ int lttng_add_net_ns_to_ctx(struct lttng_ctx **ctx)
 #endif
 
 #if defined(CONFIG_PID_NS) && \
-       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+       (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
 int lttng_add_pid_ns_to_ctx(struct lttng_ctx **ctx);
 #else
 static inline
@@ -1095,7 +1095,7 @@ int lttng_add_pid_ns_to_ctx(struct lttng_ctx **ctx)
 #endif
 
 #if defined(CONFIG_USER_NS) && \
-       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+       (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
 int lttng_add_user_ns_to_ctx(struct lttng_ctx **ctx);
 #else
 static inline
@@ -1106,7 +1106,7 @@ int lttng_add_user_ns_to_ctx(struct lttng_ctx **ctx)
 #endif
 
 #if defined(CONFIG_UTS_NS) && \
-       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+       (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
 int lttng_add_uts_ns_to_ctx(struct lttng_ctx **ctx);
 #else
 static inline
@@ -1117,7 +1117,7 @@ int lttng_add_uts_ns_to_ctx(struct lttng_ctx **ctx)
 #endif
 
 #if defined(CONFIG_TIME_NS) && \
-       (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
+       (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
 int lttng_add_time_ns_to_ctx(struct lttng_ctx **ctx);
 #else
 static inline
index a97cc024222d3c0eee2bf1ef2a2226ba11d8a73d..773de29515c78aa12872c8911993b5bc0461d3c3 100644 (file)
 #include <linux/version.h>
 #include <generated/utsrelease.h>
 
+#define LTTNG_KERNEL_VERSION(a, b, c) KERNEL_VERSION(a, b, c)
+#define LTTNG_LINUX_VERSION_CODE LINUX_VERSION_CODE
+
 /*
  * 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))
+       (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(a_low, b_low, c_low) && \
+        LTTNG_LINUX_VERSION_CODE < LTTNG_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))
+       (((LTTNG_KERNEL_VERSION(a, b, c)) << 8) + (d))
 
 #ifdef UTS_UBUNTU_RELEASE_ABI
 #define LTTNG_UBUNTU_VERSION_CODE \
-       ((LINUX_VERSION_CODE << 8) + UTS_UBUNTU_RELEASE_ABI)
+       ((LTTNG_LINUX_VERSION_CODE << 8) + UTS_UBUNTU_RELEASE_ABI)
 #else
 #define LTTNG_UBUNTU_VERSION_CODE      0
 #endif
 /* Debian */
 
 #define LTTNG_DEBIAN_KERNEL_VERSION(a, b, c, d, e, f) \
-       (((((a) << 16) + ((b) << 8) + (c)) * 1000000ULL) + ((d) * 10000) + ((e) * 100) + (f))
+       (((LTTNG_KERNEL_VERSION(a, b, c)) * 1000000ULL) + ((d) * 10000) + ((e) * 100) + (f))
 
 #ifdef DEBIAN_API_VERSION
 #define LTTNG_DEBIAN_VERSION_CODE \
-       ((LINUX_VERSION_CODE * 1000000ULL) + DEBIAN_API_VERSION)
+       ((LTTNG_LINUX_VERSION_CODE * 1000000ULL) + DEBIAN_API_VERSION)
 #else
 #define LTTNG_DEBIAN_VERSION_CODE      0
 #endif
                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 */
 
+#define LTTNG_RHEL_KERNEL_VERSION(a, b, c, d, e, f) \
+       (((LTTNG_KERNEL_VERSION(a, b, c)) * 10000000ULL) + ((d) * 10000) + ((e) * 100) + (f))
+
 #ifdef RHEL_API_VERSION
 #define LTTNG_RHEL_VERSION_CODE \
-       ((LINUX_VERSION_CODE * 10000000ULL) + RHEL_API_VERSION)
+       ((LTTNG_LINUX_VERSION_CODE * 10000000ULL) + RHEL_API_VERSION)
 #else
 #define LTTNG_RHEL_VERSION_CODE                0
 #endif
 /* 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))
+       (((LTTNG_KERNEL_VERSION(a, b, c)) * 10000000ULL) + ((d) * 10000) + ((e) * 100) + (f))
 
 #ifdef SLE_API_VERSION
 #define LTTNG_SLE_VERSION_CODE \
-       ((LINUX_VERSION_CODE * 10000000ULL) + SLE_API_VERSION)
+       ((LTTNG_LINUX_VERSION_CODE * 10000000ULL) + SLE_API_VERSION)
 #else
 #define LTTNG_SLE_VERSION_CODE         0
 #endif
 /* Fedora */
 
 #define LTTNG_FEDORA_KERNEL_VERSION(a, b, c, d) \
-        (((((a) << 16) + ((b) << 8) + (c)) * 10000ULL) + (d))
+        (((LTTNG_KERNEL_VERSION(a, b, c)) * 10000ULL) + (d))
 
 #ifdef FEDORA_REVISION_VERSION
 #define LTTNG_FEDORA_VERSION_CODE \
-        ((LINUX_VERSION_CODE * 10000ULL) + FEDORA_REVISION_VERSION)
+        ((LTTNG_LINUX_VERSION_CODE * 10000ULL) + FEDORA_REVISION_VERSION)
 #else
 #define LTTNG_FEDORA_VERSION_CODE         0
 #endif
 /* RT patch */
 
 #define LTTNG_RT_KERNEL_VERSION(a, b, c, d) \
-       (((a) << 24) + ((b) << 16) + ((c) << 8) + (d))
+       (((LTTNG_KERNEL_VERSION(a, b, c)) << 8) + (d))
 
 #ifdef RT_PATCH_VERSION
 #define LTTNG_RT_VERSION_CODE \
-       ((LINUX_VERSION_CODE << 8) + RT_PATCH_VERSION)
+       ((LTTNG_LINUX_VERSION_CODE << 8) + RT_PATCH_VERSION)
 #else
 #define LTTNG_RT_VERSION_CODE  0
 #endif
index 37a3bb8c2a363ccb25859409598da73e7705fe35..f111390c53bbceebbc39a0f55cc26c22cfb4cd4a 100644 (file)
@@ -86,7 +86,7 @@ struct channel_backend {
        void *priv;                     /* Client-specific information */
        void *priv_ops;                 /* Client-specific ops pointer */
        void (*release_priv_ops)(void *priv_ops);
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
        struct lttng_cpuhp_node cpuhp_prepare;  /* CPU hotplug prepare */
 #else
        struct notifier_block cpu_hp_notifier;   /* CPU hotplug notifier */
index de205337ce9c8ccdc53f7c7fcb93428f44a38588..97fe3582ed2ad38a29dd140b4e69a1c80d856726 100644 (file)
@@ -54,7 +54,7 @@ struct channel {
 
        unsigned long switch_timer_interval;    /* Buffer flush (jiffies) */
        unsigned long read_timer_interval;      /* Reader wakeup (jiffies) */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
        struct lttng_cpuhp_node cpuhp_prepare;
        struct lttng_cpuhp_node cpuhp_online;
        struct lttng_cpuhp_node cpuhp_iter_online;
index cc7c64c502cca0bfd6e4172c347a9730a38e6bfb..31bf328488635662e3f6aaf1094dd7f61fad1f04 100644 (file)
 #ifndef _LTTNG_WRAPPER_ATOMIC_H
 #define _LTTNG_WRAPPER_ATOMIC_H
 
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 #include <linux/atomic.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,16,0))
 static inline void lttng_smp_mb__before_atomic(void)
 {
        smp_mb__before_atomic();
@@ -23,7 +23,7 @@ static inline void lttng_smp_mb__after_atomic(void)
 {
        smp_mb__after_atomic();
 }
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,16,0)) */
 static inline void lttng_smp_mb__before_atomic(void)
 {
        smp_mb__before_atomic_inc();
@@ -33,6 +33,6 @@ static inline void lttng_smp_mb__after_atomic(void)
 {
        smp_mb__after_atomic_inc();
 }
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,16,0)) */
 
 #endif /* _LTTNG_WRAPPER_ATOMIC_H */
index 26330d39eebd80f9b7813731c27650c24cca1350..9d47ad7e5fa1939be5272a9c003b02536723cc00 100644 (file)
 #ifndef _LTTNG_WRAPPER_BARRIER_H
 #define _LTTNG_WRAPPER_BARRIER_H
 
-#include <linux/version.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)
+#include <lttng/kernel-version.h>
+#if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0)
 #include <asm/barrier.h>
 #else
 #include <asm/system.h>
 #endif
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)
+#if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,14,0)
 
 #define lttng_smp_store_release(x, v) smp_store_release(x, v)
 #define lttng_smp_load_acquire(x) smp_load_acquire(x)
index e0bd33f4ee860c52b5ba10a8eedcabb0eea3ae4e..40a472d6d4ba6ae0bce647ee74de88ff479b5c3a 100644 (file)
@@ -9,7 +9,7 @@
 #define _LTTNG_WRAPPER_COMPILER_H
 
 #include <linux/compiler.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 /*
  * Don't allow compiling with buggy compiler.
@@ -56,7 +56,7 @@
  * and remove calls to smp_read_barrier_depends which was dropped
  * in v5.9.
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0))
 #define LTTNG_READ_ONCE(x)     READ_ONCE(x)
 #else
 #define LTTNG_READ_ONCE(x)                     \
index 8f01a194a7b5131e152b342441b0d258924fa56f..e07dfebc91c5dd6e64624363a2bd791769c70c97 100644 (file)
@@ -8,11 +8,11 @@
 #ifndef _LTTNG_WRAPPER_FDTABLE_H
 #define _LTTNG_WRAPPER_FDTABLE_H
 
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 #include <linux/fdtable.h>
 #include <linux/sched.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
 static inline
 struct file *lttng_lookup_fd_rcu(unsigned int fd)
 {
@@ -26,7 +26,7 @@ struct file *lttng_lookup_fd_rcu(unsigned int fd)
 }
 #endif
 
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,7,0))
 
 int lttng_iterate_fd(struct files_struct *files,
                unsigned int first,
@@ -44,7 +44,7 @@ int lttng_iterate_fd(struct files_struct *files,
 
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0))
 
 static inline bool lttng_close_on_exec(int fd, const struct fdtable *fdt)
 {
index b1799953b29b2f01cbf0b2a543369b7495eb08ec..1ffaf2e7ecf83ada756d248a535bd039eae56c1a 100644 (file)
 #ifndef _LTTNG_WRAPPER_FILE_H
 #define _LTTNG_WRAPPER_FILE_H
 
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 #include <linux/file.h>
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
+#if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,19,0)
 
 static
 inline int lttng_get_unused_fd(void)
@@ -23,7 +23,7 @@ inline int lttng_get_unused_fd(void)
 
 #define lttng_f_dentry f_path.dentry
 
-#else /* #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) */
+#else /* #if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,19,0) */
 
 static
 inline int lttng_get_unused_fd(void)
@@ -33,6 +33,6 @@ inline int lttng_get_unused_fd(void)
 
 #define lttng_f_dentry f_dentry
 
-#endif /* #else #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) */
+#endif /* #else #if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,19,0) */
 
 #endif /* _LTTNG_WRAPPER_FILE_H */
index f11c19fca011646b0e83004a71e33aaeb931565c..f5d5867489c198405aac9c5fa2907d47b8be0fcb 100644 (file)
@@ -11,7 +11,7 @@
 #include <linux/fs.h>
 #include <lttng/kernel-version.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0))
 
 static inline
 ssize_t lttng_kernel_read(struct file *file, void *buf, size_t count, loff_t *pos)
@@ -19,7 +19,7 @@ ssize_t lttng_kernel_read(struct file *file, void *buf, size_t count, loff_t *po
        return kernel_read(file, buf, count, pos);
 }
 
-#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) */
+#else /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) */
 
 static inline
 ssize_t lttng_kernel_read(struct file *file, void *buf, size_t count, loff_t *pos)
@@ -38,6 +38,6 @@ ssize_t lttng_kernel_read(struct file *file, void *buf, size_t count, loff_t *po
        return len;
 }
 
-#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) */
+#endif /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0) */
 
 #endif /* _LTTNG_WRAPPER_FS_H */
index 0b7913d95ff47d8ddd1fa4d4a5486668326b4bf4..ea4385e556e87085ab4d35b1dfe6587a55f272c0 100644 (file)
 #ifndef _LTTNG_WRAPPER_IRQ_H
 #define _LTTNG_WRAPPER_IRQ_H
 
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 /*
  * Starting from the 3.12 Linux kernel, all architectures use the
  * generic hard irqs system. More details can be seen at commit
  * 0244ad004a54e39308d495fee0a2e637f8b5c317 in the Linux kernel GIT.
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0) \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,12,0) \
        || defined(CONFIG_GENERIC_HARDIRQS))
 # define CONFIG_LTTNG_HAS_LIST_IRQ
 #endif
index 3037eaeaa92352f481aff212c5bac621353bb87b..99302ec29fa98be9a56148b600cee9209987ea20 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef _LTTNG_WRAPPER_IRQFLAGS_H
 #define _LTTNG_WRAPPER_IRQFLAGS_H
 
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 #include <linux/irqflags.h>
 
 #ifdef CONFIG_X86
index 7f4d8300c53eb591bd7e55b84529bd2ab634e288..6a3e27e986e0b72d0e2c843f2b9f854e9ed940cd 100644 (file)
@@ -14,7 +14,7 @@
 #define _LTTNG_WRAPPER_KALLSYMS_H
 
 #include <linux/kallsyms.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 /*
  * PowerPC ABIv1 needs KALLSYMS_ALL to get the function descriptor,
 # endif
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,7,0))
 
 unsigned long wrapper_kallsyms_lookup_name(const char *name);
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,7,0)) */
 
 static inline
 unsigned long wrapper_kallsyms_lookup_name(const char *name)
@@ -38,7 +38,7 @@ unsigned long wrapper_kallsyms_lookup_name(const char *name)
        return kallsyms_lookup_name(name);
 }
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,7,0)) */
 
 static inline
 unsigned long kallsyms_lookup_funcptr(const char *name)
index 4d6993e26d7dab40c77675ef8c09e5d96ca36a68..b546d615dce45a56142fa71b502c1ecd5fb5e619 100644 (file)
@@ -9,9 +9,9 @@
 #define _LTTNG_WRAPPER_KPROBES_H
 
 #include <linux/kprobes.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
 
 static inline
 struct kretprobe *lttng_get_kretprobe(struct kretprobe_instance *ri)
@@ -19,7 +19,7 @@ struct kretprobe *lttng_get_kretprobe(struct kretprobe_instance *ri)
        return get_kretprobe(ri);
 }
 
-#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0) */
+#else /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) */
 
 static inline
 struct kretprobe *lttng_get_kretprobe(struct kretprobe_instance *ri)
@@ -27,6 +27,6 @@ struct kretprobe *lttng_get_kretprobe(struct kretprobe_instance *ri)
        return ri->rp;
 }
 
-#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0) */
+#endif /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0) */
 
 #endif /* _LTTNG_WRAPPER_KPROBES_H */
index f3b5053f518197be736943bbc1ee74b1d159b653..365cb16b0b19fadf265273959f39e67566956b76 100644 (file)
 
 #include <linux/kref.h>
 #include <linux/rculist.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 /*
  * lttng_kref_get: get reference count, checking for overflow.
  *
  * Return 1 if reference is taken, 0 otherwise (overflow).
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
 static inline int lttng_kref_get(struct kref *kref)
 {
        kref_get(kref);
        return 1;
 }
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */
 static inline int lttng_kref_get(struct kref *kref)
 {
        return atomic_add_unless(&kref->refcount, 1, INT_MAX);
 }
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */
 
 #endif /* _LTTNG_WRAPPER_KREF_H */
index 12b58be782fd65786a9d406175b262d10aa7348f..d3bdda66e9987d35ebfb09e08d8ec844eece2071 100644 (file)
@@ -13,7 +13,7 @@
 
 #include <lttng/kernel-version.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0) \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,6,0) \
                || LTTNG_UBUNTU_KERNEL_RANGE(4,4,25,44, 4,5,0,0))
 
 /*
@@ -40,7 +40,7 @@ bool wrapper_check_enough_free_pages(unsigned long num_pages)
 }
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
 static inline
 void wrapper_set_current_oom_origin(void)
 {
@@ -53,7 +53,7 @@ void wrapper_clear_current_oom_origin(void)
        return clear_current_oom_origin();
 }
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0)) */
 
 static inline
 void wrapper_set_current_oom_origin(void)
@@ -66,5 +66,5 @@ void wrapper_clear_current_oom_origin(void)
 {
        return;
 }
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0)) */
 #endif /* _LTTNG_WRAPPER_MM_H */
index 8e8a37123c82637321c296b16dc0157338f77f70..97eb235c9ab8eb07a6fdde41f0e453d9b64ffecd 100644 (file)
 #ifndef _LTTNG_WRAPPER_NAMESPACE_H
 #define _LTTNG_WRAPPER_NAMESPACE_H
 
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,19,0))
 #define lttng_ns_inum ns.inum
 #else
 #define lttng_ns_inum proc_inum
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,5,0))
 #define lttng_user_ns_parent parent
 #else
 #define lttng_user_ns_parent creator->user_ns
index 3b997cae56d7837ca6bcd4493d7794c2fc16c074..36a8cf73702bc79073382d42395e6400c1e88f6d 100644 (file)
@@ -8,16 +8,16 @@
 #ifndef _LTTNG_WRAPPER_OBJTOOL_H
 #define _LTTNG_WRAPPER_OBJTOOL_H
 
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0))
 #include <linux/objtool.h>
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,6,0))
 #include <linux/frame.h>
 #endif
 
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,6,0))
 
 #define LTTNG_STACK_FRAME_NON_STANDARD(func) \
        STACK_FRAME_NON_STANDARD(func)
index 7669125ae4fef03c9868b7c9cc03b383aab71b24..c74e6d68d17b05abba373c64dbdab1ad9d326b71 100644 (file)
@@ -19,7 +19,7 @@
  * the get_pageblock_migratetype() macro uses it.
  */
 #if (defined(CONFIG_KALLSYMS) \
-       && (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,2)        \
+       && (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,19,2)    \
                || LTTNG_KERNEL_RANGE(3,14,36, 3,15,0)          \
                || LTTNG_KERNEL_RANGE(3,18,10, 3,19,0)          \
                || LTTNG_DEBIAN_KERNEL_RANGE(3,16,7,9,0,0, 3,17,0,0,0,0) \
index fff8b1df28625a46355c9a626928a54826161a17..7a050cc0540f2e25817dc9fe7d2aa82e21742724 100644 (file)
 #ifndef _LTTNG_WRAPPER_PERCPU_DEFS_H
 #define _LTTNG_WRAPPER_PERCPU_DEFS_H
 
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
+#if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,19,0)
 
 #include <linux/percpu-defs.h>
 
 #define lttng_this_cpu_ptr(ptr)                this_cpu_ptr(ptr)
 
-#else /* #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) */
+#else /* #if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,19,0) */
 
 #include <linux/percpu.h>
 
 #define lttng_this_cpu_ptr(ptr)                (&__get_cpu_var(*(ptr)))
 
-#endif /* #else #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) */
+#endif /* #else #if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,19,0) */
 
 #endif /* _LTTNG_WRAPPER_PERCPU_DEFS_H */
index bbdfb63c8d0d140f7c7e7e8e3660887f995a5edb..737e3b381e30f68e4d7e8253552430a4216dbe03 100644 (file)
@@ -12,7 +12,7 @@
 
 #ifdef CONFIG_PERF_EVENTS
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,1,0))
 static inline struct perf_event *
 wrapper_perf_event_create_kernel_counter(struct perf_event_attr *attr,
                                int cpu,
@@ -21,7 +21,7 @@ wrapper_perf_event_create_kernel_counter(struct perf_event_attr *attr,
 {
        return perf_event_create_kernel_counter(attr, cpu, task, callback, NULL);
 }
-#else /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) */
+#else /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,1,0)) */
 static inline struct perf_event *
 wrapper_perf_event_create_kernel_counter(struct perf_event_attr *attr,
                                int cpu,
@@ -30,7 +30,7 @@ wrapper_perf_event_create_kernel_counter(struct perf_event_attr *attr,
 {
        return perf_event_create_kernel_counter(attr, cpu, task, callback);
 }
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) */
+#endif /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,1,0)) */
 
 #endif /* CONFIG_PERF_EVENTS */
 
index 29f60947c05f2a3e6bbd975e4904630f0dd3ade3..58bd4ab07ecd1caf807ac2dafef2baa76269661a 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef _LTTNG_WRAPPER_RCU_H
 #define _LTTNG_WRAPPER_RCU_H
 
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 #include <linux/rculist.h>
 #include <linux/rcupdate.h>
 #include <wrapper/list.h>
index cecd800d18c8719f498592735498c110d83b9e03..63270e50e4f50705ccf3e6b5297f9d1c1412cfad 100644 (file)
 
 #define LTTNG_SYSCALL_NR_ARGS 6
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,1,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,1,0))
 
 #define lttng_syscall_get_arguments(task, regs, args) \
        syscall_get_arguments(task, regs, args)
 
-#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(5,1,0) */
+#else /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,1,0) */
 
 static inline
 void lttng_syscall_get_arguments(struct task_struct *task,
@@ -29,6 +29,6 @@ void lttng_syscall_get_arguments(struct task_struct *task,
        syscall_get_arguments(task, regs, 0, LTTNG_SYSCALL_NR_ARGS, args);
 }
 
-#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5,1,0) */
+#endif /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,1,0) */
 
 #endif /* _LTTNG_WRAPPER_SYSCALL_H */
index 60ce78c9f32e65b83160a29d93ceee97089dae25..ad424dcf30c0b6f2f26028eb826e76b788538f72 100644 (file)
@@ -9,13 +9,13 @@
 #ifndef _LTTNG_WRAPPER_TIME_H
 #define _LTTNG_WRAPPER_TIME_H
 
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 /*
  * Use 64bit timespec on kernels that have it, this makes 32bit arch
  * y2038 compliant.
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,17,0))
 # define LTTNG_KERNEL_HAS_TIMESPEC64
 #endif
 
index 76c8a572bf9fddb597e1e45adbd6d342daa5a00a..54649d69773412978aec5000a37136b4d0768643 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef _LTTNG_WRAPPER_TIMER_H
 #define _LTTNG_WRAPPER_TIMER_H
 
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 #include <linux/timer.h>
 #include <lttng/kernel-version.h>
 
@@ -26,7 +26,7 @@
  */
 
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0))
 
 #define LTTNG_TIMER_PINNED             TIMER_PINNED
 #define LTTNG_TIMER_FUNC_ARG_TYPE      struct timer_list *
        timer_setup(timer, callback, flags)
 
 
-#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) */
+#else /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0) */
 
 
 # if (LTTNG_RT_VERSION_CODE >= LTTNG_RT_KERNEL_VERSION(4,6,4,8) \
-       || LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
+       || LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,8,0))
 
 #define lttng_init_timer_pinned(timer) \
        init_timer_pinned(timer)
@@ -84,6 +84,6 @@ static inline void lttng_timer_setup(struct timer_list *timer,
        timer->data = (unsigned long)data;
 }
 
-#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) */
+#endif /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0) */
 
 #endif /* _LTTNG_WRAPPER_TIMER_H */
index fba3b9fe0e946b8a90e3a913aaca4ba7f06b26d3..e3738263bd8442b0d901822d719271928a284113 100644 (file)
@@ -20,7 +20,7 @@
 #include <linux/time.h>
 #include <linux/hrtimer.h>
 #include <linux/percpu.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 #include <asm/local.h>
 #include <lttng/kernel-version.h>
 #include <lttng/clock.h>
@@ -51,7 +51,7 @@ extern struct lttng_trace_clock *lttng_trace_clock;
  * this feature on 64-bit architectures.
  */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0) \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,17,0) \
        && BITS_PER_LONG == 64 \
        && !defined(LTTNG_CLOCK_NMI_SAFE_BROKEN))
 #define LTTNG_USE_NMI_SAFE_CLOCK
index 41fcfad670e48a5ed2d2b0e3c7603eb5d7743901..d5f3207594194dd7a2bc9c66a1462bab6abcebeb 100644 (file)
 #ifndef _LTTNG_WRAPPER_TRACEPOINT_H
 #define _LTTNG_WRAPPER_TRACEPOINT_H
 
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 #include <linux/tracepoint.h>
 #include <linux/module.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0))
 #define LTTNG_DEFINE_TRACE(name, proto, args)          \
        DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
 #else
 
 #endif /* HAVE_KABI_2635_TRACEPOINT */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,15,0))
 
 #include <lttng/tracepoint.h>
 
 #define lttng_wrapper_tracepoint_probe_register lttng_tracepoint_probe_register
 #define lttng_wrapper_tracepoint_probe_unregister lttng_tracepoint_probe_unregister
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,15,0)) */
 
 #define lttng_wrapper_tracepoint_probe_register kabi_2635_tracepoint_probe_register
 #define lttng_wrapper_tracepoint_probe_unregister kabi_2635_tracepoint_probe_unregister
@@ -52,9 +52,9 @@ void lttng_tracepoint_exit(void)
 {
 }
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,15,0)) */
 
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0) && defined(CONFIG_MODULE_SIG))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,15,0) && defined(CONFIG_MODULE_SIG))
 
 #include <linux/kallsyms.h>
 #include <wrapper/kallsyms.h>
@@ -87,9 +87,9 @@ int wrapper_tracepoint_module_notify(struct notifier_block *nb,
  * }
  */
 
-#endif /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0) && defined(CONFIG_MODULE_SIG)) */
+#endif /* #if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,15,0) && defined(CONFIG_MODULE_SIG)) */
 
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0) && defined(CONFIG_MODULE_SIG) && defined(MODULE))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,15,0) && defined(CONFIG_MODULE_SIG) && defined(MODULE))
 
 static inline
 int wrapper_lttng_fixup_sig(struct module *mod)
@@ -110,7 +110,7 @@ int wrapper_lttng_fixup_sig(struct module *mod)
        return ret;
 }
 
-#else /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0) && defined(CONFIG_MODULE_SIG) && defined(MODULE)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,15,0) && defined(CONFIG_MODULE_SIG) && defined(MODULE)) */
 
 static inline
 int wrapper_lttng_fixup_sig(struct module *mod)
@@ -118,18 +118,18 @@ int wrapper_lttng_fixup_sig(struct module *mod)
        return 0;
 }
 
-#endif /* #else #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0) && defined(CONFIG_MODULE_SIG) && defined(MODULE)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,15,0) && defined(CONFIG_MODULE_SIG) && defined(MODULE)) */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,19,0))
 static inline struct tracepoint *lttng_tracepoint_ptr_deref(tracepoint_ptr_t *p)
 {
        return tracepoint_ptr_deref(p);
 }
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,19,0)) */
 static inline struct tracepoint *lttng_tracepoint_ptr_deref(struct tracepoint * const *p)
 {
        return *p;
 }
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,19,0)) */
 
 #endif /* _LTTNG_WRAPPER_TRACEPOINT_H */
index ffbc46a15a1405772e20663665bfd60253d44a57..4ccb26a006397350b604cfc7a33cbb072c7dcfe2 100644 (file)
 #include <linux/uaccess.h>
 #include <lttng/kernel-version.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,0,0) || \
        LTTNG_RHEL_KERNEL_RANGE(4,18,0,147,0,0, 4,19,0,0,0,0))
 
 #define VERIFY_READ    0
 #define VERIFY_WRITE   1
 #define lttng_access_ok(type, addr, size) access_ok(addr, size)
 
-#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) */
+#else /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,0,0) */
 
 #define lttng_access_ok(type, addr, size) access_ok(type, addr, size)
 
-#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) */
+#endif /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,0,0) */
 
 #endif /* _LTTNG_WRAPPER_UACCESS_H */
index f5487e1b16a6677215ede184d427d9b94c15da95..9cbbe3b2fdffd33a650a103e5510532f9b715d39 100644 (file)
 #ifndef _LTTNG_WRAPPER_UPROBES_H
 #define _LTTNG_WRAPPER_UPROBES_H
 
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,5,0))
 #include <linux/uprobes.h>
 
 /* Use kallsym lookup for version before 3.9. */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,9,0))
 
 static inline
 int wrapper_uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *uc)
index 5e0ab5ace684cfb4af41fc6c7133c719b2616a2e..26d15c55d33d3c19dab5c3a9e6ff9a7e6325f276 100644 (file)
@@ -9,11 +9,11 @@
 #ifndef _LTTNG_WRAPPER_USER_NAMESPACE_H
 #define _LTTNG_WRAPPER_USER_NAMESPACE_H
 
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 #include <linux/user_namespace.h>
 
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)
+#if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3, 5, 0)
 
 #define lttng_current_xxuid(xxx)                               \
        (from_kuid_munged(&init_user_ns, current_##xxx()))
index d8ac53d33134995aa335f29b5c4cffbfc3632ed4..1c03c028238dd2ab0203921e80dfa6857e0c798e 100644 (file)
@@ -8,16 +8,16 @@
 #ifndef _LTTNG_WRAPPER_UUID_H
 #define _LTTNG_WRAPPER_UUID_H
 
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 #include <linux/uuid.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,7,0))
 static inline
 void lttng_guid_gen(guid_t *u)
 {
        return guid_gen(u);
 }
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,7,0)) */
 
 typedef uuid_le guid_t;
 
@@ -26,6 +26,6 @@ void lttng_guid_gen(guid_t *u)
 {
        return uuid_le_gen(u);
 }
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,7,0)) */
 
 #endif /* _LTTNG_WRAPPER_UUID_H */
index bbc900d1ad677fce4ecf360c577703f1f822a3c5..13252372d62b123b4d533a08a8b070d57ea76afa 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef _LTTNG_WRAPPER_VMALLOC_H
 #define _LTTNG_WRAPPER_VMALLOC_H
 
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 #include <linux/vmalloc.h>
 #include <linux/mm.h>
 
@@ -22,7 +22,7 @@
 #include <wrapper/kallsyms.h>
 #include <lttng/kernel-version.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,8,0))
 
 /*
  * wrapper_vmalloc_sync_mappings was removed in v5.8, the vmalloc mappings
@@ -32,7 +32,7 @@ static inline
 void wrapper_vmalloc_sync_mappings(void)
 {}
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) \
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0) \
   || LTTNG_KERNEL_RANGE(5,5,12, 5,6,0)            \
   || LTTNG_KERNEL_RANGE(5,4,28, 5,5,0)            \
   || LTTNG_KERNEL_RANGE(5,2,37, 5,3,0)            \
@@ -77,7 +77,7 @@ void __canary__vmalloc_sync_mappings(void)
        vmalloc_sync_mappings();
 }
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0)) */
 
 /*
  * Map vmalloc_sync_mappings to vmalloc_sync_all() on kernels before 5.6.
@@ -115,11 +115,11 @@ void __canary__vmalloc_sync_all(void)
        vmalloc_sync_all();
 }
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0)) */
 
 #else /* CONFIG_KALLSYMS */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,8,0))
 
 /*
  * wrapper_vmalloc_sync_mappings was removed in v5.8, the vmalloc mappings
@@ -129,7 +129,7 @@ static inline
 void wrapper_vmalloc_sync_mappings(void)
 {}
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) \
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0) \
   || LTTNG_KERNEL_RANGE(5,5,12, 5,6,0)            \
   || LTTNG_KERNEL_RANGE(5,4,28, 5,5,0)            \
   || LTTNG_KERNEL_RANGE(5,2,37, 5,3,0)            \
@@ -147,7 +147,7 @@ void wrapper_vmalloc_sync_mappings(void)
        return vmalloc_sync_mappings();
 }
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0)) */
 
 static inline
 void wrapper_vmalloc_sync_mappings(void)
@@ -155,11 +155,11 @@ void wrapper_vmalloc_sync_mappings(void)
        return vmalloc_sync_all();
 }
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0)) */
 
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0))
 static inline
 void *lttng_kvmalloc_node(unsigned long size, gfp_t flags, int node)
 {
@@ -212,7 +212,7 @@ void print_vmalloc_node_range_warning(void)
        printk_once(KERN_WARNING "LTTng: Please rebuild your kernel with CONFIG_KALLSYMS enabled.\n");
 }
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,0,0))
 
 /*
  * kallsyms wrapper of __vmalloc_node with a fallback to kmalloc_node.
@@ -262,7 +262,7 @@ void *__canary____lttng_vmalloc_node_range(unsigned long size, unsigned long ali
                        vm_flags, node, caller);
 }
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,6,0))
 
 /*
  * kallsyms wrapper of __vmalloc_node with a fallback to kmalloc_node.
@@ -310,7 +310,7 @@ void *__canary____lttng_vmalloc_node_range(unsigned long size, unsigned long ali
                        node, caller);
 }
 
-#else /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) */
+#else /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,6,0)) */
 
 /*
  * kallsyms wrapper of __vmalloc_node with a fallback to kmalloc_node.
index 0aa69486d6fde4c6234b76c98da087d194d38eca..e62de713588852d7b11f39c0a5104a16ebfb450b 100644 (file)
@@ -20,7 +20,7 @@
 
 
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
+#if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,2,0)
 
 static struct wb_domain *global_wb_domain_sym;
 
@@ -51,7 +51,7 @@ unsigned long __canary__global_wb_domain(void)
        return global_wb_domain.dirty_limit;
 }
 
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)
+#elif LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,1,0)
 
 static unsigned long *global_dirty_limit_sym;
 
@@ -88,7 +88,7 @@ unsigned long __canary__global_dirty_limit(void)
 
 #include <linux/writeback.h>
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)
+#if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,1,0)
 static inline
 unsigned long wrapper_global_dirty_limit(void)
 {
index 1625804f8b5ef845060c82221e293c9ed3a714d0..cfd6649d76ac041b0824a28f7378c7afd2d72e1b 100644 (file)
@@ -259,7 +259,7 @@ void channel_backend_reset(struct channel_backend *chanb)
        chanb->start_tsc = config->cb.ring_buffer_clock_read(chan);
 }
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
 
 /*
  * No need to implement a "dead" callback to do a buffer switch here,
@@ -291,7 +291,7 @@ int lttng_cpuhp_rb_backend_prepare(unsigned int cpu,
 }
 EXPORT_SYMBOL_GPL(lttng_cpuhp_rb_backend_prepare);
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 
 #ifdef CONFIG_HOTPLUG_CPU
 
@@ -341,7 +341,7 @@ int lib_ring_buffer_cpu_hp_callback(struct notifier_block *nb,
 
 #endif
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 
 /**
  * channel_backend_init - initialize a channel backend
@@ -419,13 +419,13 @@ int channel_backend_init(struct channel_backend *chanb,
                if (!chanb->buf)
                        goto free_cpumask;
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
                chanb->cpuhp_prepare.component = LTTNG_RING_BUFFER_BACKEND;
                ret = cpuhp_state_add_instance(lttng_rb_hp_prepare,
                        &chanb->cpuhp_prepare.node);
                if (ret)
                        goto free_bufs;
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 
                {
                        /*
@@ -462,7 +462,7 @@ int channel_backend_init(struct channel_backend *chanb,
                        }
 #endif
                }
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
        } else {
                chanb->buf = kzalloc(sizeof(struct lib_ring_buffer), GFP_KERNEL);
                if (!chanb->buf)
@@ -477,18 +477,18 @@ int channel_backend_init(struct channel_backend *chanb,
 
 free_bufs:
        if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
                /*
                 * Teardown of lttng_rb_hp_prepare instance
                 * on "add" error is handled within cpu hotplug,
                 * no teardown to do from the caller.
                 */
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 #ifdef CONFIG_HOTPLUG_CPU
                put_online_cpus();
                unregister_hotcpu_notifier(&chanb->cpu_hp_notifier);
 #endif
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
                for_each_possible_cpu(i) {
                        struct lib_ring_buffer *buf =
                                per_cpu_ptr(chanb->buf, i);
@@ -517,15 +517,15 @@ void channel_backend_unregister_notifiers(struct channel_backend *chanb)
        const struct lib_ring_buffer_config *config = &chanb->config;
 
        if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
                int ret;
 
                ret = cpuhp_state_remove_instance(lttng_rb_hp_prepare,
                                &chanb->cpuhp_prepare.node);
                WARN_ON(ret);
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
                unregister_hotcpu_notifier(&chanb->cpu_hp_notifier);
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
        }
 }
 
index c298296aa6b7e70c5406a397211ad37be4eef973..38ba05d9cb2344ff17e7ff6b954ff39d60347aa5 100644 (file)
@@ -469,7 +469,7 @@ static void lib_ring_buffer_stop_read_timer(struct lib_ring_buffer *buf)
        buf->read_timer_enabled = 0;
 }
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
 
 enum cpuhp_state lttng_rb_hp_prepare;
 enum cpuhp_state lttng_rb_hp_online;
@@ -540,7 +540,7 @@ int lttng_cpuhp_rb_frontend_offline(unsigned int cpu,
 }
 EXPORT_SYMBOL_GPL(lttng_cpuhp_rb_frontend_offline);
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 
 #ifdef CONFIG_HOTPLUG_CPU
 
@@ -602,7 +602,7 @@ int lib_ring_buffer_cpu_hp_callback(struct notifier_block *nb,
 
 #endif
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 
 #if defined(CONFIG_NO_HZ) && defined(CONFIG_LIB_RING_BUFFER)
 /*
@@ -708,7 +708,7 @@ static void channel_unregister_notifiers(struct channel *chan)
                 * concurrency.
                 */
 #endif /* CONFIG_NO_HZ */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
                {
                        int ret;
 
@@ -719,7 +719,7 @@ static void channel_unregister_notifiers(struct channel *chan)
                                &chan->cpuhp_prepare.node);
                        WARN_ON(ret);
                }
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
                {
                        int cpu;
 
@@ -743,7 +743,7 @@ static void channel_unregister_notifiers(struct channel *chan)
                        }
 #endif
                }
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
        } else {
                struct lib_ring_buffer *buf = chan->backend.buf;
 
@@ -873,7 +873,7 @@ struct channel *channel_create(const struct lib_ring_buffer_config *config,
        init_irq_work(&chan->wakeup_pending, lib_ring_buffer_pending_wakeup_chan);
 
        if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
                chan->cpuhp_prepare.component = LTTNG_RING_BUFFER_FRONTEND;
                ret = cpuhp_state_add_instance_nocalls(lttng_rb_hp_prepare,
                        &chan->cpuhp_prepare.node);
@@ -885,7 +885,7 @@ struct channel *channel_create(const struct lib_ring_buffer_config *config,
                        &chan->cpuhp_online.node);
                if (ret)
                        goto cpuhp_online_error;
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
                {
                        int cpu;
                        /*
@@ -921,7 +921,7 @@ struct channel *channel_create(const struct lib_ring_buffer_config *config,
                        }
 #endif
                }
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 
 #if defined(CONFIG_NO_HZ) && defined(CONFIG_LIB_RING_BUFFER)
                /* Only benefit from NO_HZ idle with per-cpu buffers for now. */
@@ -941,13 +941,13 @@ struct channel *channel_create(const struct lib_ring_buffer_config *config,
 
        return chan;
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
 cpuhp_online_error:
        ret = cpuhp_state_remove_instance_nocalls(lttng_rb_hp_prepare,
                        &chan->cpuhp_prepare.node);
        WARN_ON(ret);
 cpuhp_prepare_error:
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 error_free_backend:
        channel_backend_free(&chan->backend);
 error:
index da19d28053dca4bb7c700d7c390b04ab5405a331..147450f8250b1c0ff000e35c8df97125cf9af6b1 100644 (file)
@@ -353,7 +353,7 @@ void lib_ring_buffer_iterator_init(struct channel *chan, struct lib_ring_buffer
                list_add(&buf->iter.empty_node, &chan->iter.empty_head);
 }
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
 
 int lttng_cpuhp_rb_iter_online(unsigned int cpu,
                struct lttng_cpuhp_node *node)
@@ -370,7 +370,7 @@ int lttng_cpuhp_rb_iter_online(unsigned int cpu,
 }
 EXPORT_SYMBOL_GPL(lttng_cpuhp_rb_iter_online);
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 
 #ifdef CONFIG_HOTPLUG_CPU
 static
@@ -402,7 +402,7 @@ int channel_iterator_cpu_hotplug(struct notifier_block *nb,
 }
 #endif
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 
 int channel_iterator_init(struct channel *chan)
 {
@@ -419,13 +419,13 @@ int channel_iterator_init(struct channel *chan)
                if (ret)
                        return ret;
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
                chan->cpuhp_iter_online.component = LTTNG_RING_BUFFER_ITER;
                ret = cpuhp_state_add_instance(lttng_rb_hp_online,
                        &chan->cpuhp_iter_online.node);
                if (ret)
                        return ret;
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
                {
                        int cpu;
 
@@ -454,7 +454,7 @@ int channel_iterator_init(struct channel *chan)
                        }
 #endif
                }
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
        } else {
                buf = channel_get_ring_buffer(config, chan, 0);
                lib_ring_buffer_iterator_init(chan, buf);
@@ -467,7 +467,7 @@ void channel_iterator_unregister_notifiers(struct channel *chan)
        const struct lib_ring_buffer_config *config = &chan->backend.config;
 
        if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
                {
                        int ret;
 
@@ -475,10 +475,10 @@ void channel_iterator_unregister_notifiers(struct channel *chan)
                                &chan->cpuhp_iter_online.node);
                        WARN_ON(ret);
                }
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
                chan->hp_iter_enable = 0;
                unregister_cpu_notifier(&chan->hp_iter_notifier);
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
        }
 }
 
index 34174a587ab4af1a8d601d752a89ae31e92a4b29..671119333c2f0c4e2dadb3de7f5e968775c2a5f2 100644 (file)
@@ -20,7 +20,7 @@
 /*
  * fault() vm_op implementation for ring buffer file mapping.
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,1,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,1,0))
 static vm_fault_t lib_ring_buffer_fault_compat(struct vm_area_struct *vma, struct vm_fault *vmf)
 #else
 static int lib_ring_buffer_fault_compat(struct vm_area_struct *vma, struct vm_fault *vmf)
@@ -57,24 +57,24 @@ static int lib_ring_buffer_fault_compat(struct vm_area_struct *vma, struct vm_fa
        return 0;
 }
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,1,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,1,0))
 static vm_fault_t lib_ring_buffer_fault(struct vm_fault *vmf)
 {
        struct vm_area_struct *vma = vmf->vma;
        return lib_ring_buffer_fault_compat(vma, vmf);
 }
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0))
 static int lib_ring_buffer_fault(struct vm_fault *vmf)
 {
        struct vm_area_struct *vma = vmf->vma;
        return lib_ring_buffer_fault_compat(vma, vmf);
 }
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */
 static int lib_ring_buffer_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
 {
        return lib_ring_buffer_fault_compat(vma, vmf);
 }
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,11,0)) */
 
 /*
  * vm_ops for ring buffer file mappings.
index 7b7e3d65156bb16813cf7012f5eb2e50c9679795..b6580fa6d42359158195a086c79e16490728849a 100644 (file)
@@ -12,7 +12,7 @@
 
 #include <linux/module.h>
 #include <linux/fs.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 
 #include <wrapper/splice.h>
 #include <ringbuffer/backend.h>
@@ -47,20 +47,20 @@ static void lib_ring_buffer_pipe_buf_release(struct pipe_inode_info *pipe,
        __free_page(pbuf->page);
 }
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,8,0))
 static const struct pipe_buf_operations ring_buffer_pipe_buf_ops = {
        .release = lib_ring_buffer_pipe_buf_release,
        .try_steal = generic_pipe_buf_try_steal,
        .get = generic_pipe_buf_get
 };
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,1,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,1,0))
 static const struct pipe_buf_operations ring_buffer_pipe_buf_ops = {
        .confirm = generic_pipe_buf_confirm,
        .release = lib_ring_buffer_pipe_buf_release,
        .steal = generic_pipe_buf_steal,
        .get = generic_pipe_buf_get
 };
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,15,0))
 static const struct pipe_buf_operations ring_buffer_pipe_buf_ops = {
        .can_merge = 0,
        .confirm = generic_pipe_buf_confirm,
@@ -108,7 +108,7 @@ static int subbuf_splice_actor(struct file *in,
                .pages = pages,
                .nr_pages = 0,
                .partial = partial,
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,12,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(4,12,0))
                .flags = flags,
 #endif
                .ops = &ring_buffer_pipe_buf_ops,
index 7096daf7a544358202e14f49ae210d13397c48b2..4d0539853c04206b9f0d5f7053fa474120509c02 100644 (file)
@@ -54,7 +54,7 @@
 
 static struct proc_dir_entry *lttng_proc_dentry;
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
 static const struct proc_ops lttng_proc_ops;
 #else
 static const struct file_operations lttng_proc_ops;
@@ -464,7 +464,7 @@ long lttng_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
        }
 }
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
 static const struct proc_ops lttng_proc_ops = {
        .proc_ioctl = lttng_ioctl,
 #ifdef CONFIG_COMPAT
index 27f00f6bd78dd7e309cad8ff0252b6bc0e39a88a..3a9429780c83a2f471ad0b2250c8595638e6e458 100644 (file)
@@ -20,7 +20,7 @@
 #include <lttng/tracer.h>
 
 #if defined(CONFIG_CGROUPS) && \
-       ((LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)) || \
+       ((LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,6,0)) || \
         LTTNG_UBUNTU_KERNEL_RANGE(4,4,0,0, 4,5,0,0))
 
 static
index a11292252002fec03d4d102979b028c991f8607e..162fac59ec3ad7f1013a917c1065add5d4a8f854 100644 (file)
@@ -20,7 +20,7 @@
 #include <lttng/tracer.h>
 
 #if defined(CONFIG_IPC_NS) && \
-       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+       (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
 
 static
 size_t ipc_ns_get_size(size_t offset)
index 7fce5dd151d16b30fc743eeea3cb31617fed09e9..f62d6a480016421af64deacadd0082c32ac746e9 100644 (file)
@@ -20,7 +20,7 @@
 #include <lttng/tracer.h>
 
 #if !defined(LTTNG_MNT_NS_MISSING_HEADER) && \
-       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+       (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
 
 #include <../fs/mount.h>
 
index 879a61bd45dd71ef8c5ef0c972024f97cfb0bf00..c9c13e89631eb25529933798d1c86c6a5b0adae5 100644 (file)
@@ -21,7 +21,7 @@
 #include <lttng/tracer.h>
 
 #if defined(CONFIG_NET_NS) && \
-       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+       (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
 
 static
 size_t net_ns_get_size(size_t offset)
index bc860e67465e508ba48451cd6414d51cbad785f3..25ca8c59f1790c1d6cdcd3ca04e1d71a0be6226c 100644 (file)
@@ -59,7 +59,7 @@ void perf_counter_record(struct lttng_ctx_field *field,
        chan->ops->event_write(ctx, &value, sizeof(value));
 }
 
-#if defined(CONFIG_PERF_EVENTS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
+#if defined(CONFIG_PERF_EVENTS) && (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,1,0))
 static
 void overflow_callback(struct perf_event *event,
                       struct perf_sample_data *data,
@@ -80,7 +80,7 @@ void lttng_destroy_perf_counter_field(struct lttng_ctx_field *field)
 {
        struct perf_event **events = field->u.perf_counter->e;
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
        {
                int ret;
 
@@ -91,7 +91,7 @@ void lttng_destroy_perf_counter_field(struct lttng_ctx_field *field)
                        &field->u.perf_counter->cpuhp_prepare.node);
                WARN_ON(ret);
        }
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
        {
                int cpu;
 
@@ -103,14 +103,14 @@ void lttng_destroy_perf_counter_field(struct lttng_ctx_field *field)
                unregister_cpu_notifier(&field->u.perf_counter->nb);
 #endif
        }
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
        kfree(field->event_field.name);
        kfree(field->u.perf_counter->attr);
        lttng_kvfree(events);
        kfree(field->u.perf_counter);
 }
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
 
 int lttng_cpuhp_perf_counter_online(unsigned int cpu,
                struct lttng_cpuhp_node *node)
@@ -151,7 +151,7 @@ int lttng_cpuhp_perf_counter_dead(unsigned int cpu,
        return 0;
 }
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 
 #ifdef CONFIG_HOTPLUG_CPU
 
@@ -210,7 +210,7 @@ int lttng_perf_counter_cpu_hp_callback(struct notifier_block *nb,
 
 #endif
 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 
 int lttng_add_perf_counter_to_ctx(uint32_t type,
                                  uint64_t config,
@@ -264,7 +264,7 @@ int lttng_add_perf_counter_to_ctx(uint32_t type,
                goto find_error;
        }
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
 
        perf_field->cpuhp_prepare.component = LTTNG_CONTEXT_PERF_COUNTERS;
        ret = cpuhp_state_add_instance(lttng_hp_prepare,
@@ -278,7 +278,7 @@ int lttng_add_perf_counter_to_ctx(uint32_t type,
        if (ret)
                goto cpuhp_online_error;
 
-#else  /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#else  /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
        {
                int cpu;
 
@@ -304,7 +304,7 @@ int lttng_add_perf_counter_to_ctx(uint32_t type,
                put_online_cpus();
                perf_field->hp_enable = 1;
        }
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 
        field->destroy = lttng_destroy_perf_counter_field;
 
@@ -324,7 +324,7 @@ int lttng_add_perf_counter_to_ctx(uint32_t type,
        wrapper_vmalloc_sync_mappings();
        return 0;
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
 cpuhp_online_error:
        {
                int remove_ret;
@@ -334,7 +334,7 @@ cpuhp_online_error:
                WARN_ON(remove_ret);
        }
 cpuhp_prepare_error:
-#else  /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#else  /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 counter_busy:
 counter_error:
        {
@@ -349,7 +349,7 @@ counter_error:
                unregister_cpu_notifier(&perf_field->nb);
 #endif
        }
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 find_error:
        lttng_remove_context_field(ctx, field);
 append_context_error:
index 721485dfafdccae6082439fb57563b9f8ef26a6e..23b0e6d25451559397299e7c875cef7610fa2190 100644 (file)
@@ -20,7 +20,7 @@
 #include <lttng/tracer.h>
 
 #if defined(CONFIG_PID_NS) && \
-       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+       (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
 
 static
 size_t pid_ns_get_size(size_t offset)
index b2c1189dd03ead3f63ff4dc138f7047d21690f68..5be49a59661f46857935011db7ba580e1b675bcb 100644 (file)
@@ -20,7 +20,7 @@
 #include <lttng/tracer.h>
 
 #if defined(CONFIG_USER_NS) && \
-       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+       (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
 
 static
 size_t user_ns_get_size(size_t offset)
index b4284a5c5cf0d4fe854437fdf20c6cef06b88a3c..3c399fe3138d44196d64c5a681478a2cc0377623 100644 (file)
@@ -20,7 +20,7 @@
 #include <lttng/tracer.h>
 
 #if defined(CONFIG_UTS_NS) && \
-       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+       (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,8,0))
 
 static
 size_t uts_ns_get_size(size_t offset)
index bcb817e55cf721490c4e6f4656b8f7626e9a9ebb..cb1eb5bf030ea233c15309e3c8baa21a04402c43 100644 (file)
@@ -90,21 +90,21 @@ int _lttng_field_statedump(struct lttng_session *session,
 
 void synchronize_trace(void)
 {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,1,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,1,0))
        synchronize_rcu();
 #else
        synchronize_sched();
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0))
 #ifdef CONFIG_PREEMPT_RT_FULL
        synchronize_rcu();
 #endif
-#else /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) */
+#else /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0)) */
 #ifdef CONFIG_PREEMPT_RT
        synchronize_rcu();
 #endif
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) */
+#endif /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0)) */
 }
 
 void lttng_lock_sessions(void)
@@ -4029,7 +4029,7 @@ void lttng_counter_transport_unregister(struct lttng_counter_transport *transpor
 }
 EXPORT_SYMBOL_GPL(lttng_counter_transport_unregister);
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0))
 
 enum cpuhp_state lttng_hp_prepare;
 enum cpuhp_state lttng_hp_online;
@@ -4145,7 +4145,7 @@ static void __exit lttng_exit_cpu_hotplug(void)
        cpuhp_remove_multi_state(lttng_hp_prepare);
 }
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 static int lttng_init_cpu_hotplug(void)
 {
        return 0;
@@ -4153,7 +4153,7 @@ static int lttng_init_cpu_hotplug(void)
 static void lttng_exit_cpu_hotplug(void)
 {
 }
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,10,0)) */
 
 
 static int __init lttng_events_init(void)
index f9917bb226441b04cd0f33e221d1fb1819654536..b3453bf5a8f21891c5ba4b75bd271317c96d3af4 100644 (file)
@@ -94,7 +94,7 @@ LTTNG_DEFINE_TRACE(lttng_statedump_process_pid_ns,
                struct pid_namespace *pid_ns),
        TP_ARGS(session, p, pid_ns));
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,6,0))
 LTTNG_DEFINE_TRACE(lttng_statedump_process_cgroup_ns,
        TP_PROTO(struct lttng_session *session,
                struct task_struct *p,
@@ -195,7 +195,7 @@ enum lttng_process_status {
 };
 
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0))
 
 #define LTTNG_PART_STRUCT_TYPE struct block_device
 
@@ -552,7 +552,7 @@ void lttng_statedump_process_ns(struct lttng_session *session,
         * "namespaces: Use task_lock and not rcu to protect nsproxy"
         * for details.
         */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,17,0) || \
                LTTNG_UBUNTU_KERNEL_RANGE(3,13,11,36, 3,14,0,0) || \
                LTTNG_UBUNTU_KERNEL_RANGE(3,16,1,11, 3,17,0,0) || \
                LTTNG_RHEL_KERNEL_RANGE(3,10,0,229,13,0, 3,11,0,0,0,0))
@@ -562,7 +562,7 @@ void lttng_statedump_process_ns(struct lttng_session *session,
        proxy = task_nsproxy(p);
 #endif
        if (proxy) {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,6,0))
                trace_lttng_statedump_process_cgroup_ns(session, p, proxy->cgroup_ns);
 #endif
                trace_lttng_statedump_process_ipc_ns(session, p, proxy->ipc_ns);
@@ -571,11 +571,11 @@ void lttng_statedump_process_ns(struct lttng_session *session,
 #endif
                trace_lttng_statedump_process_net_ns(session, p, proxy->net_ns);
                trace_lttng_statedump_process_uts_ns(session, p, proxy->uts_ns);
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
                trace_lttng_statedump_process_time_ns(session, p, proxy->time_ns);
 #endif
        }
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0) || \
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,17,0) || \
                LTTNG_UBUNTU_KERNEL_RANGE(3,13,11,36, 3,14,0,0) || \
                LTTNG_UBUNTU_KERNEL_RANGE(3,16,1,11, 3,17,0,0) || \
                LTTNG_RHEL_KERNEL_RANGE(3,10,0,229,13,0, 3,11,0,0,0,0))
index 6ce669f5cda7f047dfa73c15293175cd7fc29cc1..3fce0914d2d6a392f955cb724915373e4a830abc 100644 (file)
@@ -91,7 +91,7 @@ struct timeval;
 struct itimerval;
 struct itimerspec;
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
 typedef __kernel_old_time_t time_t;
 #endif
 
index 4461c9986eeaa66062b6ff5df0e0456c0fb7ade8..c700b64acdc27d455f9c96a39b24cd8a7932b21d 100644 (file)
 
 #include <linux/module.h>
 #include <linux/fs.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 #include <../fs/btrfs/ctree.h>
 #include <../fs/btrfs/transaction.h>
 #include <../fs/btrfs/volumes.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,4,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,4,0))
 #include <../fs/btrfs/block-group.h>
 #endif
 #include <linux/dcache.h>
index 70adb56a913db155203f03e60ef8a815fbbacca1..55a6340bb8da9738ac37e067cc1f444df863613c 100644 (file)
 #include <linux/module.h>
 #include <linux/fs.h>
 #include <linux/dcache.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 #include <lttng/tracer.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0))
 #include <../fs/ext3/ext3.h>
 #else
 #include <linux/ext3_fs_i.h>
index f301a16e3a8964170e9605fa9feb02ab4480b4b8..37a5aed300c74a15dd09817c4013fe8abf708bfe 100644 (file)
 #include <lttng/tracer.h>
 #include <lttng/kernel-version.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,1,0))
 #include <kvm/iodev.h>
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,1,0)) */
 #include <../../virt/kvm/iodev.h>
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,1,0)) */
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
  */
 #include <wrapper/tracepoint.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,9,0))
 #include <../../arch/x86/kvm/mmu/mmu_internal.h>
 #include <../../arch/x86/kvm/mmu/mmutrace.h>
 #else
 #include <../../arch/x86/kvm/mmutrace.h>
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0))
 #include <../arch/x86/kvm/mmu.h>
 #include <../arch/x86/kvm/mmu/spte.h>
 #endif
index 4e4f5c8361fa1b92afc43ce05bac2d9eae4f0887..05cbba58249dbbcab70533f60c26cc7edc6ace89 100644 (file)
 #include <lttng/tracer.h>
 #include <lttng/kernel-version.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,7,0))
 #include <kvm_emulate.h>
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,1,0))
 #include <kvm/iodev.h>
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,1,0)) */
 #include <../../virt/kvm/iodev.h>
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,1,0)) */
 
 /*
  * Create the tracepoint static inlines from the kernel to validate that our
index 2ab91385b4e44551cbfd7977d0e12c483cc3f5f3..6441f1161f731caa55419df5370e1e0f7a3aecb3 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #include <linux/module.h>
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 #include <lttng/tracer.h>
 
 /*
index 1892d5896d25780d763fded733f78bde086f072f..98558567894e263980f8302eb6d54cbb3ec6d81c 100644 (file)
@@ -100,7 +100,7 @@ static const struct file_operations lttng_logger_operations = {
  * Linux 5.6 introduced a separate proc_ops struct for /proc operations
  * to decouple it from the vfs.
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
 static const struct proc_ops lttng_logger_proc_ops = {
        .proc_write = lttng_logger_write,
 };
index 26a8367e89d0ccb66aa97ffab21092eb1445489a..3aa6e7b916c4f116a13d66026479f56605395454 100644 (file)
@@ -4,11 +4,11 @@
  * Copyright (C) 2013 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#include <linux/version.h>
+#include <lttng/kernel-version.h>
 #include <linux/spinlock.h>
 #include <wrapper/fdtable.h>
 
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,7,0))
 
 /*
  * Reimplementation of iterate_fd() for kernels between 2.6.32 and 3.6
index 5212082ff63b77242b60e9d9afb537be9d6f57ed..34968df25c9183f8ee91854dde9abef4bed6c4aa 100644 (file)
@@ -13,8 +13,8 @@
 #include <linux/module.h>
 
 #if (defined(CONFIG_KALLSYMS) && \
-       ((LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0)) || \
-        (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0))))
+       ((LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,11,0)) || \
+        (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,4,0))))
 
 #include <linux/kallsyms.h>
 #include <linux/interrupt.h>
index e7c6639432ee9ebf84b51644cc22f01f0dcbb960..d284876407a0396dbe9a3cd22f574961653b5dbf 100644 (file)
@@ -14,7 +14,7 @@
 #include <linux/module.h>
 #include <wrapper/kallsyms.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,7,0))
 
 #ifndef CONFIG_KPROBES
 # error "LTTng-modules requires CONFIG_KPROBES on kernels >= 5.7.0"
index 3994bf5730bd775bbe62f08a1c22c2b4c2cea134..81835cb2a04191fbd1aef3f45eae20cbc0a12cd6 100644 (file)
@@ -12,7 +12,7 @@
 #include <lttng/kernel-version.h>
 
 #if (defined(CONFIG_KALLSYMS) \
-       && (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,2)        \
+       && (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,19,2)    \
                || LTTNG_KERNEL_RANGE(3,14,36, 3,15,0)          \
                || LTTNG_KERNEL_RANGE(3,18,10, 3,19,0)          \
                || LTTNG_DEBIAN_KERNEL_RANGE(3,16,7,9,0,0, 3,17,0,0,0,0) \
index 407c12db14fca8a3611ef74e901fd8771b5ec23e..4292260c32d887d13fe22d21fe32feabacd71a48 100644 (file)
@@ -12,7 +12,7 @@
 #include <lttng/kernel-version.h>
 
 #if (defined(CONFIG_KALLSYMS) \
-       && (LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)))
+       && (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(4,2,0)))
 
 #include <linux/kallsyms.h>
 #include <linux/fs.h>
index 098ceae825a93d60947fdae53083e826cd06ac72..86007e5e73d2cc66d28fdce600fdf49c4ad0a912 100644 (file)
@@ -86,7 +86,7 @@ end:
        return written;
 }
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
 static const struct proc_ops lttng_test_filter_event_proc_ops = {
        .proc_write = lttng_test_filter_event_write,
 };
This page took 0.152928 seconds and 4 git commands to generate.