From: Peter Zijlstra <peterz@infradead.org>
To: Lucas De Marchi <lucas.de.marchi@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: perf stat output
Date: Fri, 13 Nov 2009 09:07:35 +0100 [thread overview]
Message-ID: <1258099655.4039.998.camel@laptop> (raw)
In-Reply-To: <193b0f820911121403w35c57158kf3721309e1f2ebd7@mail.gmail.com>
On Thu, 2009-11-12 at 20:03 -0200, Lucas De Marchi wrote:
> Hi all!
>
> Some questions about perf stat output. See example:
>
>
> lucas@LMS-linux:~/programming/testprograms> perf stat -e
> L1-dcache-loads -e L1-dcache-load-misses -- make -j
> gcc test_schedchanges.c -o test_schedchanges
> gcc -pthread test_taskaff1.c -o test_taskaff1
> gcc -pthread test_taskaff2.c -o test_taskaff2
> gcc -pthread test_taskaff3.c -o test_taskaff3
>
> Performance counter stats for 'make -j':
>
> 161384667 L1-dcache-loads # 0.000 M/sec
> 24853791 L1-dcache-load-misses # 0.000 M/sec
>
> 0.066893389 seconds time elapsed
>
> Why do we have both L1-dcache-loads and L1-dcache-load-misses with
> 0.000 M/sec? Also, why do we have 0 M/s when running "perf stat -a -e
> cache-misses -e cache-references" but values different than 0 when
> running "perf stat -a" without selecting the events?
No idea, you'd have to look at the code computing this M/sec stuff. I
think Ingo wrote that, so he might have an idea.
> The last question: what does the "scaled from X%" mean? Is it related
> to the maximum number of performance registers a processor can count
> at a time?
Yes, if the hardware has only 2 counters and you specify 4, we'll
round-robin those 4 onto the 2. In that case you'll see things like
scaled from ~50% because each counter will only have been on the actual
PMU for about 50% of the time.
(RR happens with tick granularity, so if your runtime is of that order
or shorter you can get funny results with some counters being 0).
next prev parent reply other threads:[~2009-11-13 8:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-12 22:03 perf stat output Lucas De Marchi
2009-11-13 8:07 ` Peter Zijlstra [this message]
2009-11-13 14:46 ` Lucas De Marchi
2009-11-15 9:13 ` Ingo Molnar
2009-11-15 14:05 ` Lucas De Marchi
2009-11-15 14:27 ` Ingo Molnar
2009-11-15 14:30 ` [tip:perf/core] perf stat: Do not print ratio when task-clock event is not counted tip-bot for Lucas De Marchi
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=1258099655.4039.998.camel@laptop \
--to=peterz@infradead.org \
--cc=acme@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lucas.de.marchi@gmail.com \
--cc=mingo@elte.hu \
/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