summaryrefslogtreecommitdiffstats
path: root/include/trace/define_trace.h
diff options
context:
space:
mode:
authorYafang Shao <laoar.shao@gmail.com>2019-03-26 13:13:09 +0100
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2019-04-08 15:22:51 +0200
commit163363455b42a1cf833742177149d1352dfe673e (patch)
tree456d1d7fcd0b6e960f192ee1f25d193de68db280 /include/trace/define_trace.h
parenttracing: Add error_log to README (diff)
downloadlinux-163363455b42a1cf833742177149d1352dfe673e.tar.xz
linux-163363455b42a1cf833742177149d1352dfe673e.zip
tracing: introduce TRACE_EVENT_NOP()
Sometimes we want to define a tracepoint as a do-nothing function. So I introduce TRACE_EVENT_NOP, DECLARE_EVENT_CLASS_NOP and DEFINE_EVENT_NOP for this kind of usage. Link: http://lkml.kernel.org/r/1553602391-11926-2-git-send-email-laoar.shao@gmail.com Signed-off-by: Yafang Shao <laoar.shao@gmail.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'include/trace/define_trace.h')
-rw-r--r--include/trace/define_trace.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/trace/define_trace.h b/include/trace/define_trace.h
index cb30c5532144..bd75f97867b9 100644
--- a/include/trace/define_trace.h
+++ b/include/trace/define_trace.h
@@ -46,6 +46,12 @@
assign, print, reg, unreg) \
DEFINE_TRACE_FN(name, reg, unreg)
+#undef TRACE_EVENT_NOP
+#define TRACE_EVENT_NOP(name, proto, args, struct, assign, print)
+
+#undef DEFINE_EVENT_NOP
+#define DEFINE_EVENT_NOP(template, name, proto, args)
+
#undef DEFINE_EVENT
#define DEFINE_EVENT(template, name, proto, args) \
DEFINE_TRACE(name)
@@ -102,6 +108,8 @@
#undef TRACE_EVENT_FN
#undef TRACE_EVENT_FN_COND
#undef TRACE_EVENT_CONDITION
+#undef TRACE_EVENT_NOP
+#undef DEFINE_EVENT_NOP
#undef DECLARE_EVENT_CLASS
#undef DEFINE_EVENT
#undef DEFINE_EVENT_FN