* Adding cache misses and references to list of default events for perf stat? @ 2014-11-04 16:44 Milian Wolff 2014-11-04 20:16 ` Andi Kleen 0 siblings, 1 reply; 4+ messages in thread From: Milian Wolff @ 2014-11-04 16:44 UTC (permalink / raw) To: linux-perf-users Hello all, could we have the cache-references,cache-misses events added to the list of default events for perf stat? I think it is a very valuable metric for all user-space applications. Currently, I run perf stat twice, once with the default events, and once with perf stat -e cache-references,cache-misses ... there is no easy way to append two events to the list of default events. So, what do you think? Bye -- Milian Wolff mail@milianw.de http://milianw.de ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Adding cache misses and references to list of default events for perf stat? 2014-11-04 16:44 Adding cache misses and references to list of default events for perf stat? Milian Wolff @ 2014-11-04 20:16 ` Andi Kleen 2014-11-05 2:26 ` Namhyung Kim 0 siblings, 1 reply; 4+ messages in thread From: Andi Kleen @ 2014-11-04 20:16 UTC (permalink / raw) To: Milian Wolff; +Cc: linux-perf-users Milian Wolff <mail@milianw.de> writes: > Hello all, > > could we have the cache-references,cache-misses events added to the list of > default events for perf stat? I think it is a very valuable metric for all > user-space applications. > > Currently, I run perf stat twice, once with the default events, and once with > > perf stat -e cache-references,cache-misses ... > > there is no easy way to append two events to the list of default events. > > So, what do you think? On most systems with only four counters it'll start multiplexing, which will give much worse results. Defaulting to non multiplexing is much better. Reproducing the standard perf stat output isn't that difficult. It's perf stat -e task-clock,cs,migrations,page-faults,cycles,instructions,branches,branch-misses and then add more events. If you remove the bogus stalled-* events you have even two free counters. If you exceed four you should define appropiate groups with {} -Andi -- ak@linux.intel.com -- Speaking for myself only ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Adding cache misses and references to list of default events for perf stat? 2014-11-04 20:16 ` Andi Kleen @ 2014-11-05 2:26 ` Namhyung Kim 2014-11-05 11:18 ` Milian Wolff 0 siblings, 1 reply; 4+ messages in thread From: Namhyung Kim @ 2014-11-05 2:26 UTC (permalink / raw) To: Andi Kleen; +Cc: Milian Wolff, linux-perf-users Hi Andi and Milian, On Tue, 04 Nov 2014 12:16:25 -0800, Andi Kleen wrote: > Milian Wolff <mail@milianw.de> writes: > >> Hello all, >> >> could we have the cache-references,cache-misses events added to the list of >> default events for perf stat? I think it is a very valuable metric for all >> user-space applications. >> >> Currently, I run perf stat twice, once with the default events, and once with >> >> perf stat -e cache-references,cache-misses ... >> >> there is no easy way to append two events to the list of default events. >> >> So, what do you think? > > On most systems with only four counters it'll start multiplexing, which > will give much worse results. Defaulting to non multiplexing is much > better. Anyway it has -d/--detailed option which can be specified up to 3 times. # perf stat -ad sleep 1 Performance counter stats for 'system wide': 8021.100443 task-clock (msec) # 8.013 CPUs utilized [100.00%] 574 context-switches # 0.072 K/sec [100.00%] 10 cpu-migrations # 0.001 K/sec [100.00%] 61 page-faults # 0.008 K/sec 153,639,037 cycles # 0.019 GHz [40.05%] 223,846,109 stalled-cycles-frontend # 145.70% frontend cycles idle [40.14%] 205,555,693 stalled-cycles-backend # 133.79% backend cycles idle [40.15%] 173,763,228 instructions # 1.13 insns per cycle # 1.29 stalled cycles per insn [50.12%] 34,553,334 branches # 4.308 M/sec [50.12%] 410,018 branch-misses # 1.19% of all branches [50.02%] 45,617,877 L1-dcache-loads # 5.687 M/sec [49.93%] 2,232,930 L1-dcache-load-misses # 4.89% of all L1-dcache hits [49.88%] 563,164 LLC-loads # 0.070 M/sec [39.92%] 240,780 LLC-load-misses # 42.75% of all LL-cache hits [39.92%] 1.000997709 seconds time elapsed Thanks, Namhyung > > Reproducing the standard perf stat output isn't that difficult. It's > > perf stat -e task-clock,cs,migrations,page-faults,cycles,instructions,branches,branch-misses > > and then add more events. If you remove the bogus stalled-* events you > have even two free counters. > > If you exceed four you should define appropiate groups with {} > > -Andi ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Adding cache misses and references to list of default events for perf stat? 2014-11-05 2:26 ` Namhyung Kim @ 2014-11-05 11:18 ` Milian Wolff 0 siblings, 0 replies; 4+ messages in thread From: Milian Wolff @ 2014-11-05 11:18 UTC (permalink / raw) To: Namhyung Kim; +Cc: Andi Kleen, linux-perf-users On Wednesday 05 November 2014 11:26:36 Namhyung Kim wrote: > Hi Andi and Milian, > > On Tue, 04 Nov 2014 12:16:25 -0800, Andi Kleen wrote: > > Milian Wolff <mail@milianw.de> writes: > >> Hello all, > >> > >> could we have the cache-references,cache-misses events added to the list > >> of > >> default events for perf stat? I think it is a very valuable metric for > >> all > >> user-space applications. > >> > >> Currently, I run perf stat twice, once with the default events, and once > >> with > >> > >> perf stat -e cache-references,cache-misses ... > >> > >> there is no easy way to append two events to the list of default events. > >> > >> So, what do you think? > > > > On most systems with only four counters it'll start multiplexing, which > > will give much worse results. Defaulting to non multiplexing is much > > better. > > Anyway it has -d/--detailed option which can be specified up to 3 times. Thanks, that helps! Cheers -- Milian Wolff mail@milianw.de http://milianw.de ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-11-05 11:18 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-11-04 16:44 Adding cache misses and references to list of default events for perf stat? Milian Wolff 2014-11-04 20:16 ` Andi Kleen 2014-11-05 2:26 ` Namhyung Kim 2014-11-05 11:18 ` Milian Wolff
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).