linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Question] How to sample PERF_TYPE_HARDWARE
@ 2021-02-08  3:47 rainkin
  2021-02-16  7:50 ` Namhyung Kim
  0 siblings, 1 reply; 5+ messages in thread
From: rainkin @ 2021-02-08  3:47 UTC (permalink / raw)
  To: linux-perf-users

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-02-19  7:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-08  3:47 [Question] How to sample PERF_TYPE_HARDWARE rainkin
2021-02-16  7:50 ` Namhyung Kim
2021-02-18  1:22   ` rainkin
2021-02-18  2:04   ` rainkin
2021-02-19  7:09     ` Namhyung Kim

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).