From: tip-bot for Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, paulus@samba.org, hpa@zytor.com,
mingo@redhat.com, a.p.zijlstra@chello.nl,
mitake@dcl.info.waseda.ac.jp, fweisbec@gmail.com,
tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perf/core] perf lock: Enhance information of lock trace events
Date: Sun, 31 Jan 2010 08:31:43 GMT [thread overview]
Message-ID: <tip-c965be10ca3cb0bdd04016c852764afaf8e647c8@git.kernel.org> (raw)
In-Reply-To: <1264851813-8413-11-git-send-email-mitake@dcl.info.waseda.ac.jp>
Commit-ID: c965be10ca3cb0bdd04016c852764afaf8e647c8
Gitweb: http://git.kernel.org/tip/c965be10ca3cb0bdd04016c852764afaf8e647c8
Author: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
AuthorDate: Sat, 30 Jan 2010 20:43:32 +0900
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Sun, 31 Jan 2010 09:08:23 +0100
perf lock: Enhance information of lock trace events
Add wait time and lock identification details.
Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <1264851813-8413-11-git-send-email-mitake@dcl.info.waseda.ac.jp>
[ removed the file/line bits as we can do that better via IPs ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
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 a870ba1..5c1dcfc 100644
--- a/include/trace/events/lock.h
+++ b/include/trace/events/lock.h
@@ -20,14 +20,17 @@ TRACE_EVENT(lock_acquire,
TP_STRUCT__entry(
__field(unsigned int, flags)
__string(name, lock->name)
+ __field(void *, lockdep_addr)
),
TP_fast_assign(
__entry->flags = (trylock ? 1 : 0) | (read ? 2 : 0);
__assign_str(name, lock->name);
+ __entry->lockdep_addr = lock;
),
- TP_printk("%s%s%s", (__entry->flags & 1) ? "try " : "",
+ TP_printk("%p %s%s%s", __entry->lockdep_addr,
+ (__entry->flags & 1) ? "try " : "",
(__entry->flags & 2) ? "read " : "",
__get_str(name))
);
@@ -40,13 +43,16 @@ TRACE_EVENT(lock_release,
TP_STRUCT__entry(
__string(name, lock->name)
+ __field(void *, lockdep_addr)
),
TP_fast_assign(
__assign_str(name, lock->name);
+ __entry->lockdep_addr = lock;
),
- TP_printk("%s", __get_str(name))
+ TP_printk("%p %s",
+ __entry->lockdep_addr, __get_str(name))
);
#ifdef CONFIG_LOCK_STAT
@@ -59,13 +65,16 @@ TRACE_EVENT(lock_contended,
TP_STRUCT__entry(
__string(name, lock->name)
+ __field(void *, lockdep_addr)
),
TP_fast_assign(
__assign_str(name, lock->name);
+ __entry->lockdep_addr = lock;
),
- TP_printk("%s", __get_str(name))
+ TP_printk("%p %s",
+ __entry->lockdep_addr, __get_str(name))
);
TRACE_EVENT(lock_acquired,
@@ -75,16 +84,18 @@ TRACE_EVENT(lock_acquired,
TP_STRUCT__entry(
__string(name, lock->name)
- __field(unsigned long, wait_usec)
- __field(unsigned long, wait_nsec_rem)
+ __field(s64, wait_nsec)
+ __field(void *, lockdep_addr)
),
+
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;
+ __entry->lockdep_addr = lock;
),
- TP_printk("%s (%lu.%03lu us)", __get_str(name), __entry->wait_usec,
- __entry->wait_nsec_rem)
+ TP_printk("%p %s (%llu ns)", __entry->lockdep_addr,
+ __get_str(name),
+ __entry->wait_nsec)
);
#endif
next prev parent reply other threads:[~2010-01-31 8:32 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-30 11:43 [PATCH 00/12 v2] perf lock: New subcommand "perf lock", for analyzing lock statistics Hitoshi Mitake
2010-01-30 11:43 ` [PATCH v2 01/11] perf tools: Add __data_loc support Hitoshi Mitake
2010-01-31 8:31 ` [tip:perf/core] " tip-bot for Hitoshi Mitake
2010-01-30 11:43 ` [PATCH v2 02/11] perf: Add util/include/linuxhash.h to include hash.h of kernel Hitoshi Mitake
2010-01-31 8:31 ` [tip:perf/core] " tip-bot for Hitoshi Mitake
2010-01-30 11:43 ` [PATCH v2 03/11] lockdep: Add information of file and line where lock inited to struct lockdep_map Hitoshi Mitake
2010-01-30 11:43 ` [PATCH v2 04/11] lockdep: Add file and line to initialize sequence of spinlock Hitoshi Mitake
2010-01-30 11:43 ` [PATCH v2 05/11] lockdep: Add file and line to initialize sequence of rwlock Hitoshi Mitake
2010-01-30 11:43 ` [PATCH v2 06/11] lockdep: Add file and line to initialize sequence of rwsem Hitoshi Mitake
2010-01-30 11:43 ` [PATCH v2 07/11] lockdep: Add file and line to initialize sequence of rwsem (x86) Hitoshi Mitake
2010-01-30 11:43 ` [PATCH v2 08/11] lockdep: Add file and line to initialize sequence of mutex Hitoshi Mitake
2010-01-30 11:43 ` [PATCH v2 09/11] lockdep: Fix the way to initialize class_mutex for information of file and line Hitoshi Mitake
2010-01-30 11:43 ` [PATCH v2 10/11] perf lock: Enhance information of lock trace events Hitoshi Mitake
2010-01-31 8:31 ` tip-bot for Hitoshi Mitake [this message]
2010-01-30 11:43 ` [PATCH v2 11/11] perf lock: New subcommand "perf lock", for analyzing lock statistics Hitoshi Mitake
2010-01-31 8:32 ` [tip:perf/core] perf lock: Introduce new tool " tip-bot for Hitoshi Mitake
2010-01-31 8:32 ` [tip:perf/core] perf lock: Clean up various details tip-bot for Ingo Molnar
2010-01-30 11:55 ` Revert "perf record: Intercept all events" Hitoshi Mitake
2010-01-31 8:29 ` [PATCH 00/12 v2] perf lock: New subcommand "perf lock", for analyzing lock statistics Ingo Molnar
2010-01-31 20:31 ` Frederic Weisbecker
2010-02-01 7:27 ` Ingo Molnar
2010-02-04 7:08 ` [PATCH] perf lock: Fix and add misc documentally things Hitoshi Mitake
2010-02-28 8:57 ` [tip:perf/core] " tip-bot for Hitoshi Mitake
2010-02-04 7:04 ` [PATCH 00/12 v2] perf lock: New subcommand "perf lock", for analyzing lock statistics Hitoshi Mitake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-c965be10ca3cb0bdd04016c852764afaf8e647c8@git.kernel.org \
--to=mitake@dcl.info.waseda.ac.jp \
--cc=a.p.zijlstra@chello.nl \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox