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
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_LOCKING65#ifdef CONFIG_PROVE_LOCKING
kernel/locking/mutex.c+3−0
@@ -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_RT36#ifndef CONFIG_PREEMPT_RT
34#include "mutex.h"37#include "mutex.h"
35 38

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