[PATCH 7/8] tracing/events: modify lockdep print to new format
From: Steven Rostedt
Date: Tue Jun 09 2009 - 17:54:52 EST
From: Steven Rostedt <srostedt@xxxxxxxxxx>
Use new format for better parsing of lockdep events.
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
---
include/trace/events/lockdep.h | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/include/trace/events/lockdep.h b/include/trace/events/lockdep.h
index 0e956c9..f9d74c8 100644
--- a/include/trace/events/lockdep.h
+++ b/include/trace/events/lockdep.h
@@ -27,9 +27,8 @@ TRACE_EVENT(lock_acquire,
__assign_str(name, lock->name);
),
- TP_printk("%s%s%s", (__entry->flags & 1) ? "try " : "",
- (__entry->flags & 2) ? "read " : "",
- __get_str(name))
+ TP_FORMAT("<ifmask:flags:1:try :><ifmask:flags:2:read :>"
+ "<string:name>")
);
TRACE_EVENT(lock_release,
@@ -46,7 +45,7 @@ TRACE_EVENT(lock_release,
__assign_str(name, lock->name);
),
- TP_printk("%s", __get_str(name))
+ TP_FORMAT("<string:name>")
);
#ifdef CONFIG_LOCK_STAT
@@ -65,7 +64,7 @@ TRACE_EVENT(lock_contended,
__assign_str(name, lock->name);
),
- TP_printk("%s", __get_str(name))
+ TP_FORMAT("<string:name>")
);
TRACE_EVENT(lock_acquired,
@@ -83,8 +82,7 @@ TRACE_EVENT(lock_acquired,
__entry->wait_nsec_rem = do_div(waittime, NSEC_PER_USEC);
__entry->wait_usec = (unsigned long) waittime;
),
- TP_printk("%s (%lu.%03lu us)", __get_str(name), __entry->wait_usec,
- __entry->wait_nsec_rem)
+ TP_FORMAT("<sting:name> (<uint:wait_usec>.<printf:wait_nsec_rem:03lu> us)")
);
#endif
--
1.6.3.1
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/