#define LTTNG_TRACE_9P_H
#include <probes/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),
#define LTTNG_TRACE_EXCEPTIONS_H
#include <probes/lttng-tracepoint-event.h>
-#include <linux/version.h>
+#include <lttng-kernel-version.h>
#undef TRACE_SYSTEM
#define TRACE_SYSTEM x86_exceptions
#define LTTNG_TRACE_IRQ_VECTORS_H
#include <probes/lttng-tracepoint-event.h>
-#include <linux/version.h>
+#include <lttng-kernel-version.h>
#undef TRACE_SYSTEM
#define TRACE_SYSTEM x86_irq_vectors
#define LTTNG_TRACE_KVM_MMU_H
#include <probes/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 \
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) \
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) \
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
*/
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
*/
| (!!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(
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,
)
)
-#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,
)
)
-#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,
)
)
-#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,
)
)
-#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,
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) || \
#include <probes/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>
/*
* 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),
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),
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))
)
)
-#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),
)
#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,
)
#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 */
#include <probes/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
#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
*/
)
#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,
)
-#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,
)
#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,
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,
)
#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,
)
)
-#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,
)
#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,
#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_
#endif /* _TRACE_BLOCK_DEF_ */
-#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) || \
| ((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)
| ((rw) & REQ_FLUSH ? RWBS_FLAG_FLUSH : 0) \
| ((rw) & REQ_FUA ? RWBS_FLAG_FUA : 0))
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,37))
#define lttng_req_op(rq)
#define lttng_req_rw(rq) ((rq)->cmd_flags)
| ((rw) & REQ_META ? RWBS_FLAG_META : 0) \
| ((rw) & REQ_SECURE ? RWBS_FLAG_SECURE : 0))
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,36))
#define lttng_req_op(rq)
#define lttng_req_rw(rq) ((rq)->cmd_flags)
#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),
)
#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),
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),
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
)
#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
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
* 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),
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,
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) \
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
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),
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),
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),
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),
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
)
#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
)
#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
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
)
#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
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
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
bio->bi_iter.bi_size)
)
)
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,38))
/**
* block_bio_complete - completed all work on the block operation
* @q: queue holding the block operation
)
#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),
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),
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),
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),
-#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
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
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),
#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
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
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),
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)
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)
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)
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)
)
LTTNG_TRACEPOINT_EVENT_CLASS(block_unplug,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,39))
TP_PROTO(struct request_queue *q, unsigned int depth, bool explicit),
TP_ARGS(q, depth, explicit),
#endif
TP_FIELDS(
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,39))
ctf_integer(int, nr_rq, depth)
#else
ctf_integer(int, nr_rq, q->rq.count[READ] + q->rq.count[WRITE])
)
)
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(2,6,39))
/**
* block_unplug_timer - timed release of operations requests in queue to device driver
* @q: request queue to unplug
* Unplug request queue @q because device driver is scheduled to work
* on elements in the request queue.
*/
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,39))
LTTNG_TRACEPOINT_EVENT_INSTANCE(block_unplug, block_unplug,
#else
LTTNG_TRACEPOINT_EVENT_INSTANCE(block_unplug, block_unplug_io,
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,39))
TP_PROTO(struct request_queue *q, unsigned int depth, bool explicit),
TP_ARGS(q, depth, explicit)
#endif
)
-#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
)
)
-#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
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,
)
#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
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
* An operation for a logical device has been mapped to the
* raw block device.
*/
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,38))
LTTNG_TRACEPOINT_EVENT(block_bio_remap,
#else
LTTNG_TRACEPOINT_EVENT(block_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,
)
#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
lttng_req_op(rq), lttng_req_rw(rq), blk_rq_bytes(rq))
)
)
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,32))
/**
* block_rq_remap - map request for a block operation request
* @q: queue holding the operation
#include <probes/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_
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) || \
)
#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,
)
)
-#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,
)
)
-#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,
)
)
-#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,
)
)
-#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,
)
)
-#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,
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,
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),
)
#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,
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,
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,
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),
)
#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,
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) || \
)
#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) || \
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)
)
#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) || \
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),
)
#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,
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) || \
)
#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) || \
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,
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,
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,
)
#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) || \
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,
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,
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,
)
#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,
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) || \
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,
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,
)
#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,
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,
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,
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) || \
)
#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,
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) || \
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,
)
#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,
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,
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,
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,
)
)
-#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,
)
)
-#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,
)
)
-#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,
)
)
-#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,
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,
)
#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,
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,
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,
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,
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,
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,
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) || \
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,
)
#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) || \
ctf_integer(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,
#include <probes/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,
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,
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,
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,
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 */
#define LTTNG_TRACE_EXT3_H
#include <probes/lttng-tracepoint-event.h>
-#include <linux/version.h>
+#include <lttng-kernel-version.h>
LTTNG_TRACEPOINT_EVENT(ext3_free_inode,
TP_PROTO(struct inode *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
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),
#include <probes/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_
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
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
)
)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,37))
LTTNG_TRACEPOINT_EVENT(ext4_evict_inode,
TP_PROTO(struct inode *inode),
TP_ARGS(inode, pos, len, copied)
)
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,40))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(2,6,40))
LTTNG_TRACEPOINT_EVENT(ext4_writepage,
TP_PROTO(struct inode *inode, struct page *page),
ctf_integer(loff_t, range_start, wbc->range_start)
ctf_integer(loff_t, range_end, wbc->range_end)
ctf_integer(pgoff_t, writeback_index, inode->i_mapping->writeback_index)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,39))
ctf_integer(int, sync_mode, wbc->sync_mode)
#endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(2,6,37))
ctf_integer(char, nonblocking, wbc->nonblocking)
#endif
ctf_integer(char, for_kupdate, wbc->for_kupdate)
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(2,6,39))
ctf_integer(char, for_reclaim, wbc->for_reclaim)
#endif
ctf_integer(char, range_cyclic, wbc->range_cyclic)
)
)
-#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,
ctf_integer(unsigned long, first_page, mpd->first_page)
ctf_integer(int, io_done, mpd->io_done)
ctf_integer(int, pages_written, mpd->pages_written)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,39))
ctf_integer(int, sync_mode, mpd->wbc->sync_mode)
#endif
)
#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),
ctf_integer(int, pages_written, pages_written)
ctf_integer(long, pages_skipped, wbc->pages_skipped)
ctf_integer(pgoff_t, writeback_index, inode->i_mapping->writeback_index)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,39))
ctf_integer(int, sync_mode, wbc->sync_mode)
#endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(2,6,33))
ctf_integer(char, encountered_congestion, wbc->encountered_congestion)
#endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,1,0))
ctf_integer(char, more_io, wbc->more_io)
#endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(2,6,35))
ctf_integer(char, no_nrwrite_index_update, wbc->no_nrwrite_index_update)
#endif
)
)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,39))
LTTNG_TRACEPOINT_EVENT_CLASS(ext4__page_op,
TP_PROTO(struct page *page),
)
)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,40))
LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__page_op, ext4_writepage,
TP_PROTO(struct page *page),
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),
LTTNG_TRACEPOINT_EVENT(ext4_mb_release_inode_pa,
TP_PROTO(
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,40))
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(2,6,40))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,37))
struct super_block *sb,
struct inode *inode,
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,36))
struct super_block *sb,
struct ext4_allocation_context *ac,
#else
struct ext4_prealloc_space *pa,
unsigned long long block, unsigned int count),
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,40))
TP_ARGS(pa, block, count),
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,37))
TP_ARGS(sb, inode, pa, block, count),
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,36))
TP_ARGS(sb, ac, pa, block, count),
#else
TP_ARGS(ac, pa, block, count),
#endif
TP_FIELDS(
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,40))
ctf_integer(dev_t, dev, pa->pa_inode->i_sb->s_dev)
ctf_integer(ino_t, ino, pa->pa_inode->i_ino)
#else
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,36))
ctf_integer(dev_t, dev, sb->s_dev)
#else
ctf_integer(dev_t, dev, ac->ac_sb->s_dev)
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,37))
ctf_integer(ino_t, ino, inode->i_ino)
#else
ctf_integer(ino_t, ino,
TP_PROTO(struct ext4_prealloc_space *pa),
TP_ARGS(pa),
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,37))
TP_PROTO(struct super_block *sb, struct ext4_prealloc_space *pa),
TP_ARGS(sb, pa),
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,36))
TP_PROTO(struct super_block *sb,
struct ext4_allocation_context *ac,
struct ext4_prealloc_space *pa),
TP_FIELDS(
#if (LTTNG_KERNEL_RANGE(2,6,40, 3,3,0))
ctf_integer(dev_t, dev, pa->pa_inode->i_sb->s_dev)
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,36))
ctf_integer(dev_t, dev, sb->s_dev)
#else
ctf_integer(dev_t, dev, ac->ac_sb->s_dev)
#endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(2,6,37))
ctf_integer(ino_t, ino,
(ac && ac->ac_inode) ? ac->ac_inode->i_ino : 0)
#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),
)
LTTNG_TRACEPOINT_EVENT(ext4_free_blocks,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,33))
TP_PROTO(struct inode *inode, __u64 block, unsigned long count,
int flags),
ctf_integer(ino_t, ino, inode->i_ino)
ctf_integer(__u64, block, block)
ctf_integer(unsigned long, count, count)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,33))
ctf_integer(int, flags, flags)
ctf_integer(TP_MODE_T, mode, inode->i_mode)
#else
)
)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,39))
LTTNG_TRACEPOINT_EVENT(ext4_sync_file_enter,
#else
LTTNG_TRACEPOINT_EVENT(ext4_sync_file,
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,35))
TP_PROTO(struct file *file, int datasync),
TP_ARGS(file, datasync),
#endif
TP_FIELDS(
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,35))
ctf_integer(dev_t, dev, file->f_path.dentry->d_inode->i_sb->s_dev)
ctf_integer(ino_t, ino, file->f_path.dentry->d_inode->i_ino)
ctf_integer(ino_t, parent, file->f_path.dentry->d_parent->d_inode->i_ino)
)
)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,39))
LTTNG_TRACEPOINT_EVENT(ext4_sync_file_exit,
TP_PROTO(struct inode *inode, int ret),
)
)
-#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),
)
LTTNG_TRACEPOINT_EVENT_CLASS(ext4__mballoc,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,37))
TP_PROTO(struct super_block *sb,
struct inode *inode,
ext4_group_t group,
#endif
TP_FIELDS(
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,37))
ctf_integer(dev_t, dev, sb->s_dev)
ctf_integer(ino_t, ino, inode ? inode->i_ino : 0)
ctf_integer(int, result_start, start)
LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__mballoc, ext4_mballoc_discard,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,37))
TP_PROTO(struct super_block *sb,
struct inode *inode,
ext4_group_t group,
LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__mballoc, ext4_mballoc_free,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,37))
TP_PROTO(struct super_block *sb,
struct inode *inode,
ext4_group_t group,
#endif
)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,33))
LTTNG_TRACEPOINT_EVENT(ext4_forget,
TP_PROTO(struct inode *inode, int is_metadata, __u64 block),
)
#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_update_reserve_space,
TP_PROTO(struct inode *inode, int used_blocks, int quota_claim),
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),
ctf_integer(TP_MODE_T, mode, inode->i_mode)
)
)
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,34))
LTTNG_TRACEPOINT_EVENT(ext4_da_update_reserve_space,
TP_PROTO(struct inode *inode, int used_blocks),
)
#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),
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),
ctf_integer(TP_MODE_T, mode, inode->i_mode)
)
)
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,34))
LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space,
TP_PROTO(struct inode *inode, int md_needed),
)
#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),
ctf_integer(TP_MODE_T, mode, inode->i_mode)
)
)
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,34))
LTTNG_TRACEPOINT_EVENT(ext4_da_release_space,
TP_PROTO(struct inode *inode, int freed_blocks),
)
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,35))
LTTNG_TRACEPOINT_EVENT_CLASS(ext4__bitmap_load,
TP_PROTO(struct super_block *sb, unsigned long group),
)
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,39))
-#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),
)
)
-#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),
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),
)
)
-#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),
)
)
-#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),
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,
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,
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),
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,
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),
)
)
-#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),
#endif
#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,
)
)
-#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,
)
)
-#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),
)
#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)
)
)
-#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,
)
)
-#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,
#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,
)
)
-#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,
)
)
-#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,
#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,
)
)
-#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,
#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),
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),
#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),
)
)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,37))
LTTNG_TRACEPOINT_EVENT_CLASS(irq_softirq,
TP_PROTO(unsigned int vec_nr),
TP_ARGS(vec_nr)
)
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,37)) */
LTTNG_TRACEPOINT_EVENT_CLASS(irq_softirq,
TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
TP_ARGS(h, vec)
)
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) */
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,37)) */
#endif /* LTTNG_TRACE_IRQ_H */
#include <probes/lttng-tracepoint-event.h>
#include <linux/jbd.h>
-#include <linux/version.h>
+#include <lttng-kernel-version.h>
LTTNG_TRACEPOINT_EVENT(jbd_checkpoint,
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)
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)
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)
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)
)
)
-#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,
#include <probes/lttng-tracepoint-event.h>
#include <linux/jbd2.h>
-#include <linux/version.h>
+#include <lttng-kernel-version.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,32))
#ifndef _TRACE_JBD2_DEF
#define _TRACE_JBD2_DEF
struct transaction_chp_stats_s;
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),
)
)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,32))
LTTNG_TRACEPOINT_EVENT(jbd2_run_stats,
TP_PROTO(dev_t dev, unsigned long tid,
struct transaction_run_stats_s *stats),
)
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,34))
+#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,
)
#endif
-#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),
#include <probes/lttng-tracepoint-event.h>
#include <linux/types.h>
-#include <linux/version.h>
+#include <lttng-kernel-version.h>
LTTNG_TRACEPOINT_EVENT_CLASS(kmem_alloc,
TP_ARGS(call_site, ptr)
)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,32))
+#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,
)
)
-#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),
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),
kmem_mm_page_pcpu_drain,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,33))
TP_PROTO(struct page *page, unsigned int order, int migratetype),
#else
TP_PROTO(struct page *page, int order, int migratetype),
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) \
)
)
-#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,
)
)
-#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,
)
)
-#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,
)
)
-#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
#define LTTNG_TRACE_KVM_MAIN_H
#include <probes/lttng-tracepoint-event.h>
-#include <linux/version.h>
+#include <lttng-kernel-version.h>
#undef TRACE_SYSTEM
#define TRACE_SYSTEM kvm
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,38))
LTTNG_TRACEPOINT_EVENT(kvm_userspace_exit,
TP_PROTO(__u32 reason, int errno),
)
#endif
-#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
)
)
-#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) \
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,34))
#define kvm_fpu_load_symbol \
{0, "unload"}, \
)
)
-#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,
#endif
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,38))
#ifdef CONFIG_KVM_ASYNC_PF
LTTNG_TRACEPOINT_EVENT_CLASS(kvm_async_get_page_class,
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(
)
)
-#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,
)
)
-#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
/* SPDX-License-Identifier: GPL-2.0 */
-#include <linux/version.h>
+#include <lttng-kernel-version.h>
#undef TRACE_SYSTEM
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,33))
#define TRACE_SYSTEM lock
#else
#define TRACE_SYSTEM lockdep
TP_FIELDS(
ctf_integer(unsigned int, flags, (trylock ? 1 : 0) | (read ? 2 : 0))
ctf_string(name, lock->name)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,34))
ctf_integer_hex(void *, lockdep_addr, lock)
#endif
)
)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,35))
LTTNG_TRACEPOINT_EVENT_CLASS(lock,
#endif
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,35)) */
LTTNG_TRACEPOINT_EVENT(lock_release,
TP_FIELDS(
ctf_string(name, lock->name)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,34))
ctf_integer_hex(void *, lockdep_addr, lock)
#endif
)
TP_FIELDS(
ctf_string(name, lock->name)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,34))
ctf_integer_hex(void *, lockdep_addr, lock)
#endif
)
TP_FIELDS(
ctf_string(name, lock->name)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,34))
ctf_integer(s64, wait_nsec, wait_nsec)
ctf_integer_hex(void *, lockdep_addr, lock)
#else
#endif
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) */
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,35)) */
#endif
#include <linux/nsproxy.h>
#include <linux/pid_namespace.h>
#include <linux/types.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_proc_inum ns.inum
#else
#define lttng_proc_inum proc_inum
ctf_integer(int, submode, submode)
ctf_integer(int, status, status)
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_proc_inum : 0)
#endif
ctf_integer(unsigned int, cpu, task_cpu(p))
#include <probes/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,
#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>
(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>
)
)
-#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,
#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),
)
#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,
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,
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,
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,
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)
)
#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,
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,
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)
)
#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,
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,
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,
),
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
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
)
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,
),
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
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,
),
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
)
#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),
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),
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),
)
#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,
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,
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,
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,
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,
ctf_integer(int, reclaim_flags, trace_shrink_flags(file))
)
)
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,37))
LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
TP_PROTO(int nid, int zid,
)
#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,
#define LTTNG_TRACE_MODULE_H
#include <probes/lttng-tracepoint-event.h>
-#include <linux/version.h>
+#include <lttng-kernel-version.h>
#ifdef CONFIG_MODULES
LTTNG_TRACEPOINT_EVENT_CLASS(module_refcnt,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,35))
TP_PROTO(struct module *mod, unsigned long ip),
TP_ARGS(mod, ip),
TP_FIELDS(
ctf_integer(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))
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,35))
ctf_integer(int, refcnt, __this_cpu_read(mod->refptr->incs) + __this_cpu_read(mod->refptr->decs))
#else
ctf_integer(int, refcnt, refcnt)
LTTNG_TRACEPOINT_EVENT_INSTANCE(module_refcnt, module_get,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,35))
TP_PROTO(struct module *mod, unsigned long ip),
TP_ARGS(mod, ip)
LTTNG_TRACEPOINT_EVENT_INSTANCE(module_refcnt, module_put,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,35))
TP_PROTO(struct module *mod, unsigned long ip),
TP_ARGS(mod, ip)
#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,
#include <linux/ip.h>
#include <linux/ipv6.h>
#include <linux/tcp.h>
-#include <linux/version.h>
+#include <lttng-kernel-version.h>
#include <lttng-endian.h>
#include <net/sock.h>
LTTNG_TRACEPOINT_EVENT(net_dev_xmit,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,40))
TP_PROTO(struct sk_buff *skb,
int rc,
struct net_device *dev,
TP_FIELDS(
ctf_integer_hex(void *, skbaddr, skb)
ctf_integer(int, rc, rc)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,40))
ctf_integer(unsigned int, len, skb_len)
ctf_string(name, dev->name)
#else
#include <probes/lttng-tracepoint-event.h>
#include <linux/ktime.h>
-#include <linux/version.h>
+#include <lttng-kernel-version.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,38))
LTTNG_TRACEPOINT_EVENT_CLASS(power_cpu,
TP_PROTO(unsigned int state, unsigned int cpu_id),
)
#endif
-#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),
)
#endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(2,6,38))
#undef CONFIG_EVENT_POWER_TRACING_DEPRECATED
#define CONFIG_EVENT_POWER_TRACING_DEPRECATED
#define _PWR_EVENT_AVOID_DOUBLE_DEFINING_DEPRECATED
*/
LTTNG_TRACEPOINT_EVENT_CLASS(power,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,36))
TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id),
TP_ARGS(type, state, cpu_id),
TP_FIELDS(
ctf_integer(u64, type, type)
ctf_integer(u64, state, state)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,36))
ctf_integer(u64, cpu_id, cpu_id)
#endif
)
LTTNG_TRACEPOINT_EVENT_INSTANCE(power, power_start,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,36))
TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id),
TP_ARGS(type, state, cpu_id)
LTTNG_TRACEPOINT_EVENT_INSTANCE(power, power_frequency,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,36))
TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id),
TP_ARGS(type, state, cpu_id)
LTTNG_TRACEPOINT_EVENT(power_end,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,36))
TP_PROTO(unsigned int cpu_id),
TP_ARGS(cpu_id),
#endif
TP_FIELDS(
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,36))
ctf_integer(u64, cpu_id, cpu_id)
#else
ctf_integer(u64, dummy, 0xffff)
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
#endif /* CONFIG_EVENT_POWER_TRACING_DEPRECATED */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,37))
/*
* The clock events are used for clock enable/disable and for
* clock rate change
*/
#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
*/
#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
#define LTTNG_TRACE_PRINTK_H
#include <probes/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,
)
)
-#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,
)
)
-#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,
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,
#define LTTNG_TRACE_RCU_H
#include <probes/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),
#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)
* 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,
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),
* 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,
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,
* 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,
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),
* 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,
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),
* 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,
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,
* 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,
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),
#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)
*/
* 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)
)
)
-#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),
)
)
-#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),
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),
#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
*/
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),
* 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),
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,
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,
* 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,
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,
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,
* 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),
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),
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),
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),
*/
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),
*/
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),
*/
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),
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)
)
)
-#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
*/
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),
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)
)
#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:
*/
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),
#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, \
#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)
#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 */
#include <probes/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_
#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)
{
*/
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),
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),
)
#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),
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),
)
#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),
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),
#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
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,19,0))
#define lttng_proc_inum ns.inum
#else
#define lttng_proc_inum proc_inum
#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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
return state;
}
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,35))
static inline long __trace_sched_switch_state(struct task_struct *p)
{
/*
* 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) || \
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,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,35))
TP_PROTO(struct task_struct *p, int success),
TP_ARGS(p, success),
ctf_integer(pid_t, tid, p->pid)
ctf_integer(int, prio, p->prio - MAX_RT_PRIO)
ctf_integer(int, success, success)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,32))
ctf_integer(int, target_cpu, task_cpu(p))
#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)) */
-#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) || \
TP_PROTO(struct task_struct *p),
TP_ARGS(p))
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,35))
LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_wakeup_template, sched_wakeup,
TP_PROTO(struct task_struct *p, int success),
TP_PROTO(struct task_struct *p, int success),
TP_ARGS(p, success))
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,35)) */
LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_wakeup_template, sched_wakeup,
TP_PROTO(struct rq *rq, struct task_struct *p, int success),
TP_PROTO(struct rq *rq, struct task_struct *p, int success),
TP_ARGS(rq, p, success))
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) */
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,35)) */
/*
* 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),
TP_ARGS(preempt, prev, next),
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,35))
TP_PROTO(struct task_struct *prev,
struct task_struct *next),
TP_ARGS(prev, next),
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,35)) */
TP_PROTO(struct rq *rq, struct task_struct *prev,
struct task_struct *next),
TP_ARGS(rq, prev, next),
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) */
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,35)) */
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_integer(long, prev_state, __trace_sched_switch_state(preempt, prev))
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,35))
ctf_integer(long, prev_state, __trace_sched_switch_state(prev))
#else
ctf_integer(long, prev_state, prev->state)
/*
* Tracepoint for waiting on task to unschedule:
*/
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,35))
LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_process_template, sched_wait_task,
TP_PROTO(struct task_struct *p),
TP_ARGS(p))
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,35)) */
LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_process_template, sched_wait_task,
TP_PROTO(struct rq *rq, struct task_struct *p),
TP_ARGS(rq, p))
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) */
+#endif /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,35)) */
/*
* Tracepoint for a waiting task:
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;
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;
TP_code_post()
)
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(2,6,33))
/*
* Tracepoint for sending a signal:
*/
)
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,4,0))
/*
* Tracepoint for exec:
*/
)
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,32))
/*
* XXX the below sched_stat tracepoints only apply to SCHED_OTHER/BATCH/IDLE
* adding sched_stat support to SCHED_FIFO/RR would be welcome.
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).
*/
)
#endif
-#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))
/*
ctf_integer(int, newprio, pi_task ? pi_task->prio - MAX_RT_PRIO : tsk->prio - MAX_RT_PRIO)
)
)
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,37))
/*
* Tracepoint for showing priority inheritance modifying a tasks
* priority.
#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) \
scsi_statusbyte_name(SAM_STAT_ACA_ACTIVE), \
scsi_statusbyte_name(SAM_STAT_TASK_ABORTED))
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,39))
#define scsi_prot_op_name(result) { result, #result }
#define show_prot_op_name(val) \
__print_symbolic(val, \
ctf_integer(unsigned int, cmd_len, cmd->cmd_len)
ctf_integer(unsigned int, data_sglen, scsi_sg_count(cmd))
ctf_integer(unsigned int, prot_sglen, scsi_prot_sg_count(cmd))
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,39))
ctf_integer(unsigned char, prot_op, scsi_get_prot_op(cmd))
#endif
ctf_sequence_hex(unsigned char, cmnd, cmd->cmnd, u32, cmd->cmd_len)
ctf_integer(unsigned int, cmd_len, cmd->cmd_len)
ctf_integer(unsigned int, data_sglen, scsi_sg_count(cmd))
ctf_integer(unsigned int, prot_sglen, scsi_prot_sg_count(cmd))
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,39))
ctf_integer(unsigned char, prot_op, scsi_get_prot_op(cmd))
#endif
ctf_sequence_hex(unsigned char, cmnd, cmd->cmnd, u32, cmd->cmd_len)
ctf_integer(unsigned int, cmd_len, cmd->cmd_len)
ctf_integer(unsigned int, data_sglen, scsi_sg_count(cmd))
ctf_integer(unsigned int, prot_sglen, scsi_prot_sg_count(cmd))
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,39))
ctf_integer(unsigned char, prot_op, scsi_get_prot_op(cmd))
#endif
ctf_sequence_hex(unsigned char, cmnd, cmd->cmnd, u32, cmd->cmd_len)
#define LTTNG_TRACE_SIGNAL_H
#include <probes/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, \
(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) ? \
(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 */
/**
* 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,
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,
* 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,
)
#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),
#include <probes/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:
)
)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,37))
LTTNG_TRACEPOINT_EVENT_MAP(consume_skb,
skb_consume,
)
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,32))
LTTNG_TRACEPOINT_EVENT(skb_copy_datagram_iovec,
TP_PROTO(const struct sk_buff *skb, int len),
#define LTTNG_TRACE_SOCK_H
#include <probes/lttng-tracepoint-event.h>
-#include <linux/version.h>
+#include <lttng-kernel-version.h>
#include <net/sock.h>
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,
)
)
-#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,
)
)
-#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,
)
)
-#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 */
#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,
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
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
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
* 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,
* 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,
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,
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,
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
* @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,
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,
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 */
#include <probes/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),
#include <probes/lttng-tracepoint-event.h>
#include <linux/workqueue.h>
-#include <linux/version.h>
+#include <lttng-kernel-version.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,36))
#ifndef _TRACE_WORKQUEUE_DEF_
#define _TRACE_WORKQUEUE_DEF_
)
)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,37))
/**
* workqueue_queue_work - called when a work gets queued
* @req_cpu: the requested cpu
*/
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),
)
)
-#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
#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_
* 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;
{
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"}, \
{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"}, \
{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"}, \
{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),
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),
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),
)
)
-#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),
)
)
-#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),
)
)
-#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)
)
)
-#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),
)
)
-#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),
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)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,38))
DEFINE_WRITEBACK_EVENT(writeback_wake_background)
#endif
DEFINE_WRITEBACK_EVENT(writeback_wake_thread)
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)
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)
#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) || \
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,
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,
)
#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,
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,
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,
)
#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,
)
)
-#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,
)
)
-#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,
)
)
-#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,
)
)
-#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,
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,
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
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,
#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),
)
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,37))
LTTNG_TRACEPOINT_EVENT_CLASS(writeback_congest_waited_template,
TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed),
)
#endif
-#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,
)
)
-#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,
#ifndef _LTTNG_BUG_H
#define _LTTNG_BUG_H
-#include <linux/version.h>
+#include <lttng-kernel-version.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,38))
#define LTTNG_BUILD_BUG_ON(cond) BUILD_BUG_ON(cond)
#else
#define LTTNG_BUILD_BUG_ON(cond) MAYBE_BUILD_BUG_ON(cond)
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 */
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;
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,
}
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
#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
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)) */
{
/*
}
#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)
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);
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)) */
}
}
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;
}
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
#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)
/*
* 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;
&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;
}
#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;
init_waitqueue_head(&chan->hp_wait);
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);
&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;
/*
}
#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. */
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:
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)
}
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
}
#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)
{
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;
}
#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);
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;
&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)) */
}
}
/*
* 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)
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.
#include <linux/module.h>
#include <linux/fs.h>
-#include <linux/version.h>
+#include <lttng-kernel-version.h>
#include <wrapper/splice.h>
#include <wrapper/ringbuffer/backend.h>
__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,
.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,
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;
}
}
-#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
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,
{
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;
&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;
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)
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
#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,
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,
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;
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;
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;
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:
{
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:
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>
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)
}
EXPORT_SYMBOL_GPL(lttng_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;
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;
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)
#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>
* 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
int lttng_add_callstack_to_ctx(struct lttng_ctx **ctx, int type);
-#if defined(CONFIG_PERF_EVENTS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
+#if defined(CONFIG_PERF_EVENTS) && (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,33))
int lttng_add_perf_counter_to_ctx(uint32_t type,
uint64_t config,
const char *name,
extern const struct file_operations lttng_tracepoint_list_fops;
extern const struct file_operations lttng_syscall_list_fops;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,35))
#define TRACEPOINT_HAS_DATA_ARG
#endif
*
* lttng-kernel-version.h
*
- * Contains helpers to check more complex kernel version conditions.
+ * Contains helpers to check kernel version conditions.
*
* Copyright (C) 2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*/
#include <linux/version.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
+#define LTTNG_KERNEL_VERSION(a, b, c) KERNEL_VERSION(a, b, c)
+#define LTTNG_LINUX_VERSION_CODE LINUX_VERSION_CODE
+
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,33))
#include <generated/utsrelease.h>
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) */
+#else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,33)) */
#include <linux/utsrelease.h>
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) */
+#endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,33)) */
/*
* 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_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))
+ (((LTTNG_KERNEL_VERSION(a, b, c)) * 10000000ULL) + ((d) * 10000) + ((e) * 100) + (f))
/* RHEL */
#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
};
-#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
#ifdef CONFIG_LTTNG_HAS_LIST_IRQ
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(2,6,39))
#define irq_desc_get_chip(desc) get_irq_desc_chip(desc)
#endif
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
#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>
#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>
#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
#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
*/
#include <linux/module.h>
-#include <linux/version.h>
+#include <lttng-kernel-version.h>
#include <lttng-tracer.h>
/*
* Create the tracepoint static inlines from the kernel to validate that our
* trace event macros match the kernel we run on.
*/
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,33))
#include <trace/events/lock.h>
#else
#include <trace/events/lockdep.h>
* 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,
};
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,
};
#ifndef _LTTNG_WRAPPER_ATOMIC_H
#define _LTTNG_WRAPPER_ATOMIC_H
-#include <linux/version.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+#include <lttng-kernel-version.h>
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,37))
#include <linux/atomic.h>
#else
#include <asm/atomic.h>
#endif
-#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();
{
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();
{
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 */
#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.
* 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) \
* 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
#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)
{
}
#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,
#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)
{
#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)
#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)
#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 */
#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)
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)
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 */
#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
#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>
#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
#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"
#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)
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)
#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)
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)
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 */
#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 */
#ifndef _LTTNG_WRAPPER_KSTRTOX_H
#define _LTTNG_WRAPPER_KSTRTOX_H
-#include <linux/version.h>
+#include <lttng-kernel-version.h>
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,0,0))
#include <linux/uaccess.h>
#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))
/*
}
#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)
{
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)
{
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 */
#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)
#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) \
* 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) \
#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 */
#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,
{
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)) */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,37))
static inline struct perf_event *
wrapper_perf_event_create_kernel_counter(struct perf_event_attr *attr,
int cpu,
{
return perf_event_create_kernel_counter(attr, cpu, task, callback);
}
-#else /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) */
+#else /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,37)) */
static inline struct perf_event *
wrapper_perf_event_create_kernel_counter(struct perf_event_attr *attr,
int cpu,
return perf_event_create_kernel_counter(attr, cpu, pid, callback);
}
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) */
+#endif /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,37)) */
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(2,6,36))
#define local64_read(l) atomic64_read(l)
#endif
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) */
+#endif /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,1,0)) */
#endif /* CONFIG_PERF_EVENTS */
#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>
#ifndef _LTTNG_WRAPPER_SPINLOCK_H
#define _LTTNG_WRAPPER_SPINLOCK_H
-#include <linux/version.h>
+#include <lttng-kernel-version.h>
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(2,6,33))
#include <linux/string.h>
#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>
#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,
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 */
#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
#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>
*/
-#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)
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 */
#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>
* 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
#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(2,6,35))
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(2,6,35))
#define DECLARE_EVENT_CLASS(name, proto, args, tstruct, assign, print)
#endif
-#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
{
}
-#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>
* }
*/
-#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)
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)
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 */
#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 */
#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)
#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;
{
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 */
#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>
#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
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) \
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.
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
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) \
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)
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)
{
printk_once(KERN_WARNING "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.
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.
node, caller);
}
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,38))
/*
* kallsyms wrapper of __vmalloc_node with a fallback to kmalloc_node.
node, caller);
}
-#else /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)) */
+#else /* (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,38)) */
/*
* Basic fallback for kernel prior to 2.6.38 without __vmalloc_node_range()
#ifndef _LTTNG_WRAPPER_VZALLOC_H
#define _LTTNG_WRAPPER_VZALLOC_H
-#include <linux/version.h>
+#include <lttng-kernel-version.h>
#include <linux/vmalloc.h>
#if LTTNG_KERNEL_RANGE(2,6,36, 2,6,37)
-#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;
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;
#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)
{