From: Omar Awile <omar.awile@cern.ch>
To: "linux-perf-users@vger.kernel.org" <linux-perf-users@vger.kernel.org>
Subject: reading PMU counts with perf leader sampling and perf script
Date: Fri, 9 Sep 2016 14:48:53 +0000 [thread overview]
Message-ID: <etPan.57d2cbe0.548515bd.6188@cern.ch> (raw)
Hello,
I’ve been trying to get periodic readouts of PMU event counts using perf record (similar to what perf stat -I does but with a higher precision than 10ms).
For this I thought I could use leader sampling with ref_cycles and the events I am targeting.
For example something like this:
$ perf record -P -c 2000000 -e '{cycles,instructions,branch-misses}:S' — ./workload
This seems to read out the sample values for the other events whenever the cycle event is sampled.
The next step would be for me to use perf script and a little python script to get the event counts but I can’t seem to find a way to do this. Can someone point me in the right direction?
perf report seems to be able to read these samples but they are shown only as aggregates. Also, perf script would allow me to process/analyze the data myself. If this is currently not possible, how would I go about adding the missing functionality in perf script?
Thank you,
Omar Awile
--
Omar Awile, Ph.D.
Systems Performance Engineer
CERN - 513/R-046
next reply other threads:[~2016-09-10 1:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-09 14:48 Omar Awile [this message]
2016-09-11 3:21 ` reading PMU counts with perf leader sampling and perf script Andi Kleen
2016-09-20 14:33 ` Omar Awile
2016-09-12 20:04 ` Arnaldo Carvalho de Melo
[not found] ` <etPan.57e15392.6894e226.675c@cern.ch>
2016-09-20 19:19 ` Arnaldo Carvalho de Melo
2016-09-20 20:16 ` Andi Kleen
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=etPan.57d2cbe0.548515bd.6188@cern.ch \
--to=omar.awile@cern.ch \
--cc=linux-perf-users@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;
as well as URLs for NNTP newsgroup(s).