diff options
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/lockdep.h | 9 | ||||
-rw-r--r-- | include/trace/lockdep_event_types.h | 44 | ||||
-rw-r--r-- | include/trace/trace_event_types.h | 1 | ||||
-rw-r--r-- | include/trace/trace_events.h | 1 |
4 files changed, 55 insertions, 0 deletions
diff --git a/include/trace/lockdep.h b/include/trace/lockdep.h new file mode 100644 index 000000000000..5ca67df87f2a --- /dev/null +++ b/include/trace/lockdep.h | |||
@@ -0,0 +1,9 @@ | |||
1 | #ifndef _TRACE_LOCKDEP_H | ||
2 | #define _TRACE_LOCKDEP_H | ||
3 | |||
4 | #include <linux/lockdep.h> | ||
5 | #include <linux/tracepoint.h> | ||
6 | |||
7 | #include <trace/lockdep_event_types.h> | ||
8 | |||
9 | #endif | ||
diff --git a/include/trace/lockdep_event_types.h b/include/trace/lockdep_event_types.h new file mode 100644 index 000000000000..f713d74a82b4 --- /dev/null +++ b/include/trace/lockdep_event_types.h | |||
@@ -0,0 +1,44 @@ | |||
1 | |||
2 | #ifndef TRACE_EVENT_FORMAT | ||
3 | # error Do not include this file directly. | ||
4 | # error Unless you know what you are doing. | ||
5 | #endif | ||
6 | |||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM lock | ||
9 | |||
10 | #ifdef CONFIG_LOCKDEP | ||
11 | |||
12 | TRACE_FORMAT(lock_acquire, | ||
13 | TPPROTO(struct lockdep_map *lock, unsigned int subclass, | ||
14 | int trylock, int read, int check, | ||
15 | struct lockdep_map *next_lock, unsigned long ip), | ||
16 | TPARGS(lock, subclass, trylock, read, check, next_lock, ip), | ||
17 | TPFMT("%s%s%s", trylock ? "try " : "", | ||
18 | read ? "read " : "", lock->name) | ||
19 | ); | ||
20 | |||
21 | TRACE_FORMAT(lock_release, | ||
22 | TPPROTO(struct lockdep_map *lock, int nested, unsigned long ip), | ||
23 | TPARGS(lock, nested, ip), | ||
24 | TPFMT("%s", lock->name) | ||
25 | ); | ||
26 | |||
27 | #ifdef CONFIG_LOCK_STAT | ||
28 | |||
29 | TRACE_FORMAT(lock_contended, | ||
30 | TPPROTO(struct lockdep_map *lock, unsigned long ip), | ||
31 | TPARGS(lock, ip), | ||
32 | TPFMT("%s", lock->name) | ||
33 | ); | ||
34 | |||
35 | TRACE_FORMAT(lock_acquired, | ||
36 | TPPROTO(struct lockdep_map *lock, unsigned long ip), | ||
37 | TPARGS(lock, ip), | ||
38 | TPFMT("%s", lock->name) | ||
39 | ); | ||
40 | |||
41 | #endif | ||
42 | #endif | ||
43 | |||
44 | #undef TRACE_SYSTEM | ||
diff --git a/include/trace/trace_event_types.h b/include/trace/trace_event_types.h index 33c8ed5ccb6c..df56f5694be6 100644 --- a/include/trace/trace_event_types.h +++ b/include/trace/trace_event_types.h | |||
@@ -2,3 +2,4 @@ | |||
2 | 2 | ||
3 | #include <trace/sched_event_types.h> | 3 | #include <trace/sched_event_types.h> |
4 | #include <trace/irq_event_types.h> | 4 | #include <trace/irq_event_types.h> |
5 | #include <trace/lockdep_event_types.h> | ||
diff --git a/include/trace/trace_events.h b/include/trace/trace_events.h index ea2ef2051762..fd13750ca4ba 100644 --- a/include/trace/trace_events.h +++ b/include/trace/trace_events.h | |||
@@ -2,3 +2,4 @@ | |||
2 | 2 | ||
3 | #include <trace/sched.h> | 3 | #include <trace/sched.h> |
4 | #include <trace/irq.h> | 4 | #include <trace/irq.h> |
5 | #include <trace/lockdep.h> | ||