how to use event groups
Hey all,
I've read through the available documentation on perf event groups. Trying it out, I am having trouble interpreting the results. I'm using the latest perf from acme's perf/core branch.
~~~~~~~~~~~~~~~~~~~~~
$ perf record -e "{cycles,instructions}" ./lab_mandelbrot -b 5
[ perf record: Woken up 3 times to write data ]
[ perf record: Captured and wrote 0.742 MB perf.data (15564 samples) ]
$ perf report --stdio
# Overhead Command Shared Object Symbol
# ................ ............... ..........................
..................................................................
#
41.71% 55.12% lab_mandelbrot libm-2.24.so [.]
__hypot_finite
18.50% 14.32% lab_mandelbrot lab_mandelbrot [.] main
~~~~~~~~~~~~~~~~~~~~~Ok, I guess the two "Overhead" columns are for cycles and then instructions. So far so good.
But when I use the TUI, things get funky:
~~~~~~~~~~~~~~~~~~~~~
Samples: 15K of event 'anon group { cycles, instructions }', Event count (approx.): 22187252255
Overhead Command Shared Object Symbol
41.71% 55.12% 55.12% lab_mandelbrot libm-2.24.so [.]__hypot_finite
18.50% 14.32% 14.32% lab_mandelbrot lab_mandelbrot [.]
main
~~~~~~~~~~~~~~~~~~~~~
There seems to be a third cost column here which duplicates the last value? Also note how the column headers are completely off.
Then, check what happens when we enable call stack sampling:
~~~~~~~~~~~~~~~~~~~~~
$ perf record -e "{cycles,instructions}" --call-graph dwarf ./lab_mandelbrot -
b 5
[ perf record: Woken up 512 times to write data ]
[ext4] with build id ebb903a8b8d54ed64fd60cabc965a430aa959bd9 not found,
continuing without symbols
[ perf record: Captured and wrote 128.196 MB perf.data (15911 samples) ]$ perf report --stdio
[ext4] with build id ebb903a8b8d54ed64fd60cabc965a430aa959bd9 not found,
continuing without symbols
# To display the perf.data header info, please use --header/--header-only
options.
# Children Self Command Shared Object
Symbol
# ................ ................ ...............
..............................
.................................................................................
#
99.48% 99.85% 0.01% 0.00% lab_mandelbrot libc-2.24.so
[.] __libc_start_main
|
--99.47%--__libc_start_main
|
--99.44%--main
~~~~~~~~~~~~~~~~~~~~~The backtrace only shows one cost, probably for the leader data only? Can I get the data for the other values in the group as well?
And, again, using the TUI things become awkward:
~~~~~~~~~~~~~~~~~~~~~
Samples: 15K of event 'anon group { cycles, instructions }', Event count (approx.): 22241444379
Children Self Command Shared Object
Symbol
+ 99.48% 99.85% 99.85% 0.01% 0.00% 0.00% lab_mandelbrot
libc-2.24.so [.] __libc_start_main
+ 99.47% 99.85% 99.85% 0.00% 0.00% 0.00% lab_mandelbrotlab_mandelbrot [.] _start
~~~~~~~~~~~~~~~~~~~~~
I now see the last value being duplicated twice :-/
Thanks
Signature · 4 lines
Milian Wolff | [email protected] | Software Engineer KDAB (Deutschland) GmbH&Co KG, a KDAB Group company Tel: +49-30-521325470 KDAB - The Qt Experts