Skip to content

Commit

Permalink
tracing: Drop lock_acquired waittime field
Browse files Browse the repository at this point in the history
Drop the waittime field from the lock_acquired event, we can
calculate it by substracting the lock_acquired event timestamp
with the matching lock_acquire one.

It is not needed and takes useless space in the traces.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
fweisbec committed May 9, 2010
1 parent 90c0e5f commit 883a2a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions include/trace/events/lock.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,24 +78,21 @@ TRACE_EVENT(lock_contended,
);

TRACE_EVENT(lock_acquired,
TP_PROTO(struct lockdep_map *lock, unsigned long ip, s64 waittime),
TP_PROTO(struct lockdep_map *lock, unsigned long ip),

TP_ARGS(lock, ip, waittime),
TP_ARGS(lock, ip),

TP_STRUCT__entry(
__string(name, lock->name)
__field(s64, wait_nsec)
__field(void *, lockdep_addr)
),

TP_fast_assign(
__assign_str(name, lock->name);
__entry->wait_nsec = waittime;
__entry->lockdep_addr = lock;
),
TP_printk("%p %s (%llu ns)", __entry->lockdep_addr,
__get_str(name),
__entry->wait_nsec)
TP_printk("%p %s", __entry->lockdep_addr,
__get_str(name))
);

#endif
Expand Down
2 changes: 1 addition & 1 deletion kernel/lockdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -3380,7 +3380,7 @@ __lock_acquired(struct lockdep_map *lock, unsigned long ip)
hlock->holdtime_stamp = now;
}

trace_lock_acquired(lock, ip, waittime);
trace_lock_acquired(lock, ip);

stats = get_lock_stats(hlock_class(hlock));
if (waittime) {
Expand Down

0 comments on commit 883a2a3

Please sign in to comment.