From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
To: David Ahern <dsahern@gmail.com>
Cc: Roland Dreier <roland@kernel.org>, linux-perf-users@vger.kernel.org
Subject: Re: perf for analyzing userspace contention
Date: Fri, 14 Oct 2011 19:43:14 -0300 [thread overview]
Message-ID: <20111014224314.GC19655@ghostprotocols.net> (raw)
In-Reply-To: <4E98A8DD.6000201@gmail.com>
Em Fri, Oct 14, 2011 at 03:25:49PM -0600, David Ahern escreveu:
>
>
> On 10/14/2011 12:36 AM, Roland Dreier wrote:
> > Anyway, suppose I have a multithreaded userspace app that uses a bunch of
> > pthread_mutexes, and I want to figure out which locks are hot and/or heavily
> > contended. What's the best way to do that? Is perf the right, or is there
> > something better? (This seems like such an obvious thing to want that there
> > must be some good way to get this data, I hope)
>
> You can capture futex entry and exit with:
>
> perf trace -e syscalls:sys_enter_futex -e syscalls:sys_exit_futex
>
> add -g to get the callchains. From there perf-script will dump the events.
Right, if userspace was compiled with -fno-omit-frame-pointer, instant
karma :-)
With what we have now in tip/master:
perf top -G
And enjoy it live :-)
- Arnaldo
next prev parent reply other threads:[~2011-10-14 22:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-14 6:36 perf for analyzing userspace contention Roland Dreier
2011-10-14 6:58 ` Maucci, Cyrille
2011-10-14 7:21 ` Roland Dreier
2011-10-14 7:33 ` Maucci, Cyrille
2011-10-14 9:42 ` Stefan Hajnoczi
2011-10-14 16:58 ` Roland Dreier
2011-10-14 21:25 ` David Ahern
2011-10-14 22:43 ` Arnaldo Carvalho de Melo [this message]
2011-10-17 23:43 ` Arun Sharma
2011-10-18 0:12 ` David Ahern
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=20111014224314.GC19655@ghostprotocols.net \
--to=acme@ghostprotocols.net \
--cc=dsahern@gmail.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=roland@kernel.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;
as well as URLs for NNTP newsgroup(s).