From: Mathieu Desnoyers Date: Fri, 3 Sep 2010 15:50:13 +0000 (-0400) Subject: ltt-ascii init fix, renaming CONFIG_LTT_* options to LTT_* X-Git-Tag: v0.19 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=2e6246b4df9cdd984847183506f345ef92953f87;p=lttng-modules.git ltt-ascii init fix, renaming CONFIG_LTT_* options to LTT_* Signed-off-by: Mathieu Desnoyers --- diff --git a/Makefile b/Makefile index befc98e0..81d81288 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,7 @@ endif else KERNELDIR ?= /lib/modules/$(shell uname -r)/build PWD := $(shell pwd) + CFLAGS = $(EXTCFLAGS) default: $(MAKE) -C $(KERNELDIR) M=$(PWD) modules diff --git a/ltt-ascii.c b/ltt-ascii.c index ed3c20d5..b020fedb 100644 --- a/ltt-ascii.c +++ b/ltt-ascii.c @@ -568,7 +568,6 @@ EXPORT_SYMBOL_GPL(ltt_ascii_remove_dir); __init int ltt_ascii_init(void) { ltt_ascii_dir_dentry = debugfs_create_dir(LTT_ASCII, get_ltt_root()); - put_ltt_root(); return ltt_ascii_dir_dentry ? 0 : -EFAULT; } @@ -576,6 +575,7 @@ __init int ltt_ascii_init(void) __exit void ltt_ascii_exit(void) { debugfs_remove(ltt_ascii_dir_dentry); + put_ltt_root(); } MODULE_LICENSE("GPL and additional rights"); diff --git a/ltt-core.c b/ltt-core.c index 13d517f5..1a0424e9 100644 --- a/ltt-core.c +++ b/ltt-core.c @@ -106,3 +106,7 @@ void ltt_filter_unregister(void) ltt_run_filter = ltt_run_filter_default; } EXPORT_SYMBOL_GPL(ltt_filter_unregister); + +MODULE_LICENSE("GPL and additional rights"); +MODULE_AUTHOR("Mathieu Desnoyers"); +MODULE_DESCRIPTION("Linux Trace Toolkit Next Generation Tracer Core"); diff --git a/ltt-relay-lockless.c b/ltt-relay-lockless.c index 0c4c83c2..db4362d4 100644 --- a/ltt-relay-lockless.c +++ b/ltt-relay-lockless.c @@ -121,7 +121,7 @@ void ltt_chanbuf_free(struct ltt_chanbuf *buf) struct ltt_chan *chan = container_of(buf->a.chan, struct ltt_chan, a); ltt_relay_print_buffer_errors(chan, buf->a.cpu); -#ifdef CONFIG_LTT_VMCORE +#ifdef LTT_VMCORE kfree(buf->commit_seq); #endif kfree(buf->commit_count); @@ -157,7 +157,7 @@ int ltt_chanbuf_create(struct ltt_chanbuf *buf, struct ltt_chan_alloc *chana, goto free_chanbuf; } -#ifdef CONFIG_LTT_VMCORE +#ifdef LTT_VMCORE buf->commit_seq = kzalloc_node(ALIGN(sizeof(*buf->commit_seq) * chan->a.n_sb, 1 << INTERNODE_CACHE_SHIFT), @@ -208,7 +208,7 @@ int ltt_chanbuf_create(struct ltt_chanbuf *buf, struct ltt_chan_alloc *chana, /* Error handling */ free_init: -#ifdef CONFIG_LTT_VMCORE +#ifdef LTT_VMCORE kfree(buf->commit_seq); free_commit: #endif diff --git a/ltt-relay-lockless.h b/ltt-relay-lockless.h index 62fc5159..73c6a3d8 100644 --- a/ltt-relay-lockless.h +++ b/ltt-relay-lockless.h @@ -88,7 +88,7 @@ struct ltt_chanbuf { * Last timestamp written in the buffer. */ /* End of first 32 bytes cacheline */ -#ifdef CONFIG_LTT_VMCORE +#ifdef LTT_VMCORE local_t *commit_seq; /* Consecutive commits */ #endif atomic_long_t active_readers; /* @@ -235,7 +235,7 @@ void ltt_reserve_push_reader(struct ltt_chanbuf *buf, struct ltt_chan *chan, consumed_new) != consumed_old)); } -#ifdef CONFIG_LTT_VMCORE +#ifdef LTT_VMCORE static __inline__ void ltt_vmcore_check_deliver(struct ltt_chanbuf *buf, long commit_count, long idx) @@ -342,7 +342,7 @@ int ltt_relay_try_reserve(struct ltt_chanbuf *buf, struct ltt_chan *chan, *tsc = trace_clock_read64(); -#ifdef CONFIG_LTT_VMCORE +#ifdef LTT_VMCORE prefetch(&buf->commit_count[SUBBUF_INDEX(*o_begin, chan)]); prefetch(&buf->commit_seq[SUBBUF_INDEX(*o_begin, chan)]); #else @@ -452,7 +452,7 @@ void ltt_force_switch(struct ltt_chanbuf *buf, enum force_switch_mode mode) * commit count reaches back the reserve offset (module subbuffer size). It is * useful for crash dump. */ -#ifdef CONFIG_LTT_VMCORE +#ifdef LTT_VMCORE static __inline__ void ltt_write_commit_counter(struct ltt_chanbuf *buf, struct ltt_chan *chan, long idx, long buf_offset, long commit_count, diff --git a/ltt-serialize.c b/ltt-serialize.c index 305b3eb8..1d5a5dfb 100644 --- a/ltt-serialize.c +++ b/ltt-serialize.c @@ -902,7 +902,7 @@ void ltt_vtrace(const struct marker *mdata, void *probe_data, void *call_data, continue; if (unlikely(!ltt_run_filter(trace, eID))) continue; -#ifdef CONFIG_LTT_DEBUG_EVENT_SIZE +#ifdef LTT_DEBUG_EVENT_SIZE rflags = LTT_RFLAG_ID_SIZE; #else if (unlikely(eID >= LTT_FREE_EVENTS)) diff --git a/ltt-type-serializer.c b/ltt-type-serializer.c index cb92aeed..7d06490c 100644 --- a/ltt-type-serializer.c +++ b/ltt-type-serializer.c @@ -58,7 +58,7 @@ void _ltt_specialized_trace(const struct marker *mdata, void *probe_data, continue; if (unlikely(!ltt_run_filter(trace, eID))) continue; -#ifdef CONFIG_LTT_DEBUG_EVENT_SIZE +#ifdef LTT_DEBUG_EVENT_SIZE rflags = LTT_RFLAG_ID_SIZE; #else if (unlikely(eID >= LTT_FREE_EVENTS))