default:
/*
* Insert buffer into the heap, remove from empty buffer
- * list. The heap should never overflow.
+ * list.
*/
CHAN_WARN_ON(chan, len < 0);
list_del(&buf->iter.empty_node);
- CHAN_WARN_ON(chan, heap_insert(heap, buf) != NULL);
+ CHAN_WARN_ON(chan, heap_insert(heap, buf));
}
}
}
{
struct ltt_channel *channel = channel_file->private_data;
static struct lttng_kernel_event metadata_params = {
- .instrumentation = LTTNG_KERNEL_TRACEPOINTS,
+ .instrumentation = LTTNG_KERNEL_TRACEPOINT,
.name = "lttng_metadata",
};
struct ltt_event *event;
return -EFAULT;
event_param.name[LTTNG_SYM_NAME_LEN - 1] = '\0';
switch (event_param.instrumentation) {
- case LTTNG_KERNEL_KPROBES:
+ case LTTNG_KERNEL_KPROBE:
event_param.u.kprobe.symbol_name[LTTNG_SYM_NAME_LEN - 1] = '\0';
break;
- case LTTNG_KERNEL_FUNCTION_TRACER:
+ case LTTNG_KERNEL_FUNCTION:
event_param.u.ftrace.symbol_name[LTTNG_SYM_NAME_LEN - 1] = '\0';
break;
default:
#define LTTNG_SYM_NAME_LEN 128
enum lttng_kernel_instrumentation {
- LTTNG_KERNEL_TRACEPOINTS,
- LTTNG_KERNEL_KPROBES,
- LTTNG_KERNEL_FUNCTION_TRACER,
+ LTTNG_KERNEL_TRACEPOINT,
+ LTTNG_KERNEL_KPROBE,
+ LTTNG_KERNEL_FUNCTION,
};
/*
uint32_t sublevel;
};
-#define LTTNG_KERNEL_SESSION _IO(0xF6, 0x40)
-#define LTTNG_KERNEL_SESSION_START _IO(0xF6, 0x41)
-#define LTTNG_KERNEL_SESSION_STOP _IO(0xF6, 0x42)
-#define LTTNG_KERNEL_CHANNEL \
+#define LTTNG_KERNEL_SESSION _IO(0xF6, 0x40)
+#define LTTNG_KERNEL_SESSION_START _IO(0xF6, 0x41)
+#define LTTNG_KERNEL_SESSION_STOP _IO(0xF6, 0x42)
+#define LTTNG_KERNEL_CHANNEL \
_IOW(0xF6, 0x43, struct lttng_kernel_channel)
-#define LTTNG_KERNEL_STREAM _IO(0xF6, 0x44)
-#define LTTNG_KERNEL_EVENT \
+#define LTTNG_KERNEL_STREAM _IO(0xF6, 0x44)
+#define LTTNG_KERNEL_EVENT \
_IOW(0xF6, 0x45, struct lttng_kernel_event)
-#define LTTNG_KERNEL_METADATA \
+#define LTTNG_KERNEL_METADATA \
_IOW(0xF6, 0x46, struct lttng_kernel_channel)
-#define LTTNG_KERNEL_KPROBE \
- _IOW(0xF6, 0x47, struct lttng_kernel_kprobe)
-#define LTTNG_KERNEL_TRACER_VERSION \
+#define LTTNG_KERNEL_TRACER_VERSION \
_IOR(0xF6, 0x48, struct lttng_kernel_tracer_version)
-#define LTTNG_KERNEL_FUNCTION_TRACER \
- _IOW(0xF6, 0x49, struct lttng_kernel_function_tracer)
#endif /* _LTT_DEBUGFS_ABI_H */
/* Populate ltt_event structure before tracepoint registration. */
smp_wmb();
switch (event_param->instrumentation) {
- case LTTNG_KERNEL_TRACEPOINTS:
+ case LTTNG_KERNEL_TRACEPOINT:
event->desc = ltt_event_get(event_param->name);
if (!event->desc)
goto register_error;
if (ret)
goto register_error;
break;
- case LTTNG_KERNEL_KPROBES:
+ case LTTNG_KERNEL_KPROBE:
ret = lttng_kprobes_register(event_param->name,
event_param->u.kprobe.symbol_name,
event_param->u.kprobe.offset,
if (ret)
goto register_error;
break;
- case LTTNG_KERNEL_FUNCTION_TRACER:
+ case LTTNG_KERNEL_FUNCTION:
ret = lttng_ftrace_register(event_param->name,
event_param->u.ftrace.symbol_name,
event);
int ret = -EINVAL;
switch (event->instrumentation) {
- case LTTNG_KERNEL_TRACEPOINTS:
+ case LTTNG_KERNEL_TRACEPOINT:
ret = tracepoint_probe_unregister(event->desc->name,
event->desc->probe_callback,
event);
return ret;
ltt_event_put(event->desc);
break;
- case LTTNG_KERNEL_KPROBES:
+ case LTTNG_KERNEL_KPROBE:
lttng_kprobes_unregister(event);
ret = 0;
break;
- case LTTNG_KERNEL_FUNCTION_TRACER:
+ case LTTNG_KERNEL_FUNCTION:
lttng_ftrace_unregister(event);
ret = 0;
break;
static
size_t client_record_header_size(const struct lib_ring_buffer_config *config,
struct channel *chan, size_t offset,
- size_t data_size,
size_t *pre_header_padding,
- unsigned int rflags,
struct lib_ring_buffer_ctx *ctx)
{
return 0;