Adding cache misses and references to list of default events for perf stat?
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
Signature · 3 lines
Milian Wolff [email protected] http://milianw.de
Quoted 6 lines · Milian Wolff
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.
Quoted 7 lines
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
Signature · 1 line
[email protected] -- Speaking for myself only
Hi Andi and Milian,
Quoted 12 lines · Andi Kleen
Quoted 10 lines · Milian Wolff
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 ...
Quoted 7 lines
Quoted 3 lines
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 elapsedThanks,
Namhyung
Quoted 11 lines
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
Quoted 19 lines · On Wednesday 05 November 2014 11:26:36 Namhyung Kim wrote:
Hi Andi and Milian,
Quoted 16 lines · Andi Kleen
Quoted 15 lines · Milian Wolff
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.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
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
Signature · 3 lines
Milian Wolff [email protected] http://milianw.de