History

locking: Add lock contention tracepoints

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.

Namhyung Kim committed 4 years ago

Commit 16edd9b1 parent 1ee32613 files · +61 −4Browse files

Showing the changes to kernel (2 of 3 files). Show all

Unified · Split

2 files
  1. kernel/locking/lockdep.c +0 −1
  2. kernel/locking/mutex.c +3 −0
kernel/locking/lockdep.c+0−1
@@ -60,7 +60,6 @@ · 59 unmodified lines
6060
6161 #include "lockdep_internals.h"
6262
63−#define CREATE_TRACE_POINTS
6463 #include <trace/events/lock.h>
6564
6665 #ifdef CONFIG_PROVE_LOCKING
kernel/locking/mutex.c+3−0
@@ -30,6 +30,9 @@ · 29 unmodified lines
3030 #include <linux/debug_locks.h>
3131 #include <linux/osq_lock.h>
3232
33+#define CREATE_TRACE_POINTS
34+#include <trace/events/lock.h>
35+
3336 #ifndef CONFIG_PREEMPT_RT
3437 #include "mutex.h"
3538

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t