diff options
Diffstat (limited to 'include/trace/events/lock.h')
-rw-r--r-- | include/trace/events/lock.h | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/include/trace/events/lock.h b/include/trace/events/lock.h index a870ba125aa8..5c1dcfc16c60 100644 --- a/include/trace/events/lock.h +++ b/include/trace/events/lock.h | |||
@@ -20,14 +20,17 @@ TRACE_EVENT(lock_acquire, | |||
20 | TP_STRUCT__entry( | 20 | TP_STRUCT__entry( |
21 | __field(unsigned int, flags) | 21 | __field(unsigned int, flags) |
22 | __string(name, lock->name) | 22 | __string(name, lock->name) |
23 | __field(void *, lockdep_addr) | ||
23 | ), | 24 | ), |
24 | 25 | ||
25 | TP_fast_assign( | 26 | TP_fast_assign( |
26 | __entry->flags = (trylock ? 1 : 0) | (read ? 2 : 0); | 27 | __entry->flags = (trylock ? 1 : 0) | (read ? 2 : 0); |
27 | __assign_str(name, lock->name); | 28 | __assign_str(name, lock->name); |
29 | __entry->lockdep_addr = lock; | ||
28 | ), | 30 | ), |
29 | 31 | ||
30 | TP_printk("%s%s%s", (__entry->flags & 1) ? "try " : "", | 32 | TP_printk("%p %s%s%s", __entry->lockdep_addr, |
33 | (__entry->flags & 1) ? "try " : "", | ||
31 | (__entry->flags & 2) ? "read " : "", | 34 | (__entry->flags & 2) ? "read " : "", |
32 | __get_str(name)) | 35 | __get_str(name)) |
33 | ); | 36 | ); |
@@ -40,13 +43,16 @@ TRACE_EVENT(lock_release, | |||
40 | 43 | ||
41 | TP_STRUCT__entry( | 44 | TP_STRUCT__entry( |
42 | __string(name, lock->name) | 45 | __string(name, lock->name) |
46 | __field(void *, lockdep_addr) | ||
43 | ), | 47 | ), |
44 | 48 | ||
45 | TP_fast_assign( | 49 | TP_fast_assign( |
46 | __assign_str(name, lock->name); | 50 | __assign_str(name, lock->name); |
51 | __entry->lockdep_addr = lock; | ||
47 | ), | 52 | ), |
48 | 53 | ||
49 | TP_printk("%s", __get_str(name)) | 54 | TP_printk("%p %s", |
55 | __entry->lockdep_addr, __get_str(name)) | ||
50 | ); | 56 | ); |
51 | 57 | ||
52 | #ifdef CONFIG_LOCK_STAT | 58 | #ifdef CONFIG_LOCK_STAT |
@@ -59,13 +65,16 @@ TRACE_EVENT(lock_contended, | |||
59 | 65 | ||
60 | TP_STRUCT__entry( | 66 | TP_STRUCT__entry( |
61 | __string(name, lock->name) | 67 | __string(name, lock->name) |
68 | __field(void *, lockdep_addr) | ||
62 | ), | 69 | ), |
63 | 70 | ||
64 | TP_fast_assign( | 71 | TP_fast_assign( |
65 | __assign_str(name, lock->name); | 72 | __assign_str(name, lock->name); |
73 | __entry->lockdep_addr = lock; | ||
66 | ), | 74 | ), |
67 | 75 | ||
68 | TP_printk("%s", __get_str(name)) | 76 | TP_printk("%p %s", |
77 | __entry->lockdep_addr, __get_str(name)) | ||
69 | ); | 78 | ); |
70 | 79 | ||
71 | TRACE_EVENT(lock_acquired, | 80 | TRACE_EVENT(lock_acquired, |
@@ -75,16 +84,18 @@ TRACE_EVENT(lock_acquired, | |||
75 | 84 | ||
76 | TP_STRUCT__entry( | 85 | TP_STRUCT__entry( |
77 | __string(name, lock->name) | 86 | __string(name, lock->name) |
78 | __field(unsigned long, wait_usec) | 87 | __field(s64, wait_nsec) |
79 | __field(unsigned long, wait_nsec_rem) | 88 | __field(void *, lockdep_addr) |
80 | ), | 89 | ), |
90 | |||
81 | TP_fast_assign( | 91 | TP_fast_assign( |
82 | __assign_str(name, lock->name); | 92 | __assign_str(name, lock->name); |
83 | __entry->wait_nsec_rem = do_div(waittime, NSEC_PER_USEC); | 93 | __entry->wait_nsec = waittime; |
84 | __entry->wait_usec = (unsigned long) waittime; | 94 | __entry->lockdep_addr = lock; |
85 | ), | 95 | ), |
86 | TP_printk("%s (%lu.%03lu us)", __get_str(name), __entry->wait_usec, | 96 | TP_printk("%p %s (%llu ns)", __entry->lockdep_addr, |
87 | __entry->wait_nsec_rem) | 97 | __get_str(name), |
98 | __entry->wait_nsec) | ||
88 | ); | 99 | ); |
89 | 100 | ||
90 | #endif | 101 | #endif |