diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2009-04-18 22:54:49 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-22 06:30:15 -0400 |
commit | 7e7ca9a22dbbc5c91763cd16923c7509918709b6 (patch) | |
tree | 3d036f3cf4dc9c375b032e12afafc75bffcd17a8 /include/trace | |
parent | 9cbf117662e24c6d33245666804487f92c21b59d (diff) |
tracing/lock: provide lock_acquired event support for dynamic size string
Now that we can support the dynamic sized string, make the lock tracing
able to use it, making it safe against modules removal and consuming
the right amount of memory needed for each lock name
Changes in v2:
adapt to the __ending_string() updates and the opening_string() removal.
[ Impact: protect lock tracer against module removal ]
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/lockdep.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/trace/events/lockdep.h b/include/trace/events/lockdep.h index 45e326b5c7f3..3ca315c1429d 100644 --- a/include/trace/events/lockdep.h +++ b/include/trace/events/lockdep.h | |||
@@ -38,16 +38,16 @@ TRACE_EVENT(lock_acquired, | |||
38 | TP_ARGS(lock, ip, waittime), | 38 | TP_ARGS(lock, ip, waittime), |
39 | 39 | ||
40 | TP_STRUCT__entry( | 40 | TP_STRUCT__entry( |
41 | __field(const char *, name) | 41 | __string(name, lock->name) |
42 | __field(unsigned long, wait_usec) | 42 | __field(unsigned long, wait_usec) |
43 | __field(unsigned long, wait_nsec_rem) | 43 | __field(unsigned long, wait_nsec_rem) |
44 | ), | 44 | ), |
45 | TP_fast_assign( | 45 | TP_fast_assign( |
46 | __entry->name = lock->name; | 46 | __assign_str(name, lock->name); |
47 | __entry->wait_nsec_rem = do_div(waittime, NSEC_PER_USEC); | 47 | __entry->wait_nsec_rem = do_div(waittime, NSEC_PER_USEC); |
48 | __entry->wait_usec = (unsigned long) waittime; | 48 | __entry->wait_usec = (unsigned long) waittime; |
49 | ), | 49 | ), |
50 | TP_printk("%s (%lu.%03lu us)", __entry->name, __entry->wait_usec, | 50 | TP_printk("%s (%lu.%03lu us)", __get_str(name), __entry->wait_usec, |
51 | __entry->wait_nsec_rem) | 51 | __entry->wait_nsec_rem) |
52 | ); | 52 | ); |
53 | 53 | ||