[PATCH 03/11] tracing: convert lockdep lock_acquired trace point to use nsec2usec tag

From: Steven Rostedt
Date: Wed Jun 10 2009 - 01:43:42 EST


From: Steven Rostedt <srostedt@xxxxxxxxxx>

The current conversion of the nsec value in the lockstat lock event
is performed in the fast path. Now that there is a tag to do the conversion
we can move this into the slow path and increase performance while tracing.

This patch also fixes a typo in the tag name.

[ Impact: increase performance in lockstat tracing and tag typo fix ]

Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
---
include/trace/events/lockdep.h | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/include/trace/events/lockdep.h b/include/trace/events/lockdep.h
index f9d74c8..4251f17 100644
--- a/include/trace/events/lockdep.h
+++ b/include/trace/events/lockdep.h
@@ -74,15 +74,13 @@ TRACE_EVENT(lock_acquired,

TP_STRUCT__entry(
__string(name, lock->name)
- __field(unsigned long, wait_usec)
- __field(unsigned long, wait_nsec_rem)
+ __field(long long, wait_nsec)
),
TP_fast_assign(
__assign_str(name, lock->name);
- __entry->wait_nsec_rem = do_div(waittime, NSEC_PER_USEC);
- __entry->wait_usec = (unsigned long) waittime;
+ __entry->wait_nsec = waittime;
),
- TP_FORMAT("<sting:name> (<uint:wait_usec>.<printf:wait_nsec_rem:03lu> us)")
+ TP_FORMAT("<string:name> (<nsec2usec:3:wait_nsec> 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/