This adds two new lock contention tracepoints like below: * lock:contention_begin * lock:contention_end The lock:contention_begin takes a flags argument to classify locks. I found it useful to identify what kind of locks it's tracing like if it's spinning or sleeping, reader-writer lock, real-time, and per-cpu. Move tracepoint definitions into mutex.c so that we can use them without lockdep.
Showing the changes to kernel (2 of 3 files). Show all
Unified · Split
| @@ -60,7 +60,6 @@ · 59 unmodified lines | |||
| 60 | 60 | ||
| 61 | #include "lockdep_internals.h" | 61 | #include "lockdep_internals.h" |
| 62 | 62 | ||
| 63 | #define CREATE_TRACE_POINTS | ||
| 64 | #include <trace/events/lock.h> | 63 | #include <trace/events/lock.h> |
| 65 | 64 | ||
| 66 | #ifdef CONFIG_PROVE_LOCKING | 65 | #ifdef CONFIG_PROVE_LOCKING |
| @@ -30,6 +30,9 @@ · 29 unmodified lines | |||
| 30 | #include <linux/debug_locks.h> | 30 | #include <linux/debug_locks.h> |
| 31 | #include <linux/osq_lock.h> | 31 | #include <linux/osq_lock.h> |
| 32 | 32 | ||
| 33 | #define CREATE_TRACE_POINTS | ||
| 34 | #include <trace/events/lock.h> | ||
| 35 | |||
| 33 | #ifndef CONFIG_PREEMPT_RT | 36 | #ifndef CONFIG_PREEMPT_RT |
| 34 | #include "mutex.h" | 37 | #include "mutex.h" |
| 35 | 38 | ||