From ab2277d6c5aacf0c9ead24599e3b5fc57302d43f Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 23 May 2011 22:35:05 -0400 Subject: [PATCH] Update ABI Signed-off-by: Mathieu Desnoyers --- lib/ringbuffer/ring_buffer_iterator.c | 4 ++-- ltt-debugfs-abi.c | 6 +++--- ltt-debugfs-abi.h | 26 +++++++++++--------------- ltt-events.c | 12 ++++++------ ltt-ring-buffer-metadata-client.h | 2 -- 5 files changed, 22 insertions(+), 28 deletions(-) diff --git a/lib/ringbuffer/ring_buffer_iterator.c b/lib/ringbuffer/ring_buffer_iterator.c index ff9b8061..1e60f2c4 100644 --- a/lib/ringbuffer/ring_buffer_iterator.c +++ b/lib/ringbuffer/ring_buffer_iterator.c @@ -151,11 +151,11 @@ void lib_ring_buffer_get_empty_buf_records(const struct lib_ring_buffer_config * 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)); } } } diff --git a/ltt-debugfs-abi.c b/ltt-debugfs-abi.c index 4f283a18..ee3ab043 100644 --- a/ltt-debugfs-abi.c +++ b/ltt-debugfs-abi.c @@ -143,7 +143,7 @@ void lttng_metadata_create_events(struct file *channel_file) { 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; @@ -362,10 +362,10 @@ int lttng_abi_create_event(struct file *channel_file, 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: diff --git a/ltt-debugfs-abi.h b/ltt-debugfs-abi.h index 12592c8f..195acfc2 100644 --- a/ltt-debugfs-abi.h +++ b/ltt-debugfs-abi.h @@ -14,9 +14,9 @@ #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, }; /* @@ -65,21 +65,17 @@ struct lttng_kernel_tracer_version { 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 */ diff --git a/ltt-events.c b/ltt-events.c index 17d87095..c08079b5 100644 --- a/ltt-events.c +++ b/ltt-events.c @@ -235,7 +235,7 @@ struct ltt_event *ltt_event_create(struct ltt_channel *chan, /* 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; @@ -245,7 +245,7 @@ struct ltt_event *ltt_event_create(struct ltt_channel *chan, 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, @@ -254,7 +254,7 @@ struct ltt_event *ltt_event_create(struct ltt_channel *chan, 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); @@ -293,7 +293,7 @@ int _ltt_event_unregister(struct ltt_event *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); @@ -301,11 +301,11 @@ int _ltt_event_unregister(struct ltt_event *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; diff --git a/ltt-ring-buffer-metadata-client.h b/ltt-ring-buffer-metadata-client.h index 136af200..a5ce2062 100644 --- a/ltt-ring-buffer-metadata-client.h +++ b/ltt-ring-buffer-metadata-client.h @@ -57,9 +57,7 @@ static u64 client_ring_buffer_clock_read(struct channel *chan) 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; -- 2.34.1