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

From: Andi Kleen
Date: Fri Mar 22 2013 - 21:30:24 EST


From: Andi Kleen <ak@xxxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/