[PATCH 22/29] locking, tsx: Add a trace point for elision skipping

Andi Kleen
2013-03-23T01:30:17Z

For tuning the adaptive locking algorithms it's useful to trace adaptive
elision skipping. Add a trace point for this case.

Used in followon patches

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
include/trace/events/elision.h | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
create mode 100644 include/trace/events/elision.h

diff --git a/include/trace/events/elision.h b/include/trace/events/elision.h
new file mode 100644
index 0000000..5d16d02
--- /dev/null
+++ b/include/trace/events/elision.h
@@ -0,0 +1,31 @@
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM elision
+
+#if !defined(_TRACE_ELISION_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_ELISION_H
+
+#include <linux/lockdep.h>
+#include <linux/tracepoint.h>
+
+#ifdef CONFIG_RTM_LOCKS
+
+TRACE_EVENT(elision_skip_start,
+ TP_PROTO(void *lock, u32 status),
+ TP_ARGS(lock, status),
+ TP_STRUCT__entry(
+ __field(void *, lock)
+ __field(u32, status)
+ ),
+ TP_fast_assign(
+ __entry->lock = lock;
+ __entry->status = status;
+ ),
+ TP_printk("%p %x", __entry->lock, __entry->status)
+);
+
+#endif
+
+#endif
+
+/* This part must be outside protection */
+#include <trace/define_trace.h>
--
1.7.7.6