From: Tim Blechmann <tim@klingt.org>
To: linux-kernel@vger.kernel.org
Subject: perf: counter and event question
Date: Mon, 28 Dec 2009 12:16:33 +0100 [thread overview]
Message-ID: <4B389391.8050303@klingt.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 962 bytes --]
hi all,
trying to use the perf subsystem, i am a bit confused by the terms
`performance counter' and `performance event'.
i am trying to compare `counting' counters with `sampling' counters. as
a test case, i am counting PERF_COUNT_HW_INSTRUCTIONS of the same code
piece with both approaches. the sampling counters are sampled with a
period of 1. the code is really trivial [1].
the `counting' counters report numbers of about 9000 instructions, but
the mmap buffer only seems to contain about 100 to 200 event samples.
from my (limited) understanding, these number should at least be
similar, so i am a bit confused to see such a big difference. am i
missing something, like it is impossible to sample instructions with a
period of 1? or could there be an issue with my code?
thanks, tim
[1] http://tim.klingt.org/git?p=perf-cpp.git
--
tim@klingt.org
http://tim.klingt.org
I don't write music for sissy ears.
Charles Ives
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next reply other threads:[~2009-12-28 11:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-28 11:16 Tim Blechmann [this message]
2009-12-28 11:26 ` perf: counter and event question Peter Zijlstra
2009-12-28 12:39 ` Tim Blechmann
2009-12-28 13:03 ` Peter Zijlstra
2009-12-28 13:09 ` Tim Blechmann
2009-12-28 14:02 ` Peter Zijlstra
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=4B389391.8050303@klingt.org \
--to=tim@klingt.org \
--cc=linux-kernel@vger.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