case LTTNG_KERNEL_CONTEXT_VPPID:
return lttng_add_vppid_to_ctx(ctx);
case LTTNG_KERNEL_CONTEXT_PERF_COUNTER:
- context_param.u.perf_counter.name[LTTNG_SYM_NAME_LEN - 1] = '\0';
+ context_param.u.perf_counter.name[LTTNG_KERNEL_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,
if (copy_from_user(&event_param, uevent_param, sizeof(event_param)))
return -EFAULT;
- event_param.name[LTTNG_SYM_NAME_LEN - 1] = '\0';
+ event_param.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
switch (event_param.instrumentation) {
case LTTNG_KERNEL_KRETPROBE:
- event_param.u.kretprobe.symbol_name[LTTNG_SYM_NAME_LEN - 1] = '\0';
+ event_param.u.kretprobe.symbol_name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
break;
case LTTNG_KERNEL_KPROBE:
- event_param.u.kprobe.symbol_name[LTTNG_SYM_NAME_LEN - 1] = '\0';
+ event_param.u.kprobe.symbol_name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
break;
case LTTNG_KERNEL_FUNCTION:
- event_param.u.ftrace.symbol_name[LTTNG_SYM_NAME_LEN - 1] = '\0';
+ event_param.u.ftrace.symbol_name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
break;
default:
break;
#include <linux/fs.h>
-#define LTTNG_SYM_NAME_LEN 256
+#define LTTNG_KERNEL_SYM_NAME_LEN 256
enum lttng_kernel_instrumentation {
LTTNG_KERNEL_TRACEPOINT = 0,
/*
* LTTng DebugFS ABI structures.
*/
-
struct lttng_kernel_channel {
int overwrite; /* 1: overwrite, 0: discard */
uint64_t subbuf_size; /* in bytes */
uint64_t addr;
uint64_t offset;
- char symbol_name[LTTNG_SYM_NAME_LEN];
+ char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
};
/*
uint64_t addr;
uint64_t offset;
- char symbol_name[LTTNG_SYM_NAME_LEN];
+ char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
};
struct lttng_kernel_function_tracer {
- char symbol_name[LTTNG_SYM_NAME_LEN];
+ char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
};
/*
* For syscall tracing, name = '\0' means "enable all".
*/
struct lttng_kernel_event {
- char name[LTTNG_SYM_NAME_LEN]; /* event name */
+ char name[LTTNG_KERNEL_SYM_NAME_LEN]; /* event name */
enum lttng_kernel_instrumentation instrumentation;
/* Per instrumentation type configuration */
union {
struct lttng_kernel_perf_counter_ctx {
uint32_t type;
uint64_t config;
- char name[LTTNG_SYM_NAME_LEN];
+ char name[LTTNG_KERNEL_SYM_NAME_LEN];
};
struct lttng_kernel_context {
if (chan_table[i])
continue;
memset(&ev, 0, sizeof(ev));
- strncpy(ev.name, desc->name, LTTNG_SYM_NAME_LEN);
- ev.name[LTTNG_SYM_NAME_LEN - 1] = '\0';
+ strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN);
+ ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
ev.instrumentation = LTTNG_KERNEL_NOOP;
chan_table[i] = lttng_event_create(chan, &ev, filter,
desc);
&__event_desc___sys_unknown;
memset(&ev, 0, sizeof(ev));
- strncpy(ev.name, desc->name, LTTNG_SYM_NAME_LEN);
- ev.name[LTTNG_SYM_NAME_LEN - 1] = '\0';
+ strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN);
+ ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
ev.instrumentation = LTTNG_KERNEL_NOOP;
chan->sc_unknown = lttng_event_create(chan, &ev, filter,
desc);
&__event_desc___compat_sys_unknown;
memset(&ev, 0, sizeof(ev));
- strncpy(ev.name, desc->name, LTTNG_SYM_NAME_LEN);
- ev.name[LTTNG_SYM_NAME_LEN - 1] = '\0';
+ strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN);
+ ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
ev.instrumentation = LTTNG_KERNEL_NOOP;
chan->sc_compat_unknown = lttng_event_create(chan, &ev, filter,
desc);
&__event_desc___exit_syscall;
memset(&ev, 0, sizeof(ev));
- strncpy(ev.name, desc->name, LTTNG_SYM_NAME_LEN);
- ev.name[LTTNG_SYM_NAME_LEN - 1] = '\0';
+ strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN);
+ ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
ev.instrumentation = LTTNG_KERNEL_NOOP;
chan->sc_exit = lttng_event_create(chan, &ev, filter,
desc);
event->u.kprobe.kp.pre_handler = lttng_kprobes_handler_pre;
if (symbol_name) {
event->u.kprobe.symbol_name =
- kzalloc(LTTNG_SYM_NAME_LEN * sizeof(char),
+ kzalloc(LTTNG_KERNEL_SYM_NAME_LEN * sizeof(char),
GFP_KERNEL);
if (!event->u.kprobe.symbol_name) {
ret = -ENOMEM;
goto name_error;
}
memcpy(event->u.kprobe.symbol_name, symbol_name,
- LTTNG_SYM_NAME_LEN * sizeof(char));
+ LTTNG_KERNEL_SYM_NAME_LEN * sizeof(char));
event->u.kprobe.kp.symbol_name =
event->u.kprobe.symbol_name;
}