From: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
To: Peter Zijlstra <peterz@infradead.org>
Cc: mingo@elte.hu, linux-kernel@vger.kernel.org,
Paul Mackerras <paulus@samba.org>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [PATCH 2/2] perf lock: Fix output of tracing lock events
Date: Thu, 31 Dec 2009 22:24:40 +0900 [thread overview]
Message-ID: <a6b9f31a0912310524ke0c8880o189fe4304a2ff229@mail.gmail.com> (raw)
In-Reply-To: <1261994502.7135.51.camel@laptop>
On Mon, Dec 28, 2009 at 19:01, Peter Zijlstra <peterz@infradead.org> wrote:
> On Sat, 2009-12-26 at 22:43 +0900, Hitoshi Mitake wrote:
>
>> > As to removing the waittime, I'm not sure, in this case, yes, but if you
>> > want some other processing that hooks straight into the tracepoints
>> > instead of using a logging structure, it might be useful.
>> >
>> > Removing that do_div() from there and exposing waittime as u64 in nsec,
>> > for sure, that do_div() is just silly.
>> >
>> >
>> >
>>
>> I was too egoist. perf lock is not an only one user of lock events.
>>
>> And I have a suggestion. Adding name of source files and lines of
>> lock instances may be good thing for human's readability.
>> How do you think?
>
> file:line might be interesting indeed, but I worry about the size of the
> event entry.. But lets see how that goes.
>
>> > Why do we need to have instance resolution?
>
> You forgot to answer this question.
>
> Is it purely because the waittime computation as done by lockstat is not
> good enough for you -- should we not fix that instead, that'd benefit
> more people.
>
>
>
Ah, sorry, let me answer to the question.
Yes, I need instance resolution. Name is not enough thing.
Because there are locks which use name which is used by other locks.
For example, at least 5 lock instances use the name "port_lock".
This is copied from output of cscope.
*** drivers/infiniband/core/user_mad.c:
<global>[138] static DEFINE_SPINLOCK(port_lock);
*** drivers/net/ehea/ehea.h:
<global>[473] struct mutex port_lock;
*** drivers/pcmcia/i82092.c:
<global>[202] static DEFINE_SPINLOCK(port_lock);
*** drivers/pcmcia/pd6729.c:
<global>[69] static DEFINE_SPINLOCK(port_lock);
*** drivers/usb/gadget/u_serial.c:
<global>[94] spinlock_t port_lock;
port_lock of ehea.h and u_serial.c is a member of struct,
so number of instances with this name is more than 5.
So we cannot distinguish between each lock instances by their name.
And waittime caliculated by lockstat is valuable information,
but we can also use timestamp.
waittime is not equal to hold time, and every events have their timestamps.
I think exploiting information from timestamps
(which already be providec) is worthful.
next prev parent reply other threads:[~2009-12-31 13:24 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-16 3:28 [PATCH 1/2] perf: Add util/include/linuxhash.h to include hash.h of kernel Hitoshi Mitake
2009-12-16 3:28 ` [PATCH 2/2] perf lock: Fix output of tracing lock events Hitoshi Mitake
2009-12-16 8:19 ` [tip:perf/lock] " tip-bot for Hitoshi Mitake
2009-12-17 8:50 ` [PATCH 2/2] " Ingo Molnar
2009-12-17 9:24 ` Peter Zijlstra
2009-12-17 10:09 ` Ingo Molnar
2009-12-17 10:26 ` Peter Zijlstra
2009-12-17 10:51 ` Ingo Molnar
2009-12-26 13:43 ` Hitoshi Mitake
2009-12-28 10:01 ` Peter Zijlstra
2009-12-31 13:24 ` Hitoshi Mitake [this message]
2010-01-07 10:38 ` Hitoshi Mitake
2010-01-07 10:39 ` [PATCH 0/5] lockdep: Add information of file and line to lockdep_map Hitoshi Mitake
2010-01-13 9:52 ` Peter Zijlstra
2010-01-13 10:09 ` Ingo Molnar
2010-01-16 13:01 ` Hitoshi Mitake
2010-01-18 7:20 ` Peter Zijlstra
2010-01-26 5:56 ` [PATCH] Add type of locks to lock trace events Hitoshi Mitake
2010-01-28 10:21 ` Peter Zijlstra
2010-01-29 17:29 ` Frederic Weisbecker
2010-01-29 17:41 ` Peter Zijlstra
2010-01-29 22:12 ` Frederic Weisbecker
2010-02-24 9:02 ` [PATCH] Separate lock events with types Hitoshi Mitake
2010-03-26 23:33 ` Frederic Weisbecker
2010-04-05 10:37 ` Hitoshi Mitake
2010-04-06 8:26 ` Peter Zijlstra
2010-04-06 9:44 ` Frederic Weisbecker
2010-01-07 10:39 ` [PATCH 1/5] lockdep: Add file and line to initialize sequence of spin and rw lock Hitoshi Mitake
2010-01-07 10:39 ` [PATCH 2/5] lockdep: Add file and line to initialize sequence of rwsem Hitoshi Mitake
2010-01-07 10:39 ` [PATCH 3/5] " Hitoshi Mitake
2010-01-07 10:39 ` [PATCH 4/5] lockdep: Add file and line to initialize sequence of mutex Hitoshi Mitake
2010-01-07 10:39 ` [PATCH 5/5] lockdep: Fix the way to initialize class_mutex for information of file and line Hitoshi Mitake
2010-01-13 10:00 ` Ingo Molnar
2010-01-13 23:17 ` Greg KH
2010-01-13 23:19 ` Greg KH
2010-01-16 12:55 ` Hitoshi Mitake
2009-12-16 8:18 ` [tip:perf/lock] perf: Add util/include/linuxhash.h to include hash.h of kernel tip-bot for 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=a6b9f31a0912310524ke0c8880o189fe4304a2ff229@mail.gmail.com \
--to=mitake@dcl.info.waseda.ac.jp \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
/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
all inboxes | Powered by JetHome®