Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1297883
| From | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [for-next][PATCH 07/13] tracing: Introduce TRACE_EVENT_FN_COND macro |
| Date | 2015-12-24 15:40 +0100 |
| Message-ID | <qJfdE-7VC-23@gated-at.bofh.it> (permalink) |
| References | <qJf3Y-7QW-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Denis Kirjanov <kda@linux-powerpc.org> TRACE_EVENT_FN can't be used in some circumstances like invoking trace functions from offlined CPU due to RCU usage. This patch adds the TRACE_EVENT_FN_COND macro to make such trace points conditional. Link: http://lkml.kernel.org/r/1450124286-4822-1-git-send-email-kda@linux-powerpc.org Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> --- include/linux/tracepoint.h | 4 ++++ include/trace/define_trace.h | 6 ++++++ include/trace/trace_events.h | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index 696a339c592c..45b3fcf7dd3c 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h @@ -493,6 +493,10 @@ extern void syscall_unregfunc(void); #define TRACE_EVENT_FN(name, proto, args, struct, \ assign, print, reg, unreg) \ DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) +#define TRACE_EVENT_FN_COND(name, proto, args, cond, struct, \ + assign, print, reg, unreg) \ + DECLARE_TRACE_CONDITION(name, PARAMS(proto), \ + PARAMS(args), PARAMS(cond)) #define TRACE_EVENT_CONDITION(name, proto, args, cond, \ struct, assign, print) \ DECLARE_TRACE_CONDITION(name, PARAMS(proto), \ diff --git a/include/trace/define_trace.h b/include/trace/define_trace.h index 2d8639ea64d5..6e3945f64102 100644 --- a/include/trace/define_trace.h +++ b/include/trace/define_trace.h @@ -40,6 +40,11 @@ assign, print, reg, unreg) \ DEFINE_TRACE_FN(name, reg, unreg) +#undef TRACE_EVENT_FN_COND +#define TRACE_EVENT_FN_COND(name, proto, args, cond, tstruct, \ + assign, print, reg, unreg) \ + DEFINE_TRACE_FN(name, reg, unreg) + #undef DEFINE_EVENT #define DEFINE_EVENT(template, name, proto, args) \ DEFINE_TRACE(name) @@ -93,6 +98,7 @@ #undef TRACE_EVENT #undef TRACE_EVENT_FN +#undef TRACE_EVENT_FN_COND #undef TRACE_EVENT_CONDITION #undef DECLARE_EVENT_CLASS #undef DEFINE_EVENT diff --git a/include/trace/trace_events.h b/include/trace/trace_events.h index de996cf61053..170c93bbdbb7 100644 --- a/include/trace/trace_events.h +++ b/include/trace/trace_events.h @@ -123,6 +123,12 @@ TRACE_MAKE_SYSTEM_STR(); TRACE_EVENT(name, PARAMS(proto), PARAMS(args), \ PARAMS(tstruct), PARAMS(assign), PARAMS(print)) \ +#undef TRACE_EVENT_FN_COND +#define TRACE_EVENT_FN_COND(name, proto, args, cond, tstruct, \ + assign, print, reg, unreg) \ + TRACE_EVENT_CONDITION(name, PARAMS(proto), PARAMS(args), PARAMS(cond), \ + PARAMS(tstruct), PARAMS(assign), PARAMS(print)) \ + #undef TRACE_EVENT_FLAGS #define TRACE_EVENT_FLAGS(name, value) \ __TRACE_EVENT_FLAGS(name, value) -- 2.6.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[for-next][PATCH 00/13] tracing: More updates for 4.5. Steven Rostedt <rostedt@goodmis.org> - 2015-12-24 15:40 +0100 [for-next][PATCH 06/13] tracing: Use seq_buf_used() in seq_buf_to_user() instead of len Steven Rostedt <rostedt@goodmis.org> - 2015-12-24 15:40 +0100 [for-next][PATCH 01/13] ftrace: Fix a typo in comment Steven Rostedt <rostedt@goodmis.org> - 2015-12-24 15:40 +0100 [for-next][PATCH 12/13] metag: ftrace: Fix the comments for ftrace_modify_code Steven Rostedt <rostedt@goodmis.org> - 2015-12-24 15:40 +0100 [for-next][PATCH 03/13] ftrace: Remove use of control list and ops Steven Rostedt <rostedt@goodmis.org> - 2015-12-24 15:40 +0100 [for-next][PATCH 07/13] tracing: Introduce TRACE_EVENT_FN_COND macro Steven Rostedt <rostedt@goodmis.org> - 2015-12-24 15:40 +0100 [for-next][PATCH 04/13] ftrace: Have ftrace_ops_get_func() handle RCU and PER_CPU flags too Steven Rostedt <rostedt@goodmis.org> - 2015-12-24 15:40 +0100 [for-next][PATCH 13/13] tracing: Fix comment to use tracing_on over tracing_enable Steven Rostedt <rostedt@goodmis.org> - 2015-12-24 15:40 +0100 [for-next][PATCH 09/13] ftrace: Clean up ftrace_module_init() code Steven Rostedt <rostedt@goodmis.org> - 2015-12-24 15:40 +0100 [for-next][PATCH 10/13] ia64: ftrace: Fix the comments for ftrace_modify_code() Steven Rostedt <rostedt@goodmis.org> - 2015-12-24 15:40 +0100 [for-next][PATCH 02/13] ftrace: Fix output of enabled_functions for showing tramp Steven Rostedt <rostedt@goodmis.org> - 2015-12-24 15:40 +0100
csiph-web