summaryrefslogtreecommitdiff
path: root/include/trace/events/lock.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2022-03-30 13:06:54 +0200
committerPeter Zijlstra <peterz@infradead.org>2022-04-05 10:24:36 +0200
commitdc1f7893a70fe403983bd8492f177bf993940e2c (patch)
tree0601a9c8f14c338fbae6755284036b50e98501d1 /include/trace/events/lock.h
parentee042be16cb455116d0fe99b77c6bc8baf87c8c6 (diff)
locking/mutex: Make contention tracepoints more consistent wrt adaptive spinning
Have the trace_contention_*() tracepoints consistently include adaptive spinning. In order to differentiate between the spinning and non-spinning states add LCB_F_MUTEX and combine with LCB_F_SPIN. The consequence is that a mutex contention can now triggler multiple _begin() tracepoints before triggering an _end(). Additionally, this fixes one path where mutex would trigger _end() without ever seeing a _begin(). Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Diffstat (limited to 'include/trace/events/lock.h')
-rw-r--r--include/trace/events/lock.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/trace/events/lock.h b/include/trace/events/lock.h
index b9b6e3edd518..9ebd081e057e 100644
--- a/include/trace/events/lock.h
+++ b/include/trace/events/lock.h
@@ -14,6 +14,7 @@
#define LCB_F_WRITE (1U << 2)
#define LCB_F_RT (1U << 3)
#define LCB_F_PERCPU (1U << 4)
+#define LCB_F_MUTEX (1U << 5)
#ifdef CONFIG_LOCKDEP
@@ -113,7 +114,8 @@ TRACE_EVENT(contention_begin,
{ LCB_F_READ, "READ" },
{ LCB_F_WRITE, "WRITE" },
{ LCB_F_RT, "RT" },
- { LCB_F_PERCPU, "PERCPU" }
+ { LCB_F_PERCPU, "PERCPU" },
+ { LCB_F_MUTEX, "MUTEX" }
))
);