/*
* LTTng DebugFS ABI structures.
*/
-#define LTTNG_KERNEL_OLD_CHANNEL_PADDING LTTNG_KERNEL_SYM_NAME_LEN + 32
-struct lttng_kernel_old_channel {
+#define LTTNG_KERNEL_ABI_OLD_CHANNEL_PADDING LTTNG_KERNEL_ABI_SYM_NAME_LEN + 32
+struct lttng_kernel_abi_old_channel {
int overwrite; /* 1: overwrite, 0: discard */
uint64_t subbuf_size; /* in bytes */
uint64_t num_subbuf;
unsigned int switch_timer_interval; /* usecs */
unsigned int read_timer_interval; /* usecs */
- enum lttng_kernel_output output; /* splice, mmap */
- char padding[LTTNG_KERNEL_OLD_CHANNEL_PADDING];
+ enum lttng_kernel_abi_output output; /* splice, mmap */
+ char padding[LTTNG_KERNEL_ABI_OLD_CHANNEL_PADDING];
};
-struct lttng_kernel_old_kretprobe {
+struct lttng_kernel_abi_old_kretprobe {
uint64_t addr;
uint64_t offset;
- char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
+ char symbol_name[LTTNG_KERNEL_ABI_SYM_NAME_LEN];
};
/*
* Either addr is used, or symbol_name and offset.
*/
-struct lttng_kernel_old_kprobe {
+struct lttng_kernel_abi_old_kprobe {
uint64_t addr;
uint64_t offset;
- char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
+ char symbol_name[LTTNG_KERNEL_ABI_SYM_NAME_LEN];
};
-struct lttng_kernel_old_function_tracer {
- char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
+struct lttng_kernel_abi_old_function_tracer {
+ char symbol_name[LTTNG_KERNEL_ABI_SYM_NAME_LEN];
};
/*
* For syscall tracing, name = '\0' means "enable all".
*/
-#define LTTNG_KERNEL_OLD_EVENT_PADDING1 16
-#define LTTNG_KERNEL_OLD_EVENT_PADDING2 LTTNG_KERNEL_SYM_NAME_LEN + 32
-struct lttng_kernel_old_event {
- char name[LTTNG_KERNEL_SYM_NAME_LEN]; /* event name */
- enum lttng_kernel_instrumentation instrumentation;
- char padding[LTTNG_KERNEL_OLD_EVENT_PADDING1];
+#define LTTNG_KERNEL_ABI_OLD_EVENT_PADDING1 16
+#define LTTNG_KERNEL_ABI_OLD_EVENT_PADDING2 LTTNG_KERNEL_ABI_SYM_NAME_LEN + 32
+struct lttng_kernel_abi_old_event {
+ char name[LTTNG_KERNEL_ABI_SYM_NAME_LEN]; /* event name */
+ enum lttng_kernel_abi_instrumentation instrumentation;
+ char padding[LTTNG_KERNEL_ABI_OLD_EVENT_PADDING1];
/* Per instrumentation type configuration */
union {
- struct lttng_kernel_old_kretprobe kretprobe;
- struct lttng_kernel_old_kprobe kprobe;
- struct lttng_kernel_old_function_tracer ftrace;
- char padding[LTTNG_KERNEL_OLD_EVENT_PADDING2];
+ struct lttng_kernel_abi_old_kretprobe kretprobe;
+ struct lttng_kernel_abi_old_kprobe kprobe;
+ struct lttng_kernel_abi_old_function_tracer ftrace;
+ char padding[LTTNG_KERNEL_ABI_OLD_EVENT_PADDING2];
} u;
};
-struct lttng_kernel_old_tracer_version {
+struct lttng_kernel_abi_old_tracer_version {
uint32_t major;
uint32_t minor;
uint32_t patchlevel;
};
-struct lttng_kernel_old_calibrate {
- enum lttng_kernel_calibrate_type type; /* type (input) */
+struct lttng_kernel_abi_old_calibrate {
+ enum lttng_kernel_abi_calibrate_type type; /* type (input) */
};
-struct lttng_kernel_old_perf_counter_ctx {
+struct lttng_kernel_abi_old_perf_counter_ctx {
uint32_t type;
uint64_t config;
- char name[LTTNG_KERNEL_SYM_NAME_LEN];
+ char name[LTTNG_KERNEL_ABI_SYM_NAME_LEN];
};
-#define LTTNG_KERNEL_OLD_CONTEXT_PADDING1 16
-#define LTTNG_KERNEL_OLD_CONTEXT_PADDING2 LTTNG_KERNEL_SYM_NAME_LEN + 32
-struct lttng_kernel_old_context {
- enum lttng_kernel_context_type ctx;
- char padding[LTTNG_KERNEL_OLD_CONTEXT_PADDING1];
+#define LTTNG_KERNEL_ABI_OLD_CONTEXT_PADDING1 16
+#define LTTNG_KERNEL_ABI_OLD_CONTEXT_PADDING2 LTTNG_KERNEL_ABI_SYM_NAME_LEN + 32
+struct lttng_kernel_abi_old_context {
+ enum lttng_kernel_abi_context_type ctx;
+ char padding[LTTNG_KERNEL_ABI_OLD_CONTEXT_PADDING1];
union {
- struct lttng_kernel_old_perf_counter_ctx perf_counter;
- char padding[LTTNG_KERNEL_OLD_CONTEXT_PADDING2];
+ struct lttng_kernel_abi_old_perf_counter_ctx perf_counter;
+ char padding[LTTNG_KERNEL_ABI_OLD_CONTEXT_PADDING2];
} u;
};
/* LTTng file descriptor ioctl */
-#define LTTNG_KERNEL_OLD_SESSION _IO(0xF6, 0x40)
-#define LTTNG_KERNEL_OLD_TRACER_VERSION \
- _IOR(0xF6, 0x41, struct lttng_kernel_old_tracer_version)
-#define LTTNG_KERNEL_OLD_TRACEPOINT_LIST _IO(0xF6, 0x42)
-#define LTTNG_KERNEL_OLD_WAIT_QUIESCENT _IO(0xF6, 0x43)
-#define LTTNG_KERNEL_OLD_CALIBRATE \
- _IOWR(0xF6, 0x44, struct lttng_kernel_old_calibrate)
+#define LTTNG_KERNEL_ABI_OLD_SESSION _IO(0xF6, 0x40)
+#define LTTNG_KERNEL_ABI_OLD_TRACER_VERSION \
+ _IOR(0xF6, 0x41, struct lttng_kernel_abi_old_tracer_version)
+#define LTTNG_KERNEL_ABI_OLD_TRACEPOINT_LIST _IO(0xF6, 0x42)
+#define LTTNG_KERNEL_ABI_OLD_WAIT_QUIESCENT _IO(0xF6, 0x43)
+#define LTTNG_KERNEL_ABI_OLD_CALIBRATE \
+ _IOWR(0xF6, 0x44, struct lttng_kernel_abi_old_calibrate)
/* Session FD ioctl */
-#define LTTNG_KERNEL_OLD_METADATA \
- _IOW(0xF6, 0x50, struct lttng_kernel_old_channel)
-#define LTTNG_KERNEL_OLD_CHANNEL \
- _IOW(0xF6, 0x51, struct lttng_kernel_old_channel)
-#define LTTNG_KERNEL_OLD_SESSION_START _IO(0xF6, 0x52)
-#define LTTNG_KERNEL_OLD_SESSION_STOP _IO(0xF6, 0x53)
+#define LTTNG_KERNEL_ABI_OLD_METADATA \
+ _IOW(0xF6, 0x50, struct lttng_kernel_abi_old_channel)
+#define LTTNG_KERNEL_ABI_OLD_CHANNEL \
+ _IOW(0xF6, 0x51, struct lttng_kernel_abi_old_channel)
+#define LTTNG_KERNEL_ABI_OLD_SESSION_START _IO(0xF6, 0x52)
+#define LTTNG_KERNEL_ABI_OLD_SESSION_STOP _IO(0xF6, 0x53)
/* Channel FD ioctl */
-#define LTTNG_KERNEL_OLD_STREAM _IO(0xF6, 0x60)
-#define LTTNG_KERNEL_OLD_EVENT \
- _IOW(0xF6, 0x61, struct lttng_kernel_old_event)
+#define LTTNG_KERNEL_ABI_OLD_STREAM _IO(0xF6, 0x60)
+#define LTTNG_KERNEL_ABI_OLD_EVENT \
+ _IOW(0xF6, 0x61, struct lttng_kernel_abi_old_event)
/* Event and Channel FD ioctl */
-#define LTTNG_KERNEL_OLD_CONTEXT \
- _IOW(0xF6, 0x70, struct lttng_kernel_old_context)
+#define LTTNG_KERNEL_ABI_OLD_CONTEXT \
+ _IOW(0xF6, 0x70, struct lttng_kernel_abi_old_context)
/* Event, Channel and Session ioctl */
-#define LTTNG_KERNEL_OLD_ENABLE _IO(0xF6, 0x80)
-#define LTTNG_KERNEL_OLD_DISABLE _IO(0xF6, 0x81)
+#define LTTNG_KERNEL_ABI_OLD_ENABLE _IO(0xF6, 0x80)
+#define LTTNG_KERNEL_ABI_OLD_DISABLE _IO(0xF6, 0x81)
#endif /* _LTTNG_ABI_OLD_H */
* Major/minor version of ABI exposed to lttng tools. Major number
* should be increased when an incompatible ABI change is done.
*/
-#define LTTNG_MODULES_ABI_MAJOR_VERSION 2
-#define LTTNG_MODULES_ABI_MINOR_VERSION 6
-
-#define LTTNG_KERNEL_SYM_NAME_LEN 256
-#define LTTNG_KERNEL_SESSION_NAME_LEN 256
-#define LTTNG_KERNEL_SESSION_CREATION_TIME_ISO8601_LEN 26
-
-enum lttng_kernel_instrumentation {
- LTTNG_KERNEL_TRACEPOINT = 0,
- LTTNG_KERNEL_KPROBE = 1,
- LTTNG_KERNEL_FUNCTION = 2,
- LTTNG_KERNEL_KRETPROBE = 3,
- LTTNG_KERNEL_NOOP = 4, /* not hooked */
- LTTNG_KERNEL_SYSCALL = 5,
- LTTNG_KERNEL_UPROBE = 6,
+#define LTTNG_KERNEL_ABI_MAJOR_VERSION 2
+#define LTTNG_KERNEL_ABI_MINOR_VERSION 6
+
+#define LTTNG_KERNEL_ABI_SYM_NAME_LEN 256
+#define LTTNG_KERNEL_ABI_SESSION_NAME_LEN 256
+#define LTTNG_KERNEL_ABI_SESSION_CREATION_TIME_ISO8601_LEN 26
+
+enum lttng_kernel_abi_instrumentation {
+ LTTNG_KERNEL_ABI_TRACEPOINT = 0,
+ LTTNG_KERNEL_ABI_KPROBE = 1,
+ LTTNG_KERNEL_ABI_FUNCTION = 2,
+ LTTNG_KERNEL_ABI_KRETPROBE = 3,
+ LTTNG_KERNEL_ABI_NOOP = 4, /* not hooked */
+ LTTNG_KERNEL_ABI_SYSCALL = 5,
+ LTTNG_KERNEL_ABI_UPROBE = 6,
};
/*
* LTTng consumer mode
*/
-enum lttng_kernel_output {
- LTTNG_KERNEL_SPLICE = 0,
- LTTNG_KERNEL_MMAP = 1,
+enum lttng_kernel_abi_output {
+ LTTNG_KERNEL_ABI_SPLICE = 0,
+ LTTNG_KERNEL_ABI_MMAP = 1,
};
/*
* LTTng DebugFS ABI structures.
*/
-#define LTTNG_KERNEL_CHANNEL_PADDING LTTNG_KERNEL_SYM_NAME_LEN + 32
-struct lttng_kernel_channel {
+#define LTTNG_KERNEL_ABI_CHANNEL_PADDING LTTNG_KERNEL_ABI_SYM_NAME_LEN + 32
+struct lttng_kernel_abi_channel {
uint64_t subbuf_size; /* in bytes */
uint64_t num_subbuf;
unsigned int switch_timer_interval; /* usecs */
unsigned int read_timer_interval; /* usecs */
- uint32_t output; /* enum lttng_kernel_output (splice, mmap) */
+ uint32_t output; /* enum lttng_kernel_abi_output (splice, mmap) */
int overwrite; /* 1: overwrite, 0: discard */
- char padding[LTTNG_KERNEL_CHANNEL_PADDING];
+ char padding[LTTNG_KERNEL_ABI_CHANNEL_PADDING];
} __attribute__((packed));
-enum lttng_kernel_kretprobe_entryexit {
- LTTNG_KERNEL_KRETPROBE_ENTRYEXIT = 0,
- LTTNG_KERNEL_KRETPROBE_ENTRY = 1,
- LTTNG_KERNEL_KRETPROBE_EXIT = 2,
+enum lttng_kernel_abi_kretprobe_entryexit {
+ LTTNG_KERNEL_ABI_KRETPROBE_ENTRYEXIT = 0,
+ LTTNG_KERNEL_ABI_KRETPROBE_ENTRY = 1,
+ LTTNG_KERNEL_ABI_KRETPROBE_EXIT = 2,
};
-struct lttng_kernel_kretprobe {
+struct lttng_kernel_abi_kretprobe {
uint64_t addr;
uint64_t offset;
- char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
- uint8_t entryexit; /* enum lttng_kernel_kretprobe_entryexit */
+ char symbol_name[LTTNG_KERNEL_ABI_SYM_NAME_LEN];
+ uint8_t entryexit; /* enum lttng_kernel_abi_kretprobe_entryexit */
} __attribute__((packed));
/*
* Either addr is used, or symbol_name and offset.
*/
-struct lttng_kernel_kprobe {
+struct lttng_kernel_abi_kprobe {
uint64_t addr;
uint64_t offset;
- char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
+ char symbol_name[LTTNG_KERNEL_ABI_SYM_NAME_LEN];
} __attribute__((packed));
-struct lttng_kernel_function_tracer {
- char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
+struct lttng_kernel_abi_function_tracer {
+ char symbol_name[LTTNG_KERNEL_ABI_SYM_NAME_LEN];
} __attribute__((packed));
-struct lttng_kernel_uprobe {
+struct lttng_kernel_abi_uprobe {
int fd;
} __attribute__((packed));
-struct lttng_kernel_event_callsite_uprobe {
+struct lttng_kernel_abi_event_callsite_uprobe {
uint64_t offset;
} __attribute__((packed));
-struct lttng_kernel_event_callsite {
+struct lttng_kernel_abi_event_callsite {
union {
- struct lttng_kernel_event_callsite_uprobe uprobe;
+ struct lttng_kernel_abi_event_callsite_uprobe uprobe;
} u;
} __attribute__((packed));
-enum lttng_kernel_syscall_entryexit {
- LTTNG_KERNEL_SYSCALL_ENTRYEXIT = 0,
- LTTNG_KERNEL_SYSCALL_ENTRY = 1,
- LTTNG_KERNEL_SYSCALL_EXIT = 2,
+enum lttng_kernel_abi_syscall_entryexit {
+ LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT = 0,
+ LTTNG_KERNEL_ABI_SYSCALL_ENTRY = 1,
+ LTTNG_KERNEL_ABI_SYSCALL_EXIT = 2,
};
-enum lttng_kernel_syscall_abi {
- LTTNG_KERNEL_SYSCALL_ABI_ALL = 0,
- LTTNG_KERNEL_SYSCALL_ABI_NATIVE = 1,
- LTTNG_KERNEL_SYSCALL_ABI_COMPAT = 2,
+enum lttng_kernel_abi_syscall_abi {
+ LTTNG_KERNEL_ABI_SYSCALL_ABI_ALL = 0,
+ LTTNG_KERNEL_ABI_SYSCALL_ABI_NATIVE = 1,
+ LTTNG_KERNEL_ABI_SYSCALL_ABI_COMPAT = 2,
};
-enum lttng_kernel_syscall_match {
- LTTNG_KERNEL_SYSCALL_MATCH_NAME = 0,
- LTTNG_KERNEL_SYSCALL_MATCH_NR = 1, /* Not implemented. */
+enum lttng_kernel_abi_syscall_match {
+ LTTNG_KERNEL_ABI_SYSCALL_MATCH_NAME = 0,
+ LTTNG_KERNEL_ABI_SYSCALL_MATCH_NR = 1, /* Not implemented. */
};
-struct lttng_kernel_syscall {
- uint8_t entryexit; /* enum lttng_kernel_syscall_entryexit */
- uint8_t abi; /* enum lttng_kernel_syscall_abi */
- uint8_t match; /* enum lttng_kernel_syscall_match */
+struct lttng_kernel_abi_syscall {
+ uint8_t entryexit; /* enum lttng_kernel_abi_syscall_entryexit */
+ uint8_t abi; /* enum lttng_kernel_abi_syscall_abi */
+ uint8_t match; /* enum lttng_kernel_abi_syscall_match */
uint8_t padding;
uint32_t nr; /* For LTTNG_SYSCALL_MATCH_NR */
} __attribute__((packed));
/*
* For syscall tracing, name = "*" means "enable all".
*/
-#define LTTNG_KERNEL_EVENT_PADDING1 8
-#define LTTNG_KERNEL_EVENT_PADDING2 LTTNG_KERNEL_SYM_NAME_LEN + 32
-struct lttng_kernel_event {
- char name[LTTNG_KERNEL_SYM_NAME_LEN]; /* event name */
- uint32_t instrumentation; /* enum lttng_kernel_instrumentation */
+#define LTTNG_KERNEL_ABI_EVENT_PADDING1 8
+#define LTTNG_KERNEL_ABI_EVENT_PADDING2 LTTNG_KERNEL_ABI_SYM_NAME_LEN + 32
+struct lttng_kernel_abi_event {
+ char name[LTTNG_KERNEL_ABI_SYM_NAME_LEN]; /* event name */
+ uint32_t instrumentation; /* enum lttng_kernel_abi_instrumentation */
uint64_t token; /* User-provided token */
- char padding[LTTNG_KERNEL_EVENT_PADDING1];
+ char padding[LTTNG_KERNEL_ABI_EVENT_PADDING1];
/* Per instrumentation type configuration */
union {
- struct lttng_kernel_kretprobe kretprobe;
- struct lttng_kernel_kprobe kprobe;
- struct lttng_kernel_function_tracer ftrace;
- struct lttng_kernel_uprobe uprobe;
- struct lttng_kernel_syscall syscall;
- char padding[LTTNG_KERNEL_EVENT_PADDING2];
+ struct lttng_kernel_abi_kretprobe kretprobe;
+ struct lttng_kernel_abi_kprobe kprobe;
+ struct lttng_kernel_abi_function_tracer ftrace;
+ struct lttng_kernel_abi_uprobe uprobe;
+ struct lttng_kernel_abi_syscall syscall;
+ char padding[LTTNG_KERNEL_ABI_EVENT_PADDING2];
} u;
} __attribute__((packed));
-#define LTTNG_KERNEL_EVENT_NOTIFIER_PADDING 32
-struct lttng_kernel_event_notifier {
- struct lttng_kernel_event event;
+#define LTTNG_KERNEL_ABI_EVENT_NOTIFIER_PADDING 32
+struct lttng_kernel_abi_event_notifier {
+ struct lttng_kernel_abi_event event;
uint64_t error_counter_index;
- char padding[LTTNG_KERNEL_EVENT_NOTIFIER_PADDING];
+ char padding[LTTNG_KERNEL_ABI_EVENT_NOTIFIER_PADDING];
} __attribute__((packed));
-#define LTTNG_KERNEL_COUNTER_DIMENSION_MAX 4
+#define LTTNG_KERNEL_ABI_COUNTER_DIMENSION_MAX 4
-enum lttng_kernel_counter_arithmetic {
- LTTNG_KERNEL_COUNTER_ARITHMETIC_MODULAR = 0,
+enum lttng_kernel_abi_counter_arithmetic {
+ LTTNG_KERNEL_ABI_COUNTER_ARITHMETIC_MODULAR = 0,
};
-enum lttng_kernel_counter_bitness {
- LTTNG_KERNEL_COUNTER_BITNESS_32 = 0,
- LTTNG_KERNEL_COUNTER_BITNESS_64 = 1,
+enum lttng_kernel_abi_counter_bitness {
+ LTTNG_KERNEL_ABI_COUNTER_BITNESS_32 = 0,
+ LTTNG_KERNEL_ABI_COUNTER_BITNESS_64 = 1,
};
-struct lttng_kernel_counter_dimension {
+struct lttng_kernel_abi_counter_dimension {
uint64_t size;
uint64_t underflow_index;
uint64_t overflow_index;
uint8_t has_overflow;
} __attribute__((packed));
-#define LTTNG_KERNEL_COUNTER_CONF_PADDING1 67
-struct lttng_kernel_counter_conf {
- uint32_t arithmetic; /* enum lttng_kernel_counter_arithmetic */
- uint32_t bitness; /* enum lttng_kernel_counter_bitness */
+#define LTTNG_KERNEL_ABI_COUNTER_CONF_PADDING1 67
+struct lttng_kernel_abi_counter_conf {
+ uint32_t arithmetic; /* enum lttng_kernel_abi_counter_arithmetic */
+ uint32_t bitness; /* enum lttng_kernel_abi_counter_bitness */
uint32_t number_dimensions;
int64_t global_sum_step;
- struct lttng_kernel_counter_dimension dimensions[LTTNG_KERNEL_COUNTER_DIMENSION_MAX];
+ struct lttng_kernel_abi_counter_dimension dimensions[LTTNG_KERNEL_ABI_COUNTER_DIMENSION_MAX];
uint8_t coalesce_hits;
- char padding[LTTNG_KERNEL_COUNTER_CONF_PADDING1];
+ char padding[LTTNG_KERNEL_ABI_COUNTER_CONF_PADDING1];
} __attribute__((packed));
-struct lttng_kernel_counter_index {
+struct lttng_kernel_abi_counter_index {
uint32_t number_dimensions;
- uint64_t dimension_indexes[LTTNG_KERNEL_COUNTER_DIMENSION_MAX];
+ uint64_t dimension_indexes[LTTNG_KERNEL_ABI_COUNTER_DIMENSION_MAX];
} __attribute__((packed));
-struct lttng_kernel_counter_value {
+struct lttng_kernel_abi_counter_value {
int64_t value;
uint8_t underflow;
uint8_t overflow;
} __attribute__((packed));
-#define LTTNG_KERNEL_COUNTER_READ_PADDING 32
-struct lttng_kernel_counter_read {
- struct lttng_kernel_counter_index index;
+#define LTTNG_KERNEL_ABI_COUNTER_READ_PADDING 32
+struct lttng_kernel_abi_counter_read {
+ struct lttng_kernel_abi_counter_index index;
int32_t cpu; /* -1 for global counter, >= 0 for specific cpu. */
- struct lttng_kernel_counter_value value; /* output */
- char padding[LTTNG_KERNEL_COUNTER_READ_PADDING];
+ struct lttng_kernel_abi_counter_value value; /* output */
+ char padding[LTTNG_KERNEL_ABI_COUNTER_READ_PADDING];
} __attribute__((packed));
-#define LTTNG_KERNEL_COUNTER_AGGREGATE_PADDING 32
-struct lttng_kernel_counter_aggregate {
- struct lttng_kernel_counter_index index;
- struct lttng_kernel_counter_value value; /* output */
- char padding[LTTNG_KERNEL_COUNTER_AGGREGATE_PADDING];
+#define LTTNG_KERNEL_ABI_COUNTER_AGGREGATE_PADDING 32
+struct lttng_kernel_abi_counter_aggregate {
+ struct lttng_kernel_abi_counter_index index;
+ struct lttng_kernel_abi_counter_value value; /* output */
+ char padding[LTTNG_KERNEL_ABI_COUNTER_AGGREGATE_PADDING];
} __attribute__((packed));
-#define LTTNG_KERNEL_COUNTER_CLEAR_PADDING 32
-struct lttng_kernel_counter_clear {
- struct lttng_kernel_counter_index index;
- char padding[LTTNG_KERNEL_COUNTER_CLEAR_PADDING];
+#define LTTNG_KERNEL_ABI_COUNTER_CLEAR_PADDING 32
+struct lttng_kernel_abi_counter_clear {
+ struct lttng_kernel_abi_counter_index index;
+ char padding[LTTNG_KERNEL_ABI_COUNTER_CLEAR_PADDING];
} __attribute__((packed));
-#define LTTNG_KERNEL_EVENT_NOTIFIER_NOTIFICATION_PADDING 32
-struct lttng_kernel_event_notifier_notification {
+#define LTTNG_KERNEL_ABI_EVENT_NOTIFIER_NOTIFICATION_PADDING 32
+struct lttng_kernel_abi_event_notifier_notification {
uint64_t token;
uint16_t capture_buf_size;
- char padding[LTTNG_KERNEL_EVENT_NOTIFIER_NOTIFICATION_PADDING];
+ char padding[LTTNG_KERNEL_ABI_EVENT_NOTIFIER_NOTIFICATION_PADDING];
} __attribute__((packed));
-struct lttng_kernel_tracer_version {
+struct lttng_kernel_abi_tracer_version {
uint32_t major;
uint32_t minor;
uint32_t patchlevel;
} __attribute__((packed));
-struct lttng_kernel_tracer_abi_version {
+struct lttng_kernel_abi_tracer_abi_version {
uint32_t major;
uint32_t minor;
} __attribute__((packed));
-struct lttng_kernel_session_name {
- char name[LTTNG_KERNEL_SESSION_NAME_LEN];
+struct lttng_kernel_abi_session_name {
+ char name[LTTNG_KERNEL_ABI_SESSION_NAME_LEN];
} __attribute__((packed));
-struct lttng_kernel_session_creation_time {
- char iso8601[LTTNG_KERNEL_SESSION_CREATION_TIME_ISO8601_LEN];
+struct lttng_kernel_abi_session_creation_time {
+ char iso8601[LTTNG_KERNEL_ABI_SESSION_CREATION_TIME_ISO8601_LEN];
} __attribute__((packed));
-enum lttng_kernel_calibrate_type {
- LTTNG_KERNEL_CALIBRATE_KRETPROBE,
+enum lttng_kernel_abi_calibrate_type {
+ LTTNG_KERNEL_ABI_CALIBRATE_KRETPROBE,
};
-struct lttng_kernel_calibrate {
- uint32_t type; /* enum lttng_kernel_calibrate_type (input) */
+struct lttng_kernel_abi_calibrate {
+ uint32_t type; /* enum lttng_kernel_abi_calibrate_type (input) */
} __attribute__((packed));
-struct lttng_kernel_syscall_mask {
+struct lttng_kernel_abi_syscall_mask {
uint32_t len; /* in bits */
char mask[];
} __attribute__((packed));
-enum lttng_kernel_context_type {
- LTTNG_KERNEL_CONTEXT_PID = 0,
- LTTNG_KERNEL_CONTEXT_PERF_COUNTER = 1,
- LTTNG_KERNEL_CONTEXT_PROCNAME = 2,
- LTTNG_KERNEL_CONTEXT_PRIO = 3,
- LTTNG_KERNEL_CONTEXT_NICE = 4,
- LTTNG_KERNEL_CONTEXT_VPID = 5,
- LTTNG_KERNEL_CONTEXT_TID = 6,
- LTTNG_KERNEL_CONTEXT_VTID = 7,
- LTTNG_KERNEL_CONTEXT_PPID = 8,
- LTTNG_KERNEL_CONTEXT_VPPID = 9,
- LTTNG_KERNEL_CONTEXT_HOSTNAME = 10,
- LTTNG_KERNEL_CONTEXT_CPU_ID = 11,
- LTTNG_KERNEL_CONTEXT_INTERRUPTIBLE = 12,
- LTTNG_KERNEL_CONTEXT_PREEMPTIBLE = 13,
- LTTNG_KERNEL_CONTEXT_NEED_RESCHEDULE = 14,
- LTTNG_KERNEL_CONTEXT_MIGRATABLE = 15,
- LTTNG_KERNEL_CONTEXT_CALLSTACK_KERNEL = 16,
- LTTNG_KERNEL_CONTEXT_CALLSTACK_USER = 17,
- LTTNG_KERNEL_CONTEXT_CGROUP_NS = 18,
- LTTNG_KERNEL_CONTEXT_IPC_NS = 19,
- LTTNG_KERNEL_CONTEXT_MNT_NS = 20,
- LTTNG_KERNEL_CONTEXT_NET_NS = 21,
- LTTNG_KERNEL_CONTEXT_PID_NS = 22,
- LTTNG_KERNEL_CONTEXT_USER_NS = 23,
- LTTNG_KERNEL_CONTEXT_UTS_NS = 24,
- LTTNG_KERNEL_CONTEXT_UID = 25,
- LTTNG_KERNEL_CONTEXT_EUID = 26,
- LTTNG_KERNEL_CONTEXT_SUID = 27,
- LTTNG_KERNEL_CONTEXT_GID = 28,
- LTTNG_KERNEL_CONTEXT_EGID = 29,
- LTTNG_KERNEL_CONTEXT_SGID = 30,
- LTTNG_KERNEL_CONTEXT_VUID = 31,
- LTTNG_KERNEL_CONTEXT_VEUID = 32,
- LTTNG_KERNEL_CONTEXT_VSUID = 33,
- LTTNG_KERNEL_CONTEXT_VGID = 34,
- LTTNG_KERNEL_CONTEXT_VEGID = 35,
- LTTNG_KERNEL_CONTEXT_VSGID = 36,
- LTTNG_KERNEL_CONTEXT_TIME_NS = 37,
+enum lttng_kernel_abi_context_type {
+ LTTNG_KERNEL_ABI_CONTEXT_PID = 0,
+ LTTNG_KERNEL_ABI_CONTEXT_PERF_COUNTER = 1,
+ LTTNG_KERNEL_ABI_CONTEXT_PROCNAME = 2,
+ LTTNG_KERNEL_ABI_CONTEXT_PRIO = 3,
+ LTTNG_KERNEL_ABI_CONTEXT_NICE = 4,
+ LTTNG_KERNEL_ABI_CONTEXT_VPID = 5,
+ LTTNG_KERNEL_ABI_CONTEXT_TID = 6,
+ LTTNG_KERNEL_ABI_CONTEXT_VTID = 7,
+ LTTNG_KERNEL_ABI_CONTEXT_PPID = 8,
+ LTTNG_KERNEL_ABI_CONTEXT_VPPID = 9,
+ LTTNG_KERNEL_ABI_CONTEXT_HOSTNAME = 10,
+ LTTNG_KERNEL_ABI_CONTEXT_CPU_ID = 11,
+ LTTNG_KERNEL_ABI_CONTEXT_INTERRUPTIBLE = 12,
+ LTTNG_KERNEL_ABI_CONTEXT_PREEMPTIBLE = 13,
+ LTTNG_KERNEL_ABI_CONTEXT_NEED_RESCHEDULE = 14,
+ LTTNG_KERNEL_ABI_CONTEXT_MIGRATABLE = 15,
+ LTTNG_KERNEL_ABI_CONTEXT_CALLSTACK_KERNEL = 16,
+ LTTNG_KERNEL_ABI_CONTEXT_CALLSTACK_USER = 17,
+ LTTNG_KERNEL_ABI_CONTEXT_CGROUP_NS = 18,
+ LTTNG_KERNEL_ABI_CONTEXT_IPC_NS = 19,
+ LTTNG_KERNEL_ABI_CONTEXT_MNT_NS = 20,
+ LTTNG_KERNEL_ABI_CONTEXT_NET_NS = 21,
+ LTTNG_KERNEL_ABI_CONTEXT_PID_NS = 22,
+ LTTNG_KERNEL_ABI_CONTEXT_USER_NS = 23,
+ LTTNG_KERNEL_ABI_CONTEXT_UTS_NS = 24,
+ LTTNG_KERNEL_ABI_CONTEXT_UID = 25,
+ LTTNG_KERNEL_ABI_CONTEXT_EUID = 26,
+ LTTNG_KERNEL_ABI_CONTEXT_SUID = 27,
+ LTTNG_KERNEL_ABI_CONTEXT_GID = 28,
+ LTTNG_KERNEL_ABI_CONTEXT_EGID = 29,
+ LTTNG_KERNEL_ABI_CONTEXT_SGID = 30,
+ LTTNG_KERNEL_ABI_CONTEXT_VUID = 31,
+ LTTNG_KERNEL_ABI_CONTEXT_VEUID = 32,
+ LTTNG_KERNEL_ABI_CONTEXT_VSUID = 33,
+ LTTNG_KERNEL_ABI_CONTEXT_VGID = 34,
+ LTTNG_KERNEL_ABI_CONTEXT_VEGID = 35,
+ LTTNG_KERNEL_ABI_CONTEXT_VSGID = 36,
+ LTTNG_KERNEL_ABI_CONTEXT_TIME_NS = 37,
};
-struct lttng_kernel_perf_counter_ctx {
+struct lttng_kernel_abi_perf_counter_ctx {
uint32_t type;
uint64_t config;
- char name[LTTNG_KERNEL_SYM_NAME_LEN];
+ char name[LTTNG_KERNEL_ABI_SYM_NAME_LEN];
} __attribute__((packed));
-#define LTTNG_KERNEL_CONTEXT_PADDING1 16
-#define LTTNG_KERNEL_CONTEXT_PADDING2 LTTNG_KERNEL_SYM_NAME_LEN + 32
-struct lttng_kernel_context {
- uint32_t ctx; /*enum lttng_kernel_context_type */
- char padding[LTTNG_KERNEL_CONTEXT_PADDING1];
+#define LTTNG_KERNEL_ABI_CONTEXT_PADDING1 16
+#define LTTNG_KERNEL_ABI_CONTEXT_PADDING2 LTTNG_KERNEL_ABI_SYM_NAME_LEN + 32
+struct lttng_kernel_abi_context {
+ uint32_t ctx; /*enum lttng_kernel_abi_context_type */
+ char padding[LTTNG_KERNEL_ABI_CONTEXT_PADDING1];
union {
- struct lttng_kernel_perf_counter_ctx perf_counter;
- char padding[LTTNG_KERNEL_CONTEXT_PADDING2];
+ struct lttng_kernel_abi_perf_counter_ctx perf_counter;
+ char padding[LTTNG_KERNEL_ABI_CONTEXT_PADDING2];
} u;
} __attribute__((packed));
-#define LTTNG_KERNEL_FILTER_BYTECODE_MAX_LEN 65536
-struct lttng_kernel_filter_bytecode {
+#define LTTNG_KERNEL_ABI_FILTER_BYTECODE_MAX_LEN 65536
+struct lttng_kernel_abi_filter_bytecode {
uint32_t len;
uint32_t reloc_offset;
uint64_t seqnum;
char data[0];
} __attribute__((packed));
-#define LTTNG_KERNEL_CAPTURE_BYTECODE_MAX_LEN 65536
-struct lttng_kernel_capture_bytecode {
+#define LTTNG_KERNEL_ABI_CAPTURE_BYTECODE_MAX_LEN 65536
+struct lttng_kernel_abi_capture_bytecode {
uint32_t len;
uint32_t reloc_offset;
uint64_t seqnum;
char data[0];
} __attribute__((packed));
-enum lttng_kernel_tracker_type {
- LTTNG_KERNEL_TRACKER_UNKNOWN = -1,
+enum lttng_kernel_abi_tracker_type {
+ LTTNG_KERNEL_ABI_TRACKER_UNKNOWN = -1,
- LTTNG_KERNEL_TRACKER_PID = 0,
- LTTNG_KERNEL_TRACKER_VPID = 1,
- LTTNG_KERNEL_TRACKER_UID = 2,
- LTTNG_KERNEL_TRACKER_VUID = 3,
- LTTNG_KERNEL_TRACKER_GID = 4,
- LTTNG_KERNEL_TRACKER_VGID = 5,
+ LTTNG_KERNEL_ABI_TRACKER_PID = 0,
+ LTTNG_KERNEL_ABI_TRACKER_VPID = 1,
+ LTTNG_KERNEL_ABI_TRACKER_UID = 2,
+ LTTNG_KERNEL_ABI_TRACKER_VUID = 3,
+ LTTNG_KERNEL_ABI_TRACKER_GID = 4,
+ LTTNG_KERNEL_ABI_TRACKER_VGID = 5,
};
-struct lttng_kernel_tracker_args {
- uint32_t type; /* enum lttng_kernel_tracker_type */
+struct lttng_kernel_abi_tracker_args {
+ uint32_t type; /* enum lttng_kernel_abi_tracker_type */
int32_t id;
};
/* LTTng file descriptor ioctl */
/* lttng/abi-old.h reserve 0x40, 0x41, 0x42, 0x43, and 0x44. */
-#define LTTNG_KERNEL_SESSION _IO(0xF6, 0x45)
-#define LTTNG_KERNEL_TRACER_VERSION \
- _IOR(0xF6, 0x46, struct lttng_kernel_tracer_version)
-#define LTTNG_KERNEL_TRACEPOINT_LIST _IO(0xF6, 0x47)
-#define LTTNG_KERNEL_WAIT_QUIESCENT _IO(0xF6, 0x48)
-#define LTTNG_KERNEL_CALIBRATE \
- _IOWR(0xF6, 0x49, struct lttng_kernel_calibrate)
-#define LTTNG_KERNEL_SYSCALL_LIST _IO(0xF6, 0x4A)
-#define LTTNG_KERNEL_TRACER_ABI_VERSION \
- _IOR(0xF6, 0x4B, struct lttng_kernel_tracer_abi_version)
-#define LTTNG_KERNEL_EVENT_NOTIFIER_GROUP_CREATE _IO(0xF6, 0x4C)
+#define LTTNG_KERNEL_ABI_SESSION _IO(0xF6, 0x45)
+#define LTTNG_KERNEL_ABI_TRACER_VERSION \
+ _IOR(0xF6, 0x46, struct lttng_kernel_abi_tracer_version)
+#define LTTNG_KERNEL_ABI_TRACEPOINT_LIST _IO(0xF6, 0x47)
+#define LTTNG_KERNEL_ABI_WAIT_QUIESCENT _IO(0xF6, 0x48)
+#define LTTNG_KERNEL_ABI_CALIBRATE \
+ _IOWR(0xF6, 0x49, struct lttng_kernel_abi_calibrate)
+#define LTTNG_KERNEL_ABI_SYSCALL_LIST _IO(0xF6, 0x4A)
+#define LTTNG_KERNEL_ABI_TRACER_ABI_VERSION \
+ _IOR(0xF6, 0x4B, struct lttng_kernel_abi_tracer_abi_version)
+#define LTTNG_KERNEL_ABI_EVENT_NOTIFIER_GROUP_CREATE _IO(0xF6, 0x4C)
/* Session FD ioctl */
/* lttng/abi-old.h reserve 0x50, 0x51, 0x52, and 0x53. */
-#define LTTNG_KERNEL_METADATA \
- _IOW(0xF6, 0x54, struct lttng_kernel_channel)
-#define LTTNG_KERNEL_CHANNEL \
- _IOW(0xF6, 0x55, struct lttng_kernel_channel)
-#define LTTNG_KERNEL_SESSION_START _IO(0xF6, 0x56)
-#define LTTNG_KERNEL_SESSION_STOP _IO(0xF6, 0x57)
-#define LTTNG_KERNEL_SESSION_TRACK_PID \
+#define LTTNG_KERNEL_ABI_METADATA \
+ _IOW(0xF6, 0x54, struct lttng_kernel_abi_channel)
+#define LTTNG_KERNEL_ABI_CHANNEL \
+ _IOW(0xF6, 0x55, struct lttng_kernel_abi_channel)
+#define LTTNG_KERNEL_ABI_SESSION_START _IO(0xF6, 0x56)
+#define LTTNG_KERNEL_ABI_SESSION_STOP _IO(0xF6, 0x57)
+#define LTTNG_KERNEL_ABI_SESSION_TRACK_PID \
_IOR(0xF6, 0x58, int32_t)
-#define LTTNG_KERNEL_SESSION_UNTRACK_PID \
+#define LTTNG_KERNEL_ABI_SESSION_UNTRACK_PID \
_IOR(0xF6, 0x59, int32_t)
/*
* are generating two different ioctl numbers, but this was not done on
* purpose. We should generally try to avoid those duplications.
*/
-#define LTTNG_KERNEL_SESSION_LIST_TRACKER_PIDS _IO(0xF6, 0x58)
-#define LTTNG_KERNEL_SESSION_METADATA_REGEN _IO(0xF6, 0x59)
+#define LTTNG_KERNEL_ABI_SESSION_LIST_TRACKER_PIDS _IO(0xF6, 0x58)
+#define LTTNG_KERNEL_ABI_SESSION_METADATA_REGEN _IO(0xF6, 0x59)
/* lttng/abi-old.h reserve 0x5A and 0x5B. */
-#define LTTNG_KERNEL_SESSION_STATEDUMP _IO(0xF6, 0x5C)
-#define LTTNG_KERNEL_SESSION_SET_NAME \
- _IOR(0xF6, 0x5D, struct lttng_kernel_session_name)
-#define LTTNG_KERNEL_SESSION_SET_CREATION_TIME \
- _IOR(0xF6, 0x5E, struct lttng_kernel_session_creation_time)
+#define LTTNG_KERNEL_ABI_SESSION_STATEDUMP _IO(0xF6, 0x5C)
+#define LTTNG_KERNEL_ABI_SESSION_SET_NAME \
+ _IOR(0xF6, 0x5D, struct lttng_kernel_abi_session_name)
+#define LTTNG_KERNEL_ABI_SESSION_SET_CREATION_TIME \
+ _IOR(0xF6, 0x5E, struct lttng_kernel_abi_session_creation_time)
/* Channel FD ioctl */
/* lttng/abi-old.h reserve 0x60 and 0x61. */
-#define LTTNG_KERNEL_STREAM _IO(0xF6, 0x62)
-#define LTTNG_KERNEL_EVENT \
- _IOW(0xF6, 0x63, struct lttng_kernel_event)
-#define LTTNG_KERNEL_SYSCALL_MASK \
- _IOWR(0xF6, 0x64, struct lttng_kernel_syscall_mask)
+#define LTTNG_KERNEL_ABI_STREAM _IO(0xF6, 0x62)
+#define LTTNG_KERNEL_ABI_EVENT \
+ _IOW(0xF6, 0x63, struct lttng_kernel_abi_event)
+#define LTTNG_KERNEL_ABI_SYSCALL_MASK \
+ _IOWR(0xF6, 0x64, struct lttng_kernel_abi_syscall_mask)
/* Event and Channel FD ioctl */
/* lttng/abi-old.h reserve 0x70. */
-#define LTTNG_KERNEL_CONTEXT \
- _IOW(0xF6, 0x71, struct lttng_kernel_context)
+#define LTTNG_KERNEL_ABI_CONTEXT \
+ _IOW(0xF6, 0x71, struct lttng_kernel_abi_context)
/* Event, Event notifier, Channel, Counter and Session ioctl */
/* lttng/abi-old.h reserve 0x80 and 0x81. */
-#define LTTNG_KERNEL_ENABLE _IO(0xF6, 0x82)
-#define LTTNG_KERNEL_DISABLE _IO(0xF6, 0x83)
+#define LTTNG_KERNEL_ABI_ENABLE _IO(0xF6, 0x82)
+#define LTTNG_KERNEL_ABI_DISABLE _IO(0xF6, 0x83)
/* Trigger group and session ioctl */
-#define LTTNG_KERNEL_COUNTER \
- _IOW(0xF6, 0x84, struct lttng_kernel_counter_conf)
+#define LTTNG_KERNEL_ABI_COUNTER \
+ _IOW(0xF6, 0x84, struct lttng_kernel_abi_counter_conf)
/* Event and Event notifier FD ioctl */
-#define LTTNG_KERNEL_FILTER _IO(0xF6, 0x90)
-#define LTTNG_KERNEL_ADD_CALLSITE _IO(0xF6, 0x91)
+#define LTTNG_KERNEL_ABI_FILTER _IO(0xF6, 0x90)
+#define LTTNG_KERNEL_ABI_ADD_CALLSITE _IO(0xF6, 0x91)
/* Session FD ioctl (continued) */
-#define LTTNG_KERNEL_SESSION_LIST_TRACKER_IDS \
- _IOR(0xF6, 0xA0, struct lttng_kernel_tracker_args)
-#define LTTNG_KERNEL_SESSION_TRACK_ID \
- _IOR(0xF6, 0xA1, struct lttng_kernel_tracker_args)
-#define LTTNG_KERNEL_SESSION_UNTRACK_ID \
- _IOR(0xF6, 0xA2, struct lttng_kernel_tracker_args)
+#define LTTNG_KERNEL_ABI_SESSION_LIST_TRACKER_IDS \
+ _IOR(0xF6, 0xA0, struct lttng_kernel_abi_tracker_args)
+#define LTTNG_KERNEL_ABI_SESSION_TRACK_ID \
+ _IOR(0xF6, 0xA1, struct lttng_kernel_abi_tracker_args)
+#define LTTNG_KERNEL_ABI_SESSION_UNTRACK_ID \
+ _IOR(0xF6, 0xA2, struct lttng_kernel_abi_tracker_args)
/* Event notifier group file descriptor ioctl */
-#define LTTNG_KERNEL_EVENT_NOTIFIER_CREATE \
- _IOW(0xF6, 0xB0, struct lttng_kernel_event_notifier)
-#define LTTNG_KERNEL_EVENT_NOTIFIER_GROUP_NOTIFICATION_FD \
+#define LTTNG_KERNEL_ABI_EVENT_NOTIFIER_CREATE \
+ _IOW(0xF6, 0xB0, struct lttng_kernel_abi_event_notifier)
+#define LTTNG_KERNEL_ABI_EVENT_NOTIFIER_GROUP_NOTIFICATION_FD \
_IO(0xF6, 0xB1)
/* Event notifier file descriptor ioctl */
-#define LTTNG_KERNEL_CAPTURE _IO(0xF6, 0xB8)
+#define LTTNG_KERNEL_ABI_CAPTURE _IO(0xF6, 0xB8)
/* Counter file descriptor ioctl */
-#define LTTNG_KERNEL_COUNTER_READ \
- _IOWR(0xF6, 0xC0, struct lttng_kernel_counter_read)
-#define LTTNG_KERNEL_COUNTER_AGGREGATE \
- _IOWR(0xF6, 0xC1, struct lttng_kernel_counter_aggregate)
-#define LTTNG_KERNEL_COUNTER_CLEAR \
- _IOW(0xF6, 0xC2, struct lttng_kernel_counter_clear)
+#define LTTNG_KERNEL_ABI_COUNTER_READ \
+ _IOWR(0xF6, 0xC0, struct lttng_kernel_abi_counter_read)
+#define LTTNG_KERNEL_ABI_COUNTER_AGGREGATE \
+ _IOWR(0xF6, 0xC1, struct lttng_kernel_abi_counter_aggregate)
+#define LTTNG_KERNEL_ABI_COUNTER_CLEAR \
+ _IOW(0xF6, 0xC2, struct lttng_kernel_abi_counter_clear)
/*
*/
/* returns the timestamp begin of the current sub-buffer */
-#define LTTNG_RING_BUFFER_GET_TIMESTAMP_BEGIN _IOR(0xF6, 0x20, uint64_t)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_GET_TIMESTAMP_BEGIN _IOR(0xF6, 0x20, uint64_t)
/* returns the timestamp end of the current sub-buffer */
-#define LTTNG_RING_BUFFER_GET_TIMESTAMP_END _IOR(0xF6, 0x21, uint64_t)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_GET_TIMESTAMP_END _IOR(0xF6, 0x21, uint64_t)
/* returns the number of events discarded of the current sub-buffer */
-#define LTTNG_RING_BUFFER_GET_EVENTS_DISCARDED _IOR(0xF6, 0x22, uint64_t)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_GET_EVENTS_DISCARDED _IOR(0xF6, 0x22, uint64_t)
/* returns the packet payload size of the current sub-buffer */
-#define LTTNG_RING_BUFFER_GET_CONTENT_SIZE _IOR(0xF6, 0x23, uint64_t)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_GET_CONTENT_SIZE _IOR(0xF6, 0x23, uint64_t)
/* returns the packet size of the current sub-buffer*/
-#define LTTNG_RING_BUFFER_GET_PACKET_SIZE _IOR(0xF6, 0x24, uint64_t)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_GET_PACKET_SIZE _IOR(0xF6, 0x24, uint64_t)
/* returns the stream id (invariant for the stream) */
-#define LTTNG_RING_BUFFER_GET_STREAM_ID _IOR(0xF6, 0x25, uint64_t)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_GET_STREAM_ID _IOR(0xF6, 0x25, uint64_t)
/* returns the current timestamp as perceived from the tracer */
-#define LTTNG_RING_BUFFER_GET_CURRENT_TIMESTAMP _IOR(0xF6, 0x26, uint64_t)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_GET_CURRENT_TIMESTAMP _IOR(0xF6, 0x26, uint64_t)
/* returns the packet sequence number of the current sub-buffer */
-#define LTTNG_RING_BUFFER_GET_SEQ_NUM _IOR(0xF6, 0x27, uint64_t)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_GET_SEQ_NUM _IOR(0xF6, 0x27, uint64_t)
/* returns the stream instance id (invariant for the stream) */
-#define LTTNG_RING_BUFFER_INSTANCE_ID _IOR(0xF6, 0x28, uint64_t)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_INSTANCE_ID _IOR(0xF6, 0x28, uint64_t)
#ifdef CONFIG_COMPAT
/* returns the timestamp begin of the current sub-buffer */
-#define LTTNG_RING_BUFFER_COMPAT_GET_TIMESTAMP_BEGIN \
- LTTNG_RING_BUFFER_GET_TIMESTAMP_BEGIN
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_TIMESTAMP_BEGIN \
+ LTTNG_KERNEL_ABI_RING_BUFFER_GET_TIMESTAMP_BEGIN
/* returns the timestamp end of the current sub-buffer */
-#define LTTNG_RING_BUFFER_COMPAT_GET_TIMESTAMP_END \
- LTTNG_RING_BUFFER_GET_TIMESTAMP_END
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_TIMESTAMP_END \
+ LTTNG_KERNEL_ABI_RING_BUFFER_GET_TIMESTAMP_END
/* returns the number of events discarded of the current sub-buffer */
-#define LTTNG_RING_BUFFER_COMPAT_GET_EVENTS_DISCARDED \
- LTTNG_RING_BUFFER_GET_EVENTS_DISCARDED
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_EVENTS_DISCARDED \
+ LTTNG_KERNEL_ABI_RING_BUFFER_GET_EVENTS_DISCARDED
/* returns the packet payload size of the current sub-buffer */
-#define LTTNG_RING_BUFFER_COMPAT_GET_CONTENT_SIZE \
- LTTNG_RING_BUFFER_GET_CONTENT_SIZE
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_CONTENT_SIZE \
+ LTTNG_KERNEL_ABI_RING_BUFFER_GET_CONTENT_SIZE
/* returns the packet size of the current sub-buffer */
-#define LTTNG_RING_BUFFER_COMPAT_GET_PACKET_SIZE \
- LTTNG_RING_BUFFER_GET_PACKET_SIZE
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_PACKET_SIZE \
+ LTTNG_KERNEL_ABI_RING_BUFFER_GET_PACKET_SIZE
/* returns the stream id (invariant for the stream) */
-#define LTTNG_RING_BUFFER_COMPAT_GET_STREAM_ID \
- LTTNG_RING_BUFFER_GET_STREAM_ID
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_STREAM_ID \
+ LTTNG_KERNEL_ABI_RING_BUFFER_GET_STREAM_ID
/* returns the current timestamp as perceived from the tracer */
-#define LTTNG_RING_BUFFER_COMPAT_GET_CURRENT_TIMESTAMP \
- LTTNG_RING_BUFFER_GET_CURRENT_TIMESTAMP
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_CURRENT_TIMESTAMP \
+ LTTNG_KERNEL_ABI_RING_BUFFER_GET_CURRENT_TIMESTAMP
/* returns the packet sequence number of the current sub-buffer */
-#define LTTNG_RING_BUFFER_COMPAT_GET_SEQ_NUM \
- LTTNG_RING_BUFFER_GET_SEQ_NUM
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_SEQ_NUM \
+ LTTNG_KERNEL_ABI_RING_BUFFER_GET_SEQ_NUM
/* returns the stream instance id (invariant for the stream) */
-#define LTTNG_RING_BUFFER_COMPAT_INSTANCE_ID \
- LTTNG_RING_BUFFER_INSTANCE_ID
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_INSTANCE_ID \
+ LTTNG_KERNEL_ABI_RING_BUFFER_INSTANCE_ID
#endif /* CONFIG_COMPAT */
#endif /* _LTTNG_ABI_H */
const struct lttng_kernel_event_desc *desc;
void *filter;
struct lttng_kernel_ctx *ctx;
- enum lttng_kernel_instrumentation instrumentation;
+ enum lttng_kernel_abi_instrumentation instrumentation;
union {
struct lttng_kprobe kprobe;
struct {
void *filter;
struct list_head list; /* event_notifier list in event_notifier group */
- enum lttng_kernel_instrumentation instrumentation;
+ enum lttng_kernel_abi_instrumentation instrumentation;
union {
struct lttng_kprobe kprobe;
struct lttng_uprobe uprobe;
/* head list of struct lttng_bytecode_node */
struct list_head filter_bytecode_head;
- struct lttng_kernel_event event_param;
+ struct lttng_kernel_abi_event event_param;
unsigned int enabled:1;
uint64_t user_token; /* User-provided token. */
struct list_head enablers_head;
/* Hash table of events */
struct lttng_event_ht events_ht;
- char name[LTTNG_KERNEL_SESSION_NAME_LEN];
- char creation_time[LTTNG_KERNEL_SESSION_CREATION_TIME_ISO8601_LEN];
+ char name[LTTNG_KERNEL_ABI_SESSION_NAME_LEN];
+ char creation_time[LTTNG_KERNEL_ABI_SESSION_CREATION_TIME_ISO8601_LEN];
};
struct lttng_counter {
struct lttng_event_enabler *lttng_event_enabler_create(
enum lttng_enabler_format_type format_type,
- struct lttng_kernel_event *event_param,
+ struct lttng_kernel_abi_event *event_param,
struct lttng_channel *chan);
int lttng_event_enabler_enable(struct lttng_event_enabler *event_enabler);
struct lttng_event_notifier_enabler *lttng_event_notifier_enabler_create(
struct lttng_event_notifier_group *event_notifier_group,
enum lttng_enabler_format_type format_type,
- struct lttng_kernel_event_notifier *event_notifier_param);
+ struct lttng_kernel_abi_event_notifier *event_notifier_param);
int lttng_event_notifier_enabler_enable(
struct lttng_event_notifier_enabler *event_notifier_enabler);
struct lttng_event_notifier_group *lttng_event_notifier_group_create(void);
int lttng_event_notifier_group_create_error_counter(
struct file *event_notifier_group_file,
- const struct lttng_kernel_counter_conf *error_counter_conf);
+ const struct lttng_kernel_abi_counter_conf *error_counter_conf);
void lttng_event_notifier_group_destroy(
struct lttng_event_notifier_group *event_notifier_group);
void lttng_metadata_channel_destroy(struct lttng_channel *chan);
struct lttng_event *lttng_event_create(struct lttng_channel *chan,
- struct lttng_kernel_event *event_param,
+ struct lttng_kernel_abi_event *event_param,
void *filter,
const struct lttng_kernel_event_desc *event_desc,
- enum lttng_kernel_instrumentation itype);
+ enum lttng_kernel_abi_instrumentation itype);
struct lttng_event *_lttng_event_create(struct lttng_channel *chan,
- struct lttng_kernel_event *event_param,
+ struct lttng_kernel_abi_event *event_param,
void *filter,
const struct lttng_kernel_event_desc *event_desc,
- enum lttng_kernel_instrumentation itype);
+ enum lttng_kernel_abi_instrumentation itype);
struct lttng_event *lttng_event_compat_old_create(struct lttng_channel *chan,
- struct lttng_kernel_old_event *old_event_param,
+ struct lttng_kernel_abi_old_event *old_event_param,
void *filter,
const struct lttng_kernel_event_desc *internal_desc);
uint64_t id,
uint64_t error_counter_idx,
struct lttng_event_notifier_group *event_notifier_group,
- struct lttng_kernel_event_notifier *event_notifier_param,
+ struct lttng_kernel_abi_event_notifier *event_notifier_param,
void *filter,
- enum lttng_kernel_instrumentation itype);
+ enum lttng_kernel_abi_instrumentation itype);
struct lttng_event_notifier *_lttng_event_notifier_create(
const struct lttng_kernel_event_desc *event_notifier_desc,
uint64_t id,
uint64_t error_counter_idx,
struct lttng_event_notifier_group *event_notifier_group,
- struct lttng_kernel_event_notifier *event_notifier_param,
+ struct lttng_kernel_abi_event_notifier *event_notifier_param,
void *filter,
- enum lttng_kernel_instrumentation itype);
+ enum lttng_kernel_abi_instrumentation itype);
int lttng_channel_enable(struct lttng_channel *channel);
int lttng_channel_disable(struct lttng_channel *channel);
struct lttng_event *event);
long lttng_channel_syscall_mask(struct lttng_channel *channel,
- struct lttng_kernel_syscall_mask __user *usyscall_mask);
+ struct lttng_kernel_abi_syscall_mask __user *usyscall_mask);
int lttng_syscalls_register_event_notifier(
struct lttng_event_notifier_enabler *event_notifier_enabler,
#endif
int lttng_event_enabler_attach_filter_bytecode(struct lttng_event_enabler *event_enabler,
- struct lttng_kernel_filter_bytecode __user *bytecode);
+ struct lttng_kernel_abi_filter_bytecode __user *bytecode);
int lttng_event_notifier_enabler_attach_filter_bytecode(
struct lttng_event_notifier_enabler *event_notifier_enabler,
- struct lttng_kernel_filter_bytecode __user *bytecode);
+ struct lttng_kernel_abi_filter_bytecode __user *bytecode);
int lttng_event_notifier_enabler_attach_capture_bytecode(
struct lttng_event_notifier_enabler *event_notifier_enabler,
- struct lttng_kernel_capture_bytecode __user *bytecode);
+ struct lttng_kernel_abi_capture_bytecode __user *bytecode);
void lttng_enabler_link_bytecode(const struct lttng_kernel_event_desc *event_desc,
struct lttng_kernel_ctx *ctx,
#endif
int lttng_event_add_callsite(struct lttng_event *event,
- struct lttng_kernel_event_callsite *callsite);
+ struct lttng_kernel_abi_event_callsite __user *callsite);
int lttng_event_notifier_add_callsite(struct lttng_event_notifier *event_notifier,
- struct lttng_kernel_event_callsite *callsite);
+ struct lttng_kernel_abi_event_callsite __user *callsite);
#ifdef CONFIG_UPROBES
int lttng_uprobes_register_event(const char *name,
int fd, struct lttng_event *event);
int lttng_uprobes_event_add_callsite(struct lttng_event *event,
- struct lttng_kernel_event_callsite *callsite);
+ struct lttng_kernel_abi_event_callsite __user *callsite);
void lttng_uprobes_unregister_event(struct lttng_event *event);
void lttng_uprobes_destroy_event_private(struct lttng_event *event);
int lttng_uprobes_register_event_notifier(const char *name,
int fd, struct lttng_event_notifier *event_notifier);
int lttng_uprobes_event_notifier_add_callsite(struct lttng_event_notifier *event_notifier,
- struct lttng_kernel_event_callsite *callsite);
+ struct lttng_kernel_abi_event_callsite __user *callsite);
void lttng_uprobes_unregister_event_notifier(struct lttng_event_notifier *event_notifier);
void lttng_uprobes_destroy_event_notifier_private(struct lttng_event_notifier *event_notifier);
#else
static inline
int lttng_uprobes_event_add_callsite(struct lttng_event *event,
- struct lttng_kernel_event_callsite *callsite)
+ struct lttng_kernel_abi_event_callsite __user *callsite)
{
return -ENOSYS;
}
static inline
int lttng_uprobes_event_notifier_add_callsite(struct lttng_event_notifier *event_notifier,
- struct lttng_kernel_event_callsite *callsite)
+ struct lttng_kernel_abi_event_callsite __user *callsite)
{
return -ENOSYS;
}
}
#endif
-int lttng_calibrate(struct lttng_kernel_calibrate *calibrate);
+int lttng_calibrate(struct lttng_kernel_abi_calibrate *calibrate);
extern const struct file_operations lttng_tracepoint_list_fops;
extern const struct file_operations lttng_syscall_list_fops;
unsigned int flags);
/*
- * Use RING_BUFFER_GET_NEXT_SUBBUF / RING_BUFFER_PUT_NEXT_SUBBUF to read and
+ * Use LTTNG_KERNEL_ABI_RING_BUFFER_GET_NEXT_SUBBUF / LTTNG_KERNEL_ABI_RING_BUFFER_PUT_NEXT_SUBBUF to read and
* consume sub-buffers sequentially.
*
* Reading sub-buffers without consuming them can be performed with:
*
- * RING_BUFFER_SNAPSHOT
- * RING_BUFFER_SNAPSHOT_GET_CONSUMED
- * RING_BUFFER_SNAPSHOT_GET_PRODUCED
+ * LTTNG_KERNEL_ABI_RING_BUFFER_SNAPSHOT
+ * LTTNG_KERNEL_ABI_RING_BUFFER_SNAPSHOT_GET_CONSUMED
+ * LTTNG_KERNEL_ABI_RING_BUFFER_SNAPSHOT_GET_PRODUCED
*
* to get the offset range to consume, and then by passing each sub-buffer
* offset to RING_BUFFER_GET_SUBBUF, read the sub-buffer, and then release it
*/
/* Get a snapshot of the current ring buffer producer and consumer positions */
-#define RING_BUFFER_SNAPSHOT _IO(0xF6, 0x00)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_SNAPSHOT _IO(0xF6, 0x00)
/* Get the consumer position (iteration start) */
-#define RING_BUFFER_SNAPSHOT_GET_CONSUMED _IOR(0xF6, 0x01, unsigned long)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_SNAPSHOT_GET_CONSUMED _IOR(0xF6, 0x01, unsigned long)
/* Get the producer position (iteration end) */
-#define RING_BUFFER_SNAPSHOT_GET_PRODUCED _IOR(0xF6, 0x02, unsigned long)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_SNAPSHOT_GET_PRODUCED _IOR(0xF6, 0x02, unsigned long)
/* Get exclusive read access to the specified sub-buffer position */
-#define RING_BUFFER_GET_SUBBUF _IOW(0xF6, 0x03, unsigned long)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_GET_SUBBUF _IOW(0xF6, 0x03, unsigned long)
/* Release exclusive sub-buffer access */
-#define RING_BUFFER_PUT_SUBBUF _IO(0xF6, 0x04)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_PUT_SUBBUF _IO(0xF6, 0x04)
/* Get exclusive read access to the next sub-buffer that can be read. */
-#define RING_BUFFER_GET_NEXT_SUBBUF _IO(0xF6, 0x05)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_GET_NEXT_SUBBUF _IO(0xF6, 0x05)
/* Release exclusive sub-buffer access, move consumer forward. */
-#define RING_BUFFER_PUT_NEXT_SUBBUF _IO(0xF6, 0x06)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_PUT_NEXT_SUBBUF _IO(0xF6, 0x06)
/* returns the size of the current sub-buffer, without padding (for mmap). */
-#define RING_BUFFER_GET_SUBBUF_SIZE _IOR(0xF6, 0x07, unsigned long)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_GET_SUBBUF_SIZE _IOR(0xF6, 0x07, unsigned long)
/* returns the size of the current sub-buffer, with padding (for splice). */
-#define RING_BUFFER_GET_PADDED_SUBBUF_SIZE _IOR(0xF6, 0x08, unsigned long)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_GET_PADDED_SUBBUF_SIZE _IOR(0xF6, 0x08, unsigned long)
/* returns the maximum size for sub-buffers. */
-#define RING_BUFFER_GET_MAX_SUBBUF_SIZE _IOR(0xF6, 0x09, unsigned long)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_GET_MAX_SUBBUF_SIZE _IOR(0xF6, 0x09, unsigned long)
/* returns the length to mmap. */
-#define RING_BUFFER_GET_MMAP_LEN _IOR(0xF6, 0x0A, unsigned long)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_GET_MMAP_LEN _IOR(0xF6, 0x0A, unsigned long)
/* returns the offset of the subbuffer belonging to the mmap reader. */
-#define RING_BUFFER_GET_MMAP_READ_OFFSET _IOR(0xF6, 0x0B, unsigned long)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_GET_MMAP_READ_OFFSET _IOR(0xF6, 0x0B, unsigned long)
/* Flush the current sub-buffer, if non-empty. */
-#define RING_BUFFER_FLUSH _IO(0xF6, 0x0C)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH _IO(0xF6, 0x0C)
/* Get the current version of the metadata cache (after a get_next). */
-#define RING_BUFFER_GET_METADATA_VERSION _IOR(0xF6, 0x0D, uint64_t)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_GET_METADATA_VERSION _IOR(0xF6, 0x0D, uint64_t)
/*
* Get a snapshot of the current ring buffer producer and consumer positions,
* regardless of whether or not the two positions are contained within the same
* sub-buffer.
*/
-#define RING_BUFFER_SNAPSHOT_SAMPLE_POSITIONS _IO(0xF6, 0x0E)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_SNAPSHOT_SAMPLE_POSITIONS _IO(0xF6, 0x0E)
/* Flush the current sub-buffer, even if empty. */
-#define RING_BUFFER_FLUSH_EMPTY _IO(0xF6, 0x0F)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH_EMPTY _IO(0xF6, 0x0F)
/*
* Reset the position of what has been consumed from the metadata cache to 0
* so it can be read again.
*/
-#define RING_BUFFER_METADATA_CACHE_DUMP _IO(0xF6, 0x10)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_METADATA_CACHE_DUMP _IO(0xF6, 0x10)
/* Clear ring buffer content. */
-#define RING_BUFFER_CLEAR _IO(0xF6, 0x11)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_CLEAR _IO(0xF6, 0x11)
/*
* Get next metadata subbuffer, returning a flag indicating whether the
* metadata is guaranteed to be in a consistent state at the end of this
* sub-buffer (can be parsed).
*/
-#define RING_BUFFER_GET_NEXT_SUBBUF_METADATA_CHECK _IOR(0xF6, 0x12, uint32_t)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_GET_NEXT_SUBBUF_METADATA_CHECK _IOR(0xF6, 0x12, uint32_t)
#ifdef CONFIG_COMPAT
/* Get a snapshot of the current ring buffer producer and consumer positions */
-#define RING_BUFFER_COMPAT_SNAPSHOT RING_BUFFER_SNAPSHOT
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_SNAPSHOT LTTNG_KERNEL_ABI_RING_BUFFER_SNAPSHOT
/* Get the consumer position (iteration start) */
-#define RING_BUFFER_COMPAT_SNAPSHOT_GET_CONSUMED \
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_SNAPSHOT_GET_CONSUMED \
_IOR(0xF6, 0x01, compat_ulong_t)
/* Get the producer position (iteration end) */
-#define RING_BUFFER_COMPAT_SNAPSHOT_GET_PRODUCED \
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_SNAPSHOT_GET_PRODUCED \
_IOR(0xF6, 0x02, compat_ulong_t)
/* Get exclusive read access to the specified sub-buffer position */
-#define RING_BUFFER_COMPAT_GET_SUBBUF _IOW(0xF6, 0x03, compat_ulong_t)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_SUBBUF _IOW(0xF6, 0x03, compat_ulong_t)
/* Release exclusive sub-buffer access */
-#define RING_BUFFER_COMPAT_PUT_SUBBUF RING_BUFFER_PUT_SUBBUF
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_PUT_SUBBUF LTTNG_KERNEL_ABI_RING_BUFFER_PUT_SUBBUF
/* Get exclusive read access to the next sub-buffer that can be read. */
-#define RING_BUFFER_COMPAT_GET_NEXT_SUBBUF RING_BUFFER_GET_NEXT_SUBBUF
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_NEXT_SUBBUF LTTNG_KERNEL_ABI_RING_BUFFER_GET_NEXT_SUBBUF
/* Release exclusive sub-buffer access, move consumer forward. */
-#define RING_BUFFER_COMPAT_PUT_NEXT_SUBBUF RING_BUFFER_PUT_NEXT_SUBBUF
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_PUT_NEXT_SUBBUF LTTNG_KERNEL_ABI_RING_BUFFER_PUT_NEXT_SUBBUF
/* returns the size of the current sub-buffer, without padding (for mmap). */
-#define RING_BUFFER_COMPAT_GET_SUBBUF_SIZE _IOR(0xF6, 0x07, compat_ulong_t)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_SUBBUF_SIZE _IOR(0xF6, 0x07, compat_ulong_t)
/* returns the size of the current sub-buffer, with padding (for splice). */
-#define RING_BUFFER_COMPAT_GET_PADDED_SUBBUF_SIZE \
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_PADDED_SUBBUF_SIZE \
_IOR(0xF6, 0x08, compat_ulong_t)
/* returns the maximum size for sub-buffers. */
-#define RING_BUFFER_COMPAT_GET_MAX_SUBBUF_SIZE _IOR(0xF6, 0x09, compat_ulong_t)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_MAX_SUBBUF_SIZE _IOR(0xF6, 0x09, compat_ulong_t)
/* returns the length to mmap. */
-#define RING_BUFFER_COMPAT_GET_MMAP_LEN _IOR(0xF6, 0x0A, compat_ulong_t)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_MMAP_LEN _IOR(0xF6, 0x0A, compat_ulong_t)
/* returns the offset of the subbuffer belonging to the mmap reader. */
-#define RING_BUFFER_COMPAT_GET_MMAP_READ_OFFSET _IOR(0xF6, 0x0B, compat_ulong_t)
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_MMAP_READ_OFFSET _IOR(0xF6, 0x0B, compat_ulong_t)
/* Flush the current sub-buffer, if non-empty. */
-#define RING_BUFFER_COMPAT_FLUSH RING_BUFFER_FLUSH
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_FLUSH LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH
/* Get the current version of the metadata cache (after a get_next). */
-#define RING_BUFFER_COMPAT_GET_METADATA_VERSION RING_BUFFER_GET_METADATA_VERSION
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_METADATA_VERSION LTTNG_KERNEL_ABI_RING_BUFFER_GET_METADATA_VERSION
/*
* Get a snapshot of the current ring buffer producer and consumer positions,
* regardless of whether or not the two positions are contained within the same
* sub-buffer.
*/
-#define RING_BUFFER_COMPAT_SNAPSHOT_SAMPLE_POSITIONS \
- RING_BUFFER_SNAPSHOT_SAMPLE_POSITIONS
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_SNAPSHOT_SAMPLE_POSITIONS \
+ LTTNG_KERNEL_ABI_RING_BUFFER_SNAPSHOT_SAMPLE_POSITIONS
/* Flush the current sub-buffer, even if empty. */
-#define RING_BUFFER_COMPAT_FLUSH_EMPTY \
- RING_BUFFER_FLUSH_EMPTY
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_FLUSH_EMPTY \
+ LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH_EMPTY
/* Clear ring buffer content. */
-#define RING_BUFFER_COMPAT_CLEAR \
- RING_BUFFER_CLEAR
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_CLEAR \
+ LTTNG_KERNEL_ABI_RING_BUFFER_CLEAR
/*
* Get next metadata subbuffer, returning a flag indicating whether the
* metadata is guaranteed to be in a consistent state at the end of this
* sub-buffer (can be parsed).
*/
-#define RING_BUFFER_COMPAT_GET_NEXT_SUBBUF_METADATA_CHECK \
- RING_BUFFER_GET_NEXT_SUBBUF_METADATA_CHECK
+#define LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_NEXT_SUBBUF_METADATA_CHECK \
+ LTTNG_KERNEL_ABI_RING_BUFFER_GET_NEXT_SUBBUF_METADATA_CHECK
#endif /* CONFIG_COMPAT */
-#endif /* _LIB_RING_BUFFER_VFS_H */
+#endif /* _LIB_LTTNG_KERNEL_ABI_RING_BUFFER_VFS_H */
return -EIO;
switch (cmd) {
- case RING_BUFFER_SNAPSHOT:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_SNAPSHOT:
return lib_ring_buffer_snapshot(buf, &buf->cons_snapshot,
&buf->prod_snapshot);
- case RING_BUFFER_SNAPSHOT_SAMPLE_POSITIONS:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_SNAPSHOT_SAMPLE_POSITIONS:
return lib_ring_buffer_snapshot_sample_positions(buf,
&buf->cons_snapshot, &buf->prod_snapshot);
- case RING_BUFFER_SNAPSHOT_GET_CONSUMED:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_SNAPSHOT_GET_CONSUMED:
return put_ulong(buf->cons_snapshot, arg);
- case RING_BUFFER_SNAPSHOT_GET_PRODUCED:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_SNAPSHOT_GET_PRODUCED:
return put_ulong(buf->prod_snapshot, arg);
- case RING_BUFFER_GET_SUBBUF:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_SUBBUF:
{
unsigned long uconsume;
long ret;
}
return ret;
}
- case RING_BUFFER_PUT_SUBBUF:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_PUT_SUBBUF:
lib_ring_buffer_put_subbuf(buf);
return 0;
- case RING_BUFFER_GET_NEXT_SUBBUF:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_NEXT_SUBBUF:
{
long ret;
}
return ret;
}
- case RING_BUFFER_PUT_NEXT_SUBBUF:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_PUT_NEXT_SUBBUF:
lib_ring_buffer_put_next_subbuf(buf);
return 0;
- case RING_BUFFER_GET_SUBBUF_SIZE:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_SUBBUF_SIZE:
return put_ulong(lib_ring_buffer_get_read_data_size(config, buf),
arg);
- case RING_BUFFER_GET_PADDED_SUBBUF_SIZE:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_PADDED_SUBBUF_SIZE:
{
unsigned long size;
size = PAGE_ALIGN(size);
return put_ulong(size, arg);
}
- case RING_BUFFER_GET_MAX_SUBBUF_SIZE:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_MAX_SUBBUF_SIZE:
return put_ulong(chan->backend.subbuf_size, arg);
- case RING_BUFFER_GET_MMAP_LEN:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_MMAP_LEN:
{
unsigned long mmap_buf_len;
return -EFBIG;
return put_ulong(mmap_buf_len, arg);
}
- case RING_BUFFER_GET_MMAP_READ_OFFSET:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_MMAP_READ_OFFSET:
{
unsigned long sb_bindex;
return put_ulong(buf->backend.array[sb_bindex]->mmap_offset,
arg);
}
- case RING_BUFFER_FLUSH:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH:
lib_ring_buffer_switch_remote(buf);
return 0;
- case RING_BUFFER_FLUSH_EMPTY:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH_EMPTY:
lib_ring_buffer_switch_remote_empty(buf);
return 0;
- case RING_BUFFER_CLEAR:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_CLEAR:
lib_ring_buffer_clear(buf);
return 0;
default:
*
* This ioctl implements commands necessary for producer/consumer
* and flight recorder reader interaction :
- * RING_BUFFER_GET_NEXT_SUBBUF
+ * LTTNG_KERNEL_ABI_RING_BUFFER_GET_NEXT_SUBBUF
* Get the next sub-buffer that can be read. It never blocks.
- * RING_BUFFER_PUT_NEXT_SUBBUF
+ * LTTNG_KERNEL_ABI_RING_BUFFER_PUT_NEXT_SUBBUF
* Release the currently read sub-buffer.
- * RING_BUFFER_GET_SUBBUF_SIZE
+ * LTTNG_KERNEL_ABI_RING_BUFFER_GET_SUBBUF_SIZE
* returns the size of the current sub-buffer.
- * RING_BUFFER_GET_MAX_SUBBUF_SIZE
+ * LTTNG_KERNEL_ABI_RING_BUFFER_GET_MAX_SUBBUF_SIZE
* returns the maximum size for sub-buffers.
- * RING_BUFFER_GET_NUM_SUBBUF
+ * LTTNG_KERNEL_ABI_RING_BUFFER_GET_NUM_SUBBUF
* returns the number of reader-visible sub-buffers in the per cpu
* channel (for mmap).
- * RING_BUFFER_GET_MMAP_READ_OFFSET
+ * LTTNG_KERNEL_ABI_RING_BUFFER_GET_MMAP_READ_OFFSET
* returns the offset of the subbuffer belonging to the reader.
* Should only be used for mmap clients.
*/
return -EIO;
switch (cmd) {
- case RING_BUFFER_COMPAT_SNAPSHOT:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_SNAPSHOT:
return lib_ring_buffer_snapshot(buf, &buf->cons_snapshot,
&buf->prod_snapshot);
- case RING_BUFFER_COMPAT_SNAPSHOT_SAMPLE_POSITIONS:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_SNAPSHOT_SAMPLE_POSITIONS:
return lib_ring_buffer_snapshot_sample_positions(buf,
&buf->cons_snapshot, &buf->prod_snapshot);
- case RING_BUFFER_COMPAT_SNAPSHOT_GET_CONSUMED:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_SNAPSHOT_GET_CONSUMED:
return compat_put_ulong(buf->cons_snapshot, arg);
- case RING_BUFFER_COMPAT_SNAPSHOT_GET_PRODUCED:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_SNAPSHOT_GET_PRODUCED:
return compat_put_ulong(buf->prod_snapshot, arg);
- case RING_BUFFER_COMPAT_GET_SUBBUF:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_SUBBUF:
{
__u32 uconsume;
unsigned long consume;
}
return ret;
}
- case RING_BUFFER_COMPAT_PUT_SUBBUF:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_PUT_SUBBUF:
lib_ring_buffer_put_subbuf(buf);
return 0;
- case RING_BUFFER_COMPAT_GET_NEXT_SUBBUF:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_NEXT_SUBBUF:
{
long ret;
}
return ret;
}
- case RING_BUFFER_COMPAT_PUT_NEXT_SUBBUF:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_PUT_NEXT_SUBBUF:
lib_ring_buffer_put_next_subbuf(buf);
return 0;
- case RING_BUFFER_COMPAT_GET_SUBBUF_SIZE:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_SUBBUF_SIZE:
{
unsigned long data_size;
return -EFBIG;
return compat_put_ulong(data_size, arg);
}
- case RING_BUFFER_COMPAT_GET_PADDED_SUBBUF_SIZE:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_PADDED_SUBBUF_SIZE:
{
unsigned long size;
return -EFBIG;
return compat_put_ulong(size, arg);
}
- case RING_BUFFER_COMPAT_GET_MAX_SUBBUF_SIZE:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_MAX_SUBBUF_SIZE:
if (chan->backend.subbuf_size > UINT_MAX)
return -EFBIG;
return compat_put_ulong(chan->backend.subbuf_size, arg);
- case RING_BUFFER_COMPAT_GET_MMAP_LEN:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_MMAP_LEN:
{
unsigned long mmap_buf_len;
return -EFBIG;
return compat_put_ulong(mmap_buf_len, arg);
}
- case RING_BUFFER_COMPAT_GET_MMAP_READ_OFFSET:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_MMAP_READ_OFFSET:
{
unsigned long sb_bindex, read_offset;
return -EINVAL;
return compat_put_ulong(read_offset, arg);
}
- case RING_BUFFER_COMPAT_FLUSH:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_FLUSH:
lib_ring_buffer_switch_remote(buf);
return 0;
- case RING_BUFFER_COMPAT_FLUSH_EMPTY:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_FLUSH_EMPTY:
lib_ring_buffer_switch_remote_empty(buf);
return 0;
- case RING_BUFFER_COMPAT_CLEAR:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_CLEAR:
lib_ring_buffer_clear(buf);
return 0;
default:
#endif
static
-void lttng_abi_tracer_version(struct lttng_kernel_tracer_version *v)
+void lttng_abi_tracer_version(struct lttng_kernel_abi_tracer_version *v)
{
v->major = LTTNG_MODULES_MAJOR_VERSION;
v->minor = LTTNG_MODULES_MINOR_VERSION;
}
static
-void lttng_abi_tracer_abi_version(struct lttng_kernel_tracer_abi_version *v)
+void lttng_abi_tracer_abi_version(struct lttng_kernel_abi_tracer_abi_version *v)
{
- v->major = LTTNG_MODULES_ABI_MAJOR_VERSION;
- v->minor = LTTNG_MODULES_ABI_MINOR_VERSION;
+ v->major = LTTNG_KERNEL_ABI_MAJOR_VERSION;
+ v->minor = LTTNG_KERNEL_ABI_MINOR_VERSION;
}
static
long lttng_abi_add_context(struct file *file,
- struct lttng_kernel_context *context_param,
+ struct lttng_kernel_abi_context *context_param,
struct lttng_kernel_ctx **ctx, struct lttng_session *session)
{
return -EPERM;
switch (context_param->ctx) {
- case LTTNG_KERNEL_CONTEXT_PID:
+ case LTTNG_KERNEL_ABI_CONTEXT_PID:
return lttng_add_pid_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_PRIO:
+ case LTTNG_KERNEL_ABI_CONTEXT_PRIO:
return lttng_add_prio_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_NICE:
+ case LTTNG_KERNEL_ABI_CONTEXT_NICE:
return lttng_add_nice_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_VPID:
+ case LTTNG_KERNEL_ABI_CONTEXT_VPID:
return lttng_add_vpid_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_TID:
+ case LTTNG_KERNEL_ABI_CONTEXT_TID:
return lttng_add_tid_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_VTID:
+ case LTTNG_KERNEL_ABI_CONTEXT_VTID:
return lttng_add_vtid_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_PPID:
+ case LTTNG_KERNEL_ABI_CONTEXT_PPID:
return lttng_add_ppid_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_VPPID:
+ case LTTNG_KERNEL_ABI_CONTEXT_VPPID:
return lttng_add_vppid_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_PERF_COUNTER:
- context_param->u.perf_counter.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
+ case LTTNG_KERNEL_ABI_CONTEXT_PERF_COUNTER:
+ context_param->u.perf_counter.name[LTTNG_KERNEL_ABI_SYM_NAME_LEN - 1] = '\0';
return lttng_add_perf_counter_to_ctx(context_param->u.perf_counter.type,
context_param->u.perf_counter.config,
context_param->u.perf_counter.name,
ctx);
- case LTTNG_KERNEL_CONTEXT_PROCNAME:
+ case LTTNG_KERNEL_ABI_CONTEXT_PROCNAME:
return lttng_add_procname_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_HOSTNAME:
+ case LTTNG_KERNEL_ABI_CONTEXT_HOSTNAME:
return lttng_add_hostname_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_CPU_ID:
+ case LTTNG_KERNEL_ABI_CONTEXT_CPU_ID:
return lttng_add_cpu_id_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_INTERRUPTIBLE:
+ case LTTNG_KERNEL_ABI_CONTEXT_INTERRUPTIBLE:
return lttng_add_interruptible_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_NEED_RESCHEDULE:
+ case LTTNG_KERNEL_ABI_CONTEXT_NEED_RESCHEDULE:
return lttng_add_need_reschedule_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_PREEMPTIBLE:
+ case LTTNG_KERNEL_ABI_CONTEXT_PREEMPTIBLE:
return lttng_add_preemptible_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_MIGRATABLE:
+ case LTTNG_KERNEL_ABI_CONTEXT_MIGRATABLE:
return lttng_add_migratable_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_CALLSTACK_KERNEL:
- case LTTNG_KERNEL_CONTEXT_CALLSTACK_USER:
+ case LTTNG_KERNEL_ABI_CONTEXT_CALLSTACK_KERNEL:
+ case LTTNG_KERNEL_ABI_CONTEXT_CALLSTACK_USER:
return lttng_add_callstack_to_ctx(ctx, context_param->ctx);
- case LTTNG_KERNEL_CONTEXT_CGROUP_NS:
+ case LTTNG_KERNEL_ABI_CONTEXT_CGROUP_NS:
return lttng_add_cgroup_ns_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_IPC_NS:
+ case LTTNG_KERNEL_ABI_CONTEXT_IPC_NS:
return lttng_add_ipc_ns_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_MNT_NS:
+ case LTTNG_KERNEL_ABI_CONTEXT_MNT_NS:
return lttng_add_mnt_ns_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_NET_NS:
+ case LTTNG_KERNEL_ABI_CONTEXT_NET_NS:
return lttng_add_net_ns_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_PID_NS:
+ case LTTNG_KERNEL_ABI_CONTEXT_PID_NS:
return lttng_add_pid_ns_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_USER_NS:
+ case LTTNG_KERNEL_ABI_CONTEXT_USER_NS:
return lttng_add_user_ns_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_UTS_NS:
+ case LTTNG_KERNEL_ABI_CONTEXT_UTS_NS:
return lttng_add_uts_ns_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_UID:
+ case LTTNG_KERNEL_ABI_CONTEXT_UID:
return lttng_add_uid_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_EUID:
+ case LTTNG_KERNEL_ABI_CONTEXT_EUID:
return lttng_add_euid_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_SUID:
+ case LTTNG_KERNEL_ABI_CONTEXT_SUID:
return lttng_add_suid_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_GID:
+ case LTTNG_KERNEL_ABI_CONTEXT_GID:
return lttng_add_gid_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_EGID:
+ case LTTNG_KERNEL_ABI_CONTEXT_EGID:
return lttng_add_egid_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_SGID:
+ case LTTNG_KERNEL_ABI_CONTEXT_SGID:
return lttng_add_sgid_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_VUID:
+ case LTTNG_KERNEL_ABI_CONTEXT_VUID:
return lttng_add_vuid_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_VEUID:
+ case LTTNG_KERNEL_ABI_CONTEXT_VEUID:
return lttng_add_veuid_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_VSUID:
+ case LTTNG_KERNEL_ABI_CONTEXT_VSUID:
return lttng_add_vsuid_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_VGID:
+ case LTTNG_KERNEL_ABI_CONTEXT_VGID:
return lttng_add_vgid_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_VEGID:
+ case LTTNG_KERNEL_ABI_CONTEXT_VEGID:
return lttng_add_vegid_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_VSGID:
+ case LTTNG_KERNEL_ABI_CONTEXT_VSGID:
return lttng_add_vsgid_to_ctx(ctx);
- case LTTNG_KERNEL_CONTEXT_TIME_NS:
+ case LTTNG_KERNEL_ABI_CONTEXT_TIME_NS:
return lttng_add_time_ns_to_ctx(ctx);
default:
return -EINVAL;
* @arg: command arg
*
* This ioctl implements lttng commands:
- * LTTNG_KERNEL_SESSION
+ * LTTNG_KERNEL_ABI_SESSION
* Returns a LTTng trace session file descriptor
- * LTTNG_KERNEL_TRACER_VERSION
+ * LTTNG_KERNEL_ABI_TRACER_VERSION
* Returns the LTTng kernel tracer version
- * LTTNG_KERNEL_TRACEPOINT_LIST
+ * LTTNG_KERNEL_ABI_TRACEPOINT_LIST
* Returns a file descriptor listing available tracepoints
- * LTTNG_KERNEL_WAIT_QUIESCENT
+ * LTTNG_KERNEL_ABI_WAIT_QUIESCENT
* Returns after all previously running probes have completed
- * LTTNG_KERNEL_TRACER_ABI_VERSION
+ * LTTNG_KERNEL_ABI_TRACER_ABI_VERSION
* Returns the LTTng kernel tracer ABI version
- * LTTNG_KERNEL_EVENT_NOTIFIER_GROUP_CREATE
+ * LTTNG_KERNEL_ABI_EVENT_NOTIFIER_GROUP_CREATE
* Returns a LTTng event notifier group file descriptor
*
* The returned session will be deleted when its file descriptor is closed.
long lttng_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
switch (cmd) {
- case LTTNG_KERNEL_OLD_SESSION:
- case LTTNG_KERNEL_SESSION:
+ case LTTNG_KERNEL_ABI_OLD_SESSION:
+ case LTTNG_KERNEL_ABI_SESSION:
return lttng_abi_create_session();
- case LTTNG_KERNEL_EVENT_NOTIFIER_GROUP_CREATE:
+ case LTTNG_KERNEL_ABI_EVENT_NOTIFIER_GROUP_CREATE:
return lttng_abi_create_event_notifier_group();
- case LTTNG_KERNEL_OLD_TRACER_VERSION:
+ case LTTNG_KERNEL_ABI_OLD_TRACER_VERSION:
{
- struct lttng_kernel_tracer_version v;
- struct lttng_kernel_old_tracer_version oldv;
- struct lttng_kernel_old_tracer_version *uversion =
- (struct lttng_kernel_old_tracer_version __user *) arg;
+ struct lttng_kernel_abi_tracer_version v;
+ struct lttng_kernel_abi_old_tracer_version oldv;
+ struct lttng_kernel_abi_old_tracer_version *uversion =
+ (struct lttng_kernel_abi_old_tracer_version __user *) arg;
lttng_abi_tracer_version(&v);
oldv.major = v.major;
return -EFAULT;
return 0;
}
- case LTTNG_KERNEL_TRACER_VERSION:
+ case LTTNG_KERNEL_ABI_TRACER_VERSION:
{
- struct lttng_kernel_tracer_version version;
- struct lttng_kernel_tracer_version *uversion =
- (struct lttng_kernel_tracer_version __user *) arg;
+ struct lttng_kernel_abi_tracer_version version;
+ struct lttng_kernel_abi_tracer_version *uversion =
+ (struct lttng_kernel_abi_tracer_version __user *) arg;
lttng_abi_tracer_version(&version);
return -EFAULT;
return 0;
}
- case LTTNG_KERNEL_TRACER_ABI_VERSION:
+ case LTTNG_KERNEL_ABI_TRACER_ABI_VERSION:
{
- struct lttng_kernel_tracer_abi_version version;
- struct lttng_kernel_tracer_abi_version *uversion =
- (struct lttng_kernel_tracer_abi_version __user *) arg;
+ struct lttng_kernel_abi_tracer_abi_version version;
+ struct lttng_kernel_abi_tracer_abi_version *uversion =
+ (struct lttng_kernel_abi_tracer_abi_version __user *) arg;
lttng_abi_tracer_abi_version(&version);
return -EFAULT;
return 0;
}
- case LTTNG_KERNEL_OLD_TRACEPOINT_LIST:
- case LTTNG_KERNEL_TRACEPOINT_LIST:
+ case LTTNG_KERNEL_ABI_OLD_TRACEPOINT_LIST:
+ case LTTNG_KERNEL_ABI_TRACEPOINT_LIST:
return lttng_abi_tracepoint_list();
- case LTTNG_KERNEL_SYSCALL_LIST:
+ case LTTNG_KERNEL_ABI_SYSCALL_LIST:
return lttng_abi_syscall_list();
- case LTTNG_KERNEL_OLD_WAIT_QUIESCENT:
- case LTTNG_KERNEL_WAIT_QUIESCENT:
+ case LTTNG_KERNEL_ABI_OLD_WAIT_QUIESCENT:
+ case LTTNG_KERNEL_ABI_WAIT_QUIESCENT:
synchronize_trace();
return 0;
- case LTTNG_KERNEL_OLD_CALIBRATE:
+ case LTTNG_KERNEL_ABI_OLD_CALIBRATE:
{
- struct lttng_kernel_old_calibrate __user *ucalibrate =
- (struct lttng_kernel_old_calibrate __user *) arg;
- struct lttng_kernel_old_calibrate old_calibrate;
- struct lttng_kernel_calibrate calibrate;
+ struct lttng_kernel_abi_old_calibrate __user *ucalibrate =
+ (struct lttng_kernel_abi_old_calibrate __user *) arg;
+ struct lttng_kernel_abi_old_calibrate old_calibrate;
+ struct lttng_kernel_abi_calibrate calibrate;
int ret;
if (copy_from_user(&old_calibrate, ucalibrate, sizeof(old_calibrate)))
return -EFAULT;
return ret;
}
- case LTTNG_KERNEL_CALIBRATE:
+ case LTTNG_KERNEL_ABI_CALIBRATE:
{
- struct lttng_kernel_calibrate __user *ucalibrate =
- (struct lttng_kernel_calibrate __user *) arg;
- struct lttng_kernel_calibrate calibrate;
+ struct lttng_kernel_abi_calibrate __user *ucalibrate =
+ (struct lttng_kernel_abi_calibrate __user *) arg;
+ struct lttng_kernel_abi_calibrate calibrate;
int ret;
if (copy_from_user(&calibrate, ucalibrate, sizeof(calibrate)))
static
int lttng_abi_create_channel(struct file *session_file,
- struct lttng_kernel_channel *chan_param,
+ struct lttng_kernel_abi_channel *chan_param,
enum channel_type channel_type)
{
struct lttng_session *session = session_file->private_data;
}
switch (channel_type) {
case PER_CPU_CHANNEL:
- if (chan_param->output == LTTNG_KERNEL_SPLICE) {
+ if (chan_param->output == LTTNG_KERNEL_ABI_SPLICE) {
transport_name = chan_param->overwrite ?
"relay-overwrite" : "relay-discard";
- } else if (chan_param->output == LTTNG_KERNEL_MMAP) {
+ } else if (chan_param->output == LTTNG_KERNEL_ABI_MMAP) {
transport_name = chan_param->overwrite ?
"relay-overwrite-mmap" : "relay-discard-mmap";
} else {
}
break;
case METADATA_CHANNEL:
- if (chan_param->output == LTTNG_KERNEL_SPLICE)
+ if (chan_param->output == LTTNG_KERNEL_ABI_SPLICE)
transport_name = "relay-metadata";
- else if (chan_param->output == LTTNG_KERNEL_MMAP)
+ else if (chan_param->output == LTTNG_KERNEL_ABI_MMAP)
transport_name = "relay-metadata-mmap";
else
return -EINVAL;
static
int lttng_abi_session_set_name(struct lttng_session *session,
- struct lttng_kernel_session_name *name)
+ struct lttng_kernel_abi_session_name *name)
{
size_t len;
- len = strnlen(name->name, LTTNG_KERNEL_SESSION_NAME_LEN);
+ len = strnlen(name->name, LTTNG_KERNEL_ABI_SESSION_NAME_LEN);
- if (len == LTTNG_KERNEL_SESSION_NAME_LEN) {
+ if (len == LTTNG_KERNEL_ABI_SESSION_NAME_LEN) {
/* Name is too long/malformed */
return -EINVAL;
}
static
int lttng_abi_session_set_creation_time(struct lttng_session *session,
- struct lttng_kernel_session_creation_time *time)
+ struct lttng_kernel_abi_session_creation_time *time)
{
size_t len;
- len = strnlen(time->iso8601, LTTNG_KERNEL_SESSION_CREATION_TIME_ISO8601_LEN);
+ len = strnlen(time->iso8601, LTTNG_KERNEL_ABI_SESSION_CREATION_TIME_ISO8601_LEN);
- if (len == LTTNG_KERNEL_SESSION_CREATION_TIME_ISO8601_LEN) {
+ if (len == LTTNG_KERNEL_ABI_SESSION_CREATION_TIME_ISO8601_LEN) {
/* Time is too long/malformed */
return -EINVAL;
}
long lttng_counter_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
struct lttng_counter *counter = file->private_data;
- size_t indexes[LTTNG_KERNEL_COUNTER_DIMENSION_MAX] = { 0 };
+ size_t indexes[LTTNG_KERNEL_ABI_COUNTER_DIMENSION_MAX] = { 0 };
int i;
switch (cmd) {
- case LTTNG_KERNEL_COUNTER_READ:
+ case LTTNG_KERNEL_ABI_COUNTER_READ:
{
- struct lttng_kernel_counter_read local_counter_read;
- struct lttng_kernel_counter_read __user *ucounter_read =
- (struct lttng_kernel_counter_read __user *) arg;
+ struct lttng_kernel_abi_counter_read local_counter_read;
+ struct lttng_kernel_abi_counter_read __user *ucounter_read =
+ (struct lttng_kernel_abi_counter_read __user *) arg;
bool overflow, underflow;
int64_t value;
int32_t cpu;
return 0;
}
- case LTTNG_KERNEL_COUNTER_AGGREGATE:
+ case LTTNG_KERNEL_ABI_COUNTER_AGGREGATE:
{
- struct lttng_kernel_counter_aggregate local_counter_aggregate;
- struct lttng_kernel_counter_aggregate __user *ucounter_aggregate =
- (struct lttng_kernel_counter_aggregate __user *) arg;
+ struct lttng_kernel_abi_counter_aggregate local_counter_aggregate;
+ struct lttng_kernel_abi_counter_aggregate __user *ucounter_aggregate =
+ (struct lttng_kernel_abi_counter_aggregate __user *) arg;
bool overflow, underflow;
int64_t value;
int ret;
return 0;
}
- case LTTNG_KERNEL_COUNTER_CLEAR:
+ case LTTNG_KERNEL_ABI_COUNTER_CLEAR:
{
- struct lttng_kernel_counter_clear local_counter_clear;
- struct lttng_kernel_counter_clear __user *ucounter_clear =
- (struct lttng_kernel_counter_clear __user *) arg;
+ struct lttng_kernel_abi_counter_clear local_counter_clear;
+ struct lttng_kernel_abi_counter_clear __user *ucounter_clear =
+ (struct lttng_kernel_abi_counter_clear __user *) arg;
if (copy_from_user(&local_counter_clear, ucounter_clear,
sizeof(local_counter_clear)))
static
-enum tracker_type get_tracker_type(struct lttng_kernel_tracker_args *tracker)
+enum tracker_type get_tracker_type(struct lttng_kernel_abi_tracker_args *tracker)
{
switch (tracker->type) {
- case LTTNG_KERNEL_TRACKER_PID:
+ case LTTNG_KERNEL_ABI_TRACKER_PID:
return TRACKER_PID;
- case LTTNG_KERNEL_TRACKER_VPID:
+ case LTTNG_KERNEL_ABI_TRACKER_VPID:
return TRACKER_VPID;
- case LTTNG_KERNEL_TRACKER_UID:
+ case LTTNG_KERNEL_ABI_TRACKER_UID:
return TRACKER_UID;
- case LTTNG_KERNEL_TRACKER_VUID:
+ case LTTNG_KERNEL_ABI_TRACKER_VUID:
return TRACKER_VUID;
- case LTTNG_KERNEL_TRACKER_GID:
+ case LTTNG_KERNEL_ABI_TRACKER_GID:
return TRACKER_GID;
- case LTTNG_KERNEL_TRACKER_VGID:
+ case LTTNG_KERNEL_ABI_TRACKER_VGID:
return TRACKER_VGID;
default:
return TRACKER_UNKNOWN;
* @arg: command arg
*
* This ioctl implements lttng commands:
- * LTTNG_KERNEL_CHANNEL
+ * LTTNG_KERNEL_ABI_CHANNEL
* Returns a LTTng channel file descriptor
- * LTTNG_KERNEL_ENABLE
+ * LTTNG_KERNEL_ABI_ENABLE
* Enables tracing for a session (weak enable)
- * LTTNG_KERNEL_DISABLE
+ * LTTNG_KERNEL_ABI_DISABLE
* Disables tracing for a session (strong disable)
- * LTTNG_KERNEL_METADATA
+ * LTTNG_KERNEL_ABI_METADATA
* Returns a LTTng metadata file descriptor
- * LTTNG_KERNEL_SESSION_TRACK_PID
+ * LTTNG_KERNEL_ABI_SESSION_TRACK_PID
* Add PID to session PID tracker
- * LTTNG_KERNEL_SESSION_UNTRACK_PID
+ * LTTNG_KERNEL_ABI_SESSION_UNTRACK_PID
* Remove PID from session PID tracker
- * LTTNG_KERNEL_SESSION_TRACK_ID
+ * LTTNG_KERNEL_ABI_SESSION_TRACK_ID
* Add ID to tracker
- * LTTNG_KERNEL_SESSION_UNTRACK_ID
+ * LTTNG_KERNEL_ABI_SESSION_UNTRACK_ID
* Remove ID from tracker
*
* The returned channel will be deleted when its file descriptor is closed.
long lttng_session_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
struct lttng_session *session = file->private_data;
- struct lttng_kernel_channel chan_param;
- struct lttng_kernel_old_channel old_chan_param;
+ struct lttng_kernel_abi_channel chan_param;
+ struct lttng_kernel_abi_old_channel old_chan_param;
switch (cmd) {
- case LTTNG_KERNEL_OLD_CHANNEL:
+ case LTTNG_KERNEL_ABI_OLD_CHANNEL:
{
if (copy_from_user(&old_chan_param,
- (struct lttng_kernel_old_channel __user *) arg,
- sizeof(struct lttng_kernel_old_channel)))
+ (struct lttng_kernel_abi_old_channel __user *) arg,
+ sizeof(struct lttng_kernel_abi_old_channel)))
return -EFAULT;
chan_param.overwrite = old_chan_param.overwrite;
chan_param.subbuf_size = old_chan_param.subbuf_size;
return lttng_abi_create_channel(file, &chan_param,
PER_CPU_CHANNEL);
}
- case LTTNG_KERNEL_CHANNEL:
+ case LTTNG_KERNEL_ABI_CHANNEL:
{
if (copy_from_user(&chan_param,
- (struct lttng_kernel_channel __user *) arg,
- sizeof(struct lttng_kernel_channel)))
+ (struct lttng_kernel_abi_channel __user *) arg,
+ sizeof(struct lttng_kernel_abi_channel)))
return -EFAULT;
return lttng_abi_create_channel(file, &chan_param,
PER_CPU_CHANNEL);
}
- case LTTNG_KERNEL_OLD_SESSION_START:
- case LTTNG_KERNEL_OLD_ENABLE:
- case LTTNG_KERNEL_SESSION_START:
- case LTTNG_KERNEL_ENABLE:
+ case LTTNG_KERNEL_ABI_OLD_SESSION_START:
+ case LTTNG_KERNEL_ABI_OLD_ENABLE:
+ case LTTNG_KERNEL_ABI_SESSION_START:
+ case LTTNG_KERNEL_ABI_ENABLE:
return lttng_session_enable(session);
- case LTTNG_KERNEL_OLD_SESSION_STOP:
- case LTTNG_KERNEL_OLD_DISABLE:
- case LTTNG_KERNEL_SESSION_STOP:
- case LTTNG_KERNEL_DISABLE:
+ case LTTNG_KERNEL_ABI_OLD_SESSION_STOP:
+ case LTTNG_KERNEL_ABI_OLD_DISABLE:
+ case LTTNG_KERNEL_ABI_SESSION_STOP:
+ case LTTNG_KERNEL_ABI_DISABLE:
return lttng_session_disable(session);
- case LTTNG_KERNEL_OLD_METADATA:
+ case LTTNG_KERNEL_ABI_OLD_METADATA:
{
if (copy_from_user(&old_chan_param,
- (struct lttng_kernel_old_channel __user *) arg,
- sizeof(struct lttng_kernel_old_channel)))
+ (struct lttng_kernel_abi_old_channel __user *) arg,
+ sizeof(struct lttng_kernel_abi_old_channel)))
return -EFAULT;
chan_param.overwrite = old_chan_param.overwrite;
chan_param.subbuf_size = old_chan_param.subbuf_size;
return lttng_abi_create_channel(file, &chan_param,
METADATA_CHANNEL);
}
- case LTTNG_KERNEL_METADATA:
+ case LTTNG_KERNEL_ABI_METADATA:
{
if (copy_from_user(&chan_param,
- (struct lttng_kernel_channel __user *) arg,
- sizeof(struct lttng_kernel_channel)))
+ (struct lttng_kernel_abi_channel __user *) arg,
+ sizeof(struct lttng_kernel_abi_channel)))
return -EFAULT;
return lttng_abi_create_channel(file, &chan_param,
METADATA_CHANNEL);
}
- case LTTNG_KERNEL_SESSION_TRACK_PID:
+ case LTTNG_KERNEL_ABI_SESSION_TRACK_PID:
return lttng_session_track_id(session, TRACKER_PID, (int) arg);
- case LTTNG_KERNEL_SESSION_UNTRACK_PID:
+ case LTTNG_KERNEL_ABI_SESSION_UNTRACK_PID:
return lttng_session_untrack_id(session, TRACKER_PID, (int) arg);
- case LTTNG_KERNEL_SESSION_TRACK_ID:
+ case LTTNG_KERNEL_ABI_SESSION_TRACK_ID:
{
- struct lttng_kernel_tracker_args tracker;
+ struct lttng_kernel_abi_tracker_args tracker;
enum tracker_type tracker_type;
if (copy_from_user(&tracker,
- (struct lttng_kernel_tracker_args __user *) arg,
- sizeof(struct lttng_kernel_tracker_args)))
+ (struct lttng_kernel_abi_tracker_args __user *) arg,
+ sizeof(struct lttng_kernel_abi_tracker_args)))
return -EFAULT;
tracker_type = get_tracker_type(&tracker);
if (tracker_type == TRACKER_UNKNOWN)
return -EINVAL;
return lttng_session_track_id(session, tracker_type, tracker.id);
}
- case LTTNG_KERNEL_SESSION_UNTRACK_ID:
+ case LTTNG_KERNEL_ABI_SESSION_UNTRACK_ID:
{
- struct lttng_kernel_tracker_args tracker;
+ struct lttng_kernel_abi_tracker_args tracker;
enum tracker_type tracker_type;
if (copy_from_user(&tracker,
- (struct lttng_kernel_tracker_args __user *) arg,
- sizeof(struct lttng_kernel_tracker_args)))
+ (struct lttng_kernel_abi_tracker_args __user *) arg,
+ sizeof(struct lttng_kernel_abi_tracker_args)))
return -EFAULT;
tracker_type = get_tracker_type(&tracker);
if (tracker_type == TRACKER_UNKNOWN)
return lttng_session_untrack_id(session, tracker_type,
tracker.id);
}
- case LTTNG_KERNEL_SESSION_LIST_TRACKER_PIDS:
+ case LTTNG_KERNEL_ABI_SESSION_LIST_TRACKER_PIDS:
return lttng_session_list_tracker_ids(session, TRACKER_PID);
- case LTTNG_KERNEL_SESSION_LIST_TRACKER_IDS:
+ case LTTNG_KERNEL_ABI_SESSION_LIST_TRACKER_IDS:
{
- struct lttng_kernel_tracker_args tracker;
+ struct lttng_kernel_abi_tracker_args tracker;
enum tracker_type tracker_type;
if (copy_from_user(&tracker,
- (struct lttng_kernel_tracker_args __user *) arg,
- sizeof(struct lttng_kernel_tracker_args)))
+ (struct lttng_kernel_abi_tracker_args __user *) arg,
+ sizeof(struct lttng_kernel_abi_tracker_args)))
return -EFAULT;
tracker_type = get_tracker_type(&tracker);
if (tracker_type == TRACKER_UNKNOWN)
return -EINVAL;
return lttng_session_list_tracker_ids(session, tracker_type);
}
- case LTTNG_KERNEL_SESSION_METADATA_REGEN:
+ case LTTNG_KERNEL_ABI_SESSION_METADATA_REGEN:
return lttng_session_metadata_regenerate(session);
- case LTTNG_KERNEL_SESSION_STATEDUMP:
+ case LTTNG_KERNEL_ABI_SESSION_STATEDUMP:
return lttng_session_statedump(session);
- case LTTNG_KERNEL_SESSION_SET_NAME:
+ case LTTNG_KERNEL_ABI_SESSION_SET_NAME:
{
- struct lttng_kernel_session_name name;
+ struct lttng_kernel_abi_session_name name;
if (copy_from_user(&name,
- (struct lttng_kernel_session_name __user *) arg,
- sizeof(struct lttng_kernel_session_name)))
+ (struct lttng_kernel_abi_session_name __user *) arg,
+ sizeof(struct lttng_kernel_abi_session_name)))
return -EFAULT;
return lttng_abi_session_set_name(session, &name);
}
- case LTTNG_KERNEL_SESSION_SET_CREATION_TIME:
+ case LTTNG_KERNEL_ABI_SESSION_SET_CREATION_TIME:
{
- struct lttng_kernel_session_creation_time time;
+ struct lttng_kernel_abi_session_creation_time time;
if (copy_from_user(&time,
- (struct lttng_kernel_session_creation_time __user *) arg,
- sizeof(struct lttng_kernel_session_creation_time)))
+ (struct lttng_kernel_abi_session_creation_time __user *) arg,
+ sizeof(struct lttng_kernel_abi_session_creation_time)))
return -EFAULT;
return lttng_abi_session_set_creation_time(session, &time);
}
unsigned int rb_cmd;
bool coherent;
- if (cmd == RING_BUFFER_GET_NEXT_SUBBUF_METADATA_CHECK)
- rb_cmd = RING_BUFFER_GET_NEXT_SUBBUF;
+ if (cmd == LTTNG_KERNEL_ABI_RING_BUFFER_GET_NEXT_SUBBUF_METADATA_CHECK)
+ rb_cmd = LTTNG_KERNEL_ABI_RING_BUFFER_GET_NEXT_SUBBUF;
else
rb_cmd = cmd;
switch (cmd) {
- case RING_BUFFER_GET_NEXT_SUBBUF:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_NEXT_SUBBUF:
{
struct lttng_metadata_stream *stream = filp->private_data;
struct lib_ring_buffer *buf = stream->priv;
goto err;
break;
}
- case RING_BUFFER_GET_SUBBUF:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_SUBBUF:
{
/*
* Random access is not allowed for metadata channel.
*/
return -ENOSYS;
}
- case RING_BUFFER_FLUSH_EMPTY: /* Fall-through. */
- case RING_BUFFER_FLUSH:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH_EMPTY: /* Fall-through. */
+ case LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH:
{
struct lttng_metadata_stream *stream = filp->private_data;
struct lib_ring_buffer *buf = stream->priv;
goto err;
break;
}
- case RING_BUFFER_GET_METADATA_VERSION:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_METADATA_VERSION:
{
struct lttng_metadata_stream *stream = filp->private_data;
return put_u64(stream->version, arg);
}
- case RING_BUFFER_METADATA_CACHE_DUMP:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_METADATA_CACHE_DUMP:
{
struct lttng_metadata_stream *stream = filp->private_data;
return lttng_metadata_cache_dump(stream);
}
- case RING_BUFFER_GET_NEXT_SUBBUF_METADATA_CHECK:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_NEXT_SUBBUF_METADATA_CHECK:
{
struct lttng_metadata_stream *stream = filp->private_data;
struct lib_ring_buffer *buf = stream->priv;
goto err;
switch (cmd) {
- case RING_BUFFER_PUT_NEXT_SUBBUF:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_PUT_NEXT_SUBBUF:
{
lttng_metadata_ring_buffer_ioctl_put_next_subbuf(filp,
cmd, arg);
break;
}
- case RING_BUFFER_GET_NEXT_SUBBUF_METADATA_CHECK:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_NEXT_SUBBUF_METADATA_CHECK:
{
return put_u32(coherent, arg);
}
unsigned int rb_cmd;
bool coherent;
- if (cmd == RING_BUFFER_GET_NEXT_SUBBUF_METADATA_CHECK)
- rb_cmd = RING_BUFFER_GET_NEXT_SUBBUF;
+ if (cmd == LTTNG_KERNEL_ABI_RING_BUFFER_GET_NEXT_SUBBUF_METADATA_CHECK)
+ rb_cmd = LTTNG_KERNEL_ABI_RING_BUFFER_GET_NEXT_SUBBUF;
else
rb_cmd = cmd;
switch (cmd) {
- case RING_BUFFER_GET_NEXT_SUBBUF:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_NEXT_SUBBUF:
{
struct lttng_metadata_stream *stream = filp->private_data;
struct lib_ring_buffer *buf = stream->priv;
goto err;
break;
}
- case RING_BUFFER_GET_SUBBUF:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_SUBBUF:
{
/*
* Random access is not allowed for metadata channel.
*/
return -ENOSYS;
}
- case RING_BUFFER_FLUSH_EMPTY: /* Fall-through. */
- case RING_BUFFER_FLUSH:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH_EMPTY: /* Fall-through. */
+ case LTTNG_KERNEL_ABI_RING_BUFFER_FLUSH:
{
struct lttng_metadata_stream *stream = filp->private_data;
struct lib_ring_buffer *buf = stream->priv;
goto err;
break;
}
- case RING_BUFFER_GET_METADATA_VERSION:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_METADATA_VERSION:
{
struct lttng_metadata_stream *stream = filp->private_data;
return put_u64(stream->version, arg);
}
- case RING_BUFFER_METADATA_CACHE_DUMP:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_METADATA_CACHE_DUMP:
{
struct lttng_metadata_stream *stream = filp->private_data;
return lttng_metadata_cache_dump(stream);
}
- case RING_BUFFER_GET_NEXT_SUBBUF_METADATA_CHECK:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_NEXT_SUBBUF_METADATA_CHECK:
{
struct lttng_metadata_stream *stream = filp->private_data;
struct lib_ring_buffer *buf = stream->priv;
goto err;
switch (cmd) {
- case RING_BUFFER_PUT_NEXT_SUBBUF:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_PUT_NEXT_SUBBUF:
{
lttng_metadata_ring_buffer_ioctl_put_next_subbuf(filp,
cmd, arg);
break;
}
- case RING_BUFFER_GET_NEXT_SUBBUF_METADATA_CHECK:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_NEXT_SUBBUF_METADATA_CHECK:
{
return put_u32(coherent, arg);
}
}
static
-int lttng_abi_validate_event_param(struct lttng_kernel_event *event_param)
+int lttng_abi_validate_event_param(struct lttng_kernel_abi_event *event_param)
{
/* Limit ABI to implemented features. */
switch (event_param->instrumentation) {
- case LTTNG_KERNEL_SYSCALL:
+ case LTTNG_KERNEL_ABI_SYSCALL:
switch (event_param->u.syscall.entryexit) {
- case LTTNG_KERNEL_SYSCALL_ENTRY: /* Fall-through */
- case LTTNG_KERNEL_SYSCALL_EXIT: /* Fall-through */
- case LTTNG_KERNEL_SYSCALL_ENTRYEXIT:
+ case LTTNG_KERNEL_ABI_SYSCALL_ENTRY: /* Fall-through */
+ case LTTNG_KERNEL_ABI_SYSCALL_EXIT: /* Fall-through */
+ case LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT:
break;
default:
return -EINVAL;
}
switch (event_param->u.syscall.abi) {
- case LTTNG_KERNEL_SYSCALL_ABI_ALL:
+ case LTTNG_KERNEL_ABI_SYSCALL_ABI_ALL:
break;
default:
return -EINVAL;
}
switch (event_param->u.syscall.match) {
- case LTTNG_KERNEL_SYSCALL_MATCH_NAME:
+ case LTTNG_KERNEL_ABI_SYSCALL_MATCH_NAME:
break;
default:
return -EINVAL;
}
break;
- case LTTNG_KERNEL_KRETPROBE:
+ case LTTNG_KERNEL_ABI_KRETPROBE:
switch (event_param->u.kretprobe.entryexit) {
- case LTTNG_KERNEL_SYSCALL_ENTRYEXIT:
+ case LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT:
break;
- case LTTNG_KERNEL_SYSCALL_ENTRY: /* Fall-through */
- case LTTNG_KERNEL_SYSCALL_EXIT: /* Fall-through */
+ case LTTNG_KERNEL_ABI_SYSCALL_ENTRY: /* Fall-through */
+ case LTTNG_KERNEL_ABI_SYSCALL_EXIT: /* Fall-through */
default:
return -EINVAL;
}
break;
- case LTTNG_KERNEL_TRACEPOINT: /* Fall-through */
- case LTTNG_KERNEL_KPROBE: /* Fall-through */
- case LTTNG_KERNEL_UPROBE:
+ case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */
+ case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */
+ case LTTNG_KERNEL_ABI_UPROBE:
break;
- case LTTNG_KERNEL_FUNCTION: /* Fall-through */
- case LTTNG_KERNEL_NOOP: /* Fall-through */
+ case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
+ case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
default:
return -EINVAL;
}
static
int lttng_abi_create_event(struct file *channel_file,
- struct lttng_kernel_event *event_param)
+ struct lttng_kernel_abi_event *event_param)
{
struct lttng_channel *channel = channel_file->private_data;
int event_fd, ret;
struct file *event_file;
void *priv;
- event_param->name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
+ event_param->name[LTTNG_KERNEL_ABI_SYM_NAME_LEN - 1] = '\0';
switch (event_param->instrumentation) {
- case LTTNG_KERNEL_KRETPROBE:
- event_param->u.kretprobe.symbol_name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
+ case LTTNG_KERNEL_ABI_KRETPROBE:
+ event_param->u.kretprobe.symbol_name[LTTNG_KERNEL_ABI_SYM_NAME_LEN - 1] = '\0';
break;
- case LTTNG_KERNEL_KPROBE:
- event_param->u.kprobe.symbol_name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
+ case LTTNG_KERNEL_ABI_KPROBE:
+ event_param->u.kprobe.symbol_name[LTTNG_KERNEL_ABI_SYM_NAME_LEN - 1] = '\0';
break;
- case LTTNG_KERNEL_FUNCTION:
+ case LTTNG_KERNEL_ABI_FUNCTION:
WARN_ON_ONCE(1);
/* Not implemented. */
break;
goto event_error;
switch (event_param->instrumentation) {
- case LTTNG_KERNEL_TRACEPOINT: /* Fall-through */
- case LTTNG_KERNEL_SYSCALL:
+ case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */
+ case LTTNG_KERNEL_ABI_SYSCALL:
{
struct lttng_event_enabler *event_enabler;
break;
}
- case LTTNG_KERNEL_KPROBE: /* Fall-through */
- case LTTNG_KERNEL_KRETPROBE: /* Fall-through */
- case LTTNG_KERNEL_UPROBE:
+ case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */
+ case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */
+ case LTTNG_KERNEL_ABI_UPROBE:
{
struct lttng_event *event;
break;
}
- case LTTNG_KERNEL_FUNCTION: /* Fall-through */
- case LTTNG_KERNEL_NOOP: /* Fall-through */
+ case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
+ case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
default:
ret = -EINVAL;
goto event_error;
enum lttng_event_type *evtype = file->private_data;
switch (cmd) {
- case LTTNG_KERNEL_ENABLE:
+ case LTTNG_KERNEL_ABI_ENABLE:
switch (*evtype) {
case LTTNG_TYPE_EVENT:
event_notifier = file->private_data;
WARN_ON_ONCE(1);
return -ENOSYS;
}
- case LTTNG_KERNEL_DISABLE:
+ case LTTNG_KERNEL_ABI_DISABLE:
switch (*evtype) {
case LTTNG_TYPE_EVENT:
event_notifier = file->private_data;
WARN_ON_ONCE(1);
return -ENOSYS;
}
- case LTTNG_KERNEL_FILTER:
+ case LTTNG_KERNEL_ABI_FILTER:
switch (*evtype) {
case LTTNG_TYPE_EVENT:
return -EINVAL;
event_notifier_enabler = file->private_data;
return lttng_event_notifier_enabler_attach_filter_bytecode(
event_notifier_enabler,
- (struct lttng_kernel_filter_bytecode __user *) arg);
+ (struct lttng_kernel_abi_filter_bytecode __user *) arg);
default:
WARN_ON_ONCE(1);
return -ENOSYS;
}
- case LTTNG_KERNEL_CAPTURE:
+ case LTTNG_KERNEL_ABI_CAPTURE:
switch (*evtype) {
case LTTNG_TYPE_EVENT:
return -EINVAL;
event_notifier_enabler = file->private_data;
return lttng_event_notifier_enabler_attach_capture_bytecode(
event_notifier_enabler,
- (struct lttng_kernel_capture_bytecode __user *) arg);
+ (struct lttng_kernel_abi_capture_bytecode __user *) arg);
default:
WARN_ON_ONCE(1);
return -ENOSYS;
}
- case LTTNG_KERNEL_ADD_CALLSITE:
+ case LTTNG_KERNEL_ABI_ADD_CALLSITE:
switch (*evtype) {
case LTTNG_TYPE_EVENT:
event_notifier = file->private_data;
return lttng_event_notifier_add_callsite(event_notifier,
- (struct lttng_kernel_event_callsite __user *) arg);
+ (struct lttng_kernel_abi_event_callsite __user *) arg);
case LTTNG_TYPE_ENABLER:
return -EINVAL;
default:
static
int lttng_abi_create_event_notifier(struct file *event_notifier_group_file,
- struct lttng_kernel_event_notifier *event_notifier_param)
+ struct lttng_kernel_abi_event_notifier *event_notifier_param)
{
struct lttng_event_notifier_group *event_notifier_group =
event_notifier_group_file->private_data;
void *priv;
switch (event_notifier_param->event.instrumentation) {
- case LTTNG_KERNEL_TRACEPOINT:
- case LTTNG_KERNEL_UPROBE:
+ case LTTNG_KERNEL_ABI_TRACEPOINT:
+ case LTTNG_KERNEL_ABI_UPROBE:
break;
- case LTTNG_KERNEL_KPROBE:
- event_notifier_param->event.u.kprobe.symbol_name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
+ case LTTNG_KERNEL_ABI_KPROBE:
+ event_notifier_param->event.u.kprobe.symbol_name[LTTNG_KERNEL_ABI_SYM_NAME_LEN - 1] = '\0';
break;
- case LTTNG_KERNEL_SYSCALL:
+ case LTTNG_KERNEL_ABI_SYSCALL:
break;
- case LTTNG_KERNEL_KRETPROBE:
+ case LTTNG_KERNEL_ABI_KRETPROBE:
/* Placing an event notifier on kretprobe is not supported. */
- case LTTNG_KERNEL_FUNCTION:
- case LTTNG_KERNEL_NOOP:
+ case LTTNG_KERNEL_ABI_FUNCTION:
+ case LTTNG_KERNEL_ABI_NOOP:
default:
ret = -EINVAL;
goto inval_instr;
}
- event_notifier_param->event.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
+ event_notifier_param->event.name[LTTNG_KERNEL_ABI_SYM_NAME_LEN - 1] = '\0';
event_notifier_fd = lttng_get_unused_fd();
if (event_notifier_fd < 0) {
goto event_notifier_error;
switch (event_notifier_param->event.instrumentation) {
- case LTTNG_KERNEL_TRACEPOINT: /* Fall-through */
- case LTTNG_KERNEL_SYSCALL:
+ case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */
+ case LTTNG_KERNEL_ABI_SYSCALL:
{
struct lttng_event_notifier_enabler *enabler;
break;
}
- case LTTNG_KERNEL_KPROBE: /* Fall-through */
- case LTTNG_KERNEL_KRETPROBE: /* Fall-through */
- case LTTNG_KERNEL_UPROBE:
+ case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */
+ case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */
+ case LTTNG_KERNEL_ABI_UPROBE:
{
struct lttng_event_notifier *event_notifier;
break;
}
- case LTTNG_KERNEL_FUNCTION: /* Fall-through */
- case LTTNG_KERNEL_NOOP: /* Fall-through */
+ case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
+ case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
default:
ret = -EINVAL;
goto event_notifier_error;
static
long lttng_abi_event_notifier_group_create_error_counter(
struct file *event_notifier_group_file,
- const struct lttng_kernel_counter_conf *error_counter_conf)
+ const struct lttng_kernel_abi_counter_conf *error_counter_conf)
{
int counter_fd, ret;
char *counter_transport_name;
struct lttng_event_notifier_group *event_notifier_group =
(struct lttng_event_notifier_group *) event_notifier_group_file->private_data;
- if (error_counter_conf->arithmetic != LTTNG_KERNEL_COUNTER_ARITHMETIC_MODULAR) {
+ if (error_counter_conf->arithmetic != LTTNG_KERNEL_ABI_COUNTER_ARITHMETIC_MODULAR) {
printk(KERN_ERR "LTTng: event_notifier: Error counter of the wrong arithmetic type.\n");
return -EINVAL;
}
}
switch (error_counter_conf->bitness) {
- case LTTNG_KERNEL_COUNTER_BITNESS_64:
+ case LTTNG_KERNEL_ABI_COUNTER_BITNESS_64:
counter_transport_name = "counter-per-cpu-64-modular";
break;
- case LTTNG_KERNEL_COUNTER_BITNESS_32:
+ case LTTNG_KERNEL_ABI_COUNTER_BITNESS_32:
counter_transport_name = "counter-per-cpu-32-modular";
break;
default:
unsigned long arg)
{
switch (cmd) {
- case LTTNG_KERNEL_EVENT_NOTIFIER_GROUP_NOTIFICATION_FD:
+ case LTTNG_KERNEL_ABI_EVENT_NOTIFIER_GROUP_NOTIFICATION_FD:
{
return lttng_abi_open_event_notifier_group_stream(file);
}
- case LTTNG_KERNEL_EVENT_NOTIFIER_CREATE:
+ case LTTNG_KERNEL_ABI_EVENT_NOTIFIER_CREATE:
{
- struct lttng_kernel_event_notifier uevent_notifier_param;
+ struct lttng_kernel_abi_event_notifier uevent_notifier_param;
if (copy_from_user(&uevent_notifier_param,
- (struct lttng_kernel_event_notifier __user *) arg,
+ (struct lttng_kernel_abi_event_notifier __user *) arg,
sizeof(uevent_notifier_param)))
return -EFAULT;
return lttng_abi_create_event_notifier(file, &uevent_notifier_param);
}
- case LTTNG_KERNEL_COUNTER:
+ case LTTNG_KERNEL_ABI_COUNTER:
{
- struct lttng_kernel_counter_conf uerror_counter_conf;
+ struct lttng_kernel_abi_counter_conf uerror_counter_conf;
if (copy_from_user(&uerror_counter_conf,
- (struct lttng_kernel_counter_conf __user *) arg,
+ (struct lttng_kernel_abi_counter_conf __user *) arg,
sizeof(uerror_counter_conf)))
return -EFAULT;
return lttng_abi_event_notifier_group_create_error_counter(file,
* @arg: command arg
*
* This ioctl implements lttng commands:
- * LTTNG_KERNEL_STREAM
+ * LTTNG_KERNEL_ABI_STREAM
* Returns an event stream file descriptor or failure.
* (typically, one event stream records events from one CPU)
- * LTTNG_KERNEL_EVENT
+ * LTTNG_KERNEL_ABI_EVENT
* Returns an event file descriptor or failure.
- * LTTNG_KERNEL_CONTEXT
+ * LTTNG_KERNEL_ABI_CONTEXT
* Prepend a context field to each event in the channel
- * LTTNG_KERNEL_ENABLE
+ * LTTNG_KERNEL_ABI_ENABLE
* Enable recording for events in this channel (weak enable)
- * LTTNG_KERNEL_DISABLE
+ * LTTNG_KERNEL_ABI_DISABLE
* Disable recording for events in this channel (strong disable)
*
* Channel and event file descriptors also hold a reference on the session.
struct lttng_channel *channel = file->private_data;
switch (cmd) {
- case LTTNG_KERNEL_OLD_STREAM:
- case LTTNG_KERNEL_STREAM:
+ case LTTNG_KERNEL_ABI_OLD_STREAM:
+ case LTTNG_KERNEL_ABI_STREAM:
return lttng_abi_open_stream(file);
- case LTTNG_KERNEL_OLD_EVENT:
+ case LTTNG_KERNEL_ABI_OLD_EVENT:
{
- struct lttng_kernel_event *uevent_param;
- struct lttng_kernel_old_event *old_uevent_param;
+ struct lttng_kernel_abi_event *uevent_param;
+ struct lttng_kernel_abi_old_event *old_uevent_param;
int ret;
- uevent_param = kmalloc(sizeof(struct lttng_kernel_event),
+ uevent_param = kmalloc(sizeof(struct lttng_kernel_abi_event),
GFP_KERNEL);
if (!uevent_param) {
ret = -ENOMEM;
goto old_event_end;
}
old_uevent_param = kmalloc(
- sizeof(struct lttng_kernel_old_event),
+ sizeof(struct lttng_kernel_abi_old_event),
GFP_KERNEL);
if (!old_uevent_param) {
ret = -ENOMEM;
goto old_event_error_free_param;
}
if (copy_from_user(old_uevent_param,
- (struct lttng_kernel_old_event __user *) arg,
- sizeof(struct lttng_kernel_old_event))) {
+ (struct lttng_kernel_abi_old_event __user *) arg,
+ sizeof(struct lttng_kernel_abi_old_event))) {
ret = -EFAULT;
goto old_event_error_free_old_param;
}
old_uevent_param->instrumentation;
switch (old_uevent_param->instrumentation) {
- case LTTNG_KERNEL_KPROBE:
+ case LTTNG_KERNEL_ABI_KPROBE:
uevent_param->u.kprobe.addr =
old_uevent_param->u.kprobe.addr;
uevent_param->u.kprobe.offset =
old_uevent_param->u.kprobe.symbol_name,
sizeof(uevent_param->u.kprobe.symbol_name));
break;
- case LTTNG_KERNEL_KRETPROBE:
+ case LTTNG_KERNEL_ABI_KRETPROBE:
uevent_param->u.kretprobe.addr =
old_uevent_param->u.kretprobe.addr;
uevent_param->u.kretprobe.offset =
old_uevent_param->u.kretprobe.symbol_name,
sizeof(uevent_param->u.kretprobe.symbol_name));
break;
- case LTTNG_KERNEL_FUNCTION:
+ case LTTNG_KERNEL_ABI_FUNCTION:
WARN_ON_ONCE(1);
/* Not implemented. */
break;
old_event_end:
return ret;
}
- case LTTNG_KERNEL_EVENT:
+ case LTTNG_KERNEL_ABI_EVENT:
{
- struct lttng_kernel_event uevent_param;
+ struct lttng_kernel_abi_event uevent_param;
if (copy_from_user(&uevent_param,
- (struct lttng_kernel_event __user *) arg,
+ (struct lttng_kernel_abi_event __user *) arg,
sizeof(uevent_param)))
return -EFAULT;
return lttng_abi_create_event(file, &uevent_param);
}
- case LTTNG_KERNEL_OLD_CONTEXT:
+ case LTTNG_KERNEL_ABI_OLD_CONTEXT:
{
- struct lttng_kernel_context *ucontext_param;
- struct lttng_kernel_old_context *old_ucontext_param;
+ struct lttng_kernel_abi_context *ucontext_param;
+ struct lttng_kernel_abi_old_context *old_ucontext_param;
int ret;
- ucontext_param = kmalloc(sizeof(struct lttng_kernel_context),
+ ucontext_param = kmalloc(sizeof(struct lttng_kernel_abi_context),
GFP_KERNEL);
if (!ucontext_param) {
ret = -ENOMEM;
goto old_ctx_end;
}
- old_ucontext_param = kmalloc(sizeof(struct lttng_kernel_old_context),
+ old_ucontext_param = kmalloc(sizeof(struct lttng_kernel_abi_old_context),
GFP_KERNEL);
if (!old_ucontext_param) {
ret = -ENOMEM;
}
if (copy_from_user(old_ucontext_param,
- (struct lttng_kernel_old_context __user *) arg,
- sizeof(struct lttng_kernel_old_context))) {
+ (struct lttng_kernel_abi_old_context __user *) arg,
+ sizeof(struct lttng_kernel_abi_old_context))) {
ret = -EFAULT;
goto old_ctx_error_free_old_param;
}
memcpy(ucontext_param->padding, old_ucontext_param->padding,
sizeof(ucontext_param->padding));
/* only type that uses the union */
- if (old_ucontext_param->ctx == LTTNG_KERNEL_CONTEXT_PERF_COUNTER) {
+ if (old_ucontext_param->ctx == LTTNG_KERNEL_ABI_CONTEXT_PERF_COUNTER) {
ucontext_param->u.perf_counter.type =
old_ucontext_param->u.perf_counter.type;
ucontext_param->u.perf_counter.config =
old_ctx_end:
return ret;
}
- case LTTNG_KERNEL_CONTEXT:
+ case LTTNG_KERNEL_ABI_CONTEXT:
{
- struct lttng_kernel_context ucontext_param;
+ struct lttng_kernel_abi_context ucontext_param;
if (copy_from_user(&ucontext_param,
- (struct lttng_kernel_context __user *) arg,
+ (struct lttng_kernel_abi_context __user *) arg,
sizeof(ucontext_param)))
return -EFAULT;
return lttng_abi_add_context(file,
&ucontext_param,
&channel->ctx, channel->session);
}
- case LTTNG_KERNEL_OLD_ENABLE:
- case LTTNG_KERNEL_ENABLE:
+ case LTTNG_KERNEL_ABI_OLD_ENABLE:
+ case LTTNG_KERNEL_ABI_ENABLE:
return lttng_channel_enable(channel);
- case LTTNG_KERNEL_OLD_DISABLE:
- case LTTNG_KERNEL_DISABLE:
+ case LTTNG_KERNEL_ABI_OLD_DISABLE:
+ case LTTNG_KERNEL_ABI_DISABLE:
return lttng_channel_disable(channel);
- case LTTNG_KERNEL_SYSCALL_MASK:
+ case LTTNG_KERNEL_ABI_SYSCALL_MASK:
return lttng_channel_syscall_mask(channel,
- (struct lttng_kernel_syscall_mask __user *) arg);
+ (struct lttng_kernel_abi_syscall_mask __user *) arg);
default:
return -ENOIOCTLCMD;
}
* @arg: command arg
*
* This ioctl implements lttng commands:
- * LTTNG_KERNEL_STREAM
+ * LTTNG_KERNEL_ABI_STREAM
* Returns an event stream file descriptor or failure.
*
* Channel and event file descriptors also hold a reference on the session.
long lttng_metadata_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
switch (cmd) {
- case LTTNG_KERNEL_OLD_STREAM:
- case LTTNG_KERNEL_STREAM:
+ case LTTNG_KERNEL_ABI_OLD_STREAM:
+ case LTTNG_KERNEL_ABI_STREAM:
return lttng_abi_open_metadata_stream(file);
default:
return -ENOIOCTLCMD;
* @arg: command arg
*
* This ioctl implements lttng commands:
- * LTTNG_KERNEL_CONTEXT
+ * LTTNG_KERNEL_ABI_CONTEXT
* Prepend a context field to each record of this event
- * LTTNG_KERNEL_ENABLE
+ * LTTNG_KERNEL_ABI_ENABLE
* Enable recording for this event (weak enable)
- * LTTNG_KERNEL_DISABLE
+ * LTTNG_KERNEL_ABI_DISABLE
* Disable recording for this event (strong disable)
*/
static
enum lttng_event_type *evtype = file->private_data;
switch (cmd) {
- case LTTNG_KERNEL_OLD_CONTEXT:
+ case LTTNG_KERNEL_ABI_OLD_CONTEXT:
{
/* Not implemented */
return -ENOSYS;
}
- case LTTNG_KERNEL_CONTEXT:
+ case LTTNG_KERNEL_ABI_CONTEXT:
{
/* Not implemented */
return -ENOSYS;
}
- case LTTNG_KERNEL_OLD_ENABLE:
- case LTTNG_KERNEL_ENABLE:
+ case LTTNG_KERNEL_ABI_OLD_ENABLE:
+ case LTTNG_KERNEL_ABI_ENABLE:
switch (*evtype) {
case LTTNG_TYPE_EVENT:
event = file->private_data;
WARN_ON_ONCE(1);
return -ENOSYS;
}
- case LTTNG_KERNEL_OLD_DISABLE:
- case LTTNG_KERNEL_DISABLE:
+ case LTTNG_KERNEL_ABI_OLD_DISABLE:
+ case LTTNG_KERNEL_ABI_DISABLE:
switch (*evtype) {
case LTTNG_TYPE_EVENT:
event = file->private_data;
WARN_ON_ONCE(1);
return -ENOSYS;
}
- case LTTNG_KERNEL_FILTER:
+ case LTTNG_KERNEL_ABI_FILTER:
switch (*evtype) {
case LTTNG_TYPE_EVENT:
return -EINVAL;
event_enabler = file->private_data;
return lttng_event_enabler_attach_filter_bytecode(
event_enabler,
- (struct lttng_kernel_filter_bytecode __user *) arg);
+ (struct lttng_kernel_abi_filter_bytecode __user *) arg);
}
default:
WARN_ON_ONCE(1);
return -ENOSYS;
}
- case LTTNG_KERNEL_ADD_CALLSITE:
+ case LTTNG_KERNEL_ABI_ADD_CALLSITE:
switch (*evtype) {
case LTTNG_TYPE_EVENT:
event = file->private_data;
return lttng_event_add_callsite(event,
- (struct lttng_kernel_event_callsite __user *) arg);
+ (struct lttng_kernel_abi_event_callsite __user *) arg);
case LTTNG_TYPE_ENABLER:
return -EINVAL;
default:
return -EIO;
switch (cmd) {
- case LTTNG_RING_BUFFER_GET_TIMESTAMP_BEGIN:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_TIMESTAMP_BEGIN:
{
uint64_t ts;
goto error;
return put_u64(ts, arg);
}
- case LTTNG_RING_BUFFER_GET_TIMESTAMP_END:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_TIMESTAMP_END:
{
uint64_t ts;
goto error;
return put_u64(ts, arg);
}
- case LTTNG_RING_BUFFER_GET_EVENTS_DISCARDED:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_EVENTS_DISCARDED:
{
uint64_t ed;
goto error;
return put_u64(ed, arg);
}
- case LTTNG_RING_BUFFER_GET_CONTENT_SIZE:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_CONTENT_SIZE:
{
uint64_t cs;
goto error;
return put_u64(cs, arg);
}
- case LTTNG_RING_BUFFER_GET_PACKET_SIZE:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_PACKET_SIZE:
{
uint64_t ps;
goto error;
return put_u64(ps, arg);
}
- case LTTNG_RING_BUFFER_GET_STREAM_ID:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_STREAM_ID:
{
uint64_t si;
goto error;
return put_u64(si, arg);
}
- case LTTNG_RING_BUFFER_GET_CURRENT_TIMESTAMP:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_CURRENT_TIMESTAMP:
{
uint64_t ts;
goto error;
return put_u64(ts, arg);
}
- case LTTNG_RING_BUFFER_GET_SEQ_NUM:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_SEQ_NUM:
{
uint64_t seq;
goto error;
return put_u64(seq, arg);
}
- case LTTNG_RING_BUFFER_INSTANCE_ID:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_INSTANCE_ID:
{
uint64_t id;
return -EIO;
switch (cmd) {
- case LTTNG_RING_BUFFER_COMPAT_GET_TIMESTAMP_BEGIN:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_TIMESTAMP_BEGIN:
{
uint64_t ts;
goto error;
return put_u64(ts, arg);
}
- case LTTNG_RING_BUFFER_COMPAT_GET_TIMESTAMP_END:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_TIMESTAMP_END:
{
uint64_t ts;
goto error;
return put_u64(ts, arg);
}
- case LTTNG_RING_BUFFER_COMPAT_GET_EVENTS_DISCARDED:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_EVENTS_DISCARDED:
{
uint64_t ed;
goto error;
return put_u64(ed, arg);
}
- case LTTNG_RING_BUFFER_COMPAT_GET_CONTENT_SIZE:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_CONTENT_SIZE:
{
uint64_t cs;
goto error;
return put_u64(cs, arg);
}
- case LTTNG_RING_BUFFER_COMPAT_GET_PACKET_SIZE:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_PACKET_SIZE:
{
uint64_t ps;
goto error;
return put_u64(ps, arg);
}
- case LTTNG_RING_BUFFER_COMPAT_GET_STREAM_ID:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_STREAM_ID:
{
uint64_t si;
goto error;
return put_u64(si, arg);
}
- case LTTNG_RING_BUFFER_GET_CURRENT_TIMESTAMP:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_GET_CURRENT_TIMESTAMP:
{
uint64_t ts;
goto error;
return put_u64(ts, arg);
}
- case LTTNG_RING_BUFFER_COMPAT_GET_SEQ_NUM:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_GET_SEQ_NUM:
{
uint64_t seq;
goto error;
return put_u64(seq, arg);
}
- case LTTNG_RING_BUFFER_COMPAT_INSTANCE_ID:
+ case LTTNG_KERNEL_ABI_RING_BUFFER_COMPAT_INSTANCE_ID:
{
uint64_t id;
return -EINVAL;
/* Check if field offset is too large for 16-bit offset */
- if (field_offset > LTTNG_KERNEL_FILTER_BYTECODE_MAX_LEN - 1)
+ if (field_offset > LTTNG_KERNEL_ABI_FILTER_BYTECODE_MAX_LEN - 1)
return -EINVAL;
/* set type */
return -ENOENT;
/* Check if idx is too large for 16-bit offset */
- if (idx > LTTNG_KERNEL_FILTER_BYTECODE_MAX_LEN - 1)
+ if (idx > LTTNG_KERNEL_ABI_FILTER_BYTECODE_MAX_LEN - 1)
return -EINVAL;
/* Get context return type */
asm volatile ("");
}
-int lttng_calibrate(struct lttng_kernel_calibrate *calibrate)
+int lttng_calibrate(struct lttng_kernel_abi_calibrate *calibrate)
{
switch (calibrate->type) {
- case LTTNG_KERNEL_CALIBRATE_KRETPROBE:
+ case LTTNG_KERNEL_ABI_CALIBRATE_KRETPROBE:
lttng_calibrate_kretprobe();
break;
default:
int lttng_add_callstack_to_ctx(struct lttng_kernel_ctx **ctx, int type)
{
switch (type) {
- case LTTNG_KERNEL_CONTEXT_CALLSTACK_KERNEL:
+ case LTTNG_KERNEL_ABI_CONTEXT_CALLSTACK_KERNEL:
return __lttng_add_callstack_generic(ctx, CALLSTACK_KERNEL);
#ifdef CONFIG_X86
- case LTTNG_KERNEL_CONTEXT_CALLSTACK_USER:
+ case LTTNG_KERNEL_ABI_CONTEXT_CALLSTACK_USER:
return __lttng_add_callstack_generic(ctx, CALLSTACK_USER);
#endif
default:
{
struct lttng_event_notifier_group *event_notifier_group = event_notifier->group;
struct lib_ring_buffer_ctx ctx;
- struct lttng_kernel_event_notifier_notification kernel_notif;
+ struct lttng_kernel_abi_event_notifier_notification kernel_notif;
size_t capture_buffer_content_len, reserve_size;
int ret;
goto end;
}
switch (event->instrumentation) {
- case LTTNG_KERNEL_TRACEPOINT: /* Fall-through */
- case LTTNG_KERNEL_SYSCALL:
+ case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */
+ case LTTNG_KERNEL_ABI_SYSCALL:
ret = -EINVAL;
break;
- case LTTNG_KERNEL_KPROBE: /* Fall-through */
- case LTTNG_KERNEL_UPROBE:
+ case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */
+ case LTTNG_KERNEL_ABI_UPROBE:
WRITE_ONCE(event->enabled, 1);
break;
- case LTTNG_KERNEL_KRETPROBE:
+ case LTTNG_KERNEL_ABI_KRETPROBE:
ret = lttng_kretprobes_event_enable_state(event, 1);
break;
- case LTTNG_KERNEL_FUNCTION: /* Fall-through */
- case LTTNG_KERNEL_NOOP: /* Fall-through */
+ case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
+ case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
default:
WARN_ON_ONCE(1);
ret = -EINVAL;
goto end;
}
switch (event->instrumentation) {
- case LTTNG_KERNEL_TRACEPOINT: /* Fall-through */
- case LTTNG_KERNEL_SYSCALL:
+ case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */
+ case LTTNG_KERNEL_ABI_SYSCALL:
ret = -EINVAL;
break;
- case LTTNG_KERNEL_KPROBE: /* Fall-through */
- case LTTNG_KERNEL_UPROBE:
+ case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */
+ case LTTNG_KERNEL_ABI_UPROBE:
WRITE_ONCE(event->enabled, 0);
break;
- case LTTNG_KERNEL_KRETPROBE:
+ case LTTNG_KERNEL_ABI_KRETPROBE:
ret = lttng_kretprobes_event_enable_state(event, 0);
break;
- case LTTNG_KERNEL_FUNCTION: /* Fall-through */
- case LTTNG_KERNEL_NOOP: /* Fall-through */
+ case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
+ case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
default:
WARN_ON_ONCE(1);
ret = -EINVAL;
goto end;
}
switch (event_notifier->instrumentation) {
- case LTTNG_KERNEL_TRACEPOINT: /* Fall-through */
- case LTTNG_KERNEL_SYSCALL:
+ case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */
+ case LTTNG_KERNEL_ABI_SYSCALL:
ret = -EINVAL;
break;
- case LTTNG_KERNEL_KPROBE: /* Fall-through */
- case LTTNG_KERNEL_UPROBE:
+ case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */
+ case LTTNG_KERNEL_ABI_UPROBE:
WRITE_ONCE(event_notifier->enabled, 1);
break;
- case LTTNG_KERNEL_FUNCTION: /* Fall-through */
- case LTTNG_KERNEL_KRETPROBE: /* Fall-through */
- case LTTNG_KERNEL_NOOP: /* Fall-through */
+ case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
+ case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */
+ case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
default:
WARN_ON_ONCE(1);
ret = -EINVAL;
goto end;
}
switch (event_notifier->instrumentation) {
- case LTTNG_KERNEL_TRACEPOINT: /* Fall-through */
- case LTTNG_KERNEL_SYSCALL:
+ case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */
+ case LTTNG_KERNEL_ABI_SYSCALL:
ret = -EINVAL;
break;
- case LTTNG_KERNEL_KPROBE: /* Fall-through */
- case LTTNG_KERNEL_UPROBE:
+ case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */
+ case LTTNG_KERNEL_ABI_UPROBE:
WRITE_ONCE(event_notifier->enabled, 0);
break;
- case LTTNG_KERNEL_FUNCTION: /* Fall-through */
- case LTTNG_KERNEL_KRETPROBE: /* Fall-through */
- case LTTNG_KERNEL_NOOP: /* Fall-through */
+ case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
+ case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */
+ case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
default:
WARN_ON_ONCE(1);
ret = -EINVAL;
* Needs to be called with sessions mutex held.
*/
struct lttng_event *_lttng_event_create(struct lttng_channel *chan,
- struct lttng_kernel_event *event_param,
+ struct lttng_kernel_abi_event *event_param,
void *filter,
const struct lttng_kernel_event_desc *event_desc,
- enum lttng_kernel_instrumentation itype)
+ enum lttng_kernel_abi_instrumentation itype)
{
struct lttng_session *session = chan->session;
struct lttng_event *event;
}
switch (itype) {
- case LTTNG_KERNEL_TRACEPOINT:
+ case LTTNG_KERNEL_ABI_TRACEPOINT:
event_name = event_desc->event_name;
break;
- case LTTNG_KERNEL_KPROBE: /* Fall-through */
- case LTTNG_KERNEL_UPROBE: /* Fall-through */
- case LTTNG_KERNEL_KRETPROBE: /* Fall-through */
- case LTTNG_KERNEL_SYSCALL:
+ case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */
+ case LTTNG_KERNEL_ABI_UPROBE: /* Fall-through */
+ case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */
+ case LTTNG_KERNEL_ABI_SYSCALL:
event_name = event_param->name;
break;
- case LTTNG_KERNEL_FUNCTION: /* Fall-through */
- case LTTNG_KERNEL_NOOP: /* Fall-through */
+ case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
+ case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
default:
WARN_ON_ONCE(1);
ret = -EINVAL;
lttng_hlist_for_each_entry(event, head, hlist) {
WARN_ON_ONCE(!event->desc);
if (!strncmp(event->desc->event_name, event_name,
- LTTNG_KERNEL_SYM_NAME_LEN - 1)
+ LTTNG_KERNEL_ABI_SYM_NAME_LEN - 1)
&& chan == event->chan) {
ret = -EEXIST;
goto exist;
INIT_LIST_HEAD(&event->enablers_ref_head);
switch (itype) {
- case LTTNG_KERNEL_TRACEPOINT:
+ case LTTNG_KERNEL_ABI_TRACEPOINT:
/* Event will be enabled by enabler sync. */
event->enabled = 0;
event->registered = 0;
smp_wmb();
break;
- case LTTNG_KERNEL_KPROBE:
+ case LTTNG_KERNEL_ABI_KPROBE:
/*
* Needs to be explicitly enabled after creation, since
* we may want to apply filters.
WARN_ON_ONCE(!ret);
break;
- case LTTNG_KERNEL_KRETPROBE:
+ case LTTNG_KERNEL_ABI_KRETPROBE:
{
struct lttng_event *event_return;
break;
}
- case LTTNG_KERNEL_SYSCALL:
+ case LTTNG_KERNEL_ABI_SYSCALL:
/*
* Needs to be explicitly enabled after creation, since
* we may want to apply filters.
event->registered = 0;
event->desc = event_desc;
switch (event_param->u.syscall.entryexit) {
- case LTTNG_KERNEL_SYSCALL_ENTRYEXIT:
+ case LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT:
ret = -EINVAL;
goto register_error;
- case LTTNG_KERNEL_SYSCALL_ENTRY:
+ case LTTNG_KERNEL_ABI_SYSCALL_ENTRY:
event->u.syscall.entryexit = LTTNG_SYSCALL_ENTRY;
break;
- case LTTNG_KERNEL_SYSCALL_EXIT:
+ case LTTNG_KERNEL_ABI_SYSCALL_EXIT:
event->u.syscall.entryexit = LTTNG_SYSCALL_EXIT;
break;
}
switch (event_param->u.syscall.abi) {
- case LTTNG_KERNEL_SYSCALL_ABI_ALL:
+ case LTTNG_KERNEL_ABI_SYSCALL_ABI_ALL:
ret = -EINVAL;
goto register_error;
- case LTTNG_KERNEL_SYSCALL_ABI_NATIVE:
+ case LTTNG_KERNEL_ABI_SYSCALL_ABI_NATIVE:
event->u.syscall.abi = LTTNG_SYSCALL_ABI_NATIVE;
break;
- case LTTNG_KERNEL_SYSCALL_ABI_COMPAT:
+ case LTTNG_KERNEL_ABI_SYSCALL_ABI_COMPAT:
event->u.syscall.abi = LTTNG_SYSCALL_ABI_COMPAT;
break;
}
}
break;
- case LTTNG_KERNEL_UPROBE:
+ case LTTNG_KERNEL_ABI_UPROBE:
/*
* Needs to be explicitly enabled after creation, since
* we may want to apply filters.
WARN_ON_ONCE(!ret);
break;
- case LTTNG_KERNEL_FUNCTION: /* Fall-through */
- case LTTNG_KERNEL_NOOP: /* Fall-through */
+ case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
+ case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
default:
WARN_ON_ONCE(1);
ret = -EINVAL;
const struct lttng_kernel_event_desc *event_desc,
uint64_t token, uint64_t error_counter_index,
struct lttng_event_notifier_group *event_notifier_group,
- struct lttng_kernel_event_notifier *event_notifier_param,
- void *filter, enum lttng_kernel_instrumentation itype)
+ struct lttng_kernel_abi_event_notifier *event_notifier_param,
+ void *filter, enum lttng_kernel_abi_instrumentation itype)
{
struct lttng_event_notifier *event_notifier;
struct lttng_counter *error_counter;
int ret;
switch (itype) {
- case LTTNG_KERNEL_TRACEPOINT:
+ case LTTNG_KERNEL_ABI_TRACEPOINT:
event_name = event_desc->event_name;
break;
- case LTTNG_KERNEL_KPROBE: /* Fall-through */
- case LTTNG_KERNEL_UPROBE: /* Fall-through */
- case LTTNG_KERNEL_SYSCALL:
+ case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */
+ case LTTNG_KERNEL_ABI_UPROBE: /* Fall-through */
+ case LTTNG_KERNEL_ABI_SYSCALL:
event_name = event_notifier_param->event.name;
break;
- case LTTNG_KERNEL_KRETPROBE: /* Fall-through */
- case LTTNG_KERNEL_FUNCTION: /* Fall-through */
- case LTTNG_KERNEL_NOOP: /* Fall-through */
+ case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */
+ case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
+ case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
default:
WARN_ON_ONCE(1);
ret = -EINVAL;
lttng_hlist_for_each_entry(event_notifier, head, hlist) {
WARN_ON_ONCE(!event_notifier->desc);
if (!strncmp(event_notifier->desc->event_name, event_name,
- LTTNG_KERNEL_SYM_NAME_LEN - 1)
+ LTTNG_KERNEL_ABI_SYM_NAME_LEN - 1)
&& event_notifier_group == event_notifier->group
&& token == event_notifier->user_token) {
ret = -EEXIST;
INIT_LIST_HEAD(&event_notifier->enablers_ref_head);
switch (itype) {
- case LTTNG_KERNEL_TRACEPOINT:
+ case LTTNG_KERNEL_ABI_TRACEPOINT:
/* Event will be enabled by enabler sync. */
event_notifier->enabled = 0;
event_notifier->registered = 0;
smp_wmb();
break;
- case LTTNG_KERNEL_KPROBE:
+ case LTTNG_KERNEL_ABI_KPROBE:
/*
* Needs to be explicitly enabled after creation, since
* we may want to apply filters.
WARN_ON_ONCE(!ret);
break;
- case LTTNG_KERNEL_SYSCALL:
+ case LTTNG_KERNEL_ABI_SYSCALL:
/*
* Needs to be explicitly enabled after creation, since
* we may want to apply filters.
event_notifier->registered = 0;
event_notifier->desc = event_desc;
switch (event_notifier_param->event.u.syscall.entryexit) {
- case LTTNG_KERNEL_SYSCALL_ENTRYEXIT:
+ case LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT:
ret = -EINVAL;
goto register_error;
- case LTTNG_KERNEL_SYSCALL_ENTRY:
+ case LTTNG_KERNEL_ABI_SYSCALL_ENTRY:
event_notifier->u.syscall.entryexit = LTTNG_SYSCALL_ENTRY;
break;
- case LTTNG_KERNEL_SYSCALL_EXIT:
+ case LTTNG_KERNEL_ABI_SYSCALL_EXIT:
event_notifier->u.syscall.entryexit = LTTNG_SYSCALL_EXIT;
break;
}
switch (event_notifier_param->event.u.syscall.abi) {
- case LTTNG_KERNEL_SYSCALL_ABI_ALL:
+ case LTTNG_KERNEL_ABI_SYSCALL_ABI_ALL:
ret = -EINVAL;
goto register_error;
- case LTTNG_KERNEL_SYSCALL_ABI_NATIVE:
+ case LTTNG_KERNEL_ABI_SYSCALL_ABI_NATIVE:
event_notifier->u.syscall.abi = LTTNG_SYSCALL_ABI_NATIVE;
break;
- case LTTNG_KERNEL_SYSCALL_ABI_COMPAT:
+ case LTTNG_KERNEL_ABI_SYSCALL_ABI_COMPAT:
event_notifier->u.syscall.abi = LTTNG_SYSCALL_ABI_COMPAT;
break;
}
}
break;
- case LTTNG_KERNEL_UPROBE:
+ case LTTNG_KERNEL_ABI_UPROBE:
/*
* Needs to be explicitly enabled after creation, since
* we may want to apply filters.
WARN_ON_ONCE(!ret);
break;
- case LTTNG_KERNEL_KRETPROBE: /* Fall-through */
- case LTTNG_KERNEL_FUNCTION: /* Fall-through */
- case LTTNG_KERNEL_NOOP: /* Fall-through */
+ case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */
+ case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
+ case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
default:
WARN_ON_ONCE(1);
ret = -EINVAL;
}
struct lttng_event *lttng_event_create(struct lttng_channel *chan,
- struct lttng_kernel_event *event_param,
+ struct lttng_kernel_abi_event *event_param,
void *filter,
const struct lttng_kernel_event_desc *event_desc,
- enum lttng_kernel_instrumentation itype)
+ enum lttng_kernel_abi_instrumentation itype)
{
struct lttng_event *event;
const struct lttng_kernel_event_desc *event_desc,
uint64_t id, uint64_t error_counter_index,
struct lttng_event_notifier_group *event_notifier_group,
- struct lttng_kernel_event_notifier *event_notifier_param,
- void *filter, enum lttng_kernel_instrumentation itype)
+ struct lttng_kernel_abi_event_notifier *event_notifier_param,
+ void *filter, enum lttng_kernel_abi_instrumentation itype)
{
struct lttng_event_notifier *event_notifier;
desc = event->desc;
switch (event->instrumentation) {
- case LTTNG_KERNEL_TRACEPOINT:
+ case LTTNG_KERNEL_ABI_TRACEPOINT:
ret = lttng_wrapper_tracepoint_probe_register(desc->event_kname,
desc->probe_callback,
event);
break;
- case LTTNG_KERNEL_SYSCALL:
+ case LTTNG_KERNEL_ABI_SYSCALL:
ret = lttng_syscall_filter_enable_event(event->chan, event);
break;
- case LTTNG_KERNEL_KPROBE: /* Fall-through */
- case LTTNG_KERNEL_UPROBE: /* Fall-through */
- case LTTNG_KERNEL_KRETPROBE:
+ case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */
+ case LTTNG_KERNEL_ABI_UPROBE: /* Fall-through */
+ case LTTNG_KERNEL_ABI_KRETPROBE:
ret = 0;
break;
- case LTTNG_KERNEL_FUNCTION: /* Fall-through */
- case LTTNG_KERNEL_NOOP: /* Fall-through */
+ case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
+ case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
default:
WARN_ON_ONCE(1);
}
desc = event->desc;
switch (event->instrumentation) {
- case LTTNG_KERNEL_TRACEPOINT:
+ case LTTNG_KERNEL_ABI_TRACEPOINT:
ret = lttng_wrapper_tracepoint_probe_unregister(event->desc->event_kname,
event->desc->probe_callback,
event);
break;
- case LTTNG_KERNEL_KPROBE:
+ case LTTNG_KERNEL_ABI_KPROBE:
lttng_kprobes_unregister_event(event);
ret = 0;
break;
- case LTTNG_KERNEL_KRETPROBE:
+ case LTTNG_KERNEL_ABI_KRETPROBE:
lttng_kretprobes_unregister(event);
ret = 0;
break;
- case LTTNG_KERNEL_SYSCALL:
+ case LTTNG_KERNEL_ABI_SYSCALL:
ret = lttng_syscall_filter_disable_event(event->chan, event);
break;
- case LTTNG_KERNEL_NOOP:
+ case LTTNG_KERNEL_ABI_NOOP:
ret = 0;
break;
- case LTTNG_KERNEL_UPROBE:
+ case LTTNG_KERNEL_ABI_UPROBE:
lttng_uprobes_unregister_event(event);
ret = 0;
break;
- case LTTNG_KERNEL_FUNCTION: /* Fall-through */
+ case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
default:
WARN_ON_ONCE(1);
}
desc = event_notifier->desc;
switch (event_notifier->instrumentation) {
- case LTTNG_KERNEL_TRACEPOINT:
+ case LTTNG_KERNEL_ABI_TRACEPOINT:
ret = lttng_wrapper_tracepoint_probe_register(desc->event_kname,
desc->event_notifier_callback,
event_notifier);
break;
- case LTTNG_KERNEL_SYSCALL:
+ case LTTNG_KERNEL_ABI_SYSCALL:
ret = lttng_syscall_filter_enable_event_notifier(event_notifier);
break;
- case LTTNG_KERNEL_KPROBE: /* Fall-through */
- case LTTNG_KERNEL_UPROBE:
+ case LTTNG_KERNEL_ABI_KPROBE: /* Fall-through */
+ case LTTNG_KERNEL_ABI_UPROBE:
ret = 0;
break;
- case LTTNG_KERNEL_KRETPROBE: /* Fall-through */
- case LTTNG_KERNEL_FUNCTION: /* Fall-through */
- case LTTNG_KERNEL_NOOP: /* Fall-through */
+ case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */
+ case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
+ case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
default:
WARN_ON_ONCE(1);
}
desc = event_notifier->desc;
switch (event_notifier->instrumentation) {
- case LTTNG_KERNEL_TRACEPOINT:
+ case LTTNG_KERNEL_ABI_TRACEPOINT:
ret = lttng_wrapper_tracepoint_probe_unregister(event_notifier->desc->event_kname,
event_notifier->desc->event_notifier_callback,
event_notifier);
break;
- case LTTNG_KERNEL_KPROBE:
+ case LTTNG_KERNEL_ABI_KPROBE:
lttng_kprobes_unregister_event_notifier(event_notifier);
ret = 0;
break;
- case LTTNG_KERNEL_UPROBE:
+ case LTTNG_KERNEL_ABI_UPROBE:
lttng_uprobes_unregister_event_notifier(event_notifier);
ret = 0;
break;
- case LTTNG_KERNEL_SYSCALL:
+ case LTTNG_KERNEL_ABI_SYSCALL:
ret = lttng_syscall_filter_disable_event_notifier(event_notifier);
break;
- case LTTNG_KERNEL_KRETPROBE: /* Fall-through */
- case LTTNG_KERNEL_FUNCTION: /* Fall-through */
- case LTTNG_KERNEL_NOOP: /* Fall-through */
+ case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */
+ case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
+ case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
default:
WARN_ON_ONCE(1);
}
struct lttng_enabler_ref *enabler_ref, *tmp_enabler_ref;
switch (event->instrumentation) {
- case LTTNG_KERNEL_TRACEPOINT:
+ case LTTNG_KERNEL_ABI_TRACEPOINT:
lttng_event_desc_put(event->desc);
break;
- case LTTNG_KERNEL_KPROBE:
+ case LTTNG_KERNEL_ABI_KPROBE:
module_put(event->desc->owner);
lttng_kprobes_destroy_event_private(event);
break;
- case LTTNG_KERNEL_KRETPROBE:
+ case LTTNG_KERNEL_ABI_KRETPROBE:
module_put(event->desc->owner);
lttng_kretprobes_destroy_private(event);
break;
- case LTTNG_KERNEL_SYSCALL:
+ case LTTNG_KERNEL_ABI_SYSCALL:
break;
- case LTTNG_KERNEL_UPROBE:
+ case LTTNG_KERNEL_ABI_UPROBE:
module_put(event->desc->owner);
lttng_uprobes_destroy_event_private(event);
break;
- case LTTNG_KERNEL_FUNCTION: /* Fall-through */
- case LTTNG_KERNEL_NOOP: /* Fall-through */
+ case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
+ case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
default:
WARN_ON_ONCE(1);
}
struct lttng_enabler_ref *enabler_ref, *tmp_enabler_ref;
switch (event_notifier->instrumentation) {
- case LTTNG_KERNEL_TRACEPOINT:
+ case LTTNG_KERNEL_ABI_TRACEPOINT:
lttng_event_desc_put(event_notifier->desc);
break;
- case LTTNG_KERNEL_KPROBE:
+ case LTTNG_KERNEL_ABI_KPROBE:
module_put(event_notifier->desc->owner);
lttng_kprobes_destroy_event_notifier_private(event_notifier);
break;
- case LTTNG_KERNEL_SYSCALL:
+ case LTTNG_KERNEL_ABI_SYSCALL:
break;
- case LTTNG_KERNEL_UPROBE:
+ case LTTNG_KERNEL_ABI_UPROBE:
module_put(event_notifier->desc->owner);
lttng_uprobes_destroy_event_notifier_private(event_notifier);
break;
- case LTTNG_KERNEL_KRETPROBE: /* Fall-through */
- case LTTNG_KERNEL_FUNCTION: /* Fall-through */
- case LTTNG_KERNEL_NOOP: /* Fall-through */
+ case LTTNG_KERNEL_ABI_KRETPROBE: /* Fall-through */
+ case LTTNG_KERNEL_ABI_FUNCTION: /* Fall-through */
+ case LTTNG_KERNEL_ABI_NOOP: /* Fall-through */
default:
WARN_ON_ONCE(1);
}
enabler_name = enabler->event_param.name;
switch (enabler->event_param.instrumentation) {
- case LTTNG_KERNEL_TRACEPOINT:
+ case LTTNG_KERNEL_ABI_TRACEPOINT:
desc_name = desc->event_name;
switch (enabler->format_type) {
case LTTNG_ENABLER_FORMAT_STAR_GLOB:
}
break;
- case LTTNG_KERNEL_SYSCALL:
+ case LTTNG_KERNEL_ABI_SYSCALL:
desc_name = desc->event_name;
if (!strncmp(desc_name, "compat_", strlen("compat_"))) {
desc_name += strlen("compat_");
return -EINVAL;
}
switch (enabler->event_param.u.syscall.entryexit) {
- case LTTNG_KERNEL_SYSCALL_ENTRYEXIT:
+ case LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT:
break;
- case LTTNG_KERNEL_SYSCALL_ENTRY:
+ case LTTNG_KERNEL_ABI_SYSCALL_ENTRY:
if (!entry)
return 0;
break;
- case LTTNG_KERNEL_SYSCALL_EXIT:
+ case LTTNG_KERNEL_ABI_SYSCALL_EXIT:
if (entry)
return 0;
break;
return -EINVAL;
}
switch (enabler->event_param.u.syscall.abi) {
- case LTTNG_KERNEL_SYSCALL_ABI_ALL:
+ case LTTNG_KERNEL_ABI_SYSCALL_ABI_ALL:
break;
- case LTTNG_KERNEL_SYSCALL_ABI_NATIVE:
+ case LTTNG_KERNEL_ABI_SYSCALL_ABI_NATIVE:
if (compat)
return 0;
break;
- case LTTNG_KERNEL_SYSCALL_ABI_COMPAT:
+ case LTTNG_KERNEL_ABI_SYSCALL_ABI_COMPAT:
if (!compat)
return 0;
break;
return -EINVAL;
}
switch (enabler->event_param.u.syscall.match) {
- case LTTNG_KERNEL_SYSCALL_MATCH_NAME:
+ case LTTNG_KERNEL_ABI_SYSCALL_MATCH_NAME:
switch (enabler->format_type) {
case LTTNG_ENABLER_FORMAT_STAR_GLOB:
return lttng_match_enabler_star_glob(desc_name, enabler_name);
return -EINVAL;
}
break;
- case LTTNG_KERNEL_SYSCALL_MATCH_NR:
+ case LTTNG_KERNEL_ABI_SYSCALL_MATCH_NR:
return -EINVAL; /* Not implemented. */
default:
return -EINVAL;
*/
event = _lttng_event_create(event_enabler->chan,
NULL, NULL, desc,
- LTTNG_KERNEL_TRACEPOINT);
+ LTTNG_KERNEL_ABI_TRACEPOINT);
if (!event) {
printk(KERN_INFO "LTTng: Unable to create event %s\n",
probe_desc->event_desc[i]->event_name);
event_notifier_enabler->base.user_token,
event_notifier_enabler->error_counter_index,
event_notifier_group, NULL, NULL,
- LTTNG_KERNEL_TRACEPOINT);
+ LTTNG_KERNEL_ABI_TRACEPOINT);
if (IS_ERR(event_notifier)) {
printk(KERN_INFO "Unable to create event_notifier %s\n",
probe_desc->event_desc[i]->event_name);
void lttng_create_event_if_missing(struct lttng_event_enabler *event_enabler)
{
switch (event_enabler->base.event_param.instrumentation) {
- case LTTNG_KERNEL_TRACEPOINT:
+ case LTTNG_KERNEL_ABI_TRACEPOINT:
lttng_create_tracepoint_event_if_missing(event_enabler);
break;
- case LTTNG_KERNEL_SYSCALL:
+ case LTTNG_KERNEL_ABI_SYSCALL:
lttng_create_syscall_event_if_missing(event_enabler);
break;
struct lttng_enabler *base_enabler = lttng_event_enabler_as_enabler(event_enabler);
struct lttng_event *event;
- if (base_enabler->event_param.instrumentation == LTTNG_KERNEL_SYSCALL &&
- base_enabler->event_param.u.syscall.abi == LTTNG_KERNEL_SYSCALL_ABI_ALL &&
- base_enabler->event_param.u.syscall.match == LTTNG_KERNEL_SYSCALL_MATCH_NAME &&
+ if (base_enabler->event_param.instrumentation == LTTNG_KERNEL_ABI_SYSCALL &&
+ base_enabler->event_param.u.syscall.abi == LTTNG_KERNEL_ABI_SYSCALL_ABI_ALL &&
+ base_enabler->event_param.u.syscall.match == LTTNG_KERNEL_ABI_SYSCALL_MATCH_NAME &&
!strcmp(base_enabler->event_param.name, "*")) {
int enabled = base_enabler->enabled;
- enum lttng_kernel_syscall_entryexit entryexit = base_enabler->event_param.u.syscall.entryexit;
+ enum lttng_kernel_abi_syscall_entryexit entryexit = base_enabler->event_param.u.syscall.entryexit;
- if (entryexit == LTTNG_KERNEL_SYSCALL_ENTRY || entryexit == LTTNG_KERNEL_SYSCALL_ENTRYEXIT)
+ if (entryexit == LTTNG_KERNEL_ABI_SYSCALL_ENTRY || entryexit == LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT)
WRITE_ONCE(chan->syscall_all_entry, enabled);
- if (entryexit == LTTNG_KERNEL_SYSCALL_EXIT || entryexit == LTTNG_KERNEL_SYSCALL_ENTRYEXIT)
+ if (entryexit == LTTNG_KERNEL_ABI_SYSCALL_EXIT || entryexit == LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT)
WRITE_ONCE(chan->syscall_all_exit, enabled);
}
void lttng_create_event_notifier_if_missing(struct lttng_event_notifier_enabler *event_notifier_enabler)
{
switch (event_notifier_enabler->base.event_param.instrumentation) {
- case LTTNG_KERNEL_TRACEPOINT:
+ case LTTNG_KERNEL_ABI_TRACEPOINT:
lttng_create_tracepoint_event_notifier_if_missing(event_notifier_enabler);
break;
- case LTTNG_KERNEL_SYSCALL:
+ case LTTNG_KERNEL_ABI_SYSCALL:
lttng_create_syscall_event_notifier_if_missing(event_notifier_enabler);
break;
struct lttng_enabler *base_enabler = lttng_event_notifier_enabler_as_enabler(event_notifier_enabler);
struct lttng_event_notifier *event_notifier;
- if (base_enabler->event_param.instrumentation == LTTNG_KERNEL_SYSCALL &&
- base_enabler->event_param.u.syscall.abi == LTTNG_KERNEL_SYSCALL_ABI_ALL &&
- base_enabler->event_param.u.syscall.match == LTTNG_KERNEL_SYSCALL_MATCH_NAME &&
+ if (base_enabler->event_param.instrumentation == LTTNG_KERNEL_ABI_SYSCALL &&
+ base_enabler->event_param.u.syscall.abi == LTTNG_KERNEL_ABI_SYSCALL_ABI_ALL &&
+ base_enabler->event_param.u.syscall.match == LTTNG_KERNEL_ABI_SYSCALL_MATCH_NAME &&
!strcmp(base_enabler->event_param.name, "*")) {
int enabled = base_enabler->enabled;
- enum lttng_kernel_syscall_entryexit entryexit = base_enabler->event_param.u.syscall.entryexit;
+ enum lttng_kernel_abi_syscall_entryexit entryexit = base_enabler->event_param.u.syscall.entryexit;
- if (entryexit == LTTNG_KERNEL_SYSCALL_ENTRY || entryexit == LTTNG_KERNEL_SYSCALL_ENTRYEXIT)
+ if (entryexit == LTTNG_KERNEL_ABI_SYSCALL_ENTRY || entryexit == LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT)
WRITE_ONCE(event_notifier_group->syscall_all_entry, enabled);
- if (entryexit == LTTNG_KERNEL_SYSCALL_EXIT || entryexit == LTTNG_KERNEL_SYSCALL_ENTRYEXIT)
+ if (entryexit == LTTNG_KERNEL_ABI_SYSCALL_EXIT || entryexit == LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT)
WRITE_ONCE(event_notifier_group->syscall_all_exit, enabled);
}
struct lttng_event_enabler *lttng_event_enabler_create(
enum lttng_enabler_format_type format_type,
- struct lttng_kernel_event *event_param,
+ struct lttng_kernel_abi_event *event_param,
struct lttng_channel *chan)
{
struct lttng_event_enabler *event_enabler;
static
int lttng_enabler_attach_filter_bytecode(struct lttng_enabler *enabler,
- struct lttng_kernel_filter_bytecode __user *bytecode)
+ struct lttng_kernel_abi_filter_bytecode __user *bytecode)
{
struct lttng_bytecode_node *bytecode_node;
uint32_t bytecode_len;
}
int lttng_event_enabler_attach_filter_bytecode(struct lttng_event_enabler *event_enabler,
- struct lttng_kernel_filter_bytecode __user *bytecode)
+ struct lttng_kernel_abi_filter_bytecode __user *bytecode)
{
int ret;
ret = lttng_enabler_attach_filter_bytecode(
}
int lttng_event_add_callsite(struct lttng_event *event,
- struct lttng_kernel_event_callsite __user *callsite)
+ struct lttng_kernel_abi_event_callsite __user *callsite)
{
switch (event->instrumentation) {
- case LTTNG_KERNEL_UPROBE:
+ case LTTNG_KERNEL_ABI_UPROBE:
return lttng_uprobes_event_add_callsite(event, callsite);
default:
return -EINVAL;
}
}
-int lttng_event_enabler_attach_context(struct lttng_event_enabler *event_enabler,
- struct lttng_kernel_context *context_param)
-{
- return -ENOSYS;
-}
-
static
void lttng_enabler_destroy(struct lttng_enabler *enabler)
{
struct lttng_event_notifier_enabler *lttng_event_notifier_enabler_create(
struct lttng_event_notifier_group *event_notifier_group,
enum lttng_enabler_format_type format_type,
- struct lttng_kernel_event_notifier *event_notifier_param)
+ struct lttng_kernel_abi_event_notifier *event_notifier_param)
{
struct lttng_event_notifier_enabler *event_notifier_enabler;
int lttng_event_notifier_enabler_attach_filter_bytecode(
struct lttng_event_notifier_enabler *event_notifier_enabler,
- struct lttng_kernel_filter_bytecode __user *bytecode)
+ struct lttng_kernel_abi_filter_bytecode __user *bytecode)
{
int ret;
int lttng_event_notifier_enabler_attach_capture_bytecode(
struct lttng_event_notifier_enabler *event_notifier_enabler,
- struct lttng_kernel_capture_bytecode __user *bytecode)
+ struct lttng_kernel_abi_capture_bytecode __user *bytecode)
{
struct lttng_bytecode_node *bytecode_node;
struct lttng_enabler *enabler =
}
int lttng_event_notifier_add_callsite(struct lttng_event_notifier *event_notifier,
- struct lttng_kernel_event_callsite __user *callsite)
+ struct lttng_kernel_abi_event_callsite __user *callsite)
{
switch (event_notifier->instrumentation) {
- case LTTNG_KERNEL_UPROBE:
+ case LTTNG_KERNEL_ABI_UPROBE:
return lttng_uprobes_event_notifier_add_callsite(event_notifier,
callsite);
default:
}
}
-int lttng_event_notifier_enabler_attach_context(
- struct lttng_event_notifier_enabler *event_notifier_enabler,
- struct lttng_kernel_context *context_param)
-{
- return -ENOSYS;
-}
-
static
void lttng_event_notifier_enabler_destroy(
struct lttng_event_notifier_enabler *event_notifier_enabler)
int enabled = 0, has_enablers_without_bytecode = 0;
switch (event->instrumentation) {
- case LTTNG_KERNEL_TRACEPOINT: /* Fall-through */
- case LTTNG_KERNEL_SYSCALL:
+ case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */
+ case LTTNG_KERNEL_ABI_SYSCALL:
/* Enable events */
list_for_each_entry(enabler_ref,
&event->enablers_ref_head, node) {
int enabled = 0, has_enablers_without_bytecode = 0;
switch (event_notifier->instrumentation) {
- case LTTNG_KERNEL_TRACEPOINT: /* Fall-through */
- case LTTNG_KERNEL_SYSCALL:
+ case LTTNG_KERNEL_ABI_TRACEPOINT: /* Fall-through */
+ case LTTNG_KERNEL_ABI_SYSCALL:
/* Enable event_notifiers */
list_for_each_entry(enabler_ref,
&event_notifier->enablers_ref_head, node) {
size_t provider_name_len;
provider_name_len = strnlen(desc->provider_name,
- LTTNG_KERNEL_SYM_NAME_LEN - 1);
+ LTTNG_KERNEL_ABI_SYM_NAME_LEN - 1);
for (i = 0; i < desc->nr_events; i++) {
if (strncmp(desc->event_desc[i]->event_name,
desc->provider_name,
/* Allocate events for each syscall matching enabler, insert into table */
for (i = 0; i < table_len; i++) {
const struct lttng_kernel_event_desc *desc = table[i].desc;
- struct lttng_kernel_event ev;
+ struct lttng_kernel_abi_event ev;
struct lttng_event *event;
struct hlist_head *head;
bool found = false;
memset(&ev, 0, sizeof(ev));
switch (type) {
case SC_TYPE_ENTRY:
- ev.u.syscall.entryexit = LTTNG_KERNEL_SYSCALL_ENTRY;
- ev.u.syscall.abi = LTTNG_KERNEL_SYSCALL_ABI_NATIVE;
+ ev.u.syscall.entryexit = LTTNG_KERNEL_ABI_SYSCALL_ENTRY;
+ ev.u.syscall.abi = LTTNG_KERNEL_ABI_SYSCALL_ABI_NATIVE;
break;
case SC_TYPE_EXIT:
- ev.u.syscall.entryexit = LTTNG_KERNEL_SYSCALL_EXIT;
- ev.u.syscall.abi = LTTNG_KERNEL_SYSCALL_ABI_NATIVE;
+ ev.u.syscall.entryexit = LTTNG_KERNEL_ABI_SYSCALL_EXIT;
+ ev.u.syscall.abi = LTTNG_KERNEL_ABI_SYSCALL_ABI_NATIVE;
break;
case SC_TYPE_COMPAT_ENTRY:
- ev.u.syscall.entryexit = LTTNG_KERNEL_SYSCALL_ENTRY;
- ev.u.syscall.abi = LTTNG_KERNEL_SYSCALL_ABI_COMPAT;
+ ev.u.syscall.entryexit = LTTNG_KERNEL_ABI_SYSCALL_ENTRY;
+ ev.u.syscall.abi = LTTNG_KERNEL_ABI_SYSCALL_ABI_COMPAT;
break;
case SC_TYPE_COMPAT_EXIT:
- ev.u.syscall.entryexit = LTTNG_KERNEL_SYSCALL_EXIT;
- ev.u.syscall.abi = LTTNG_KERNEL_SYSCALL_ABI_COMPAT;
+ ev.u.syscall.entryexit = LTTNG_KERNEL_ABI_SYSCALL_EXIT;
+ ev.u.syscall.abi = LTTNG_KERNEL_ABI_SYSCALL_ABI_COMPAT;
break;
}
- strncpy(ev.name, desc->event_name, LTTNG_KERNEL_SYM_NAME_LEN - 1);
- ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
- ev.instrumentation = LTTNG_KERNEL_SYSCALL;
+ strncpy(ev.name, desc->event_name, LTTNG_KERNEL_ABI_SYM_NAME_LEN - 1);
+ ev.name[LTTNG_KERNEL_ABI_SYM_NAME_LEN - 1] = '\0';
+ ev.instrumentation = LTTNG_KERNEL_ABI_SYSCALL;
event = _lttng_event_create(chan, &ev, filter,
desc, ev.instrumentation);
WARN_ON_ONCE(!event);
int lttng_syscalls_register_event(struct lttng_event_enabler *event_enabler, void *filter)
{
struct lttng_channel *chan = event_enabler->chan;
- struct lttng_kernel_event ev;
+ struct lttng_kernel_abi_event ev;
int ret;
wrapper_vmalloc_sync_mappings();
struct lttng_event *event;
memset(&ev, 0, sizeof(ev));
- strncpy(ev.name, desc->event_name, LTTNG_KERNEL_SYM_NAME_LEN);
- ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
- ev.instrumentation = LTTNG_KERNEL_SYSCALL;
- ev.u.syscall.entryexit = LTTNG_KERNEL_SYSCALL_ENTRY;
- ev.u.syscall.abi = LTTNG_KERNEL_SYSCALL_ABI_NATIVE;
+ strncpy(ev.name, desc->event_name, LTTNG_KERNEL_ABI_SYM_NAME_LEN);
+ ev.name[LTTNG_KERNEL_ABI_SYM_NAME_LEN - 1] = '\0';
+ ev.instrumentation = LTTNG_KERNEL_ABI_SYSCALL;
+ ev.u.syscall.entryexit = LTTNG_KERNEL_ABI_SYSCALL_ENTRY;
+ ev.u.syscall.abi = LTTNG_KERNEL_ABI_SYSCALL_ABI_NATIVE;
event = _lttng_event_create(chan, &ev, filter, desc,
ev.instrumentation);
WARN_ON_ONCE(!event);
struct lttng_event *event;
memset(&ev, 0, sizeof(ev));
- strncpy(ev.name, desc->event_name, LTTNG_KERNEL_SYM_NAME_LEN);
- ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
- ev.instrumentation = LTTNG_KERNEL_SYSCALL;
- ev.u.syscall.entryexit = LTTNG_KERNEL_SYSCALL_ENTRY;
- ev.u.syscall.abi = LTTNG_KERNEL_SYSCALL_ABI_COMPAT;
+ strncpy(ev.name, desc->event_name, LTTNG_KERNEL_ABI_SYM_NAME_LEN);
+ ev.name[LTTNG_KERNEL_ABI_SYM_NAME_LEN - 1] = '\0';
+ ev.instrumentation = LTTNG_KERNEL_ABI_SYSCALL;
+ ev.u.syscall.entryexit = LTTNG_KERNEL_ABI_SYSCALL_ENTRY;
+ ev.u.syscall.abi = LTTNG_KERNEL_ABI_SYSCALL_ABI_COMPAT;
event = _lttng_event_create(chan, &ev, filter, desc,
ev.instrumentation);
WARN_ON_ONCE(!event);
struct lttng_event *event;
memset(&ev, 0, sizeof(ev));
- strncpy(ev.name, desc->event_name, LTTNG_KERNEL_SYM_NAME_LEN);
- ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
- ev.instrumentation = LTTNG_KERNEL_SYSCALL;
- ev.u.syscall.entryexit = LTTNG_KERNEL_SYSCALL_EXIT;
- ev.u.syscall.abi = LTTNG_KERNEL_SYSCALL_ABI_COMPAT;
+ strncpy(ev.name, desc->event_name, LTTNG_KERNEL_ABI_SYM_NAME_LEN);
+ ev.name[LTTNG_KERNEL_ABI_SYM_NAME_LEN - 1] = '\0';
+ ev.instrumentation = LTTNG_KERNEL_ABI_SYSCALL;
+ ev.u.syscall.entryexit = LTTNG_KERNEL_ABI_SYSCALL_EXIT;
+ ev.u.syscall.abi = LTTNG_KERNEL_ABI_SYSCALL_ABI_COMPAT;
event = _lttng_event_create(chan, &ev, filter, desc,
ev.instrumentation);
WARN_ON_ONCE(!event);
struct lttng_event *event;
memset(&ev, 0, sizeof(ev));
- strncpy(ev.name, desc->event_name, LTTNG_KERNEL_SYM_NAME_LEN);
- ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
- ev.instrumentation = LTTNG_KERNEL_SYSCALL;
- ev.u.syscall.entryexit = LTTNG_KERNEL_SYSCALL_EXIT;
- ev.u.syscall.abi = LTTNG_KERNEL_SYSCALL_ABI_NATIVE;
+ strncpy(ev.name, desc->event_name, LTTNG_KERNEL_ABI_SYM_NAME_LEN);
+ ev.name[LTTNG_KERNEL_ABI_SYM_NAME_LEN - 1] = '\0';
+ ev.instrumentation = LTTNG_KERNEL_ABI_SYSCALL;
+ ev.u.syscall.entryexit = LTTNG_KERNEL_ABI_SYSCALL_EXIT;
+ ev.u.syscall.abi = LTTNG_KERNEL_ABI_SYSCALL_ABI_NATIVE;
event = _lttng_event_create(chan, &ev, filter, desc,
ev.instrumentation);
WARN_ON_ONCE(!event);
struct lttng_event_notifier *notifier;
const struct lttng_kernel_event_desc *desc;
struct lttng_event_notifier_group *group = event_notifier_enabler->group;
- struct lttng_kernel_event_notifier event_notifier_param;
+ struct lttng_kernel_abi_event_notifier event_notifier_param;
uint64_t user_token = event_notifier_enabler->base.user_token;
uint64_t error_counter_index = event_notifier_enabler->error_counter_index;
struct lttng_enabler *base_enabler = lttng_event_notifier_enabler_as_enabler(
struct hlist_head *unknown_dispatch_list;
int ret = 0;
bool found = false;
- enum lttng_kernel_syscall_abi abi;
- enum lttng_kernel_syscall_entryexit entryexit;
+ enum lttng_kernel_abi_syscall_abi abi;
+ enum lttng_kernel_abi_syscall_entryexit entryexit;
struct hlist_head *head;
switch (type) {
case SC_TYPE_ENTRY:
desc = &__event_desc___syscall_entry_unknown;
unknown_dispatch_list = &group->event_notifier_unknown_syscall_dispatch;
- entryexit = LTTNG_KERNEL_SYSCALL_ENTRY;
- abi = LTTNG_KERNEL_SYSCALL_ABI_NATIVE;
+ entryexit = LTTNG_KERNEL_ABI_SYSCALL_ENTRY;
+ abi = LTTNG_KERNEL_ABI_SYSCALL_ABI_NATIVE;
break;
case SC_TYPE_EXIT:
desc = &__event_desc___syscall_exit_unknown;
unknown_dispatch_list = &group->event_notifier_exit_unknown_syscall_dispatch;
- entryexit = LTTNG_KERNEL_SYSCALL_EXIT;
- abi = LTTNG_KERNEL_SYSCALL_ABI_NATIVE;
+ entryexit = LTTNG_KERNEL_ABI_SYSCALL_EXIT;
+ abi = LTTNG_KERNEL_ABI_SYSCALL_ABI_NATIVE;
break;
case SC_TYPE_COMPAT_ENTRY:
desc = &__event_desc___compat_syscall_entry_unknown;
unknown_dispatch_list = &group->event_notifier_compat_unknown_syscall_dispatch;
- entryexit = LTTNG_KERNEL_SYSCALL_ENTRY;
- abi = LTTNG_KERNEL_SYSCALL_ABI_COMPAT;
+ entryexit = LTTNG_KERNEL_ABI_SYSCALL_ENTRY;
+ abi = LTTNG_KERNEL_ABI_SYSCALL_ABI_COMPAT;
break;
case SC_TYPE_COMPAT_EXIT:
desc = &__event_desc___compat_syscall_exit_unknown;
unknown_dispatch_list = &group->event_notifier_exit_compat_unknown_syscall_dispatch;
- entryexit = LTTNG_KERNEL_SYSCALL_EXIT;
- abi = LTTNG_KERNEL_SYSCALL_ABI_COMPAT;
+ entryexit = LTTNG_KERNEL_ABI_SYSCALL_EXIT;
+ abi = LTTNG_KERNEL_ABI_SYSCALL_ABI_COMPAT;
break;
default:
BUG_ON(1);
memset(&event_notifier_param, 0, sizeof(event_notifier_param));
strncat(event_notifier_param.event.name, desc->event_name,
- LTTNG_KERNEL_SYM_NAME_LEN - strlen(event_notifier_param.event.name) - 1);
+ LTTNG_KERNEL_ABI_SYM_NAME_LEN - strlen(event_notifier_param.event.name) - 1);
- event_notifier_param.event.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
+ event_notifier_param.event.name[LTTNG_KERNEL_ABI_SYM_NAME_LEN - 1] = '\0';
- event_notifier_param.event.instrumentation = LTTNG_KERNEL_SYSCALL;
+ event_notifier_param.event.instrumentation = LTTNG_KERNEL_ABI_SYSCALL;
event_notifier_param.event.u.syscall.abi = abi;
event_notifier_param.event.u.syscall.entryexit = entryexit;
/* iterate over all syscall and create event_notifier that match */
for (i = 0; i < table_len; i++) {
struct lttng_event_notifier *event_notifier;
- struct lttng_kernel_event_notifier event_notifier_param;
+ struct lttng_kernel_abi_event_notifier event_notifier_param;
struct hlist_head *head;
int found = 0;
memset(&event_notifier_param, 0, sizeof(event_notifier_param));
switch (type) {
case SC_TYPE_ENTRY:
- event_notifier_param.event.u.syscall.entryexit = LTTNG_KERNEL_SYSCALL_ENTRY;
- event_notifier_param.event.u.syscall.abi = LTTNG_KERNEL_SYSCALL_ABI_NATIVE;
+ event_notifier_param.event.u.syscall.entryexit = LTTNG_KERNEL_ABI_SYSCALL_ENTRY;
+ event_notifier_param.event.u.syscall.abi = LTTNG_KERNEL_ABI_SYSCALL_ABI_NATIVE;
break;
case SC_TYPE_EXIT:
- event_notifier_param.event.u.syscall.entryexit = LTTNG_KERNEL_SYSCALL_EXIT;
- event_notifier_param.event.u.syscall.abi = LTTNG_KERNEL_SYSCALL_ABI_NATIVE;
+ event_notifier_param.event.u.syscall.entryexit = LTTNG_KERNEL_ABI_SYSCALL_EXIT;
+ event_notifier_param.event.u.syscall.abi = LTTNG_KERNEL_ABI_SYSCALL_ABI_NATIVE;
break;
case SC_TYPE_COMPAT_ENTRY:
- event_notifier_param.event.u.syscall.entryexit = LTTNG_KERNEL_SYSCALL_ENTRY;
- event_notifier_param.event.u.syscall.abi = LTTNG_KERNEL_SYSCALL_ABI_COMPAT;
+ event_notifier_param.event.u.syscall.entryexit = LTTNG_KERNEL_ABI_SYSCALL_ENTRY;
+ event_notifier_param.event.u.syscall.abi = LTTNG_KERNEL_ABI_SYSCALL_ABI_COMPAT;
break;
case SC_TYPE_COMPAT_EXIT:
- event_notifier_param.event.u.syscall.entryexit = LTTNG_KERNEL_SYSCALL_EXIT;
- event_notifier_param.event.u.syscall.abi = LTTNG_KERNEL_SYSCALL_ABI_COMPAT;
+ event_notifier_param.event.u.syscall.entryexit = LTTNG_KERNEL_ABI_SYSCALL_EXIT;
+ event_notifier_param.event.u.syscall.abi = LTTNG_KERNEL_ABI_SYSCALL_ABI_COMPAT;
break;
}
strncat(event_notifier_param.event.name, desc->event_name,
- LTTNG_KERNEL_SYM_NAME_LEN - strlen(event_notifier_param.event.name) - 1);
- event_notifier_param.event.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
- event_notifier_param.event.instrumentation = LTTNG_KERNEL_SYSCALL;
+ LTTNG_KERNEL_ABI_SYM_NAME_LEN - strlen(event_notifier_param.event.name) - 1);
+ event_notifier_param.event.name[LTTNG_KERNEL_ABI_SYM_NAME_LEN - 1] = '\0';
+ event_notifier_param.event.instrumentation = LTTNG_KERNEL_ABI_SYSCALL;
event_notifier = _lttng_event_notifier_create(desc, user_token,
error_counter_index, group, &event_notifier_param,
int ret;
struct lttng_enabler *base_enabler =
lttng_event_notifier_enabler_as_enabler(event_notifier_enabler);
- enum lttng_kernel_syscall_entryexit entryexit =
+ enum lttng_kernel_abi_syscall_entryexit entryexit =
base_enabler->event_param.u.syscall.entryexit;
- if (entryexit == LTTNG_KERNEL_SYSCALL_ENTRY || entryexit == LTTNG_KERNEL_SYSCALL_ENTRYEXIT) {
+ if (entryexit == LTTNG_KERNEL_ABI_SYSCALL_ENTRY || entryexit == LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT) {
ret = create_matching_event_notifiers(event_notifier_enabler,
filter, sc_table, ARRAY_SIZE(sc_table), SC_TYPE_ENTRY);
if (ret)
goto end;
}
- if (entryexit == LTTNG_KERNEL_SYSCALL_EXIT || entryexit == LTTNG_KERNEL_SYSCALL_ENTRYEXIT) {
+ if (entryexit == LTTNG_KERNEL_ABI_SYSCALL_EXIT || entryexit == LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT) {
ret = create_matching_event_notifiers(event_notifier_enabler,
filter, sc_exit_table, ARRAY_SIZE(sc_exit_table),
SC_TYPE_EXIT);
struct hlist_head *dispatch_list;
int ret = 0;
- WARN_ON_ONCE(notifier->instrumentation != LTTNG_KERNEL_SYSCALL);
+ WARN_ON_ONCE(notifier->instrumentation != LTTNG_KERNEL_ABI_SYSCALL);
ret = lttng_syscall_filter_enable(group->sc_filter,
notifier->desc->event_name, notifier->u.syscall.abi,
struct lttng_channel *channel,
struct lttng_event *event)
{
- WARN_ON_ONCE(event->instrumentation != LTTNG_KERNEL_SYSCALL);
+ WARN_ON_ONCE(event->instrumentation != LTTNG_KERNEL_ABI_SYSCALL);
return lttng_syscall_filter_enable(channel->sc_filter,
event->desc->event_name, event->u.syscall.abi,
struct lttng_event_notifier_group *group = notifier->group;
int ret;
- WARN_ON_ONCE(notifier->instrumentation != LTTNG_KERNEL_SYSCALL);
+ WARN_ON_ONCE(notifier->instrumentation != LTTNG_KERNEL_ABI_SYSCALL);
ret = lttng_syscall_filter_disable(group->sc_filter,
notifier->desc->event_name, notifier->u.syscall.abi,
* A syscall is enabled if it is traced for either entry or exit.
*/
long lttng_channel_syscall_mask(struct lttng_channel *channel,
- struct lttng_kernel_syscall_mask __user *usyscall_mask)
+ struct lttng_kernel_abi_syscall_mask __user *usyscall_mask)
{
uint32_t len, sc_tables_len, bitmask_len;
int ret = 0, bit;
if (symbol_name) {
lttng_kp->symbol_name =
- kzalloc(LTTNG_KERNEL_SYM_NAME_LEN * sizeof(char),
+ kzalloc(LTTNG_KERNEL_ABI_SYM_NAME_LEN * sizeof(char),
GFP_KERNEL);
if (!lttng_kp->symbol_name) {
ret = -ENOMEM;
goto name_error;
}
memcpy(lttng_kp->symbol_name, symbol_name,
- LTTNG_KERNEL_SYM_NAME_LEN * sizeof(char));
+ LTTNG_KERNEL_ABI_SYM_NAME_LEN * sizeof(char));
lttng_kp->kp.symbol_name = lttng_kp->symbol_name;
}
struct lttng_event *event_exit;
struct lttng_krp *lttng_krp;
- if (event->instrumentation != LTTNG_KERNEL_KRETPROBE) {
+ if (event->instrumentation != LTTNG_KERNEL_ABI_KRETPROBE) {
return -EINVAL;
}
if (event->enabled == enable) {
static
int lttng_uprobes_add_callsite(struct lttng_uprobe *uprobe,
- struct lttng_kernel_event_callsite __user *callsite,
+ struct lttng_kernel_abi_event_callsite __user *callsite,
int (*handler)(struct uprobe_consumer *self, struct pt_regs *regs),
void *priv_data)
{
}
int lttng_uprobes_event_add_callsite(struct lttng_event *event,
- struct lttng_kernel_event_callsite __user *callsite)
+ struct lttng_kernel_abi_event_callsite __user *callsite)
{
return lttng_uprobes_add_callsite(&event->u.uprobe, callsite,
lttng_uprobes_event_handler_pre, event);
EXPORT_SYMBOL_GPL(lttng_uprobes_event_add_callsite);
int lttng_uprobes_event_notifier_add_callsite(struct lttng_event_notifier *event_notifier,
- struct lttng_kernel_event_callsite __user *callsite)
+ struct lttng_kernel_abi_event_callsite __user *callsite)
{
return lttng_uprobes_add_callsite(&event_notifier->u.uprobe, callsite,
lttng_uprobes_event_notifier_handler_pre, event_notifier);