From: David Ahern <dsahern@gmail.com>
To: Wim Heirman <wim@heirman.net>
Cc: "Ingo Molnar" <mingo@elte.hu>,
"Arnaldo Carvalho de Melo" <acme@redhat.com>,
linux-kernel@vger.kernel.org,
"Peter Zijlstra" <a.p.zijlstra@chello.nl>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Frédéric Weisbecker" <fweisbec@gmail.com>,
"Brice Goglin" <Brice.Goglin@inria.fr>
Subject: Re: perf-stat per thread results
Date: Sat, 14 May 2011 12:57:00 -0600 [thread overview]
Message-ID: <4DCED07C.505@gmail.com> (raw)
In-Reply-To: <BANLkTimZFpFedMR01rHtnmiRVffEw2FTeQ@mail.gmail.com>
On 05/14/11 12:52, Wim Heirman wrote:
> 2011/5/14 David Ahern <dsahern@gmail.com>:
>> On 05/14/11 06:49, Wim Heirman wrote:
>>>> Hmm.... my mileage varies using latest kernel
>>>> (446cc6345d3de6571bdd0840f48aca441488a28d)
>>>>
>>>> $ /tmp/build-perf/perf record --stat -fo /tmp/perf.data -p $(pidof rsyslogd)
>>>> ^C[ perf record: Woken up 1 times to write data ]
>>>> [ perf record: Captured and wrote 0.007 MB /tmp/perf.data (~308 samples) ]
>>>>
>>>> $ /tmp/build-perf/perf report -T -i /tmp/perf.data
>>>> # Events: 6 cycles
>>>> #
>>>> # Overhead Command Shared Object Symbol
>>>> # ........ ........ ................. ..........................
>>>> #
>>>> 97.61% rsyslogd libc-2.13.so [.] __libc_disable_asynccancel
>>>> 2.39% rsyslogd [kernel.kallsyms] [k] native_write_msr_safe
>>>>
>>>>
>>>> #
>>>> # (For a higher level overview, try: perf report --sort comm,dso)
>>>> #
>>>> # PID TID
>>>>
>>>>
>>>> ie., I do not get the counter values. Specifying the counter with -e
>>>> (e.g., -e branch-misses) does not help -- still no counter output.
>>>
>>> Is rsyslogd multithreaded? (Or at least, do the non-main threads
>>> execute any work during your perf-record measurement) If not, then
>>> what you see is consistent with what I'm getting, i.e. everything but
>>> the main thread is reported.
>>
>> It is multithreaded, but my point is that I do not get counter output at
>> the end -- the PID/TID table is empty. I do not get counters for single
>> threaded processes nor for commands run by perf record -- e.g.,
>> /tmp/build-perf/perf record --stat -e instructions -fo /tmp/perf.data --
>> sleep 1
>
> My guess was that none of the threads got scheduled while you did your
> perf-record run (rsyslogd usually isn't exactly very CPU intensive).
> And the main thread isn't ever reported, at least that's the bug I'm
> seeing. Can you try with a compute-intensive, multi-threaded program?
>
> Wim.
The reports show data was collected. I have done a number of simple
examples -- all of which execute at least 1 instruction, but the
counters are not displayed (which they should be per the commit
changelog commit).
David
next prev parent reply other threads:[~2011-05-14 18:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-13 15:14 perf-stat per thread results Wim Heirman
2011-05-13 15:30 ` Ingo Molnar
2011-05-13 15:41 ` David Ahern
2011-05-13 15:35 ` David Ahern
2011-05-13 15:44 ` Ingo Molnar
2011-05-13 20:32 ` Wim Heirman
2011-05-13 20:45 ` Arnaldo Carvalho de Melo
2011-05-14 12:45 ` Wim Heirman
2011-05-14 20:24 ` Wim Heirman
2011-05-13 23:02 ` David Ahern
2011-05-14 12:49 ` Wim Heirman
2011-05-14 17:48 ` David Ahern
2011-05-14 18:52 ` Wim Heirman
2011-05-14 18:57 ` David Ahern [this message]
2011-05-13 20:11 ` Juri Lelli
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=4DCED07C.505@gmail.com \
--to=dsahern@gmail.com \
--cc=Brice.Goglin@inria.fr \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=wim@heirman.net \
/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).