summaryrefslogtreecommitdiffstats
path: root/include/trace/irq.h
diff options
context:
space:
mode:
authorSteven Rostedt2009-04-10 15:36:00 +0200
committerSteven Rostedt2009-04-14 18:57:28 +0200
commita8d154b009168337494fbf345671bab74d3e4b8b (patch)
tree4097612e1a5cc8bf7658542f7d0f51b815113eaf /include/trace/irq.h
parenttracing: consolidate trace and trace_event headers (diff)
downloadkernel-qcow2-linux-a8d154b009168337494fbf345671bab74d3e4b8b.tar.gz
kernel-qcow2-linux-a8d154b009168337494fbf345671bab74d3e4b8b.tar.xz
kernel-qcow2-linux-a8d154b009168337494fbf345671bab74d3e4b8b.zip
tracing: create automated trace defines
This patch lowers the number of places a developer must modify to add new tracepoints. The current method to add a new tracepoint into an existing system is to write the trace point macro in the trace header with one of the macros TRACE_EVENT, TRACE_FORMAT or DECLARE_TRACE, then they must add the same named item into the C file with the macro DEFINE_TRACE(name) and then add the trace point. This change cuts out the needing to add the DEFINE_TRACE(name). Every file that uses the tracepoint must still include the trace/<type>.h file, but the one C file must also add a define before the including of that file. #define CREATE_TRACE_POINTS #include <trace/mytrace.h> This will cause the trace/mytrace.h file to also produce the C code necessary to implement the trace point. Note, if more than one trace/<type>.h is used to create the C code it is best to list them all together. #define CREATE_TRACE_POINTS #include <trace/foo.h> #include <trace/bar.h> #include <trace/fido.h> Thanks to Mathieu Desnoyers and Christoph Hellwig for coming up with the cleaner solution of the define above the includes over my first design to have the C code include a "special" header. This patch converts sched, irq and lockdep and skb to use this new method. Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Neil Horman <nhorman@tuxdriver.com> Cc: Zhao Lei <zhaolei@cn.fujitsu.com> Cc: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro> Cc: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/trace/irq.h')
-rw-r--r--include/trace/irq.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/trace/irq.h b/include/trace/irq.h
index 04ab4c652225..75e3468e4493 100644
--- a/include/trace/irq.h
+++ b/include/trace/irq.h
@@ -51,4 +51,7 @@ TRACE_FORMAT(softirq_exit,
TP_FMT("softirq=%d action=%s", (int)(h - vec), softirq_to_name[h-vec])
);
-#endif
+#endif /* _TRACE_IRQ_H */
+
+/* This part must be outside protection */
+#include <trace/define_trace.h>