From a90917c3f8c4ed79117f1caa333b29a2108084ec Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Sun, 22 Jan 2012 16:13:41 -0500 Subject: [PATCH] Mass rename: ltt_*/ltt-* to LTTNG_*/LTTNG-* For files, defines and symbols. Signed-off-by: Mathieu Desnoyers --- Makefile | 24 +-- TODO | 2 +- lib/bitfield.h | 2 +- lttng-abi.c | 60 +++--- lttng-calibrate.c | 2 +- lttng-context-nice.c | 12 +- lttng-context-perf-counters.c | 12 +- lttng-context-pid.c | 12 +- lttng-context-ppid.c | 12 +- lttng-context-prio.c | 12 +- lttng-context-procname.c | 8 +- lttng-context-tid.c | 12 +- lttng-context-vpid.c | 12 +- lttng-context-vppid.c | 12 +- lttng-context-vtid.c | 12 +- ltt-context.c => lttng-context.c | 6 +- ltt-endian.h => lttng-endian.h | 10 +- ltt-events.c => lttng-events.c | 188 +++++++++--------- ltt-events.h => lttng-events.h | 140 ++++++------- ltt-probes.c => lttng-probes.c | 22 +- ...rd.c => lttng-ring-buffer-client-discard.c | 6 +- ...=> lttng-ring-buffer-client-mmap-discard.c | 6 +- ... lttng-ring-buffer-client-mmap-overwrite.c | 6 +- ....c => lttng-ring-buffer-client-overwrite.c | 6 +- ...fer-client.h => lttng-ring-buffer-client.h | 166 ++++++++-------- ...t.c => lttng-ring-buffer-metadata-client.c | 6 +- ...t.h => lttng-ring-buffer-metadata-client.h | 84 ++++---- ...> lttng-ring-buffer-metadata-mmap-client.c | 6 +- lttng-syscalls.c | 28 +-- ltt-tracer-core.h => lttng-tracer-core.h | 14 +- ltt-tracer.h => lttng-tracer.h | 24 +-- probes/lttng-events.h | 44 ++-- probes/lttng-ftrace.c | 24 +-- probes/lttng-kprobes.c | 24 +-- probes/lttng-kretprobes.c | 28 +-- probes/lttng-types.c | 2 +- probes/lttng-types.h | 6 +- wrapper/ftrace.h | 6 +- wrapper/kallsyms.h | 6 +- wrapper/perf.h | 6 +- wrapper/spinlock.h | 6 +- wrapper/splice.h | 6 +- wrapper/trace-clock.h | 6 +- wrapper/uuid.h | 6 +- wrapper/vmalloc.h | 6 +- 45 files changed, 550 insertions(+), 550 deletions(-) rename ltt-context.c => lttng-context.c (96%) rename ltt-endian.h => lttng-endian.h (70%) rename ltt-events.c => lttng-events.c (81%) rename ltt-events.h => lttng-events.h (72%) rename ltt-probes.c => lttng-probes.c (85%) rename ltt-ring-buffer-client-discard.c => lttng-ring-buffer-client-discard.c (83%) rename ltt-ring-buffer-client-mmap-discard.c => lttng-ring-buffer-client-mmap-discard.c (83%) rename ltt-ring-buffer-client-mmap-overwrite.c => lttng-ring-buffer-client-mmap-overwrite.c (83%) rename ltt-ring-buffer-client-overwrite.c => lttng-ring-buffer-client-overwrite.c (83%) rename ltt-ring-buffer-client.h => lttng-ring-buffer-client.h (73%) rename ltt-ring-buffer-metadata-client.c => lttng-ring-buffer-metadata-client.c (81%) rename ltt-ring-buffer-metadata-client.h => lttng-ring-buffer-metadata-client.h (76%) rename ltt-ring-buffer-metadata-mmap-client.c => lttng-ring-buffer-metadata-mmap-client.c (81%) rename ltt-tracer-core.h => lttng-tracer-core.h (70%) rename ltt-tracer.h => lttng-tracer.h (73%) diff --git a/Makefile b/Makefile index 0d16bcbb..ad2ff5a7 100644 --- a/Makefile +++ b/Makefile @@ -5,16 +5,16 @@ ifneq ($(KERNELRELEASE),) ifneq ($(CONFIG_TRACEPOINTS),) -obj-m += ltt-ring-buffer-client-discard.o -obj-m += ltt-ring-buffer-client-overwrite.o -obj-m += ltt-ring-buffer-metadata-client.o -obj-m += ltt-ring-buffer-client-mmap-discard.o -obj-m += ltt-ring-buffer-client-mmap-overwrite.o -obj-m += ltt-ring-buffer-metadata-mmap-client.o - -obj-m += ltt-relay.o -ltt-relay-objs := ltt-events.o lttng-abi.o \ - ltt-probes.o ltt-context.o \ +obj-m += lttng-ring-buffer-client-discard.o +obj-m += lttng-ring-buffer-client-overwrite.o +obj-m += lttng-ring-buffer-metadata-client.o +obj-m += lttng-ring-buffer-client-mmap-discard.o +obj-m += lttng-ring-buffer-client-mmap-overwrite.o +obj-m += lttng-ring-buffer-metadata-mmap-client.o + +obj-m += lttng-tracer.o +lttng-tracer-objs := lttng-events.o lttng-abi.o \ + lttng-probes.o lttng-context.o \ lttng-context-pid.o lttng-context-procname.o \ lttng-context-prio.o lttng-context-nice.o \ lttng-context-vpid.o lttng-context-tid.o \ @@ -22,11 +22,11 @@ ltt-relay-objs := ltt-events.o lttng-abi.o \ lttng-context-vppid.o lttng-calibrate.o ifneq ($(CONFIG_HAVE_SYSCALL_TRACEPOINTS),) -ltt-relay-objs += lttng-syscalls.o +lttng-tracer-objs += lttng-syscalls.o endif ifneq ($(CONFIG_PERF_EVENTS),) -ltt-relay-objs += $(shell \ +lttng-tracer-objs += $(shell \ if [ $(VERSION) -ge 3 \ -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 33 \) ] ; then \ echo "lttng-context-perf-counters.o" ; fi;) diff --git a/TODO b/TODO index 44200741..090b923e 100644 --- a/TODO +++ b/TODO @@ -93,7 +93,7 @@ B) Features allow integration between NOHZ and LTTng would be to add support for such notifiers into NOHZ kernel infrastructure. - 10) Turn drivers/staging/lttng/ltt-probes.c probe_list into a + 10) Turn lttng-probes.c probe_list into a hash table. Turns O(n^2) trace systems registration (cost for n systems) into O(n). (O(1) per system) diff --git a/lib/bitfield.h b/lib/bitfield.h index 861e6dcd..8c2b1a20 100644 --- a/lib/bitfield.h +++ b/lib/bitfield.h @@ -19,7 +19,7 @@ * all copies or substantial portions of the Software. */ -#include "../ltt-endian.h" +#include "../lttng-endian.h" #ifndef CHAR_BIT #define CHAR_BIT 8 diff --git a/lttng-abi.c b/lttng-abi.c index ec16b7fc..d15e3f83 100644 --- a/lttng-abi.c +++ b/lttng-abi.c @@ -34,8 +34,8 @@ #include "wrapper/ringbuffer/vfs.h" #include "wrapper/poll.h" #include "lttng-abi.h" -#include "ltt-events.h" -#include "ltt-tracer.h" +#include "lttng-events.h" +#include "lttng-tracer.h" /* * This is LTTng's own personal way to create a system call as an external @@ -62,11 +62,11 @@ enum channel_type { static int lttng_abi_create_session(void) { - struct ltt_session *session; + struct lttng_session *session; struct file *session_file; int session_fd, ret; - session = ltt_session_create(); + session = lttng_session_create(); if (!session) return -ENOMEM; session_fd = get_unused_fd(); @@ -88,7 +88,7 @@ int lttng_abi_create_session(void) file_error: put_unused_fd(session_fd); fd_error: - ltt_session_destroy(session); + lttng_session_destroy(session); return ret; } @@ -147,7 +147,7 @@ long lttng_abi_tracer_version(struct file *file, static long lttng_abi_add_context(struct file *file, struct lttng_kernel_context __user *ucontext_param, - struct lttng_ctx **ctx, struct ltt_session *session) + struct lttng_ctx **ctx, struct lttng_session *session) { struct lttng_kernel_context context_param; @@ -255,18 +255,18 @@ static const struct file_operations lttng_fops = { static void lttng_metadata_create_events(struct file *channel_file) { - struct ltt_channel *channel = channel_file->private_data; + struct lttng_channel *channel = channel_file->private_data; static struct lttng_kernel_event metadata_params = { .instrumentation = LTTNG_KERNEL_TRACEPOINT, .name = "lttng_metadata", }; - struct ltt_event *event; + struct lttng_event *event; /* * We tolerate no failure path after event creation. It will stay * invariant for the rest of the session. */ - event = ltt_event_create(channel, &metadata_params, NULL, NULL); + event = lttng_event_create(channel, &metadata_params, NULL, NULL); if (!event) { goto create_error; } @@ -282,10 +282,10 @@ int lttng_abi_create_channel(struct file *session_file, struct lttng_kernel_channel __user *uchan_param, enum channel_type channel_type) { - struct ltt_session *session = session_file->private_data; + struct lttng_session *session = session_file->private_data; const struct file_operations *fops = NULL; const char *transport_name; - struct ltt_channel *chan; + struct lttng_channel *chan; struct file *chan_file; struct lttng_kernel_channel chan_param; int chan_fd; @@ -342,7 +342,7 @@ int lttng_abi_create_channel(struct file *session_file, * We tolerate no failure path after channel creation. It will stay * invariant for the rest of the session. */ - chan = ltt_channel_create(session, transport_name, NULL, + chan = lttng_channel_create(session, transport_name, NULL, chan_param.subbuf_size, chan_param.num_subbuf, chan_param.switch_timer_interval, @@ -394,7 +394,7 @@ fd_error: static long lttng_session_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { - struct ltt_session *session = file->private_data; + struct lttng_session *session = file->private_data; switch (cmd) { case LTTNG_KERNEL_CHANNEL: @@ -403,10 +403,10 @@ long lttng_session_ioctl(struct file *file, unsigned int cmd, unsigned long arg) PER_CPU_CHANNEL); case LTTNG_KERNEL_SESSION_START: case LTTNG_KERNEL_ENABLE: - return ltt_session_enable(session); + return lttng_session_enable(session); case LTTNG_KERNEL_SESSION_STOP: case LTTNG_KERNEL_DISABLE: - return ltt_session_disable(session); + return lttng_session_disable(session); case LTTNG_KERNEL_METADATA: return lttng_abi_create_channel(file, (struct lttng_kernel_channel __user *) arg, @@ -427,10 +427,10 @@ long lttng_session_ioctl(struct file *file, unsigned int cmd, unsigned long arg) static int lttng_session_release(struct inode *inode, struct file *file) { - struct ltt_session *session = file->private_data; + struct lttng_session *session = file->private_data; if (session) - ltt_session_destroy(session); + lttng_session_destroy(session); return 0; } @@ -446,7 +446,7 @@ static const struct file_operations lttng_session_fops = { static int lttng_abi_open_stream(struct file *channel_file) { - struct ltt_channel *channel = channel_file->private_data; + struct lttng_channel *channel = channel_file->private_data; struct lib_ring_buffer *buf; int stream_fd, ret; struct file *stream_file; @@ -492,8 +492,8 @@ static int lttng_abi_create_event(struct file *channel_file, struct lttng_kernel_event __user *uevent_param) { - struct ltt_channel *channel = channel_file->private_data; - struct ltt_event *event; + struct lttng_channel *channel = channel_file->private_data; + struct lttng_event *event; struct lttng_kernel_event event_param; int event_fd, ret; struct file *event_file; @@ -532,7 +532,7 @@ int lttng_abi_create_event(struct file *channel_file, * We tolerate no failure path after event creation. It * will stay invariant for the rest of the session. */ - event = ltt_event_create(channel, &event_param, NULL, NULL); + event = lttng_event_create(channel, &event_param, NULL, NULL); if (!event) { ret = -EINVAL; goto event_error; @@ -589,7 +589,7 @@ fd_error: static long lttng_channel_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { - struct ltt_channel *channel = file->private_data; + struct lttng_channel *channel = file->private_data; switch (cmd) { case LTTNG_KERNEL_STREAM: @@ -601,9 +601,9 @@ long lttng_channel_ioctl(struct file *file, unsigned int cmd, unsigned long arg) (struct lttng_kernel_context __user *) arg, &channel->ctx, channel->session); case LTTNG_KERNEL_ENABLE: - return ltt_channel_enable(channel); + return lttng_channel_enable(channel); case LTTNG_KERNEL_DISABLE: - return ltt_channel_disable(channel); + return lttng_channel_disable(channel); default: return -ENOIOCTLCMD; } @@ -641,7 +641,7 @@ long lttng_metadata_ioctl(struct file *file, unsigned int cmd, unsigned long arg */ unsigned int lttng_channel_poll(struct file *file, poll_table *wait) { - struct ltt_channel *channel = file->private_data; + struct lttng_channel *channel = file->private_data; unsigned int mask = 0; if (file->f_mode & FMODE_READ) { @@ -664,7 +664,7 @@ unsigned int lttng_channel_poll(struct file *file, poll_table *wait) static int lttng_channel_release(struct inode *inode, struct file *file) { - struct ltt_channel *channel = file->private_data; + struct lttng_channel *channel = file->private_data; if (channel) fput(channel->session->file); @@ -708,7 +708,7 @@ static const struct file_operations lttng_metadata_fops = { static long lttng_event_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { - struct ltt_event *event = file->private_data; + struct lttng_event *event = file->private_data; switch (cmd) { case LTTNG_KERNEL_CONTEXT: @@ -716,9 +716,9 @@ long lttng_event_ioctl(struct file *file, unsigned int cmd, unsigned long arg) (struct lttng_kernel_context __user *) arg, &event->ctx, event->chan->session); case LTTNG_KERNEL_ENABLE: - return ltt_event_enable(event); + return lttng_event_enable(event); case LTTNG_KERNEL_DISABLE: - return ltt_event_disable(event); + return lttng_event_disable(event); default: return -ENOIOCTLCMD; } @@ -727,7 +727,7 @@ long lttng_event_ioctl(struct file *file, unsigned int cmd, unsigned long arg) static int lttng_event_release(struct inode *inode, struct file *file) { - struct ltt_event *event = file->private_data; + struct lttng_event *event = file->private_data; if (event) fput(event->chan->file); diff --git a/lttng-calibrate.c b/lttng-calibrate.c index 1fe3a690..f2362fb2 100644 --- a/lttng-calibrate.c +++ b/lttng-calibrate.c @@ -9,7 +9,7 @@ */ #include "lttng-abi.h" -#include "ltt-events.h" +#include "lttng-events.h" noinline void lttng_calibrate_kretprobe(void) diff --git a/lttng-context-nice.c b/lttng-context-nice.c index 9b99b549..ca391e31 100644 --- a/lttng-context-nice.c +++ b/lttng-context-nice.c @@ -10,17 +10,17 @@ #include #include #include -#include "ltt-events.h" +#include "lttng-events.h" #include "wrapper/ringbuffer/frontend_types.h" #include "wrapper/vmalloc.h" -#include "ltt-tracer.h" +#include "lttng-tracer.h" static size_t nice_get_size(size_t offset) { size_t size = 0; - size += lib_ring_buffer_align(offset, ltt_alignof(int)); + size += lib_ring_buffer_align(offset, lttng_alignof(int)); size += sizeof(int); return size; } @@ -28,12 +28,12 @@ size_t nice_get_size(size_t offset) static void nice_record(struct lttng_ctx_field *field, struct lib_ring_buffer_ctx *ctx, - struct ltt_channel *chan) + struct lttng_channel *chan) { int nice; nice = task_nice(current); - lib_ring_buffer_align_ctx(ctx, ltt_alignof(nice)); + lib_ring_buffer_align_ctx(ctx, lttng_alignof(nice)); chan->ops->event_write(ctx, &nice, sizeof(nice)); } @@ -51,7 +51,7 @@ int lttng_add_nice_to_ctx(struct lttng_ctx **ctx) field->event_field.name = "nice"; field->event_field.type.atype = atype_integer; field->event_field.type.u.basic.integer.size = sizeof(int) * CHAR_BIT; - field->event_field.type.u.basic.integer.alignment = ltt_alignof(int) * CHAR_BIT; + field->event_field.type.u.basic.integer.alignment = lttng_alignof(int) * CHAR_BIT; field->event_field.type.u.basic.integer.signedness = is_signed_type(int); field->event_field.type.u.basic.integer.reverse_byte_order = 0; field->event_field.type.u.basic.integer.base = 10; diff --git a/lttng-context-perf-counters.c b/lttng-context-perf-counters.c index 3ae2266f..444c2f92 100644 --- a/lttng-context-perf-counters.c +++ b/lttng-context-perf-counters.c @@ -12,18 +12,18 @@ #include #include #include -#include "ltt-events.h" +#include "lttng-events.h" #include "wrapper/ringbuffer/frontend_types.h" #include "wrapper/vmalloc.h" #include "wrapper/perf.h" -#include "ltt-tracer.h" +#include "lttng-tracer.h" static size_t perf_counter_get_size(size_t offset) { size_t size = 0; - size += lib_ring_buffer_align(offset, ltt_alignof(uint64_t)); + size += lib_ring_buffer_align(offset, lttng_alignof(uint64_t)); size += sizeof(uint64_t); return size; } @@ -31,7 +31,7 @@ size_t perf_counter_get_size(size_t offset) static void perf_counter_record(struct lttng_ctx_field *field, struct lib_ring_buffer_ctx *ctx, - struct ltt_channel *chan) + struct lttng_channel *chan) { struct perf_event *event; uint64_t value; @@ -54,7 +54,7 @@ void perf_counter_record(struct lttng_ctx_field *field, */ value = 0; } - lib_ring_buffer_align_ctx(ctx, ltt_alignof(value)); + lib_ring_buffer_align_ctx(ctx, lttng_alignof(value)); chan->ops->event_write(ctx, &value, sizeof(value)); } @@ -230,7 +230,7 @@ int lttng_add_perf_counter_to_ctx(uint32_t type, field->event_field.name = name_alloc; field->event_field.type.atype = atype_integer; field->event_field.type.u.basic.integer.size = sizeof(uint64_t) * CHAR_BIT; - field->event_field.type.u.basic.integer.alignment = ltt_alignof(uint64_t) * CHAR_BIT; + field->event_field.type.u.basic.integer.alignment = lttng_alignof(uint64_t) * CHAR_BIT; field->event_field.type.u.basic.integer.signedness = is_signed_type(uint64_t); field->event_field.type.u.basic.integer.reverse_byte_order = 0; field->event_field.type.u.basic.integer.base = 10; diff --git a/lttng-context-pid.c b/lttng-context-pid.c index 698b2422..f548e3c6 100644 --- a/lttng-context-pid.c +++ b/lttng-context-pid.c @@ -10,17 +10,17 @@ #include #include #include -#include "ltt-events.h" +#include "lttng-events.h" #include "wrapper/ringbuffer/frontend_types.h" #include "wrapper/vmalloc.h" -#include "ltt-tracer.h" +#include "lttng-tracer.h" static size_t pid_get_size(size_t offset) { size_t size = 0; - size += lib_ring_buffer_align(offset, ltt_alignof(pid_t)); + size += lib_ring_buffer_align(offset, lttng_alignof(pid_t)); size += sizeof(pid_t); return size; } @@ -28,12 +28,12 @@ size_t pid_get_size(size_t offset) static void pid_record(struct lttng_ctx_field *field, struct lib_ring_buffer_ctx *ctx, - struct ltt_channel *chan) + struct lttng_channel *chan) { pid_t pid; pid = task_tgid_nr(current); - lib_ring_buffer_align_ctx(ctx, ltt_alignof(pid)); + lib_ring_buffer_align_ctx(ctx, lttng_alignof(pid)); chan->ops->event_write(ctx, &pid, sizeof(pid)); } @@ -51,7 +51,7 @@ int lttng_add_pid_to_ctx(struct lttng_ctx **ctx) field->event_field.name = "pid"; field->event_field.type.atype = atype_integer; field->event_field.type.u.basic.integer.size = sizeof(pid_t) * CHAR_BIT; - field->event_field.type.u.basic.integer.alignment = ltt_alignof(pid_t) * CHAR_BIT; + field->event_field.type.u.basic.integer.alignment = lttng_alignof(pid_t) * CHAR_BIT; field->event_field.type.u.basic.integer.signedness = is_signed_type(pid_t); field->event_field.type.u.basic.integer.reverse_byte_order = 0; field->event_field.type.u.basic.integer.base = 10; diff --git a/lttng-context-ppid.c b/lttng-context-ppid.c index 738f7e68..aaa334bc 100644 --- a/lttng-context-ppid.c +++ b/lttng-context-ppid.c @@ -11,17 +11,17 @@ #include #include #include -#include "ltt-events.h" +#include "lttng-events.h" #include "wrapper/ringbuffer/frontend_types.h" #include "wrapper/vmalloc.h" -#include "ltt-tracer.h" +#include "lttng-tracer.h" static size_t ppid_get_size(size_t offset) { size_t size = 0; - size += lib_ring_buffer_align(offset, ltt_alignof(pid_t)); + size += lib_ring_buffer_align(offset, lttng_alignof(pid_t)); size += sizeof(pid_t); return size; } @@ -29,14 +29,14 @@ size_t ppid_get_size(size_t offset) static void ppid_record(struct lttng_ctx_field *field, struct lib_ring_buffer_ctx *ctx, - struct ltt_channel *chan) + struct lttng_channel *chan) { pid_t ppid; rcu_read_lock(); ppid = task_tgid_nr(current->real_parent); rcu_read_unlock(); - lib_ring_buffer_align_ctx(ctx, ltt_alignof(ppid)); + lib_ring_buffer_align_ctx(ctx, lttng_alignof(ppid)); chan->ops->event_write(ctx, &ppid, sizeof(ppid)); } @@ -54,7 +54,7 @@ int lttng_add_ppid_to_ctx(struct lttng_ctx **ctx) field->event_field.name = "ppid"; field->event_field.type.atype = atype_integer; field->event_field.type.u.basic.integer.size = sizeof(pid_t) * CHAR_BIT; - field->event_field.type.u.basic.integer.alignment = ltt_alignof(pid_t) * CHAR_BIT; + field->event_field.type.u.basic.integer.alignment = lttng_alignof(pid_t) * CHAR_BIT; field->event_field.type.u.basic.integer.signedness = is_signed_type(pid_t); field->event_field.type.u.basic.integer.reverse_byte_order = 0; field->event_field.type.u.basic.integer.base = 10; diff --git a/lttng-context-prio.c b/lttng-context-prio.c index 1ee3a54d..fee0dc14 100644 --- a/lttng-context-prio.c +++ b/lttng-context-prio.c @@ -10,11 +10,11 @@ #include #include #include -#include "ltt-events.h" +#include "lttng-events.h" #include "wrapper/ringbuffer/frontend_types.h" #include "wrapper/vmalloc.h" #include "wrapper/kallsyms.h" -#include "ltt-tracer.h" +#include "lttng-tracer.h" static int (*wrapper_task_prio_sym)(struct task_struct *t); @@ -34,7 +34,7 @@ size_t prio_get_size(size_t offset) { size_t size = 0; - size += lib_ring_buffer_align(offset, ltt_alignof(int)); + size += lib_ring_buffer_align(offset, lttng_alignof(int)); size += sizeof(int); return size; } @@ -42,12 +42,12 @@ size_t prio_get_size(size_t offset) static void prio_record(struct lttng_ctx_field *field, struct lib_ring_buffer_ctx *ctx, - struct ltt_channel *chan) + struct lttng_channel *chan) { int prio; prio = wrapper_task_prio_sym(current); - lib_ring_buffer_align_ctx(ctx, ltt_alignof(prio)); + lib_ring_buffer_align_ctx(ctx, lttng_alignof(prio)); chan->ops->event_write(ctx, &prio, sizeof(prio)); } @@ -72,7 +72,7 @@ int lttng_add_prio_to_ctx(struct lttng_ctx **ctx) field->event_field.name = "prio"; field->event_field.type.atype = atype_integer; field->event_field.type.u.basic.integer.size = sizeof(int) * CHAR_BIT; - field->event_field.type.u.basic.integer.alignment = ltt_alignof(int) * CHAR_BIT; + field->event_field.type.u.basic.integer.alignment = lttng_alignof(int) * CHAR_BIT; field->event_field.type.u.basic.integer.signedness = is_signed_type(int); field->event_field.type.u.basic.integer.reverse_byte_order = 0; field->event_field.type.u.basic.integer.base = 10; diff --git a/lttng-context-procname.c b/lttng-context-procname.c index c6bc6468..e214bff7 100644 --- a/lttng-context-procname.c +++ b/lttng-context-procname.c @@ -10,10 +10,10 @@ #include #include #include -#include "ltt-events.h" +#include "lttng-events.h" #include "wrapper/ringbuffer/frontend_types.h" #include "wrapper/vmalloc.h" -#include "ltt-tracer.h" +#include "lttng-tracer.h" static size_t procname_get_size(size_t offset) @@ -33,7 +33,7 @@ size_t procname_get_size(size_t offset) static void procname_record(struct lttng_ctx_field *field, struct lib_ring_buffer_ctx *ctx, - struct ltt_channel *chan) + struct lttng_channel *chan) { chan->ops->event_write(ctx, current->comm, sizeof(current->comm)); } @@ -53,7 +53,7 @@ int lttng_add_procname_to_ctx(struct lttng_ctx **ctx) field->event_field.type.atype = atype_array; field->event_field.type.u.array.elem_type.atype = atype_integer; field->event_field.type.u.array.elem_type.u.basic.integer.size = sizeof(char) * CHAR_BIT; - field->event_field.type.u.array.elem_type.u.basic.integer.alignment = ltt_alignof(char) * CHAR_BIT; + field->event_field.type.u.array.elem_type.u.basic.integer.alignment = lttng_alignof(char) * CHAR_BIT; field->event_field.type.u.array.elem_type.u.basic.integer.signedness = is_signed_type(char); field->event_field.type.u.array.elem_type.u.basic.integer.reverse_byte_order = 0; field->event_field.type.u.array.elem_type.u.basic.integer.base = 10; diff --git a/lttng-context-tid.c b/lttng-context-tid.c index d5ccdb63..af59d7b8 100644 --- a/lttng-context-tid.c +++ b/lttng-context-tid.c @@ -10,17 +10,17 @@ #include #include #include -#include "ltt-events.h" +#include "lttng-events.h" #include "wrapper/ringbuffer/frontend_types.h" #include "wrapper/vmalloc.h" -#include "ltt-tracer.h" +#include "lttng-tracer.h" static size_t tid_get_size(size_t offset) { size_t size = 0; - size += lib_ring_buffer_align(offset, ltt_alignof(pid_t)); + size += lib_ring_buffer_align(offset, lttng_alignof(pid_t)); size += sizeof(pid_t); return size; } @@ -28,12 +28,12 @@ size_t tid_get_size(size_t offset) static void tid_record(struct lttng_ctx_field *field, struct lib_ring_buffer_ctx *ctx, - struct ltt_channel *chan) + struct lttng_channel *chan) { pid_t tid; tid = task_pid_nr(current); - lib_ring_buffer_align_ctx(ctx, ltt_alignof(tid)); + lib_ring_buffer_align_ctx(ctx, lttng_alignof(tid)); chan->ops->event_write(ctx, &tid, sizeof(tid)); } @@ -51,7 +51,7 @@ int lttng_add_tid_to_ctx(struct lttng_ctx **ctx) field->event_field.name = "tid"; field->event_field.type.atype = atype_integer; field->event_field.type.u.basic.integer.size = sizeof(pid_t) * CHAR_BIT; - field->event_field.type.u.basic.integer.alignment = ltt_alignof(pid_t) * CHAR_BIT; + field->event_field.type.u.basic.integer.alignment = lttng_alignof(pid_t) * CHAR_BIT; field->event_field.type.u.basic.integer.signedness = is_signed_type(pid_t); field->event_field.type.u.basic.integer.reverse_byte_order = 0; field->event_field.type.u.basic.integer.base = 10; diff --git a/lttng-context-vpid.c b/lttng-context-vpid.c index 3f16e03a..4f3c8a6a 100644 --- a/lttng-context-vpid.c +++ b/lttng-context-vpid.c @@ -10,17 +10,17 @@ #include #include #include -#include "ltt-events.h" +#include "lttng-events.h" #include "wrapper/ringbuffer/frontend_types.h" #include "wrapper/vmalloc.h" -#include "ltt-tracer.h" +#include "lttng-tracer.h" static size_t vpid_get_size(size_t offset) { size_t size = 0; - size += lib_ring_buffer_align(offset, ltt_alignof(pid_t)); + size += lib_ring_buffer_align(offset, lttng_alignof(pid_t)); size += sizeof(pid_t); return size; } @@ -28,7 +28,7 @@ size_t vpid_get_size(size_t offset) static void vpid_record(struct lttng_ctx_field *field, struct lib_ring_buffer_ctx *ctx, - struct ltt_channel *chan) + struct lttng_channel *chan) { pid_t vpid; @@ -39,7 +39,7 @@ void vpid_record(struct lttng_ctx_field *field, vpid = 0; else vpid = task_tgid_vnr(current); - lib_ring_buffer_align_ctx(ctx, ltt_alignof(vpid)); + lib_ring_buffer_align_ctx(ctx, lttng_alignof(vpid)); chan->ops->event_write(ctx, &vpid, sizeof(vpid)); } @@ -57,7 +57,7 @@ int lttng_add_vpid_to_ctx(struct lttng_ctx **ctx) field->event_field.name = "vpid"; field->event_field.type.atype = atype_integer; field->event_field.type.u.basic.integer.size = sizeof(pid_t) * CHAR_BIT; - field->event_field.type.u.basic.integer.alignment = ltt_alignof(pid_t) * CHAR_BIT; + field->event_field.type.u.basic.integer.alignment = lttng_alignof(pid_t) * CHAR_BIT; field->event_field.type.u.basic.integer.signedness = is_signed_type(pid_t); field->event_field.type.u.basic.integer.reverse_byte_order = 0; field->event_field.type.u.basic.integer.base = 10; diff --git a/lttng-context-vppid.c b/lttng-context-vppid.c index f01b0206..2fe2ffd1 100644 --- a/lttng-context-vppid.c +++ b/lttng-context-vppid.c @@ -11,17 +11,17 @@ #include #include #include -#include "ltt-events.h" +#include "lttng-events.h" #include "wrapper/ringbuffer/frontend_types.h" #include "wrapper/vmalloc.h" -#include "ltt-tracer.h" +#include "lttng-tracer.h" static size_t vppid_get_size(size_t offset) { size_t size = 0; - size += lib_ring_buffer_align(offset, ltt_alignof(pid_t)); + size += lib_ring_buffer_align(offset, lttng_alignof(pid_t)); size += sizeof(pid_t); return size; } @@ -29,7 +29,7 @@ size_t vppid_get_size(size_t offset) static void vppid_record(struct lttng_ctx_field *field, struct lib_ring_buffer_ctx *ctx, - struct ltt_channel *chan) + struct lttng_channel *chan) { struct task_struct *parent; pid_t vppid; @@ -44,7 +44,7 @@ void vppid_record(struct lttng_ctx_field *field, else vppid = task_tgid_vnr(parent); rcu_read_unlock(); - lib_ring_buffer_align_ctx(ctx, ltt_alignof(vppid)); + lib_ring_buffer_align_ctx(ctx, lttng_alignof(vppid)); chan->ops->event_write(ctx, &vppid, sizeof(vppid)); } @@ -62,7 +62,7 @@ int lttng_add_vppid_to_ctx(struct lttng_ctx **ctx) field->event_field.name = "vppid"; field->event_field.type.atype = atype_integer; field->event_field.type.u.basic.integer.size = sizeof(pid_t) * CHAR_BIT; - field->event_field.type.u.basic.integer.alignment = ltt_alignof(pid_t) * CHAR_BIT; + field->event_field.type.u.basic.integer.alignment = lttng_alignof(pid_t) * CHAR_BIT; field->event_field.type.u.basic.integer.signedness = is_signed_type(pid_t); field->event_field.type.u.basic.integer.reverse_byte_order = 0; field->event_field.type.u.basic.integer.base = 10; diff --git a/lttng-context-vtid.c b/lttng-context-vtid.c index 264bbb30..3dd34ae3 100644 --- a/lttng-context-vtid.c +++ b/lttng-context-vtid.c @@ -10,17 +10,17 @@ #include #include #include -#include "ltt-events.h" +#include "lttng-events.h" #include "wrapper/ringbuffer/frontend_types.h" #include "wrapper/vmalloc.h" -#include "ltt-tracer.h" +#include "lttng-tracer.h" static size_t vtid_get_size(size_t offset) { size_t size = 0; - size += lib_ring_buffer_align(offset, ltt_alignof(pid_t)); + size += lib_ring_buffer_align(offset, lttng_alignof(pid_t)); size += sizeof(pid_t); return size; } @@ -28,7 +28,7 @@ size_t vtid_get_size(size_t offset) static void vtid_record(struct lttng_ctx_field *field, struct lib_ring_buffer_ctx *ctx, - struct ltt_channel *chan) + struct lttng_channel *chan) { pid_t vtid; @@ -39,7 +39,7 @@ void vtid_record(struct lttng_ctx_field *field, vtid = 0; else vtid = task_pid_vnr(current); - lib_ring_buffer_align_ctx(ctx, ltt_alignof(vtid)); + lib_ring_buffer_align_ctx(ctx, lttng_alignof(vtid)); chan->ops->event_write(ctx, &vtid, sizeof(vtid)); } @@ -57,7 +57,7 @@ int lttng_add_vtid_to_ctx(struct lttng_ctx **ctx) field->event_field.name = "vtid"; field->event_field.type.atype = atype_integer; field->event_field.type.u.basic.integer.size = sizeof(pid_t) * CHAR_BIT; - field->event_field.type.u.basic.integer.alignment = ltt_alignof(pid_t) * CHAR_BIT; + field->event_field.type.u.basic.integer.alignment = lttng_alignof(pid_t) * CHAR_BIT; field->event_field.type.u.basic.integer.signedness = is_signed_type(pid_t); field->event_field.type.u.basic.integer.reverse_byte_order = 0; field->event_field.type.u.basic.integer.base = 10; diff --git a/ltt-context.c b/lttng-context.c similarity index 96% rename from ltt-context.c rename to lttng-context.c index 60ea525b..a28a9d23 100644 --- a/ltt-context.c +++ b/lttng-context.c @@ -1,5 +1,5 @@ /* - * ltt-context.c + * lttng-context.c * * Copyright 2011 (c) - Mathieu Desnoyers * @@ -13,8 +13,8 @@ #include #include #include "wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */ -#include "ltt-events.h" -#include "ltt-tracer.h" +#include "lttng-events.h" +#include "lttng-tracer.h" int lttng_find_context(struct lttng_ctx *ctx, const char *name) { diff --git a/ltt-endian.h b/lttng-endian.h similarity index 70% rename from ltt-endian.h rename to lttng-endian.h index 9a0512d2..e86dab7f 100644 --- a/ltt-endian.h +++ b/lttng-endian.h @@ -1,10 +1,10 @@ -#ifndef _LTT_ENDIAN_H -#define _LTT_ENDIAN_H +#ifndef _LTTNG_ENDIAN_H +#define _LTTNG_ENDIAN_H /* - * ltt-endian.h + * lttng-endian.h * - * Copyright 2010 (c) - Mathieu Desnoyers + * Copyright 2010-2011 (c) - Mathieu Desnoyers * * Dual LGPL v2.1/GPL v2 license. */ @@ -28,4 +28,4 @@ # include #endif -#endif /* _LTT_ENDIAN_H */ +#endif /* _LTTNG_ENDIAN_H */ diff --git a/ltt-events.c b/lttng-events.c similarity index 81% rename from ltt-events.c rename to lttng-events.c index 03dbb203..0ef87a8c 100644 --- a/ltt-events.c +++ b/lttng-events.c @@ -1,7 +1,7 @@ /* - * ltt-events.c + * lttng-events.c * - * Copyright 2010 (c) - Mathieu Desnoyers + * Copyright 2010-2011 (c) - Mathieu Desnoyers * * Holds LTTng per-session event registry. * @@ -16,23 +16,23 @@ #include #include "wrapper/uuid.h" #include "wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */ -#include "ltt-events.h" -#include "ltt-tracer.h" +#include "lttng-events.h" +#include "lttng-tracer.h" static LIST_HEAD(sessions); -static LIST_HEAD(ltt_transport_list); +static LIST_HEAD(lttng_transport_list); static DEFINE_MUTEX(sessions_mutex); static struct kmem_cache *event_cache; -static void _ltt_event_destroy(struct ltt_event *event); -static void _ltt_channel_destroy(struct ltt_channel *chan); -static int _ltt_event_unregister(struct ltt_event *event); +static void _lttng_event_destroy(struct lttng_event *event); +static void _lttng_channel_destroy(struct lttng_channel *chan); +static int _lttng_event_unregister(struct lttng_event *event); static -int _ltt_event_metadata_statedump(struct ltt_session *session, - struct ltt_channel *chan, - struct ltt_event *event); +int _lttng_event_metadata_statedump(struct lttng_session *session, + struct lttng_channel *chan, + struct lttng_event *event); static -int _ltt_session_metadata_statedump(struct ltt_session *session); +int _lttng_session_metadata_statedump(struct lttng_session *session); void synchronize_trace(void) { @@ -42,12 +42,12 @@ void synchronize_trace(void) #endif } -struct ltt_session *ltt_session_create(void) +struct lttng_session *lttng_session_create(void) { - struct ltt_session *session; + struct lttng_session *session; mutex_lock(&sessions_mutex); - session = kzalloc(sizeof(struct ltt_session), GFP_KERNEL); + session = kzalloc(sizeof(struct lttng_session), GFP_KERNEL); if (!session) return NULL; INIT_LIST_HEAD(&session->chan); @@ -58,10 +58,10 @@ struct ltt_session *ltt_session_create(void) return session; } -void ltt_session_destroy(struct ltt_session *session) +void lttng_session_destroy(struct lttng_session *session) { - struct ltt_channel *chan, *tmpchan; - struct ltt_event *event, *tmpevent; + struct lttng_channel *chan, *tmpchan; + struct lttng_event *event, *tmpevent; int ret; mutex_lock(&sessions_mutex); @@ -71,23 +71,23 @@ void ltt_session_destroy(struct ltt_session *session) WARN_ON(ret); } list_for_each_entry(event, &session->events, list) { - ret = _ltt_event_unregister(event); + ret = _lttng_event_unregister(event); WARN_ON(ret); } synchronize_trace(); /* Wait for in-flight events to complete */ list_for_each_entry_safe(event, tmpevent, &session->events, list) - _ltt_event_destroy(event); + _lttng_event_destroy(event); list_for_each_entry_safe(chan, tmpchan, &session->chan, list) - _ltt_channel_destroy(chan); + _lttng_channel_destroy(chan); list_del(&session->list); mutex_unlock(&sessions_mutex); kfree(session); } -int ltt_session_enable(struct ltt_session *session) +int lttng_session_enable(struct lttng_session *session) { int ret = 0; - struct ltt_channel *chan; + struct lttng_channel *chan; mutex_lock(&sessions_mutex); if (session->active) { @@ -110,7 +110,7 @@ int ltt_session_enable(struct ltt_session *session) ACCESS_ONCE(session->active) = 1; ACCESS_ONCE(session->been_active) = 1; - ret = _ltt_session_metadata_statedump(session); + ret = _lttng_session_metadata_statedump(session); if (ret) ACCESS_ONCE(session->active) = 0; end: @@ -118,7 +118,7 @@ end: return ret; } -int ltt_session_disable(struct ltt_session *session) +int lttng_session_disable(struct lttng_session *session) { int ret = 0; @@ -133,7 +133,7 @@ end: return ret; } -int ltt_channel_enable(struct ltt_channel *channel) +int lttng_channel_enable(struct lttng_channel *channel) { int old; @@ -145,7 +145,7 @@ int ltt_channel_enable(struct ltt_channel *channel) return 0; } -int ltt_channel_disable(struct ltt_channel *channel) +int lttng_channel_disable(struct lttng_channel *channel) { int old; @@ -157,7 +157,7 @@ int ltt_channel_disable(struct ltt_channel *channel) return 0; } -int ltt_event_enable(struct ltt_event *event) +int lttng_event_enable(struct lttng_event *event) { int old; @@ -169,7 +169,7 @@ int ltt_event_enable(struct ltt_event *event) return 0; } -int ltt_event_disable(struct ltt_event *event) +int lttng_event_disable(struct lttng_event *event) { int old; @@ -181,31 +181,31 @@ int ltt_event_disable(struct ltt_event *event) return 0; } -static struct ltt_transport *ltt_transport_find(const char *name) +static struct lttng_transport *lttng_transport_find(const char *name) { - struct ltt_transport *transport; + struct lttng_transport *transport; - list_for_each_entry(transport, <t_transport_list, node) { + list_for_each_entry(transport, <tng_transport_list, node) { if (!strcmp(transport->name, name)) return transport; } return NULL; } -struct ltt_channel *ltt_channel_create(struct ltt_session *session, +struct lttng_channel *lttng_channel_create(struct lttng_session *session, const char *transport_name, void *buf_addr, size_t subbuf_size, size_t num_subbuf, unsigned int switch_timer_interval, unsigned int read_timer_interval) { - struct ltt_channel *chan; - struct ltt_transport *transport = NULL; + struct lttng_channel *chan; + struct lttng_transport *transport = NULL; mutex_lock(&sessions_mutex); if (session->been_active) goto active; /* Refuse to add channel to active session */ - transport = ltt_transport_find(transport_name); + transport = lttng_transport_find(transport_name); if (!transport) { printk(KERN_WARNING "LTTng transport %s not found\n", transport_name); @@ -215,7 +215,7 @@ struct ltt_channel *ltt_channel_create(struct ltt_session *session, printk(KERN_WARNING "LTT : Can't lock transport module.\n"); goto notransport; } - chan = kzalloc(sizeof(struct ltt_channel), GFP_KERNEL); + chan = kzalloc(sizeof(struct lttng_channel), GFP_KERNEL); if (!chan) goto nomem; chan->session = session; @@ -252,7 +252,7 @@ active: * Only used internally at session destruction. */ static -void _ltt_channel_destroy(struct ltt_channel *chan) +void _lttng_channel_destroy(struct lttng_channel *chan) { chan->ops->channel_destroy(chan->chan); module_put(chan->transport->owner); @@ -264,12 +264,12 @@ void _ltt_channel_destroy(struct ltt_channel *chan) /* * Supports event creation while tracing session is active. */ -struct ltt_event *ltt_event_create(struct ltt_channel *chan, +struct lttng_event *lttng_event_create(struct lttng_channel *chan, struct lttng_kernel_event *event_param, void *filter, const struct lttng_event_desc *internal_desc) { - struct ltt_event *event; + struct lttng_event *event; int ret; mutex_lock(&sessions_mutex); @@ -290,11 +290,11 @@ struct ltt_event *ltt_event_create(struct ltt_channel *chan, event->id = chan->free_event_id++; event->enabled = 1; event->instrumentation = event_param->instrumentation; - /* Populate ltt_event structure before tracepoint registration. */ + /* Populate lttng_event structure before tracepoint registration. */ smp_wmb(); switch (event_param->instrumentation) { case LTTNG_KERNEL_TRACEPOINT: - event->desc = ltt_event_get(event_param->name); + event->desc = lttng_event_get(event_param->name); if (!event->desc) goto register_error; ret = tracepoint_probe_register(event_param->name, @@ -316,7 +316,7 @@ struct ltt_event *ltt_event_create(struct ltt_channel *chan, break; case LTTNG_KERNEL_KRETPROBE: { - struct ltt_event *event_return; + struct lttng_event *event_return; /* kretprobe defines 2 events */ event_return = @@ -329,7 +329,7 @@ struct ltt_event *ltt_event_create(struct ltt_channel *chan, event_return->enabled = 1; event_return->instrumentation = event_param->instrumentation; /* - * Populate ltt_event structure before kretprobe registration. + * Populate lttng_event structure before kretprobe registration. */ smp_wmb(); ret = lttng_kretprobes_register(event_param->name, @@ -346,7 +346,7 @@ struct ltt_event *ltt_event_create(struct ltt_channel *chan, WARN_ON_ONCE(!ret); ret = try_module_get(event->desc->owner); WARN_ON_ONCE(!ret); - ret = _ltt_event_metadata_statedump(chan->session, chan, + ret = _lttng_event_metadata_statedump(chan->session, chan, event_return); if (ret) { kmem_cache_free(event_cache, event_return); @@ -374,7 +374,7 @@ struct ltt_event *ltt_event_create(struct ltt_channel *chan, default: WARN_ON_ONCE(1); } - ret = _ltt_event_metadata_statedump(chan->session, chan, event); + ret = _lttng_event_metadata_statedump(chan->session, chan, event); if (ret) goto statedump_error; list_add(&event->list, &chan->session->events); @@ -395,7 +395,7 @@ full: /* * Only used internally at session destruction. */ -int _ltt_event_unregister(struct ltt_event *event) +int _lttng_event_unregister(struct lttng_event *event) { int ret = -EINVAL; @@ -432,11 +432,11 @@ int _ltt_event_unregister(struct ltt_event *event) * Only used internally at session destruction. */ static -void _ltt_event_destroy(struct ltt_event *event) +void _lttng_event_destroy(struct lttng_event *event) { switch (event->instrumentation) { case LTTNG_KERNEL_TRACEPOINT: - ltt_event_put(event->desc); + lttng_event_put(event->desc); break; case LTTNG_KERNEL_KPROBE: module_put(event->desc->owner); @@ -466,11 +466,11 @@ void _ltt_event_destroy(struct ltt_event *event) * remaining space left in packet and write, since mutual exclusion * protects us from concurrent writes. */ -int lttng_metadata_printf(struct ltt_session *session, +int lttng_metadata_printf(struct lttng_session *session, const char *fmt, ...) { struct lib_ring_buffer_ctx ctx; - struct ltt_channel *chan = session->metadata; + struct lttng_channel *chan = session->metadata; char *str; int ret = 0, waitret; size_t len, reserve_len, pos; @@ -522,7 +522,7 @@ end: } static -int _ltt_field_statedump(struct ltt_session *session, +int _lttng_field_statedump(struct lttng_session *session, const struct lttng_event_field *field) { int ret = 0; @@ -641,7 +641,7 @@ int _ltt_field_statedump(struct ltt_session *session, } static -int _ltt_context_metadata_statedump(struct ltt_session *session, +int _lttng_context_metadata_statedump(struct lttng_session *session, struct lttng_ctx *ctx) { int ret = 0; @@ -652,7 +652,7 @@ int _ltt_context_metadata_statedump(struct ltt_session *session, for (i = 0; i < ctx->nr_fields; i++) { const struct lttng_ctx_field *field = &ctx->fields[i]; - ret = _ltt_field_statedump(session, &field->event_field); + ret = _lttng_field_statedump(session, &field->event_field); if (ret) return ret; } @@ -660,8 +660,8 @@ int _ltt_context_metadata_statedump(struct ltt_session *session, } static -int _ltt_fields_metadata_statedump(struct ltt_session *session, - struct ltt_event *event) +int _lttng_fields_metadata_statedump(struct lttng_session *session, + struct lttng_event *event) { const struct lttng_event_desc *desc = event->desc; int ret = 0; @@ -670,7 +670,7 @@ int _ltt_fields_metadata_statedump(struct ltt_session *session, for (i = 0; i < desc->nr_fields; i++) { const struct lttng_event_field *field = &desc->fields[i]; - ret = _ltt_field_statedump(session, field); + ret = _lttng_field_statedump(session, field); if (ret) return ret; } @@ -678,9 +678,9 @@ int _ltt_fields_metadata_statedump(struct ltt_session *session, } static -int _ltt_event_metadata_statedump(struct ltt_session *session, - struct ltt_channel *chan, - struct ltt_event *event) +int _lttng_event_metadata_statedump(struct lttng_session *session, + struct lttng_channel *chan, + struct lttng_event *event) { int ret = 0; @@ -706,7 +706,7 @@ int _ltt_event_metadata_statedump(struct ltt_session *session, if (ret) goto end; } - ret = _ltt_context_metadata_statedump(session, event->ctx); + ret = _lttng_context_metadata_statedump(session, event->ctx); if (ret) goto end; if (event->ctx) { @@ -722,7 +722,7 @@ int _ltt_event_metadata_statedump(struct ltt_session *session, if (ret) goto end; - ret = _ltt_fields_metadata_statedump(session, event); + ret = _lttng_fields_metadata_statedump(session, event); if (ret) goto end; @@ -743,8 +743,8 @@ end: } static -int _ltt_channel_metadata_statedump(struct ltt_session *session, - struct ltt_channel *chan) +int _lttng_channel_metadata_statedump(struct lttng_session *session, + struct lttng_channel *chan) { int ret = 0; @@ -771,7 +771,7 @@ int _ltt_channel_metadata_statedump(struct ltt_session *session, if (ret) goto end; } - ret = _ltt_context_metadata_statedump(session, chan->ctx); + ret = _lttng_context_metadata_statedump(session, chan->ctx); if (ret) goto end; if (chan->ctx) { @@ -790,7 +790,7 @@ end: } static -int _ltt_stream_packet_context_declare(struct ltt_session *session) +int _lttng_stream_packet_context_declare(struct lttng_session *session) { return lttng_metadata_printf(session, "struct packet_context {\n" @@ -814,7 +814,7 @@ int _ltt_stream_packet_context_declare(struct ltt_session *session) * id 65535 is reserved to indicate an extended header. */ static -int _ltt_event_header_declare(struct ltt_session *session) +int _lttng_event_header_declare(struct lttng_session *session) { return lttng_metadata_printf(session, "struct event_header_compact {\n" @@ -842,8 +842,8 @@ int _ltt_event_header_declare(struct ltt_session *session) " } extended;\n" " } v;\n" "} align(%u);\n\n", - ltt_alignof(uint32_t) * CHAR_BIT, - ltt_alignof(uint16_t) * CHAR_BIT + lttng_alignof(uint32_t) * CHAR_BIT, + lttng_alignof(uint16_t) * CHAR_BIT ); } @@ -851,12 +851,12 @@ int _ltt_event_header_declare(struct ltt_session *session) * Output metadata into this session's metadata buffers. */ static -int _ltt_session_metadata_statedump(struct ltt_session *session) +int _lttng_session_metadata_statedump(struct lttng_session *session) { unsigned char *uuid_c = session->uuid.b; unsigned char uuid_s[37]; - struct ltt_channel *chan; - struct ltt_event *event; + struct lttng_channel *chan; + struct lttng_event *event; int ret = 0; if (!ACCESS_ONCE(session->active)) @@ -894,10 +894,10 @@ int _ltt_session_metadata_statedump(struct ltt_session *session) " uint32_t stream_id;\n" " };\n" "};\n\n", - ltt_alignof(uint8_t) * CHAR_BIT, - ltt_alignof(uint16_t) * CHAR_BIT, - ltt_alignof(uint32_t) * CHAR_BIT, - ltt_alignof(uint64_t) * CHAR_BIT, + lttng_alignof(uint8_t) * CHAR_BIT, + lttng_alignof(uint16_t) * CHAR_BIT, + lttng_alignof(uint32_t) * CHAR_BIT, + lttng_alignof(uint64_t) * CHAR_BIT, CTF_VERSION_MAJOR, CTF_VERSION_MINOR, uuid_s, @@ -910,23 +910,23 @@ int _ltt_session_metadata_statedump(struct ltt_session *session) if (ret) goto end; - ret = _ltt_stream_packet_context_declare(session); + ret = _lttng_stream_packet_context_declare(session); if (ret) goto end; - ret = _ltt_event_header_declare(session); + ret = _lttng_event_header_declare(session); if (ret) goto end; skip_session: list_for_each_entry(chan, &session->chan, list) { - ret = _ltt_channel_metadata_statedump(session, chan); + ret = _lttng_channel_metadata_statedump(session, chan); if (ret) goto end; } list_for_each_entry(event, &session->events, list) { - ret = _ltt_event_metadata_statedump(session, event->chan, event); + ret = _lttng_event_metadata_statedump(session, event->chan, event); if (ret) goto end; } @@ -936,7 +936,7 @@ end: } /** - * ltt_transport_register - LTT transport registration + * lttng_transport_register - LTT transport registration * @transport: transport structure * * Registers a transport which can be used as output to extract the data out of @@ -947,7 +947,7 @@ end: * vmalloc_sync_all. Therefore, only if the module allocates virtual memory * after its registration must it synchronize the TLBs. */ -void ltt_transport_register(struct ltt_transport *transport) +void lttng_transport_register(struct lttng_transport *transport) { /* * Make sure no page fault can be triggered by the module about to be @@ -957,28 +957,28 @@ void ltt_transport_register(struct ltt_transport *transport) wrapper_vmalloc_sync_all(); mutex_lock(&sessions_mutex); - list_add_tail(&transport->node, <t_transport_list); + list_add_tail(&transport->node, <tng_transport_list); mutex_unlock(&sessions_mutex); } -EXPORT_SYMBOL_GPL(ltt_transport_register); +EXPORT_SYMBOL_GPL(lttng_transport_register); /** - * ltt_transport_unregister - LTT transport unregistration + * lttng_transport_unregister - LTT transport unregistration * @transport: transport structure */ -void ltt_transport_unregister(struct ltt_transport *transport) +void lttng_transport_unregister(struct lttng_transport *transport) { mutex_lock(&sessions_mutex); list_del(&transport->node); mutex_unlock(&sessions_mutex); } -EXPORT_SYMBOL_GPL(ltt_transport_unregister); +EXPORT_SYMBOL_GPL(lttng_transport_unregister); -static int __init ltt_events_init(void) +static int __init lttng_events_init(void) { int ret; - event_cache = KMEM_CACHE(ltt_event, 0); + event_cache = KMEM_CACHE(lttng_event, 0); if (!event_cache) return -ENOMEM; ret = lttng_abi_init(); @@ -990,19 +990,19 @@ error_abi: return ret; } -module_init(ltt_events_init); +module_init(lttng_events_init); -static void __exit ltt_events_exit(void) +static void __exit lttng_events_exit(void) { - struct ltt_session *session, *tmpsession; + struct lttng_session *session, *tmpsession; lttng_abi_exit(); list_for_each_entry_safe(session, tmpsession, &sessions, list) - ltt_session_destroy(session); + lttng_session_destroy(session); kmem_cache_destroy(event_cache); } -module_exit(ltt_events_exit); +module_exit(lttng_events_exit); MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Mathieu Desnoyers "); diff --git a/ltt-events.h b/lttng-events.h similarity index 72% rename from ltt-events.h rename to lttng-events.h index 3aed0e21..9c652c88 100644 --- a/ltt-events.h +++ b/lttng-events.h @@ -1,10 +1,10 @@ -#ifndef _LTT_EVENTS_H -#define _LTT_EVENTS_H +#ifndef _LTTNG_EVENTS_H +#define _LTTNG_EVENTS_H /* - * ltt-events.h + * lttng-events.h * - * Copyright 2010 (c) - Mathieu Desnoyers + * Copyright 2010-2011 (c) - Mathieu Desnoyers * * Holds LTTng per-session event registry. * @@ -19,8 +19,8 @@ #undef is_signed_type #define is_signed_type(type) (((type)(-1)) < 0) -struct ltt_channel; -struct ltt_session; +struct lttng_channel; +struct lttng_session; struct lib_ring_buffer_ctx; struct perf_event; struct perf_event_attr; @@ -56,7 +56,7 @@ struct lttng_enum_entry { .u.basic.integer = \ { \ .size = sizeof(_type) * CHAR_BIT, \ - .alignment = ltt_alignof(_type) * CHAR_BIT, \ + .alignment = lttng_alignof(_type) * CHAR_BIT, \ .signedness = is_signed_type(_type), \ .reverse_byte_order = _byte_order != __BYTE_ORDER, \ .base = _base, \ @@ -135,7 +135,7 @@ struct lttng_ctx_field { size_t (*get_size)(size_t offset); void (*record)(struct lttng_ctx_field *field, struct lib_ring_buffer_ctx *ctx, - struct ltt_channel *chan); + struct lttng_channel *chan); union { struct lttng_perf_counter_field *perf_counter; } u; @@ -166,12 +166,12 @@ struct lttng_probe_desc { struct lttng_krp; /* Kretprobe handling */ /* - * ltt_event structure is referred to by the tracing fast path. It must be + * lttng_event structure is referred to by the tracing fast path. It must be * kept small. */ -struct ltt_event { +struct lttng_event { unsigned int id; - struct ltt_channel *chan; + struct lttng_channel *chan; int enabled; const struct lttng_event_desc *desc; void *filter; @@ -194,9 +194,9 @@ struct ltt_event { unsigned int metadata_dumped:1; }; -struct ltt_channel_ops { +struct lttng_channel_ops { struct channel *(*channel_create)(const char *name, - struct ltt_channel *ltt_chan, + struct lttng_channel *lttng_chan, void *buf_addr, size_t subbuf_size, size_t num_subbuf, unsigned int switch_timer_interval, @@ -226,39 +226,39 @@ struct ltt_channel_ops { int (*is_disabled)(struct channel *chan); }; -struct ltt_transport { +struct lttng_transport { char *name; struct module *owner; struct list_head node; - struct ltt_channel_ops ops; + struct lttng_channel_ops ops; }; -struct ltt_channel { +struct lttng_channel { unsigned int id; struct channel *chan; /* Channel buffers */ int enabled; struct lttng_ctx *ctx; /* Event ID management */ - struct ltt_session *session; + struct lttng_session *session; struct file *file; /* File associated to channel */ unsigned int free_event_id; /* Next event ID to allocate */ struct list_head list; /* Channel list */ - struct ltt_channel_ops *ops; - struct ltt_transport *transport; - struct ltt_event **sc_table; /* for syscall tracing */ - struct ltt_event **compat_sc_table; - struct ltt_event *sc_unknown; /* for unknown syscalls */ - struct ltt_event *sc_compat_unknown; - struct ltt_event *sc_exit; /* for syscall exit */ + struct lttng_channel_ops *ops; + struct lttng_transport *transport; + struct lttng_event **sc_table; /* for syscall tracing */ + struct lttng_event **compat_sc_table; + struct lttng_event *sc_unknown; /* for unknown syscalls */ + struct lttng_event *sc_compat_unknown; + struct lttng_event *sc_exit; /* for syscall exit */ int header_type; /* 0: unset, 1: compact, 2: large */ unsigned int metadata_dumped:1; }; -struct ltt_session { +struct lttng_session { int active; /* Is trace session active ? */ int been_active; /* Has trace session been active ? */ struct file *file; /* File associated to session */ - struct ltt_channel *metadata; /* Metadata channel */ + struct lttng_channel *metadata; /* Metadata channel */ struct list_head chan; /* Channel list head */ struct list_head events; /* Event list head */ struct list_head list; /* Session list */ @@ -267,57 +267,57 @@ struct ltt_session { unsigned int metadata_dumped:1; }; -struct ltt_session *ltt_session_create(void); -int ltt_session_enable(struct ltt_session *session); -int ltt_session_disable(struct ltt_session *session); -void ltt_session_destroy(struct ltt_session *session); +struct lttng_session *lttng_session_create(void); +int lttng_session_enable(struct lttng_session *session); +int lttng_session_disable(struct lttng_session *session); +void lttng_session_destroy(struct lttng_session *session); -struct ltt_channel *ltt_channel_create(struct ltt_session *session, +struct lttng_channel *lttng_channel_create(struct lttng_session *session, const char *transport_name, void *buf_addr, size_t subbuf_size, size_t num_subbuf, unsigned int switch_timer_interval, unsigned int read_timer_interval); -struct ltt_channel *ltt_global_channel_create(struct ltt_session *session, +struct lttng_channel *lttng_global_channel_create(struct lttng_session *session, int overwrite, void *buf_addr, size_t subbuf_size, size_t num_subbuf, unsigned int switch_timer_interval, unsigned int read_timer_interval); -struct ltt_event *ltt_event_create(struct ltt_channel *chan, +struct lttng_event *lttng_event_create(struct lttng_channel *chan, struct lttng_kernel_event *event_param, void *filter, const struct lttng_event_desc *internal_desc); -int ltt_channel_enable(struct ltt_channel *channel); -int ltt_channel_disable(struct ltt_channel *channel); -int ltt_event_enable(struct ltt_event *event); -int ltt_event_disable(struct ltt_event *event); +int lttng_channel_enable(struct lttng_channel *channel); +int lttng_channel_disable(struct lttng_channel *channel); +int lttng_event_enable(struct lttng_event *event); +int lttng_event_disable(struct lttng_event *event); -void ltt_transport_register(struct ltt_transport *transport); -void ltt_transport_unregister(struct ltt_transport *transport); +void lttng_transport_register(struct lttng_transport *transport); +void lttng_transport_unregister(struct lttng_transport *transport); void synchronize_trace(void); int lttng_abi_init(void); void lttng_abi_exit(void); -int ltt_probe_register(struct lttng_probe_desc *desc); -void ltt_probe_unregister(struct lttng_probe_desc *desc); -const struct lttng_event_desc *ltt_event_get(const char *name); -void ltt_event_put(const struct lttng_event_desc *desc); -int ltt_probes_init(void); -void ltt_probes_exit(void); +int lttng_probe_register(struct lttng_probe_desc *desc); +void lttng_probe_unregister(struct lttng_probe_desc *desc); +const struct lttng_event_desc *lttng_event_get(const char *name); +void lttng_event_put(const struct lttng_event_desc *desc); +int lttng_probes_init(void); +void lttng_probes_exit(void); #ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS -int lttng_syscalls_register(struct ltt_channel *chan, void *filter); -int lttng_syscalls_unregister(struct ltt_channel *chan); +int lttng_syscalls_register(struct lttng_channel *chan, void *filter); +int lttng_syscalls_unregister(struct lttng_channel *chan); #else -static inline int lttng_syscalls_register(struct ltt_channel *chan, void *filter) +static inline int lttng_syscalls_register(struct lttng_channel *chan, void *filter) { return -ENOSYS; } -static inline int lttng_syscalls_unregister(struct ltt_channel *chan) +static inline int lttng_syscalls_unregister(struct lttng_channel *chan) { return 0; } @@ -358,27 +358,27 @@ int lttng_kprobes_register(const char *name, const char *symbol_name, uint64_t offset, uint64_t addr, - struct ltt_event *event); -void lttng_kprobes_unregister(struct ltt_event *event); -void lttng_kprobes_destroy_private(struct ltt_event *event); + struct lttng_event *event); +void lttng_kprobes_unregister(struct lttng_event *event); +void lttng_kprobes_destroy_private(struct lttng_event *event); #else static inline int lttng_kprobes_register(const char *name, const char *symbol_name, uint64_t offset, uint64_t addr, - struct ltt_event *event) + struct lttng_event *event) { return -ENOSYS; } static inline -void lttng_kprobes_unregister(struct ltt_event *event) +void lttng_kprobes_unregister(struct lttng_event *event) { } static inline -void lttng_kprobes_destroy_private(struct ltt_event *event) +void lttng_kprobes_destroy_private(struct lttng_event *event) { } #endif @@ -388,29 +388,29 @@ int lttng_kretprobes_register(const char *name, const char *symbol_name, uint64_t offset, uint64_t addr, - struct ltt_event *event_entry, - struct ltt_event *event_exit); -void lttng_kretprobes_unregister(struct ltt_event *event); -void lttng_kretprobes_destroy_private(struct ltt_event *event); + struct lttng_event *event_entry, + struct lttng_event *event_exit); +void lttng_kretprobes_unregister(struct lttng_event *event); +void lttng_kretprobes_destroy_private(struct lttng_event *event); #else static inline int lttng_kretprobes_register(const char *name, const char *symbol_name, uint64_t offset, uint64_t addr, - struct ltt_event *event_entry, - struct ltt_event *event_exit) + struct lttng_event *event_entry, + struct lttng_event *event_exit) { return -ENOSYS; } static inline -void lttng_kretprobes_unregister(struct ltt_event *event) +void lttng_kretprobes_unregister(struct lttng_event *event) { } static inline -void lttng_kretprobes_destroy_private(struct ltt_event *event) +void lttng_kretprobes_destroy_private(struct lttng_event *event) { } #endif @@ -418,25 +418,25 @@ void lttng_kretprobes_destroy_private(struct ltt_event *event) #ifdef CONFIG_DYNAMIC_FTRACE int lttng_ftrace_register(const char *name, const char *symbol_name, - struct ltt_event *event); -void lttng_ftrace_unregister(struct ltt_event *event); -void lttng_ftrace_destroy_private(struct ltt_event *event); + struct lttng_event *event); +void lttng_ftrace_unregister(struct lttng_event *event); +void lttng_ftrace_destroy_private(struct lttng_event *event); #else static inline int lttng_ftrace_register(const char *name, const char *symbol_name, - struct ltt_event *event) + struct lttng_event *event) { return -ENOSYS; } static inline -void lttng_ftrace_unregister(struct ltt_event *event) +void lttng_ftrace_unregister(struct lttng_event *event) { } static inline -void lttng_ftrace_destroy_private(struct ltt_event *event) +void lttng_ftrace_destroy_private(struct lttng_event *event) { } #endif @@ -449,4 +449,4 @@ extern const struct file_operations lttng_tracepoint_list_fops; #define TRACEPOINT_HAS_DATA_ARG #endif -#endif /* _LTT_EVENTS_H */ +#endif /* _LTTNG_EVENTS_H */ diff --git a/ltt-probes.c b/lttng-probes.c similarity index 85% rename from ltt-probes.c rename to lttng-probes.c index 81dcbd71..97dcc359 100644 --- a/ltt-probes.c +++ b/lttng-probes.c @@ -1,7 +1,7 @@ /* - * ltt-probes.c + * lttng-probes.c * - * Copyright 2010 (c) - Mathieu Desnoyers + * Copyright 2010-2011 (c) - Mathieu Desnoyers * * Holds LTTng probes registry. * @@ -13,7 +13,7 @@ #include #include -#include "ltt-events.h" +#include "lttng-events.h" static LIST_HEAD(probe_list); static DEFINE_MUTEX(probe_mutex); @@ -33,7 +33,7 @@ const struct lttng_event_desc *find_event(const char *name) return NULL; } -int ltt_probe_register(struct lttng_probe_desc *desc) +int lttng_probe_register(struct lttng_probe_desc *desc) { int ret = 0; int i; @@ -54,17 +54,17 @@ end: mutex_unlock(&probe_mutex); return ret; } -EXPORT_SYMBOL_GPL(ltt_probe_register); +EXPORT_SYMBOL_GPL(lttng_probe_register); -void ltt_probe_unregister(struct lttng_probe_desc *desc) +void lttng_probe_unregister(struct lttng_probe_desc *desc) { mutex_lock(&probe_mutex); list_del(&desc->head); mutex_unlock(&probe_mutex); } -EXPORT_SYMBOL_GPL(ltt_probe_unregister); +EXPORT_SYMBOL_GPL(lttng_probe_unregister); -const struct lttng_event_desc *ltt_event_get(const char *name) +const struct lttng_event_desc *lttng_event_get(const char *name) { const struct lttng_event_desc *event; int ret; @@ -78,13 +78,13 @@ const struct lttng_event_desc *ltt_event_get(const char *name) WARN_ON_ONCE(!ret); return event; } -EXPORT_SYMBOL_GPL(ltt_event_get); +EXPORT_SYMBOL_GPL(lttng_event_get); -void ltt_event_put(const struct lttng_event_desc *event) +void lttng_event_put(const struct lttng_event_desc *event) { module_put(event->owner); } -EXPORT_SYMBOL_GPL(ltt_event_put); +EXPORT_SYMBOL_GPL(lttng_event_put); static void *tp_list_start(struct seq_file *m, loff_t *pos) diff --git a/ltt-ring-buffer-client-discard.c b/lttng-ring-buffer-client-discard.c similarity index 83% rename from ltt-ring-buffer-client-discard.c rename to lttng-ring-buffer-client-discard.c index eafcf45a..f3aeec31 100644 --- a/ltt-ring-buffer-client-discard.c +++ b/lttng-ring-buffer-client-discard.c @@ -1,5 +1,5 @@ /* - * ltt-ring-buffer-client-discard.c + * lttng-ring-buffer-client-discard.c * * Copyright (C) 2010 - Mathieu Desnoyers * @@ -9,12 +9,12 @@ */ #include -#include "ltt-tracer.h" +#include "lttng-tracer.h" #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_DISCARD #define RING_BUFFER_MODE_TEMPLATE_STRING "discard" #define RING_BUFFER_OUTPUT_TEMPLATE RING_BUFFER_SPLICE -#include "ltt-ring-buffer-client.h" +#include "lttng-ring-buffer-client.h" MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Mathieu Desnoyers"); diff --git a/ltt-ring-buffer-client-mmap-discard.c b/lttng-ring-buffer-client-mmap-discard.c similarity index 83% rename from ltt-ring-buffer-client-mmap-discard.c rename to lttng-ring-buffer-client-mmap-discard.c index 29819a73..4ef89535 100644 --- a/ltt-ring-buffer-client-mmap-discard.c +++ b/lttng-ring-buffer-client-mmap-discard.c @@ -1,5 +1,5 @@ /* - * ltt-ring-buffer-client-discard.c + * lttng-ring-buffer-client-discard.c * * Copyright (C) 2010 - Mathieu Desnoyers * @@ -9,12 +9,12 @@ */ #include -#include "ltt-tracer.h" +#include "lttng-tracer.h" #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_DISCARD #define RING_BUFFER_MODE_TEMPLATE_STRING "discard-mmap" #define RING_BUFFER_OUTPUT_TEMPLATE RING_BUFFER_MMAP -#include "ltt-ring-buffer-client.h" +#include "lttng-ring-buffer-client.h" MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Mathieu Desnoyers"); diff --git a/ltt-ring-buffer-client-mmap-overwrite.c b/lttng-ring-buffer-client-mmap-overwrite.c similarity index 83% rename from ltt-ring-buffer-client-mmap-overwrite.c rename to lttng-ring-buffer-client-mmap-overwrite.c index 741aa7b4..5e87b1e1 100644 --- a/ltt-ring-buffer-client-mmap-overwrite.c +++ b/lttng-ring-buffer-client-mmap-overwrite.c @@ -1,5 +1,5 @@ /* - * ltt-ring-buffer-client-overwrite.c + * lttng-ring-buffer-client-overwrite.c * * Copyright (C) 2010 - Mathieu Desnoyers * @@ -9,12 +9,12 @@ */ #include -#include "ltt-tracer.h" +#include "lttng-tracer.h" #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_OVERWRITE #define RING_BUFFER_MODE_TEMPLATE_STRING "overwrite-mmap" #define RING_BUFFER_OUTPUT_TEMPLATE RING_BUFFER_MMAP -#include "ltt-ring-buffer-client.h" +#include "lttng-ring-buffer-client.h" MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Mathieu Desnoyers"); diff --git a/ltt-ring-buffer-client-overwrite.c b/lttng-ring-buffer-client-overwrite.c similarity index 83% rename from ltt-ring-buffer-client-overwrite.c rename to lttng-ring-buffer-client-overwrite.c index 9811941a..bbd32809 100644 --- a/ltt-ring-buffer-client-overwrite.c +++ b/lttng-ring-buffer-client-overwrite.c @@ -1,5 +1,5 @@ /* - * ltt-ring-buffer-client-overwrite.c + * lttng-ring-buffer-client-overwrite.c * * Copyright (C) 2010 - Mathieu Desnoyers * @@ -9,12 +9,12 @@ */ #include -#include "ltt-tracer.h" +#include "lttng-tracer.h" #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_OVERWRITE #define RING_BUFFER_MODE_TEMPLATE_STRING "overwrite" #define RING_BUFFER_OUTPUT_TEMPLATE RING_BUFFER_SPLICE -#include "ltt-ring-buffer-client.h" +#include "lttng-ring-buffer-client.h" MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Mathieu Desnoyers"); diff --git a/ltt-ring-buffer-client.h b/lttng-ring-buffer-client.h similarity index 73% rename from ltt-ring-buffer-client.h rename to lttng-ring-buffer-client.h index 8df37901..1a04520c 100644 --- a/ltt-ring-buffer-client.h +++ b/lttng-ring-buffer-client.h @@ -1,5 +1,5 @@ /* - * ltt-ring-buffer-client.h + * lttng-ring-buffer-client.h * * Copyright (C) 2010 - Mathieu Desnoyers * @@ -13,8 +13,8 @@ #include "lib/bitfield.h" #include "wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */ #include "wrapper/trace-clock.h" -#include "ltt-events.h" -#include "ltt-tracer.h" +#include "lttng-events.h" +#include "lttng-tracer.h" #include "wrapper/ringbuffer/frontend_types.h" /* @@ -78,7 +78,7 @@ size_t ctx_get_size(size_t offset, struct lttng_ctx *ctx) static inline void ctx_record(struct lib_ring_buffer_ctx *bufctx, - struct ltt_channel *chan, + struct lttng_channel *chan, struct lttng_ctx *ctx) { int i; @@ -108,39 +108,39 @@ unsigned char record_header_size(const struct lib_ring_buffer_config *config, size_t *pre_header_padding, struct lib_ring_buffer_ctx *ctx) { - struct ltt_channel *ltt_chan = channel_get_private(chan); - struct ltt_event *event = ctx->priv; + struct lttng_channel *lttng_chan = channel_get_private(chan); + struct lttng_event *event = ctx->priv; size_t orig_offset = offset; size_t padding; - switch (ltt_chan->header_type) { + switch (lttng_chan->header_type) { case 1: /* compact */ - padding = lib_ring_buffer_align(offset, ltt_alignof(uint32_t)); + padding = lib_ring_buffer_align(offset, lttng_alignof(uint32_t)); offset += padding; - if (!(ctx->rflags & (RING_BUFFER_RFLAG_FULL_TSC | LTT_RFLAG_EXTENDED))) { + if (!(ctx->rflags & (RING_BUFFER_RFLAG_FULL_TSC | LTTNG_RFLAG_EXTENDED))) { offset += sizeof(uint32_t); /* id and timestamp */ } else { /* Minimum space taken by 5-bit id */ offset += sizeof(uint8_t); /* Align extended struct on largest member */ - offset += lib_ring_buffer_align(offset, ltt_alignof(uint64_t)); + offset += lib_ring_buffer_align(offset, lttng_alignof(uint64_t)); offset += sizeof(uint32_t); /* id */ - offset += lib_ring_buffer_align(offset, ltt_alignof(uint64_t)); + offset += lib_ring_buffer_align(offset, lttng_alignof(uint64_t)); offset += sizeof(uint64_t); /* timestamp */ } break; case 2: /* large */ - padding = lib_ring_buffer_align(offset, ltt_alignof(uint16_t)); + padding = lib_ring_buffer_align(offset, lttng_alignof(uint16_t)); offset += padding; offset += sizeof(uint16_t); - if (!(ctx->rflags & (RING_BUFFER_RFLAG_FULL_TSC | LTT_RFLAG_EXTENDED))) { - offset += lib_ring_buffer_align(offset, ltt_alignof(uint32_t)); + if (!(ctx->rflags & (RING_BUFFER_RFLAG_FULL_TSC | LTTNG_RFLAG_EXTENDED))) { + offset += lib_ring_buffer_align(offset, lttng_alignof(uint32_t)); offset += sizeof(uint32_t); /* timestamp */ } else { /* Align extended struct on largest member */ - offset += lib_ring_buffer_align(offset, ltt_alignof(uint64_t)); + offset += lib_ring_buffer_align(offset, lttng_alignof(uint64_t)); offset += sizeof(uint32_t); /* id */ - offset += lib_ring_buffer_align(offset, ltt_alignof(uint64_t)); + offset += lib_ring_buffer_align(offset, lttng_alignof(uint64_t)); offset += sizeof(uint64_t); /* timestamp */ } break; @@ -149,7 +149,7 @@ unsigned char record_header_size(const struct lib_ring_buffer_config *config, WARN_ON_ONCE(1); } offset += ctx_get_size(offset, event->ctx); - offset += ctx_get_size(offset, ltt_chan->ctx); + offset += ctx_get_size(offset, lttng_chan->ctx); *pre_header_padding = padding; return offset - orig_offset; @@ -158,12 +158,12 @@ unsigned char record_header_size(const struct lib_ring_buffer_config *config, #include "wrapper/ringbuffer/api.h" static -void ltt_write_event_header_slow(const struct lib_ring_buffer_config *config, +void lttng_write_event_header_slow(const struct lib_ring_buffer_config *config, struct lib_ring_buffer_ctx *ctx, uint32_t event_id); /* - * ltt_write_event_header + * lttng_write_event_header * * Writes the event header to the offset (already aligned on 32-bits). * @@ -172,17 +172,17 @@ void ltt_write_event_header_slow(const struct lib_ring_buffer_config *config, * @event_id: event ID */ static __inline__ -void ltt_write_event_header(const struct lib_ring_buffer_config *config, +void lttng_write_event_header(const struct lib_ring_buffer_config *config, struct lib_ring_buffer_ctx *ctx, uint32_t event_id) { - struct ltt_channel *ltt_chan = channel_get_private(ctx->chan); - struct ltt_event *event = ctx->priv; + struct lttng_channel *lttng_chan = channel_get_private(ctx->chan); + struct lttng_event *event = ctx->priv; if (unlikely(ctx->rflags)) goto slow_path; - switch (ltt_chan->header_type) { + switch (lttng_chan->header_type) { case 1: /* compact */ { uint32_t id_time = 0; @@ -198,7 +198,7 @@ void ltt_write_event_header(const struct lib_ring_buffer_config *config, uint16_t id = event_id; lib_ring_buffer_write(config, ctx, &id, sizeof(id)); - lib_ring_buffer_align_ctx(ctx, ltt_alignof(uint32_t)); + lib_ring_buffer_align_ctx(ctx, lttng_alignof(uint32_t)); lib_ring_buffer_write(config, ctx, ×tamp, sizeof(timestamp)); break; } @@ -206,27 +206,27 @@ void ltt_write_event_header(const struct lib_ring_buffer_config *config, WARN_ON_ONCE(1); } - ctx_record(ctx, ltt_chan, ltt_chan->ctx); - ctx_record(ctx, ltt_chan, event->ctx); + ctx_record(ctx, lttng_chan, lttng_chan->ctx); + ctx_record(ctx, lttng_chan, event->ctx); lib_ring_buffer_align_ctx(ctx, ctx->largest_align); return; slow_path: - ltt_write_event_header_slow(config, ctx, event_id); + lttng_write_event_header_slow(config, ctx, event_id); } static -void ltt_write_event_header_slow(const struct lib_ring_buffer_config *config, +void lttng_write_event_header_slow(const struct lib_ring_buffer_config *config, struct lib_ring_buffer_ctx *ctx, uint32_t event_id) { - struct ltt_channel *ltt_chan = channel_get_private(ctx->chan); - struct ltt_event *event = ctx->priv; + struct lttng_channel *lttng_chan = channel_get_private(ctx->chan); + struct lttng_event *event = ctx->priv; - switch (ltt_chan->header_type) { + switch (lttng_chan->header_type) { case 1: /* compact */ - if (!(ctx->rflags & (RING_BUFFER_RFLAG_FULL_TSC | LTT_RFLAG_EXTENDED))) { + if (!(ctx->rflags & (RING_BUFFER_RFLAG_FULL_TSC | LTTNG_RFLAG_EXTENDED))) { uint32_t id_time = 0; bt_bitfield_write(&id_time, uint32_t, 0, 5, event_id); @@ -239,20 +239,20 @@ void ltt_write_event_header_slow(const struct lib_ring_buffer_config *config, bt_bitfield_write(&id, uint8_t, 0, 5, 31); lib_ring_buffer_write(config, ctx, &id, sizeof(id)); /* Align extended struct on largest member */ - lib_ring_buffer_align_ctx(ctx, ltt_alignof(uint64_t)); + lib_ring_buffer_align_ctx(ctx, lttng_alignof(uint64_t)); lib_ring_buffer_write(config, ctx, &event_id, sizeof(event_id)); - lib_ring_buffer_align_ctx(ctx, ltt_alignof(uint64_t)); + lib_ring_buffer_align_ctx(ctx, lttng_alignof(uint64_t)); lib_ring_buffer_write(config, ctx, ×tamp, sizeof(timestamp)); } break; case 2: /* large */ { - if (!(ctx->rflags & (RING_BUFFER_RFLAG_FULL_TSC | LTT_RFLAG_EXTENDED))) { + if (!(ctx->rflags & (RING_BUFFER_RFLAG_FULL_TSC | LTTNG_RFLAG_EXTENDED))) { uint32_t timestamp = (uint32_t) ctx->tsc; uint16_t id = event_id; lib_ring_buffer_write(config, ctx, &id, sizeof(id)); - lib_ring_buffer_align_ctx(ctx, ltt_alignof(uint32_t)); + lib_ring_buffer_align_ctx(ctx, lttng_alignof(uint32_t)); lib_ring_buffer_write(config, ctx, ×tamp, sizeof(timestamp)); } else { uint16_t id = 65535; @@ -260,9 +260,9 @@ void ltt_write_event_header_slow(const struct lib_ring_buffer_config *config, lib_ring_buffer_write(config, ctx, &id, sizeof(id)); /* Align extended struct on largest member */ - lib_ring_buffer_align_ctx(ctx, ltt_alignof(uint64_t)); + lib_ring_buffer_align_ctx(ctx, lttng_alignof(uint64_t)); lib_ring_buffer_write(config, ctx, &event_id, sizeof(event_id)); - lib_ring_buffer_align_ctx(ctx, ltt_alignof(uint64_t)); + lib_ring_buffer_align_ctx(ctx, lttng_alignof(uint64_t)); lib_ring_buffer_write(config, ctx, ×tamp, sizeof(timestamp)); } break; @@ -270,8 +270,8 @@ void ltt_write_event_header_slow(const struct lib_ring_buffer_config *config, default: WARN_ON_ONCE(1); } - ctx_record(ctx, ltt_chan, ltt_chan->ctx); - ctx_record(ctx, ltt_chan, event->ctx); + ctx_record(ctx, lttng_chan, lttng_chan->ctx); + ctx_record(ctx, lttng_chan, event->ctx); lib_ring_buffer_align_ctx(ctx, ctx->largest_align); } @@ -312,12 +312,12 @@ static void client_buffer_begin(struct lib_ring_buffer *buf, u64 tsc, (struct packet_header *) lib_ring_buffer_offset_address(&buf->backend, subbuf_idx * chan->backend.subbuf_size); - struct ltt_channel *ltt_chan = channel_get_private(chan); - struct ltt_session *session = ltt_chan->session; + struct lttng_channel *lttng_chan = channel_get_private(chan); + struct lttng_session *session = lttng_chan->session; header->magic = CTF_MAGIC_NUMBER; memcpy(header->uuid, session->uuid.b, sizeof(session->uuid)); - header->stream_id = ltt_chan->id; + header->stream_id = lttng_chan->id; header->ctx.timestamp_begin = tsc; header->ctx.timestamp_end = 0; header->ctx.events_discarded = 0; @@ -381,24 +381,24 @@ static const struct lib_ring_buffer_config client_config = { static struct channel *_channel_create(const char *name, - struct ltt_channel *ltt_chan, void *buf_addr, + struct lttng_channel *lttng_chan, void *buf_addr, size_t subbuf_size, size_t num_subbuf, unsigned int switch_timer_interval, unsigned int read_timer_interval) { - return channel_create(&client_config, name, ltt_chan, buf_addr, + return channel_create(&client_config, name, lttng_chan, buf_addr, subbuf_size, num_subbuf, switch_timer_interval, read_timer_interval); } static -void ltt_channel_destroy(struct channel *chan) +void lttng_channel_destroy(struct channel *chan) { channel_destroy(chan); } static -struct lib_ring_buffer *ltt_buffer_read_open(struct channel *chan) +struct lib_ring_buffer *lttng_buffer_read_open(struct channel *chan) { struct lib_ring_buffer *buf; int cpu; @@ -412,7 +412,7 @@ struct lib_ring_buffer *ltt_buffer_read_open(struct channel *chan) } static -int ltt_buffer_has_read_closed_stream(struct channel *chan) +int lttng_buffer_has_read_closed_stream(struct channel *chan) { struct lib_ring_buffer *buf; int cpu; @@ -426,16 +426,16 @@ int ltt_buffer_has_read_closed_stream(struct channel *chan) } static -void ltt_buffer_read_close(struct lib_ring_buffer *buf) +void lttng_buffer_read_close(struct lib_ring_buffer *buf) { lib_ring_buffer_release_read(buf); } static -int ltt_event_reserve(struct lib_ring_buffer_ctx *ctx, +int lttng_event_reserve(struct lib_ring_buffer_ctx *ctx, uint32_t event_id) { - struct ltt_channel *ltt_chan = channel_get_private(ctx->chan); + struct lttng_channel *lttng_chan = channel_get_private(ctx->chan); int ret, cpu; cpu = lib_ring_buffer_get_cpu(&client_config); @@ -443,14 +443,14 @@ int ltt_event_reserve(struct lib_ring_buffer_ctx *ctx, return -EPERM; ctx->cpu = cpu; - switch (ltt_chan->header_type) { + switch (lttng_chan->header_type) { case 1: /* compact */ if (event_id > 30) - ctx->rflags |= LTT_RFLAG_EXTENDED; + ctx->rflags |= LTTNG_RFLAG_EXTENDED; break; case 2: /* large */ if (event_id > 65534) - ctx->rflags |= LTT_RFLAG_EXTENDED; + ctx->rflags |= LTTNG_RFLAG_EXTENDED; break; default: WARN_ON_ONCE(1); @@ -459,7 +459,7 @@ int ltt_event_reserve(struct lib_ring_buffer_ctx *ctx, ret = lib_ring_buffer_reserve(&client_config, ctx); if (ret) goto put; - ltt_write_event_header(&client_config, ctx, event_id); + lttng_write_event_header(&client_config, ctx, event_id); return 0; put: lib_ring_buffer_put_cpu(&client_config); @@ -467,35 +467,35 @@ put: } static -void ltt_event_commit(struct lib_ring_buffer_ctx *ctx) +void lttng_event_commit(struct lib_ring_buffer_ctx *ctx) { lib_ring_buffer_commit(&client_config, ctx); lib_ring_buffer_put_cpu(&client_config); } static -void ltt_event_write(struct lib_ring_buffer_ctx *ctx, const void *src, +void lttng_event_write(struct lib_ring_buffer_ctx *ctx, const void *src, size_t len) { lib_ring_buffer_write(&client_config, ctx, src, len); } static -void ltt_event_write_from_user(struct lib_ring_buffer_ctx *ctx, +void lttng_event_write_from_user(struct lib_ring_buffer_ctx *ctx, const void __user *src, size_t len) { lib_ring_buffer_copy_from_user(&client_config, ctx, src, len); } static -void ltt_event_memset(struct lib_ring_buffer_ctx *ctx, +void lttng_event_memset(struct lib_ring_buffer_ctx *ctx, int c, size_t len) { lib_ring_buffer_memset(&client_config, ctx, c, len); } static -wait_queue_head_t *ltt_get_writer_buf_wait_queue(struct channel *chan, int cpu) +wait_queue_head_t *lttng_get_writer_buf_wait_queue(struct channel *chan, int cpu) { struct lib_ring_buffer *buf = channel_get_ring_buffer(&client_config, chan, cpu); @@ -503,65 +503,65 @@ wait_queue_head_t *ltt_get_writer_buf_wait_queue(struct channel *chan, int cpu) } static -wait_queue_head_t *ltt_get_hp_wait_queue(struct channel *chan) +wait_queue_head_t *lttng_get_hp_wait_queue(struct channel *chan) { return &chan->hp_wait; } static -int ltt_is_finalized(struct channel *chan) +int lttng_is_finalized(struct channel *chan) { return lib_ring_buffer_channel_is_finalized(chan); } static -int ltt_is_disabled(struct channel *chan) +int lttng_is_disabled(struct channel *chan) { return lib_ring_buffer_channel_is_disabled(chan); } -static struct ltt_transport ltt_relay_transport = { +static struct lttng_transport lttng_relay_transport = { .name = "relay-" RING_BUFFER_MODE_TEMPLATE_STRING, .owner = THIS_MODULE, .ops = { .channel_create = _channel_create, - .channel_destroy = ltt_channel_destroy, - .buffer_read_open = ltt_buffer_read_open, + .channel_destroy = lttng_channel_destroy, + .buffer_read_open = lttng_buffer_read_open, .buffer_has_read_closed_stream = - ltt_buffer_has_read_closed_stream, - .buffer_read_close = ltt_buffer_read_close, - .event_reserve = ltt_event_reserve, - .event_commit = ltt_event_commit, - .event_write = ltt_event_write, - .event_write_from_user = ltt_event_write_from_user, - .event_memset = ltt_event_memset, + lttng_buffer_has_read_closed_stream, + .buffer_read_close = lttng_buffer_read_close, + .event_reserve = lttng_event_reserve, + .event_commit = lttng_event_commit, + .event_write = lttng_event_write, + .event_write_from_user = lttng_event_write_from_user, + .event_memset = lttng_event_memset, .packet_avail_size = NULL, /* Would be racy anyway */ - .get_writer_buf_wait_queue = ltt_get_writer_buf_wait_queue, - .get_hp_wait_queue = ltt_get_hp_wait_queue, - .is_finalized = ltt_is_finalized, - .is_disabled = ltt_is_disabled, + .get_writer_buf_wait_queue = lttng_get_writer_buf_wait_queue, + .get_hp_wait_queue = lttng_get_hp_wait_queue, + .is_finalized = lttng_is_finalized, + .is_disabled = lttng_is_disabled, }, }; -static int __init ltt_ring_buffer_client_init(void) +static int __init lttng_ring_buffer_client_init(void) { /* * This vmalloc sync all also takes care of the lib ring buffer * vmalloc'd module pages when it is built as a module into LTTng. */ wrapper_vmalloc_sync_all(); - ltt_transport_register(<t_relay_transport); + lttng_transport_register(<tng_relay_transport); return 0; } -module_init(ltt_ring_buffer_client_init); +module_init(lttng_ring_buffer_client_init); -static void __exit ltt_ring_buffer_client_exit(void) +static void __exit lttng_ring_buffer_client_exit(void) { - ltt_transport_unregister(<t_relay_transport); + lttng_transport_unregister(<tng_relay_transport); } -module_exit(ltt_ring_buffer_client_exit); +module_exit(lttng_ring_buffer_client_exit); MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Mathieu Desnoyers"); diff --git a/ltt-ring-buffer-metadata-client.c b/lttng-ring-buffer-metadata-client.c similarity index 81% rename from ltt-ring-buffer-metadata-client.c rename to lttng-ring-buffer-metadata-client.c index ac6fe78c..4345dcad 100644 --- a/ltt-ring-buffer-metadata-client.c +++ b/lttng-ring-buffer-metadata-client.c @@ -1,5 +1,5 @@ /* - * ltt-ring-buffer-metadata-client.c + * lttng-ring-buffer-metadata-client.c * * Copyright (C) 2010 - Mathieu Desnoyers * @@ -9,12 +9,12 @@ */ #include -#include "ltt-tracer.h" +#include "lttng-tracer.h" #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_DISCARD #define RING_BUFFER_MODE_TEMPLATE_STRING "metadata" #define RING_BUFFER_OUTPUT_TEMPLATE RING_BUFFER_SPLICE -#include "ltt-ring-buffer-metadata-client.h" +#include "lttng-ring-buffer-metadata-client.h" MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Mathieu Desnoyers"); diff --git a/ltt-ring-buffer-metadata-client.h b/lttng-ring-buffer-metadata-client.h similarity index 76% rename from ltt-ring-buffer-metadata-client.h rename to lttng-ring-buffer-metadata-client.h index 529bbb19..cb5c1e4c 100644 --- a/ltt-ring-buffer-metadata-client.h +++ b/lttng-ring-buffer-metadata-client.h @@ -1,5 +1,5 @@ /* - * ltt-ring-buffer-client.h + * lttng-ring-buffer-client.h * * Copyright (C) 2010 - Mathieu Desnoyers * @@ -11,8 +11,8 @@ #include #include #include "wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */ -#include "ltt-events.h" -#include "ltt-tracer.h" +#include "lttng-events.h" +#include "lttng-tracer.h" struct metadata_packet_header { uint32_t magic; /* 0x75D11D57 */ @@ -85,8 +85,8 @@ static void client_buffer_begin(struct lib_ring_buffer *buf, u64 tsc, (struct metadata_packet_header *) lib_ring_buffer_offset_address(&buf->backend, subbuf_idx * chan->backend.subbuf_size); - struct ltt_channel *ltt_chan = channel_get_private(chan); - struct ltt_session *session = ltt_chan->session; + struct lttng_channel *lttng_chan = channel_get_private(chan); + struct lttng_session *session = lttng_chan->session; header->magic = TSDL_MAGIC_NUMBER; memcpy(header->uuid, session->uuid.b, sizeof(session->uuid)); @@ -158,24 +158,24 @@ static const struct lib_ring_buffer_config client_config = { static struct channel *_channel_create(const char *name, - struct ltt_channel *ltt_chan, void *buf_addr, + struct lttng_channel *lttng_chan, void *buf_addr, size_t subbuf_size, size_t num_subbuf, unsigned int switch_timer_interval, unsigned int read_timer_interval) { - return channel_create(&client_config, name, ltt_chan, buf_addr, + return channel_create(&client_config, name, lttng_chan, buf_addr, subbuf_size, num_subbuf, switch_timer_interval, read_timer_interval); } static -void ltt_channel_destroy(struct channel *chan) +void lttng_channel_destroy(struct channel *chan) { channel_destroy(chan); } static -struct lib_ring_buffer *ltt_buffer_read_open(struct channel *chan) +struct lib_ring_buffer *lttng_buffer_read_open(struct channel *chan) { struct lib_ring_buffer *buf; @@ -186,7 +186,7 @@ struct lib_ring_buffer *ltt_buffer_read_open(struct channel *chan) } static -int ltt_buffer_has_read_closed_stream(struct channel *chan) +int lttng_buffer_has_read_closed_stream(struct channel *chan) { struct lib_ring_buffer *buf; int cpu; @@ -200,46 +200,46 @@ int ltt_buffer_has_read_closed_stream(struct channel *chan) } static -void ltt_buffer_read_close(struct lib_ring_buffer *buf) +void lttng_buffer_read_close(struct lib_ring_buffer *buf) { lib_ring_buffer_release_read(buf); } static -int ltt_event_reserve(struct lib_ring_buffer_ctx *ctx, uint32_t event_id) +int lttng_event_reserve(struct lib_ring_buffer_ctx *ctx, uint32_t event_id) { return lib_ring_buffer_reserve(&client_config, ctx); } static -void ltt_event_commit(struct lib_ring_buffer_ctx *ctx) +void lttng_event_commit(struct lib_ring_buffer_ctx *ctx) { lib_ring_buffer_commit(&client_config, ctx); } static -void ltt_event_write(struct lib_ring_buffer_ctx *ctx, const void *src, +void lttng_event_write(struct lib_ring_buffer_ctx *ctx, const void *src, size_t len) { lib_ring_buffer_write(&client_config, ctx, src, len); } static -void ltt_event_write_from_user(struct lib_ring_buffer_ctx *ctx, +void lttng_event_write_from_user(struct lib_ring_buffer_ctx *ctx, const void __user *src, size_t len) { lib_ring_buffer_copy_from_user(&client_config, ctx, src, len); } static -void ltt_event_memset(struct lib_ring_buffer_ctx *ctx, +void lttng_event_memset(struct lib_ring_buffer_ctx *ctx, int c, size_t len) { lib_ring_buffer_memset(&client_config, ctx, c, len); } static -size_t ltt_packet_avail_size(struct channel *chan) +size_t lttng_packet_avail_size(struct channel *chan) { unsigned long o_begin; @@ -256,7 +256,7 @@ size_t ltt_packet_avail_size(struct channel *chan) } static -wait_queue_head_t *ltt_get_writer_buf_wait_queue(struct channel *chan, int cpu) +wait_queue_head_t *lttng_get_writer_buf_wait_queue(struct channel *chan, int cpu) { struct lib_ring_buffer *buf = channel_get_ring_buffer(&client_config, chan, cpu); @@ -264,65 +264,65 @@ wait_queue_head_t *ltt_get_writer_buf_wait_queue(struct channel *chan, int cpu) } static -wait_queue_head_t *ltt_get_hp_wait_queue(struct channel *chan) +wait_queue_head_t *lttng_get_hp_wait_queue(struct channel *chan) { return &chan->hp_wait; } static -int ltt_is_finalized(struct channel *chan) +int lttng_is_finalized(struct channel *chan) { return lib_ring_buffer_channel_is_finalized(chan); } static -int ltt_is_disabled(struct channel *chan) +int lttng_is_disabled(struct channel *chan) { return lib_ring_buffer_channel_is_disabled(chan); } -static struct ltt_transport ltt_relay_transport = { +static struct lttng_transport lttng_relay_transport = { .name = "relay-" RING_BUFFER_MODE_TEMPLATE_STRING, .owner = THIS_MODULE, .ops = { .channel_create = _channel_create, - .channel_destroy = ltt_channel_destroy, - .buffer_read_open = ltt_buffer_read_open, + .channel_destroy = lttng_channel_destroy, + .buffer_read_open = lttng_buffer_read_open, .buffer_has_read_closed_stream = - ltt_buffer_has_read_closed_stream, - .buffer_read_close = ltt_buffer_read_close, - .event_reserve = ltt_event_reserve, - .event_commit = ltt_event_commit, - .event_write_from_user = ltt_event_write_from_user, - .event_memset = ltt_event_memset, - .event_write = ltt_event_write, - .packet_avail_size = ltt_packet_avail_size, - .get_writer_buf_wait_queue = ltt_get_writer_buf_wait_queue, - .get_hp_wait_queue = ltt_get_hp_wait_queue, - .is_finalized = ltt_is_finalized, - .is_disabled = ltt_is_disabled, + lttng_buffer_has_read_closed_stream, + .buffer_read_close = lttng_buffer_read_close, + .event_reserve = lttng_event_reserve, + .event_commit = lttng_event_commit, + .event_write_from_user = lttng_event_write_from_user, + .event_memset = lttng_event_memset, + .event_write = lttng_event_write, + .packet_avail_size = lttng_packet_avail_size, + .get_writer_buf_wait_queue = lttng_get_writer_buf_wait_queue, + .get_hp_wait_queue = lttng_get_hp_wait_queue, + .is_finalized = lttng_is_finalized, + .is_disabled = lttng_is_disabled, }, }; -static int __init ltt_ring_buffer_client_init(void) +static int __init lttng_ring_buffer_client_init(void) { /* * This vmalloc sync all also takes care of the lib ring buffer * vmalloc'd module pages when it is built as a module into LTTng. */ wrapper_vmalloc_sync_all(); - ltt_transport_register(<t_relay_transport); + lttng_transport_register(<tng_relay_transport); return 0; } -module_init(ltt_ring_buffer_client_init); +module_init(lttng_ring_buffer_client_init); -static void __exit ltt_ring_buffer_client_exit(void) +static void __exit lttng_ring_buffer_client_exit(void) { - ltt_transport_unregister(<t_relay_transport); + lttng_transport_unregister(<tng_relay_transport); } -module_exit(ltt_ring_buffer_client_exit); +module_exit(lttng_ring_buffer_client_exit); MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Mathieu Desnoyers"); diff --git a/ltt-ring-buffer-metadata-mmap-client.c b/lttng-ring-buffer-metadata-mmap-client.c similarity index 81% rename from ltt-ring-buffer-metadata-mmap-client.c rename to lttng-ring-buffer-metadata-mmap-client.c index 5cad3f92..7a3947f5 100644 --- a/ltt-ring-buffer-metadata-mmap-client.c +++ b/lttng-ring-buffer-metadata-mmap-client.c @@ -1,5 +1,5 @@ /* - * ltt-ring-buffer-metadata-client.c + * lttng-ring-buffer-metadata-client.c * * Copyright (C) 2010 - Mathieu Desnoyers * @@ -9,12 +9,12 @@ */ #include -#include "ltt-tracer.h" +#include "lttng-tracer.h" #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_DISCARD #define RING_BUFFER_MODE_TEMPLATE_STRING "metadata-mmap" #define RING_BUFFER_OUTPUT_TEMPLATE RING_BUFFER_MMAP -#include "ltt-ring-buffer-metadata-client.h" +#include "lttng-ring-buffer-metadata-client.h" MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Mathieu Desnoyers"); diff --git a/lttng-syscalls.c b/lttng-syscalls.c index 9de3c079..521531c3 100644 --- a/lttng-syscalls.c +++ b/lttng-syscalls.c @@ -14,7 +14,7 @@ #include #include -#include "ltt-events.h" +#include "lttng-events.h" #ifndef CONFIG_COMPAT static inline int is_compat_task(void) @@ -140,7 +140,7 @@ const struct trace_syscall_entry compat_sc_table[] = { #undef CREATE_SYSCALL_TABLE -static void syscall_entry_unknown(struct ltt_event *event, +static void syscall_entry_unknown(struct lttng_event *event, struct pt_regs *regs, unsigned int id) { unsigned long args[UNKNOWN_SYSCALL_NRARGS]; @@ -154,8 +154,8 @@ static void syscall_entry_unknown(struct ltt_event *event, void syscall_entry_probe(void *__data, struct pt_regs *regs, long id) { - struct ltt_channel *chan = __data; - struct ltt_event *event, *unknown_event; + struct lttng_channel *chan = __data; + struct lttng_event *event, *unknown_event; const struct trace_syscall_entry *table, *entry; size_t table_len; @@ -274,7 +274,7 @@ void syscall_entry_probe(void *__data, struct pt_regs *regs, long id) /* noinline to diminish caller stack size */ static int fill_table(const struct trace_syscall_entry *table, size_t table_len, - struct ltt_event **chan_table, struct ltt_channel *chan, void *filter) + struct lttng_event **chan_table, struct lttng_channel *chan, void *filter) { const struct lttng_event_desc *desc; unsigned int i; @@ -298,7 +298,7 @@ int fill_table(const struct trace_syscall_entry *table, size_t table_len, strncpy(ev.name, desc->name, LTTNG_SYM_NAME_LEN); ev.name[LTTNG_SYM_NAME_LEN - 1] = '\0'; ev.instrumentation = LTTNG_KERNEL_NOOP; - chan_table[i] = ltt_event_create(chan, &ev, filter, + chan_table[i] = lttng_event_create(chan, &ev, filter, desc); if (!chan_table[i]) { /* @@ -313,7 +313,7 @@ int fill_table(const struct trace_syscall_entry *table, size_t table_len, return 0; } -int lttng_syscalls_register(struct ltt_channel *chan, void *filter) +int lttng_syscalls_register(struct lttng_channel *chan, void *filter) { struct lttng_kernel_event ev; int ret; @@ -322,7 +322,7 @@ int lttng_syscalls_register(struct ltt_channel *chan, void *filter) if (!chan->sc_table) { /* create syscall table mapping syscall to events */ - chan->sc_table = kzalloc(sizeof(struct ltt_event *) + chan->sc_table = kzalloc(sizeof(struct lttng_event *) * ARRAY_SIZE(sc_table), GFP_KERNEL); if (!chan->sc_table) return -ENOMEM; @@ -331,7 +331,7 @@ int lttng_syscalls_register(struct ltt_channel *chan, void *filter) #ifdef CONFIG_COMPAT if (!chan->compat_sc_table) { /* create syscall table mapping compat syscall to events */ - chan->compat_sc_table = kzalloc(sizeof(struct ltt_event *) + chan->compat_sc_table = kzalloc(sizeof(struct lttng_event *) * ARRAY_SIZE(compat_sc_table), GFP_KERNEL); if (!chan->compat_sc_table) return -ENOMEM; @@ -345,7 +345,7 @@ int lttng_syscalls_register(struct ltt_channel *chan, void *filter) strncpy(ev.name, desc->name, LTTNG_SYM_NAME_LEN); ev.name[LTTNG_SYM_NAME_LEN - 1] = '\0'; ev.instrumentation = LTTNG_KERNEL_NOOP; - chan->sc_unknown = ltt_event_create(chan, &ev, filter, + chan->sc_unknown = lttng_event_create(chan, &ev, filter, desc); if (!chan->sc_unknown) { return -EINVAL; @@ -360,7 +360,7 @@ int lttng_syscalls_register(struct ltt_channel *chan, void *filter) strncpy(ev.name, desc->name, LTTNG_SYM_NAME_LEN); ev.name[LTTNG_SYM_NAME_LEN - 1] = '\0'; ev.instrumentation = LTTNG_KERNEL_NOOP; - chan->sc_compat_unknown = ltt_event_create(chan, &ev, filter, + chan->sc_compat_unknown = lttng_event_create(chan, &ev, filter, desc); if (!chan->sc_compat_unknown) { return -EINVAL; @@ -375,7 +375,7 @@ int lttng_syscalls_register(struct ltt_channel *chan, void *filter) strncpy(ev.name, desc->name, LTTNG_SYM_NAME_LEN); ev.name[LTTNG_SYM_NAME_LEN - 1] = '\0'; ev.instrumentation = LTTNG_KERNEL_NOOP; - chan->sc_exit = ltt_event_create(chan, &ev, filter, + chan->sc_exit = lttng_event_create(chan, &ev, filter, desc); if (!chan->sc_exit) { return -EINVAL; @@ -413,7 +413,7 @@ int lttng_syscalls_register(struct ltt_channel *chan, void *filter) /* * Only called at session destruction. */ -int lttng_syscalls_unregister(struct ltt_channel *chan) +int lttng_syscalls_unregister(struct lttng_channel *chan) { int ret; @@ -428,7 +428,7 @@ int lttng_syscalls_unregister(struct ltt_channel *chan) (void *) syscall_entry_probe, chan); if (ret) return ret; - /* ltt_event destroy will be performed by ltt_session_destroy() */ + /* lttng_event destroy will be performed by lttng_session_destroy() */ kfree(chan->sc_table); #ifdef CONFIG_COMPAT kfree(chan->compat_sc_table); diff --git a/ltt-tracer-core.h b/lttng-tracer-core.h similarity index 70% rename from ltt-tracer-core.h rename to lttng-tracer-core.h index 5abc432d..c9e68b82 100644 --- a/ltt-tracer-core.h +++ b/lttng-tracer-core.h @@ -1,8 +1,8 @@ -#ifndef LTT_TRACER_CORE_H -#define LTT_TRACER_CORE_H +#ifndef LTTNG_TRACER_CORE_H +#define LTTNG_TRACER_CORE_H /* - * ltt-tracer-core.h + * lttng-tracer-core.h * * Copyright (C) 2005-2011 Mathieu Desnoyers * @@ -21,8 +21,8 @@ #include "wrapper/ringbuffer/config.h" -struct ltt_session; -struct ltt_channel; -struct ltt_event; +struct lttng_session; +struct lttng_channel; +struct lttng_event; -#endif /* LTT_TRACER_CORE_H */ +#endif /* LTTNG_TRACER_CORE_H */ diff --git a/ltt-tracer.h b/lttng-tracer.h similarity index 73% rename from ltt-tracer.h rename to lttng-tracer.h index a21c38ca..571a715e 100644 --- a/ltt-tracer.h +++ b/lttng-tracer.h @@ -1,8 +1,8 @@ -#ifndef _LTT_TRACER_H -#define _LTT_TRACER_H +#ifndef _LTTNG_TRACER_H +#define _LTTNG_TRACER_H /* - * ltt-tracer.h + * lttng-tracer.h * * Copyright (C) 2005-2011 Mathieu Desnoyers * @@ -22,8 +22,8 @@ #include #include "wrapper/trace-clock.h" -#include "ltt-tracer-core.h" -#include "ltt-events.h" +#include "lttng-tracer-core.h" +#include "lttng-events.h" #define LTTNG_VERSION 0 #define LTTNG_PATCHLEVEL 9 @@ -34,13 +34,13 @@ #endif /* Number of bytes to log with a read/write event */ -#define LTT_LOG_RW_SIZE 32L -#define LTT_MAX_SMALL_SIZE 0xFFFFU +#define LTTNG_LOG_RW_SIZE 32L +#define LTTNG_MAX_SMALL_SIZE 0xFFFFU #ifdef RING_BUFFER_ALIGN -#define ltt_alignof(type) __alignof__(type) +#define lttng_alignof(type) __alignof__(type) #else -#define ltt_alignof(type) 1 +#define lttng_alignof(type) 1 #endif /* Tracer properties */ @@ -61,7 +61,7 @@ */ #define LTTNG_METADATA_TIMEOUT_MSEC 10000 -#define LTT_RFLAG_EXTENDED RING_BUFFER_RFLAG_END -#define LTT_RFLAG_END (LTT_RFLAG_EXTENDED << 1) +#define LTTNG_RFLAG_EXTENDED RING_BUFFER_RFLAG_END +#define LTTNG_RFLAG_END (LTTNG_RFLAG_EXTENDED << 1) -#endif /* _LTT_TRACER_H */ +#endif /* _LTTNG_TRACER_H */ diff --git a/probes/lttng-events.h b/probes/lttng-events.h index d486994f..d269490e 100644 --- a/probes/lttng-events.h +++ b/probes/lttng-events.h @@ -12,8 +12,8 @@ #include "lttng-types.h" #include "../wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */ #include "../wrapper/ringbuffer/frontend_types.h" -#include "../ltt-events.h" -#include "../ltt-tracer-core.h" +#include "../lttng-events.h" +#include "../lttng-tracer-core.h" /* * Macro declarations used for all stages. @@ -319,19 +319,19 @@ static __used struct lttng_probe_desc TP_ID(__probe_desc___, TRACE_SYSTEM) = { #undef __field_full #define __field_full(_type, _item, _order, _base) \ - __event_len += lib_ring_buffer_align(__event_len, ltt_alignof(_type)); \ + __event_len += lib_ring_buffer_align(__event_len, lttng_alignof(_type)); \ __event_len += sizeof(_type); #undef __array_enc_ext #define __array_enc_ext(_type, _item, _length, _order, _base, _encoding) \ - __event_len += lib_ring_buffer_align(__event_len, ltt_alignof(_type)); \ + __event_len += lib_ring_buffer_align(__event_len, lttng_alignof(_type)); \ __event_len += sizeof(_type) * (_length); #undef __dynamic_array_enc_ext #define __dynamic_array_enc_ext(_type, _item, _length, _order, _base, _encoding)\ - __event_len += lib_ring_buffer_align(__event_len, ltt_alignof(u32)); \ + __event_len += lib_ring_buffer_align(__event_len, lttng_alignof(u32)); \ __event_len += sizeof(u32); \ - __event_len += lib_ring_buffer_align(__event_len, ltt_alignof(_type)); \ + __event_len += lib_ring_buffer_align(__event_len, lttng_alignof(_type)); \ __dynamic_len[__dynamic_len_idx] = (_length); \ __event_len += sizeof(_type) * __dynamic_len[__dynamic_len_idx]; \ __dynamic_len_idx++; @@ -382,16 +382,16 @@ static inline size_t __event_get_size__##_name(size_t *__dynamic_len, _proto) \ #undef __field_full #define __field_full(_type, _item, _order, _base) \ - __event_align = max_t(size_t, __event_align, ltt_alignof(_type)); + __event_align = max_t(size_t, __event_align, lttng_alignof(_type)); #undef __array_enc_ext #define __array_enc_ext(_type, _item, _length, _order, _base, _encoding) \ - __event_align = max_t(size_t, __event_align, ltt_alignof(_type)); + __event_align = max_t(size_t, __event_align, lttng_alignof(_type)); #undef __dynamic_array_enc_ext #define __dynamic_array_enc_ext(_type, _item, _length, _order, _base, _encoding)\ - __event_align = max_t(size_t, __event_align, ltt_alignof(u32)); \ - __event_align = max_t(size_t, __event_align, ltt_alignof(_type)); + __event_align = max_t(size_t, __event_align, lttng_alignof(u32)); \ + __event_align = max_t(size_t, __event_align, lttng_alignof(_type)); #undef __string #define __string(_item, _src) @@ -506,7 +506,7 @@ __end_field_##_item: __assign_##dest: \ { \ __typeof__(__typemap.dest) __tmp = (src); \ - lib_ring_buffer_align_ctx(&__ctx, ltt_alignof(__tmp)); \ + lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(__tmp)); \ __chan->ops->event_write(&__ctx, &__tmp, sizeof(__tmp));\ } \ goto __end_field_##dest; @@ -516,7 +516,7 @@ __assign_##dest: \ __assign_##dest: \ if (0) \ (void) __typemap.dest; \ - lib_ring_buffer_align_ctx(&__ctx, ltt_alignof(__typemap.dest)); \ + lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(__typemap.dest)); \ __chan->ops->event_write(&__ctx, src, len); \ goto __end_field_##dest; @@ -525,12 +525,12 @@ __assign_##dest: \ __assign_##dest##_1: \ { \ u32 __tmpl = __dynamic_len[__dynamic_len_idx]; \ - lib_ring_buffer_align_ctx(&__ctx, ltt_alignof(u32)); \ + lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(u32)); \ __chan->ops->event_write(&__ctx, &__tmpl, sizeof(u32)); \ } \ goto __end_field_##dest##_1; \ __assign_##dest##_2: \ - lib_ring_buffer_align_ctx(&__ctx, ltt_alignof(__typemap.dest)); \ + lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(__typemap.dest)); \ __chan->ops->event_write(&__ctx, src, \ sizeof(__typemap.dest) * __get_dynamic_array_len(dest));\ goto __end_field_##dest##_2; @@ -540,7 +540,7 @@ __assign_##dest##_2: \ __assign_##dest: \ if (0) \ (void) __typemap.dest; \ - lib_ring_buffer_align_ctx(&__ctx, ltt_alignof(__typemap.dest)); \ + lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(__typemap.dest)); \ __chan->ops->event_write_from_user(&__ctx, src, len); \ goto __end_field_##dest; @@ -555,7 +555,7 @@ __assign_##dest##_2: \ \ if (0) \ (void) __typemap.dest; \ - lib_ring_buffer_align_ctx(&__ctx, ltt_alignof(__typemap.dest));\ + lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(__typemap.dest));\ __ustrlen = __get_dynamic_array_len(dest); \ if (likely(__ustrlen > 1)) { \ __chan->ops->event_write_from_user(&__ctx, src, \ @@ -596,8 +596,8 @@ __assign_##dest##_2: \ #define DECLARE_EVENT_CLASS(_name, _proto, _args, _tstruct, _assign, _print) \ static void __event_probe__##_name(void *__data, _proto) \ { \ - struct ltt_event *__event = __data; \ - struct ltt_channel *__chan = __event->chan; \ + struct lttng_event *__event = __data; \ + struct lttng_channel *__chan = __event->chan; \ struct lib_ring_buffer_ctx __ctx; \ size_t __event_len, __event_align; \ size_t __dynamic_len_idx = 0; \ @@ -632,8 +632,8 @@ static void __event_probe__##_name(void *__data, _proto) \ #define DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) \ static void __event_probe__##_name(void *__data) \ { \ - struct ltt_event *__event = __data; \ - struct ltt_channel *__chan = __event->chan; \ + struct lttng_event *__event = __data; \ + struct lttng_channel *__chan = __event->chan; \ struct lib_ring_buffer_ctx __ctx; \ size_t __event_len, __event_align; \ int __ret; \ @@ -680,14 +680,14 @@ static void __event_probe__##_name(void *__data) \ static int TP_ID(__lttng_events_init__, TRACE_SYSTEM)(void) { wrapper_vmalloc_sync_all(); - return ltt_probe_register(&TP_ID(__probe_desc___, TRACE_SYSTEM)); + return lttng_probe_register(&TP_ID(__probe_desc___, TRACE_SYSTEM)); } module_init_eval(__lttng_events_init__, TRACE_SYSTEM); static void TP_ID(__lttng_events_exit__, TRACE_SYSTEM)(void) { - ltt_probe_unregister(&TP_ID(__probe_desc___, TRACE_SYSTEM)); + lttng_probe_unregister(&TP_ID(__probe_desc___, TRACE_SYSTEM)); } module_exit_eval(__lttng_events_exit__, TRACE_SYSTEM); diff --git a/probes/lttng-ftrace.c b/probes/lttng-ftrace.c index 1aa71831..2a939216 100644 --- a/probes/lttng-ftrace.c +++ b/probes/lttng-ftrace.c @@ -20,17 +20,17 @@ #include #include #include -#include "../ltt-events.h" +#include "../lttng-events.h" #include "../wrapper/ringbuffer/frontend_types.h" #include "../wrapper/ftrace.h" #include "../wrapper/vmalloc.h" -#include "../ltt-tracer.h" +#include "../lttng-tracer.h" static void lttng_ftrace_handler(unsigned long ip, unsigned long parent_ip, void **data) { - struct ltt_event *event = *data; - struct ltt_channel *chan = event->chan; + struct lttng_event *event = *data; + struct lttng_channel *chan = event->chan; struct lib_ring_buffer_ctx ctx; struct { unsigned long ip; @@ -46,13 +46,13 @@ void lttng_ftrace_handler(unsigned long ip, unsigned long parent_ip, void **data return; lib_ring_buffer_ctx_init(&ctx, chan->chan, event, - sizeof(payload), ltt_alignof(payload), -1); + sizeof(payload), lttng_alignof(payload), -1); ret = chan->ops->event_reserve(&ctx, event->id); if (ret < 0) return; payload.ip = ip; payload.parent_ip = parent_ip; - lib_ring_buffer_align_ctx(&ctx, ltt_alignof(payload)); + lib_ring_buffer_align_ctx(&ctx, lttng_alignof(payload)); chan->ops->event_write(&ctx, &payload, sizeof(payload)); chan->ops->event_commit(&ctx); return; @@ -62,7 +62,7 @@ void lttng_ftrace_handler(unsigned long ip, unsigned long parent_ip, void **data * Create event description */ static -int lttng_create_ftrace_event(const char *name, struct ltt_event *event) +int lttng_create_ftrace_event(const char *name, struct lttng_event *event) { struct lttng_event_field *fields; struct lttng_event_desc *desc; @@ -86,7 +86,7 @@ int lttng_create_ftrace_event(const char *name, struct ltt_event *event) fields[0].name = "ip"; fields[0].type.atype = atype_integer; fields[0].type.u.basic.integer.size = sizeof(unsigned long) * CHAR_BIT; - fields[0].type.u.basic.integer.alignment = ltt_alignof(unsigned long) * CHAR_BIT; + fields[0].type.u.basic.integer.alignment = lttng_alignof(unsigned long) * CHAR_BIT; fields[0].type.u.basic.integer.signedness = is_signed_type(unsigned long); fields[0].type.u.basic.integer.reverse_byte_order = 0; fields[0].type.u.basic.integer.base = 16; @@ -95,7 +95,7 @@ int lttng_create_ftrace_event(const char *name, struct ltt_event *event) fields[1].name = "parent_ip"; fields[1].type.atype = atype_integer; fields[1].type.u.basic.integer.size = sizeof(unsigned long) * CHAR_BIT; - fields[1].type.u.basic.integer.alignment = ltt_alignof(unsigned long) * CHAR_BIT; + fields[1].type.u.basic.integer.alignment = lttng_alignof(unsigned long) * CHAR_BIT; fields[1].type.u.basic.integer.signedness = is_signed_type(unsigned long); fields[1].type.u.basic.integer.reverse_byte_order = 0; fields[1].type.u.basic.integer.base = 16; @@ -120,7 +120,7 @@ struct ftrace_probe_ops lttng_ftrace_ops = { int lttng_ftrace_register(const char *name, const char *symbol_name, - struct ltt_event *event) + struct lttng_event *event) { int ret; @@ -151,14 +151,14 @@ error: } EXPORT_SYMBOL_GPL(lttng_ftrace_register); -void lttng_ftrace_unregister(struct ltt_event *event) +void lttng_ftrace_unregister(struct lttng_event *event) { wrapper_unregister_ftrace_function_probe(event->u.ftrace.symbol_name, <tng_ftrace_ops, event); } EXPORT_SYMBOL_GPL(lttng_ftrace_unregister); -void lttng_ftrace_destroy_private(struct ltt_event *event) +void lttng_ftrace_destroy_private(struct lttng_event *event) { kfree(event->u.ftrace.symbol_name); kfree(event->desc->fields); diff --git a/probes/lttng-kprobes.c b/probes/lttng-kprobes.c index 784002ae..e9c64960 100644 --- a/probes/lttng-kprobes.c +++ b/probes/lttng-kprobes.c @@ -10,17 +10,17 @@ #include #include #include -#include "../ltt-events.h" +#include "../lttng-events.h" #include "../wrapper/ringbuffer/frontend_types.h" #include "../wrapper/vmalloc.h" -#include "../ltt-tracer.h" +#include "../lttng-tracer.h" static int lttng_kprobes_handler_pre(struct kprobe *p, struct pt_regs *regs) { - struct ltt_event *event = - container_of(p, struct ltt_event, u.kprobe.kp); - struct ltt_channel *chan = event->chan; + struct lttng_event *event = + container_of(p, struct lttng_event, u.kprobe.kp); + struct lttng_channel *chan = event->chan; struct lib_ring_buffer_ctx ctx; int ret; unsigned long data = (unsigned long) p->addr; @@ -33,11 +33,11 @@ int lttng_kprobes_handler_pre(struct kprobe *p, struct pt_regs *regs) return 0; lib_ring_buffer_ctx_init(&ctx, chan->chan, event, sizeof(data), - ltt_alignof(data), -1); + lttng_alignof(data), -1); ret = chan->ops->event_reserve(&ctx, event->id); if (ret < 0) return 0; - lib_ring_buffer_align_ctx(&ctx, ltt_alignof(data)); + lib_ring_buffer_align_ctx(&ctx, lttng_alignof(data)); chan->ops->event_write(&ctx, &data, sizeof(data)); chan->ops->event_commit(&ctx); return 0; @@ -47,7 +47,7 @@ int lttng_kprobes_handler_pre(struct kprobe *p, struct pt_regs *regs) * Create event description */ static -int lttng_create_kprobe_event(const char *name, struct ltt_event *event) +int lttng_create_kprobe_event(const char *name, struct lttng_event *event) { struct lttng_event_field *field; struct lttng_event_desc *desc; @@ -71,7 +71,7 @@ int lttng_create_kprobe_event(const char *name, struct ltt_event *event) field->name = "ip"; field->type.atype = atype_integer; field->type.u.basic.integer.size = sizeof(unsigned long) * CHAR_BIT; - field->type.u.basic.integer.alignment = ltt_alignof(unsigned long) * CHAR_BIT; + field->type.u.basic.integer.alignment = lttng_alignof(unsigned long) * CHAR_BIT; field->type.u.basic.integer.signedness = is_signed_type(unsigned long); field->type.u.basic.integer.reverse_byte_order = 0; field->type.u.basic.integer.base = 16; @@ -92,7 +92,7 @@ int lttng_kprobes_register(const char *name, const char *symbol_name, uint64_t offset, uint64_t addr, - struct ltt_event *event) + struct lttng_event *event) { int ret; @@ -144,13 +144,13 @@ error: } EXPORT_SYMBOL_GPL(lttng_kprobes_register); -void lttng_kprobes_unregister(struct ltt_event *event) +void lttng_kprobes_unregister(struct lttng_event *event) { unregister_kprobe(&event->u.kprobe.kp); } EXPORT_SYMBOL_GPL(lttng_kprobes_unregister); -void lttng_kprobes_destroy_private(struct ltt_event *event) +void lttng_kprobes_destroy_private(struct lttng_event *event) { kfree(event->u.kprobe.symbol_name); kfree(event->desc->fields); diff --git a/probes/lttng-kretprobes.c b/probes/lttng-kretprobes.c index 6b291018..6b75848a 100644 --- a/probes/lttng-kretprobes.c +++ b/probes/lttng-kretprobes.c @@ -11,10 +11,10 @@ #include #include #include -#include "../ltt-events.h" +#include "../lttng-events.h" #include "../wrapper/ringbuffer/frontend_types.h" #include "../wrapper/vmalloc.h" -#include "../ltt-tracer.h" +#include "../lttng-tracer.h" enum lttng_kretprobe_type { EVENT_ENTRY = 0, @@ -23,7 +23,7 @@ enum lttng_kretprobe_type { struct lttng_krp { struct kretprobe krp; - struct ltt_event *event[2]; /* ENTRY and RETURN */ + struct lttng_event *event[2]; /* ENTRY and RETURN */ struct kref kref_register; struct kref kref_alloc; }; @@ -35,9 +35,9 @@ int _lttng_kretprobes_handler(struct kretprobe_instance *krpi, { struct lttng_krp *lttng_krp = container_of(krpi->rp, struct lttng_krp, krp); - struct ltt_event *event = + struct lttng_event *event = lttng_krp->event[type]; - struct ltt_channel *chan = event->chan; + struct lttng_channel *chan = event->chan; struct lib_ring_buffer_ctx ctx; int ret; struct { @@ -56,11 +56,11 @@ int _lttng_kretprobes_handler(struct kretprobe_instance *krpi, payload.parent_ip = (unsigned long) krpi->ret_addr; lib_ring_buffer_ctx_init(&ctx, chan->chan, event, sizeof(payload), - ltt_alignof(payload), -1); + lttng_alignof(payload), -1); ret = chan->ops->event_reserve(&ctx, event->id); if (ret < 0) return 0; - lib_ring_buffer_align_ctx(&ctx, ltt_alignof(payload)); + lib_ring_buffer_align_ctx(&ctx, lttng_alignof(payload)); chan->ops->event_write(&ctx, &payload, sizeof(payload)); chan->ops->event_commit(&ctx); return 0; @@ -84,7 +84,7 @@ int lttng_kretprobes_handler_return(struct kretprobe_instance *krpi, * Create event description */ static -int lttng_create_kprobe_event(const char *name, struct ltt_event *event, +int lttng_create_kprobe_event(const char *name, struct lttng_event *event, enum lttng_kretprobe_type type) { struct lttng_event_field *fields; @@ -125,7 +125,7 @@ int lttng_create_kprobe_event(const char *name, struct ltt_event *event, fields[0].name = "ip"; fields[0].type.atype = atype_integer; fields[0].type.u.basic.integer.size = sizeof(unsigned long) * CHAR_BIT; - fields[0].type.u.basic.integer.alignment = ltt_alignof(unsigned long) * CHAR_BIT; + fields[0].type.u.basic.integer.alignment = lttng_alignof(unsigned long) * CHAR_BIT; fields[0].type.u.basic.integer.signedness = is_signed_type(unsigned long); fields[0].type.u.basic.integer.reverse_byte_order = 0; fields[0].type.u.basic.integer.base = 16; @@ -134,7 +134,7 @@ int lttng_create_kprobe_event(const char *name, struct ltt_event *event, fields[1].name = "parent_ip"; fields[1].type.atype = atype_integer; fields[1].type.u.basic.integer.size = sizeof(unsigned long) * CHAR_BIT; - fields[1].type.u.basic.integer.alignment = ltt_alignof(unsigned long) * CHAR_BIT; + fields[1].type.u.basic.integer.alignment = lttng_alignof(unsigned long) * CHAR_BIT; fields[1].type.u.basic.integer.signedness = is_signed_type(unsigned long); fields[1].type.u.basic.integer.reverse_byte_order = 0; fields[1].type.u.basic.integer.base = 16; @@ -156,8 +156,8 @@ int lttng_kretprobes_register(const char *name, const char *symbol_name, uint64_t offset, uint64_t addr, - struct ltt_event *event_entry, - struct ltt_event *event_return) + struct lttng_event *event_entry, + struct lttng_event *event_return) { int ret; struct lttng_krp *lttng_krp; @@ -247,7 +247,7 @@ void _lttng_kretprobes_unregister_release(struct kref *kref) unregister_kretprobe(<tng_krp->krp); } -void lttng_kretprobes_unregister(struct ltt_event *event) +void lttng_kretprobes_unregister(struct lttng_event *event) { kref_put(&event->u.kretprobe.lttng_krp->kref_register, _lttng_kretprobes_unregister_release); @@ -262,7 +262,7 @@ void _lttng_kretprobes_release(struct kref *kref) kfree(lttng_krp->krp.kp.symbol_name); } -void lttng_kretprobes_destroy_private(struct ltt_event *event) +void lttng_kretprobes_destroy_private(struct lttng_event *event) { kfree(event->desc->fields); kfree(event->desc->name); diff --git a/probes/lttng-types.c b/probes/lttng-types.c index 93a9ae54..2975cc49 100644 --- a/probes/lttng-types.c +++ b/probes/lttng-types.c @@ -11,7 +11,7 @@ #include #include #include "../wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */ -#include "../ltt-events.h" +#include "../lttng-events.h" #include "lttng-types.h" #include diff --git a/probes/lttng-types.h b/probes/lttng-types.h index 10620280..ea162940 100644 --- a/probes/lttng-types.h +++ b/probes/lttng-types.h @@ -17,9 +17,9 @@ #include #include "lttng.h" -#include "../ltt-events.h" -#include "../ltt-tracer.h" -#include "../ltt-endian.h" +#include "../lttng-events.h" +#include "../lttng-tracer.h" +#include "../lttng-endian.h" #endif /* _LTTNG_PROBES_LTTNG_TYPES_H */ diff --git a/wrapper/ftrace.h b/wrapper/ftrace.h index ace33c54..0f15ee4a 100644 --- a/wrapper/ftrace.h +++ b/wrapper/ftrace.h @@ -1,5 +1,5 @@ -#ifndef _LTT_WRAPPER_FTRACE_H -#define _LTT_WRAPPER_FTRACE_H +#ifndef _LTTNG_WRAPPER_FTRACE_H +#define _LTTNG_WRAPPER_FTRACE_H /* * Copyright (C) 2011 Mathieu Desnoyers (mathieu.desnoyers@efficios.com) @@ -67,4 +67,4 @@ void wrapper_unregister_ftrace_function_probe(char *glob, } #endif -#endif /* _LTT_WRAPPER_FTRACE_H */ +#endif /* _LTTNG_WRAPPER_FTRACE_H */ diff --git a/wrapper/kallsyms.h b/wrapper/kallsyms.h index afda9d21..eb904e06 100644 --- a/wrapper/kallsyms.h +++ b/wrapper/kallsyms.h @@ -1,5 +1,5 @@ -#ifndef _LTT_WRAPPER_KALLSYMS_H -#define _LTT_WRAPPER_KALLSYMS_H +#ifndef _LTTNG_WRAPPER_KALLSYMS_H +#define _LTTNG_WRAPPER_KALLSYMS_H /* * Copyright (C) 2011 Avik Sil (avik.sil@linaro.org) @@ -27,4 +27,4 @@ unsigned long kallsyms_lookup_funcptr(const char *name) #endif return addr; } -#endif /* _LTT_WRAPPER_KALLSYMS_H */ +#endif /* _LTTNG_WRAPPER_KALLSYMS_H */ diff --git a/wrapper/perf.h b/wrapper/perf.h index 9a6dbfc0..d774d4ab 100644 --- a/wrapper/perf.h +++ b/wrapper/perf.h @@ -1,5 +1,5 @@ -#ifndef _LTT_WRAPPER_PERF_H -#define _LTT_WRAPPER_PERF_H +#ifndef _LTTNG_WRAPPER_PERF_H +#define _LTTNG_WRAPPER_PERF_H /* * Copyright (C) 2011 Mathieu Desnoyers (mathieu.desnoyers@efficios.com) @@ -29,4 +29,4 @@ wrapper_perf_event_create_kernel_counter(struct perf_event_attr *attr, } #endif -#endif /* _LTT_WRAPPER_PERF_H */ +#endif /* _LTTNG_WRAPPER_PERF_H */ diff --git a/wrapper/spinlock.h b/wrapper/spinlock.h index 8b1ad992..147ace92 100644 --- a/wrapper/spinlock.h +++ b/wrapper/spinlock.h @@ -1,5 +1,5 @@ -#ifndef _LTT_WRAPPER_SPINLOCK_H -#define _LTT_WRAPPER_SPINLOCK_H +#ifndef _LTTNG_WRAPPER_SPINLOCK_H +#define _LTTNG_WRAPPER_SPINLOCK_H /* * Copyright (C) 2011 Mathieu Desnoyers (mathieu.desnoyers@efficios.com) @@ -23,4 +23,4 @@ #endif -#endif /* _LTT_WRAPPER_SPINLOCK_H */ +#endif /* _LTTNG_WRAPPER_SPINLOCK_H */ diff --git a/wrapper/splice.h b/wrapper/splice.h index f75309a8..ee08c6c6 100644 --- a/wrapper/splice.h +++ b/wrapper/splice.h @@ -1,5 +1,5 @@ -#ifndef _LTT_WRAPPER_SPLICE_H -#define _LTT_WRAPPER_SPLICE_H +#ifndef _LTTNG_WRAPPER_SPLICE_H +#define _LTTNG_WRAPPER_SPLICE_H /* * Copyright (C) 2011 Mathieu Desnoyers (mathieu.desnoyers@efficios.com) @@ -20,4 +20,4 @@ ssize_t wrapper_splice_to_pipe(struct pipe_inode_info *pipe, #define PIPE_DEF_BUFFERS 16 #endif -#endif /* _LTT_WRAPPER_SPLICE_H */ +#endif /* _LTTNG_WRAPPER_SPLICE_H */ diff --git a/wrapper/trace-clock.h b/wrapper/trace-clock.h index 11bef42b..05ab055a 100644 --- a/wrapper/trace-clock.h +++ b/wrapper/trace-clock.h @@ -7,8 +7,8 @@ * Dual LGPL v2.1/GPL v2 license. */ -#ifndef _LTT_TRACE_CLOCK_H -#define _LTT_TRACE_CLOCK_H +#ifndef _LTTNG_TRACE_CLOCK_H +#define _LTTNG_TRACE_CLOCK_H #ifdef CONFIG_HAVE_TRACE_CLOCK #include @@ -74,4 +74,4 @@ static inline void put_trace_clock(void) #endif /* CONFIG_HAVE_TRACE_CLOCK */ -#endif /* _LTT_TRACE_CLOCK_H */ +#endif /* _LTTNG_TRACE_CLOCK_H */ diff --git a/wrapper/uuid.h b/wrapper/uuid.h index bfa67ff3..b118b365 100644 --- a/wrapper/uuid.h +++ b/wrapper/uuid.h @@ -1,5 +1,5 @@ -#ifndef _LTT_WRAPPER_UUID_H -#define _LTT_WRAPPER_UUID_H +#ifndef _LTTNG_WRAPPER_UUID_H +#define _LTTNG_WRAPPER_UUID_H /* * Copyright (C) 2011 Mathieu Desnoyers (mathieu.desnoyers@efficios.com) @@ -26,4 +26,4 @@ void uuid_le_gen(uuid_le *u) } #endif -#endif /* _LTT_WRAPPER_UUID_H */ +#endif /* _LTTNG_WRAPPER_UUID_H */ diff --git a/wrapper/vmalloc.h b/wrapper/vmalloc.h index 765f2ad9..8874b571 100644 --- a/wrapper/vmalloc.h +++ b/wrapper/vmalloc.h @@ -1,5 +1,5 @@ -#ifndef _LTT_WRAPPER_VMALLOC_H -#define _LTT_WRAPPER_VMALLOC_H +#ifndef _LTTNG_WRAPPER_VMALLOC_H +#define _LTTNG_WRAPPER_VMALLOC_H /* * Copyright (C) 2011 Mathieu Desnoyers (mathieu.desnoyers@efficios.com) @@ -46,4 +46,4 @@ void wrapper_vmalloc_sync_all(void) } #endif -#endif /* _LTT_WRAPPER_VMALLOC_H */ +#endif /* _LTTNG_WRAPPER_VMALLOC_H */ -- 2.34.1