[lttng-dev] [RFC-PATCH] Adding trap tracepoints definitions
Francis Deslauriers
fdeslaur at gmail.com
Thu Mar 14 20:26:32 EDT 2013
This patch adds new trap tracepoint definitions. Both trap entry and trap exit
tracepoints can be added.
Signed-off-by: Francis Deslauriers <fdeslaur at gmail.com>
---
include/trace/events/trap.h | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
create mode 100644 include/trace/events/trap.h
diff --git a/include/trace/events/trap.h b/include/trace/events/trap.h
new file mode 100644
index 0000000..869c512
--- /dev/null
+++ b/include/trace/events/trap.h
@@ -0,0 +1,39 @@
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM trap
+
+#if !defined(_TRACE_TRAP_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_TRAP_H
+
+#include <linux/tracepoint.h>
+
+DECLARE_EVENT_CLASS(trap,
+ TP_PROTO(int trap_nb),
+
+ TP_ARGS(trap_nb),
+
+ TP_STRUCT__entry(
+ __field( int, trap_nb )
+ ),
+ TP_fast_assign(
+ __entry->trap_nb = trap_nb;
+),
+
+ TP_printk("number=%d", __entry->trap_nb)
+);
+
+DEFINE_EVENT(trap, trap_entry,
+
+ TP_PROTO(int trap_nb),
+
+ TP_ARGS(trap_nb)
+);
+DEFINE_EVENT(trap, trap_exit,
+
+ TP_PROTO(int trap_nb),
+
+ TP_ARGS(trap_nb)
+);
+
+#endif /* _TRACE_TRAP_H */
+/* This part must be outside protection */
+#include <trace/define_trace.h>
--
1.7.10.4
More information about the lttng-dev
mailing list