From: rainkin <rainkin1993@gmail.com>
To: linux-perf-users@vger.kernel.org
Subject: [Question] How to sample PERF_TYPE_HARDWARE
Date: Mon, 8 Feb 2021 11:47:51 +0800 [thread overview]
Message-ID: <CAHb-xavRszhCbGcs0DgrdoJCHmOznHC4UzhLXxtXz=gXXk+wMQ@mail.gmail.com> (raw)
Hello~
My goal is to record the number of occurring PERF_TYPE_HARDWARE events
(e.g., branches) every N events.
In my understanding, the "perf stat -e branches -I N " command is not
sampling, it is actually count model which records branches every N
millisecond. Thus perf stat does not meet my goal.
For the "perf record -e cycles -b" command, it does sampling, which
records a LBR sample every N cycles events. However, it seems that
"perf record" does not support sampling PERF_TYPE_HARDWARE.
I also look at the syscall perf_event_open, but still cannot find any
documentation about how to sample PERF_TYPE_HARDWARE.
Does anyone know how to do that?Any suggestions is helpful for me :)
Rainkin
next reply other threads:[~2021-02-08 3:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-08 3:47 rainkin [this message]
2021-02-16 7:50 ` [Question] How to sample PERF_TYPE_HARDWARE Namhyung Kim
2021-02-18 1:22 ` rainkin
2021-02-18 2:04 ` rainkin
2021-02-19 7:09 ` Namhyung Kim
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='CAHb-xavRszhCbGcs0DgrdoJCHmOznHC4UzhLXxtXz=gXXk+wMQ@mail.gmail.com' \
--to=rainkin1993@gmail.com \
--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).