linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* how to use event groups
@ 2016-08-29 18:11 Milian Wolff
  0 siblings, 0 replies; only message in thread
From: Milian Wolff @ 2016-08-29 18:11 UTC (permalink / raw)
  To: linux-perf-users; +Cc: namhyung

[-- Attachment #1: Type: text/plain, Size: 4119 bytes --]

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_mandelbrot   
lab_mandelbrot                  [.] _start
~~~~~~~~~~~~~~~~~~~~~

I now see the last value being duplicated twice :-/

Thanks

-- 
Milian Wolff | milian.wolff@kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5903 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-29 18:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-29 18:11 how to use event groups 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).