简体   繁体   中英

How to get perf stat list all possible events

I'm analyzing some weird program run time behaviour with perf , with some help on IRC. By default perf stat only lists a few counters, and not those of interest, so there is an annoying ping-pong of “include this counter in the output” and me adding it to the list of arguments passed via -e and pasting the result.

Is there a way to make perf stat simply emit all counters, so that one report is all the experts need to help me?

Short answer: no.

Rationale: The performance monitor counter (PMU) unit of a CPU is implemented by a number of additional registers so, that, for some chosen event the designed register is incremented. Now, the number of registers is limited, because adding register to CPU is very "costly" thing. So, there are many more events then available PMU registers to count them.

Bottom line, you have to choose the subset of CPU events to monitor using CPU PMU unit.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM