aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events/lockdep.h
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-04-24 11:05:52 -0400
committerSteven Rostedt <rostedt@goodmis.org>2009-04-24 11:05:52 -0400
commit39517091f88fae32b52254b561ced78da1eaf0a7 (patch)
treec94aa122c2b126f2520ea59b346b0ec9ba57bc26 /include/trace/events/lockdep.h
parent334d4169a6592d3fcd863bbe822a8f6985ffa9af (diff)
tracing/lockdep: convert lockdep to use TRACE_EVENT macro
The TRACE_FORMAT will soon be deprecated. This patch converts it to the TRACE_EVENT macro. Note, this change should also speed up the tracing. [ Impact: remove a user of deprecated TRACE_FORMAT ] Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/trace/events/lockdep.h')
-rw-r--r--include/trace/events/lockdep.h56
1 files changed, 46 insertions, 10 deletions
diff --git a/include/trace/events/lockdep.h b/include/trace/events/lockdep.h
index 3ca315c1429d..0e956c9dfd7e 100644
--- a/include/trace/events/lockdep.h
+++ b/include/trace/events/lockdep.h
@@ -9,28 +9,64 @@
9 9
10#ifdef CONFIG_LOCKDEP 10#ifdef CONFIG_LOCKDEP
11 11
12TRACE_FORMAT(lock_acquire, 12TRACE_EVENT(lock_acquire,
13
13 TP_PROTO(struct lockdep_map *lock, unsigned int subclass, 14 TP_PROTO(struct lockdep_map *lock, unsigned int subclass,
14 int trylock, int read, int check, 15 int trylock, int read, int check,
15 struct lockdep_map *next_lock, unsigned long ip), 16 struct lockdep_map *next_lock, unsigned long ip),
17
16 TP_ARGS(lock, subclass, trylock, read, check, next_lock, ip), 18 TP_ARGS(lock, subclass, trylock, read, check, next_lock, ip),
17 TP_FMT("%s%s%s", trylock ? "try " : "",
18 read ? "read " : "", lock->name)
19 );
20 19
21TRACE_FORMAT(lock_release, 20 TP_STRUCT__entry(
21 __field(unsigned int, flags)
22 __string(name, lock->name)
23 ),
24
25 TP_fast_assign(
26 __entry->flags = (trylock ? 1 : 0) | (read ? 2 : 0);
27 __assign_str(name, lock->name);
28 ),
29
30 TP_printk("%s%s%s", (__entry->flags & 1) ? "try " : "",
31 (__entry->flags & 2) ? "read " : "",
32 __get_str(name))
33);
34
35TRACE_EVENT(lock_release,
36
22 TP_PROTO(struct lockdep_map *lock, int nested, unsigned long ip), 37 TP_PROTO(struct lockdep_map *lock, int nested, unsigned long ip),
38
23 TP_ARGS(lock, nested, ip), 39 TP_ARGS(lock, nested, ip),
24 TP_FMT("%s", lock->name) 40
25 ); 41 TP_STRUCT__entry(
42 __string(name, lock->name)
43 ),
44
45 TP_fast_assign(
46 __assign_str(name, lock->name);
47 ),
48
49 TP_printk("%s", __get_str(name))
50);
26 51
27#ifdef CONFIG_LOCK_STAT 52#ifdef CONFIG_LOCK_STAT
28 53
29TRACE_FORMAT(lock_contended, 54TRACE_EVENT(lock_contended,
55
30 TP_PROTO(struct lockdep_map *lock, unsigned long ip), 56 TP_PROTO(struct lockdep_map *lock, unsigned long ip),
57
31 TP_ARGS(lock, ip), 58 TP_ARGS(lock, ip),
32 TP_FMT("%s", lock->name) 59
33 ); 60 TP_STRUCT__entry(
61 __string(name, lock->name)
62 ),
63
64 TP_fast_assign(
65 __assign_str(name, lock->name);
66 ),
67
68 TP_printk("%s", __get_str(name))
69);
34 70
35TRACE_EVENT(lock_acquired, 71TRACE_EVENT(lock_acquired,
36 TP_PROTO(struct lockdep_map *lock, unsigned long ip, s64 waittime), 72 TP_PROTO(struct lockdep_map *lock, unsigned long ip, s64 waittime),