From: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
linux-kernel@vger.kernel.org, h.mitake@gmail.com,
Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH] perf lock: clean the options for perf record
Date: Fri, 25 Feb 2011 00:46:40 +0900 [thread overview]
Message-ID: <4D667D60.5010903@dcl.info.waseda.ac.jp> (raw)
In-Reply-To: <4D648A65.2040107@dcl.info.waseda.ac.jp>
On 2011年02月23日 13:17, Hitoshi Mitake wrote:
> On 2011年02月23日 03:22, Frederic Weisbecker wrote:
>> On Tue, Feb 22, 2011 at 04:43:35PM +0100, Peter Zijlstra wrote:
>>> On Wed, 2011-02-23 at 00:30 +0900, Hitoshi Mitake wrote:
>>>> How do you think about it?
>>>
>>> Most of the lock code (esp the spinlock stuff) is already way over the
>>> threshold of sanity, adding to that for some dubious reasons doesn't
>>> seem like a good idea.
>>>
>>> I'm still not at all sure why people want all this lock tracing.
>>
>> Right, well I can imagine many usecases that could make lock
>> tracing bring more value than what lockstat already provides,
>> through a tool like perf lock if we enhance it.
>>
>> We should probably first focus on developing the tooling side
>> and make it useful enough that optimizations in the kernel
>> side become desirable.
>>
>
> Yes, lockstat only provides the lock usage statistics of
> entire of the system. perf lock will be able to provide the partial
> information of specified term, or the degree of dependency
> between locks.
>
For trial, I created new tracepoint for rwsem and tested.
Names of events are rwsem_{acquire, contended, acquired, release},
their meanings are similar to lock_{...}.
I traced perf bench sched messaging and result was,
mitake@x201i:~/linux/.../tools/perf% ./perf bench sched messaging
# Running sched/messaging benchmark...
# 20 sender and receiver processes per group
# 10 groups == 400 processes run
Total time: 1.252 [sec]
mitake@x201i:~/linux/.../tools/perf% sudo ./perf record -R -m 1024 -c 1
-e rwsem:rwsem_acquire -e
rwsem:rwsem_release,rwsem:rwsem_contended,rwsem:rwsem_acquired ./perf
bench sched messaging
# Running sched/messaging benchmark...
# 20 sender and receiver processes per group
# 10 groups == 400 processes run
Total time: 1.332 [sec]
[ perf record: Woken up 4 times to write data ]
[ perf record: Captured and wrote 13.495 MB perf.data (~589597 samples) ]
raw execution of sched messaging was 1.252 sec, and traced version
was 1.332 sec. This overhead is far smaller than the overhead of
current lock tracepoints.
I think that it is possible to write some meaningful tools
like reader/writer ratio measuring. If something can be written,
I'll post it.
next prev parent reply other threads:[~2011-02-24 15:47 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-22 15:28 Hitoshi Mitake
2011-02-22 15:30 ` Hitoshi Mitake
2011-02-22 15:43 ` Peter Zijlstra
2011-02-22 18:22 ` Frederic Weisbecker
2011-02-23 4:17 ` Hitoshi Mitake
2011-02-24 15:46 ` Hitoshi Mitake [this message]
2011-02-24 16:50 ` Frederic Weisbecker
2011-02-25 17:10 ` Hitoshi Mitake
2011-02-28 15:00 ` [PATCH] lockstat: export data in python expression Hitoshi Mitake
2011-02-28 18:07 ` Peter Zijlstra
2011-02-28 23:48 ` Hitoshi Mitake
2011-03-04 14:08 ` Steven Rostedt
2011-03-01 14:55 ` [PATCH] perf lock: clean the options for perf record Frederic Weisbecker
2011-03-04 9:41 ` Hitoshi Mitake
2011-03-04 13:56 ` Frederic Weisbecker
2011-03-04 13:58 ` Peter Zijlstra
2011-03-04 14:21 ` Frederic Weisbecker
2011-03-09 16:41 ` Hitoshi Mitake
2011-03-04 14:37 ` Steven Rostedt
2011-03-04 14:41 ` Frederic Weisbecker
2011-03-05 17:20 ` Hitoshi Mitake
2011-03-05 17:14 ` Hitoshi Mitake
2011-02-22 18:09 ` Frederic Weisbecker
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=4D667D60.5010903@dcl.info.waseda.ac.jp \
--to=mitake@dcl.info.waseda.ac.jp \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=fweisbec@gmail.com \
--cc=h.mitake@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=rostedt@goodmis.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®