* [PATCH 0/3] [GIT PULL] tracing: various fixes
@ 2010-05-06 23:04 Steven Rostedt
2010-05-06 23:05 ` [PATCH 1/3] tracing: Make the documentation clear on trace_event boot option Steven Rostedt
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Steven Rostedt @ 2010-05-06 23:04 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker
Ingo,
Please pull the latest tip/tracing/core tree, which can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
tip/tracing/core
Li Zefan (1):
tracing: Make the documentation clear on trace_event boot option
Steven Rostedt (1):
tracing: Fix tracepoint.h DECLARE_TRACE() to allow more than one header
Thiago Farina (1):
tracing: Fix "integer as NULL pointer" warning.
----
Documentation/trace/events.txt | 3 +-
include/linux/tracepoint.h | 114 +++++++++++++++++++++-------------------
include/trace/define_trace.h | 5 ++
include/trace/events/napi.h | 10 +++-
kernel/trace/trace_output.c | 2 +-
5 files changed, 75 insertions(+), 59 deletions(-)
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 1/3] tracing: Make the documentation clear on trace_event boot option 2010-05-06 23:04 [PATCH 0/3] [GIT PULL] tracing: various fixes Steven Rostedt @ 2010-05-06 23:05 ` Steven Rostedt 2010-05-06 23:05 ` [PATCH 2/3] tracing: Fix tracepoint.h DECLARE_TRACE() to allow more than one header Steven Rostedt ` (2 subsequent siblings) 3 siblings, 0 replies; 7+ messages in thread From: Steven Rostedt @ 2010-05-06 23:05 UTC (permalink / raw) To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker, Li Zefan [-- Attachment #1: 0001-tracing-Make-the-documentation-clear-on-trace_event-.patch --] [-- Type: text/plain, Size: 959 bytes --] From: Li Zefan <lizf@cn.fujitsu.com> Make it clear that event-list is a comma separated list of events. Reported-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> LKML-Reference: <4B2F154C.2060503@cn.fujitsu.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> --- Documentation/trace/events.txt | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/Documentation/trace/events.txt b/Documentation/trace/events.txt index 02ac6ed..778ddf3 100644 --- a/Documentation/trace/events.txt +++ b/Documentation/trace/events.txt @@ -90,7 +90,8 @@ In order to facilitate early boot debugging, use boot option: trace_event=[event-list] -The format of this boot option is the same as described in section 2.1. +event-list is a comma separated list of events. See section 2.1 for event +format. 3. Defining an event-enabled tracepoint ======================================= -- 1.7.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] tracing: Fix tracepoint.h DECLARE_TRACE() to allow more than one header 2010-05-06 23:04 [PATCH 0/3] [GIT PULL] tracing: various fixes Steven Rostedt 2010-05-06 23:05 ` [PATCH 1/3] tracing: Make the documentation clear on trace_event boot option Steven Rostedt @ 2010-05-06 23:05 ` Steven Rostedt 2010-05-06 23:05 ` [PATCH 3/3] tracing: Fix "integer as NULL pointer" warning Steven Rostedt 2010-05-07 6:34 ` [PATCH 0/3] [GIT PULL] tracing: various fixes Ingo Molnar 3 siblings, 0 replies; 7+ messages in thread From: Steven Rostedt @ 2010-05-06 23:05 UTC (permalink / raw) To: linux-kernel Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker, Neil Horman, David S. Miller, Mathieu Desnoyers [-- Attachment #1: 0002-tracing-Fix-tracepoint.h-DECLARE_TRACE-to-allow-more.patch --] [-- Type: text/plain, Size: 7329 bytes --] From: Steven Rostedt <srostedt@redhat.com> When more than one header is included under CREATE_TRACE_POINTS the DECLARE_TRACE() macro is not defined back to its original meaning and the second include will fail to initialize the TRACE_EVENT() and DECLARE_TRACE() correctly. To fix this the tracepoint.h file moves the define of DECLARE_TRACE() out of the #ifdef _LINUX_TRACEPOINT_H protection (just like the define of the TRACE_EVENT()). This way the define_trace.h will undef the DECLARE_TRACE() at the end and allow new headers to start from scratch. This patch also requires fixing the include/events/napi.h It currently uses DECLARE_TRACE() and should be converted to a TRACE_EVENT() format. But I'll leave that change to the authors of that file. But since the napi.h file depends on using the CREATE_TRACE_POINTS and does not define its own DEFINE_TRACE() it must use the define_trace.h method instead. Cc: Neil Horman <nhorman@tuxdriver.com> Cc: David S. Miller <davem@davemloft.net> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> --- include/linux/tracepoint.h | 114 ++++++++++++++++++++++-------------------- include/trace/define_trace.h | 5 ++ include/trace/events/napi.h | 10 +++- 3 files changed, 72 insertions(+), 57 deletions(-) diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index 78b4bd3..1d85f9a 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h @@ -33,6 +33,65 @@ struct tracepoint { * Keep in sync with vmlinux.lds.h. */ +/* + * Connect a probe to a tracepoint. + * Internal API, should not be used directly. + */ +extern int tracepoint_probe_register(const char *name, void *probe); + +/* + * Disconnect a probe from a tracepoint. + * Internal API, should not be used directly. + */ +extern int tracepoint_probe_unregister(const char *name, void *probe); + +extern int tracepoint_probe_register_noupdate(const char *name, void *probe); +extern int tracepoint_probe_unregister_noupdate(const char *name, void *probe); +extern void tracepoint_probe_update_all(void); + +struct tracepoint_iter { + struct module *module; + struct tracepoint *tracepoint; +}; + +extern void tracepoint_iter_start(struct tracepoint_iter *iter); +extern void tracepoint_iter_next(struct tracepoint_iter *iter); +extern void tracepoint_iter_stop(struct tracepoint_iter *iter); +extern void tracepoint_iter_reset(struct tracepoint_iter *iter); +extern int tracepoint_get_iter_range(struct tracepoint **tracepoint, + struct tracepoint *begin, struct tracepoint *end); + +/* + * tracepoint_synchronize_unregister must be called between the last tracepoint + * probe unregistration and the end of module exit to make sure there is no + * caller executing a probe when it is freed. + */ +static inline void tracepoint_synchronize_unregister(void) +{ + synchronize_sched(); +} + +#define PARAMS(args...) args + +#ifdef CONFIG_TRACEPOINTS +extern void tracepoint_update_probe_range(struct tracepoint *begin, + struct tracepoint *end); +#else +static inline void tracepoint_update_probe_range(struct tracepoint *begin, + struct tracepoint *end) +{ } +#endif /* CONFIG_TRACEPOINTS */ + +#endif /* _LINUX_TRACEPOINT_H */ + +/* + * Note: we keep the TRACE_EVENT and DECLARE_TRACE outside the include + * file ifdef protection. + * This is due to the way trace events work. If a file includes two + * trace event headers under one "CREATE_TRACE_POINTS" the first include + * will override the TRACE_EVENT and break the second include. + */ + #ifndef DECLARE_TRACE #define TP_PROTO(args...) args @@ -96,9 +155,6 @@ struct tracepoint { #define EXPORT_TRACEPOINT_SYMBOL(name) \ EXPORT_SYMBOL(__tracepoint_##name) -extern void tracepoint_update_probe_range(struct tracepoint *begin, - struct tracepoint *end); - #else /* !CONFIG_TRACEPOINTS */ #define DECLARE_TRACE(name, proto, args) \ static inline void _do_trace_##name(struct tracepoint *tp, proto) \ @@ -119,61 +175,9 @@ extern void tracepoint_update_probe_range(struct tracepoint *begin, #define EXPORT_TRACEPOINT_SYMBOL_GPL(name) #define EXPORT_TRACEPOINT_SYMBOL(name) -static inline void tracepoint_update_probe_range(struct tracepoint *begin, - struct tracepoint *end) -{ } #endif /* CONFIG_TRACEPOINTS */ #endif /* DECLARE_TRACE */ -/* - * Connect a probe to a tracepoint. - * Internal API, should not be used directly. - */ -extern int tracepoint_probe_register(const char *name, void *probe); - -/* - * Disconnect a probe from a tracepoint. - * Internal API, should not be used directly. - */ -extern int tracepoint_probe_unregister(const char *name, void *probe); - -extern int tracepoint_probe_register_noupdate(const char *name, void *probe); -extern int tracepoint_probe_unregister_noupdate(const char *name, void *probe); -extern void tracepoint_probe_update_all(void); - -struct tracepoint_iter { - struct module *module; - struct tracepoint *tracepoint; -}; - -extern void tracepoint_iter_start(struct tracepoint_iter *iter); -extern void tracepoint_iter_next(struct tracepoint_iter *iter); -extern void tracepoint_iter_stop(struct tracepoint_iter *iter); -extern void tracepoint_iter_reset(struct tracepoint_iter *iter); -extern int tracepoint_get_iter_range(struct tracepoint **tracepoint, - struct tracepoint *begin, struct tracepoint *end); - -/* - * tracepoint_synchronize_unregister must be called between the last tracepoint - * probe unregistration and the end of module exit to make sure there is no - * caller executing a probe when it is freed. - */ -static inline void tracepoint_synchronize_unregister(void) -{ - synchronize_sched(); -} - -#define PARAMS(args...) args - -#endif /* _LINUX_TRACEPOINT_H */ - -/* - * Note: we keep the TRACE_EVENT outside the include file ifdef protection. - * This is due to the way trace events work. If a file includes two - * trace event headers under one "CREATE_TRACE_POINTS" the first include - * will override the TRACE_EVENT and break the second include. - */ - #ifndef TRACE_EVENT /* * For use with the TRACE_EVENT macro: diff --git a/include/trace/define_trace.h b/include/trace/define_trace.h index 5acfb1e..1dfab54 100644 --- a/include/trace/define_trace.h +++ b/include/trace/define_trace.h @@ -65,6 +65,10 @@ #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) +/* Make all open coded DECLARE_TRACE nops */ +#undef DECLARE_TRACE +#define DECLARE_TRACE(name, proto, args) + #ifdef CONFIG_EVENT_TRACING #include <trace/ftrace.h> #endif @@ -75,6 +79,7 @@ #undef DEFINE_EVENT #undef DEFINE_EVENT_PRINT #undef TRACE_HEADER_MULTI_READ +#undef DECLARE_TRACE /* Only undef what we defined in this file */ #ifdef UNDEF_TRACE_INCLUDE_FILE diff --git a/include/trace/events/napi.h b/include/trace/events/napi.h index a8989c4..188deca 100644 --- a/include/trace/events/napi.h +++ b/include/trace/events/napi.h @@ -1,4 +1,7 @@ -#ifndef _TRACE_NAPI_H_ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM napi + +#if !defined(_TRACE_NAPI_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_NAPI_H_ #include <linux/netdevice.h> @@ -8,4 +11,7 @@ DECLARE_TRACE(napi_poll, TP_PROTO(struct napi_struct *napi), TP_ARGS(napi)); -#endif +#endif /* _TRACE_NAPI_H_ */ + +/* This part must be outside protection */ +#include <trace/define_trace.h> -- 1.7.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] tracing: Fix "integer as NULL pointer" warning. 2010-05-06 23:04 [PATCH 0/3] [GIT PULL] tracing: various fixes Steven Rostedt 2010-05-06 23:05 ` [PATCH 1/3] tracing: Make the documentation clear on trace_event boot option Steven Rostedt 2010-05-06 23:05 ` [PATCH 2/3] tracing: Fix tracepoint.h DECLARE_TRACE() to allow more than one header Steven Rostedt @ 2010-05-06 23:05 ` Steven Rostedt 2010-05-07 6:34 ` [PATCH 0/3] [GIT PULL] tracing: various fixes Ingo Molnar 3 siblings, 0 replies; 7+ messages in thread From: Steven Rostedt @ 2010-05-06 23:05 UTC (permalink / raw) To: linux-kernel Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker, Thiago Farina [-- Attachment #1: 0003-tracing-Fix-integer-as-NULL-pointer-warning.patch --] [-- Type: text/plain, Size: 770 bytes --] From: Thiago Farina <tfransosi@gmail.com> kernel/trace/trace_output.c:256:24: warning: Using plain integer as NULL pointer Signed-off-by: Thiago Farina <tfransosi@gmail.com> LKML-Reference: <1264349038-1766-3-git-send-email-tfransosi@gmail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> --- kernel/trace/trace_output.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index 8e46b33..2404c12 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c @@ -253,7 +253,7 @@ void *trace_seq_reserve(struct trace_seq *s, size_t len) void *ret; if (s->full) - return 0; + return NULL; if (len > ((PAGE_SIZE - 1) - s->len)) { s->full = 1; -- 1.7.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] [GIT PULL] tracing: various fixes 2010-05-06 23:04 [PATCH 0/3] [GIT PULL] tracing: various fixes Steven Rostedt ` (2 preceding siblings ...) 2010-05-06 23:05 ` [PATCH 3/3] tracing: Fix "integer as NULL pointer" warning Steven Rostedt @ 2010-05-07 6:34 ` Ingo Molnar 3 siblings, 0 replies; 7+ messages in thread From: Ingo Molnar @ 2010-05-07 6:34 UTC (permalink / raw) To: Steven Rostedt; +Cc: linux-kernel, Andrew Morton, Frederic Weisbecker * Steven Rostedt <rostedt@goodmis.org> wrote: > Ingo, > > Please pull the latest tip/tracing/core tree, which can be found at: > > git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git > tip/tracing/core > > > Li Zefan (1): > tracing: Make the documentation clear on trace_event boot option > > Steven Rostedt (1): > tracing: Fix tracepoint.h DECLARE_TRACE() to allow more than one header > > Thiago Farina (1): > tracing: Fix "integer as NULL pointer" warning. > > ---- > Documentation/trace/events.txt | 3 +- > include/linux/tracepoint.h | 114 +++++++++++++++++++++------------------- > include/trace/define_trace.h | 5 ++ > include/trace/events/napi.h | 10 +++- > kernel/trace/trace_output.c | 2 +- > 5 files changed, 75 insertions(+), 59 deletions(-) Pulled, thanks Steve! Ingo ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 0/3] [GIT PULL] tracing: various fixes
@ 2009-11-17 17:12 Steven Rostedt
2009-11-17 17:19 ` Ingo Molnar
0 siblings, 1 reply; 7+ messages in thread
From: Steven Rostedt @ 2009-11-17 17:12 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker
Ingo,
This is based on top of tip/tracing/core.
Please pull the latest tip/tracing/core-1 tree, which can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
tip/tracing/core-1
Lai Jiangshan (1):
tracing: Prevent build warning: 'ftrace_graph_buf' defined but not used
Steven Rostedt (2):
ring-buffer: Move access to commit_page up into function used
tracing: Only print objcopy version warning once from recordmcount
----
Makefile | 1 +
kernel/trace/ftrace.c | 2 +-
kernel/trace/ring_buffer.c | 9 +++------
scripts/recordmcount.pl | 12 ++++++++++--
4 files changed, 15 insertions(+), 9 deletions(-)
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 0/3] [GIT PULL] tracing: various fixes 2009-11-17 17:12 Steven Rostedt @ 2009-11-17 17:19 ` Ingo Molnar 0 siblings, 0 replies; 7+ messages in thread From: Ingo Molnar @ 2009-11-17 17:19 UTC (permalink / raw) To: Steven Rostedt; +Cc: linux-kernel, Andrew Morton, Frederic Weisbecker * Steven Rostedt <rostedt@goodmis.org> wrote: > > Ingo, > > This is based on top of tip/tracing/core. > > Please pull the latest tip/tracing/core-1 tree, which can be found at: > > git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git > tip/tracing/core-1 > > > Lai Jiangshan (1): > tracing: Prevent build warning: 'ftrace_graph_buf' defined but not used > > Steven Rostedt (2): > ring-buffer: Move access to commit_page up into function used > tracing: Only print objcopy version warning once from recordmcount > > ---- > Makefile | 1 + > kernel/trace/ftrace.c | 2 +- > kernel/trace/ring_buffer.c | 9 +++------ > scripts/recordmcount.pl | 12 ++++++++++-- > 4 files changed, 15 insertions(+), 9 deletions(-) Pulled into tip:tracing/core, thanks Steve! Ingo ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-05-07 6:34 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-05-06 23:04 [PATCH 0/3] [GIT PULL] tracing: various fixes Steven Rostedt 2010-05-06 23:05 ` [PATCH 1/3] tracing: Make the documentation clear on trace_event boot option Steven Rostedt 2010-05-06 23:05 ` [PATCH 2/3] tracing: Fix tracepoint.h DECLARE_TRACE() to allow more than one header Steven Rostedt 2010-05-06 23:05 ` [PATCH 3/3] tracing: Fix "integer as NULL pointer" warning Steven Rostedt 2010-05-07 6:34 ` [PATCH 0/3] [GIT PULL] tracing: various fixes Ingo Molnar -- strict thread matches above, loose matches on Subject: below -- 2009-11-17 17:12 Steven Rostedt 2009-11-17 17:19 ` Ingo Molnar
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox