linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* "perf script" broken with --call-graph=dwarf on recent kernels?
@ 2015-08-17 16:25 Ben Redelings
  2015-08-18  7:05 ` Jiri Olsa
  2015-10-31 13:25 ` Inverted call-graph broken? Ben Redelings
  0 siblings, 2 replies; 7+ messages in thread
From: Ben Redelings @ 2015-08-17 16:25 UTC (permalink / raw)
  To: linux-perf-users

Hi,

     The behavior of "perf script" has changed on recent kernels, and 
I'm wondering whether this is a bug, or whether I'm just missing 
something.  (I'm perf script to generate DOT graphs for user-space 
profiling via the gprof2dot script: https://github.com/jrfonseca/gprof2dot)

     If I run perf record with --call-graph=dwarf, then I can run perf 
report and view call-chains.  However, if I run 'perf script' I don't 
see any call chains, but just output like:

bali-phy 11043 10381.662885:     466982 cycles:

bali-phy 11043 10381.663136:     466737 cycles:

bali-phy 11043 10381.663386:     466456 cycles:

bali-phy 11043 10381.663636:     466465 cycles:

bali-phy 11043 10381.663885:     466611 cycles:

bali-phy 11043 10381.664135:     466757 cycles:

with an occasional

bali-phy 11043 10381.665885:     466867 cycles:
         ffffffff81577e30 page_fault ([kernel.kallsyms])

     If I run with --call-graph=lbr instead, then I get 'perf script' 
output like this instead:

bali-phy 11060 10464.369184:     420718 cycles:
                   3437d0 all_characters_connected 
(/home/bredelings/Devel/bali-phy/local/clang-3.7/bin/bali-phy)
                   3448c8 check_internal_nodes_connected 
(/home/bredelings/Devel/bali-phy/local/clang-3.7/bin/bali-phy)
                   3450fc check_alignment 
(/home/bredelings/Devel/bali-phy/local/clang-3.7/bin/bali-phy)

bali-phy 11060 10464.369412:     427217 cycles:
                   26ef10 alignment::alignment 
(/home/bredelings/Devel/bali-phy/local/clang-3.7/bin/bali-phy)
                   305f7e empirical_frequencies 
(/home/bredelings/Devel/bali-phy/local/clang-3.7/bin/bali-phy)
                   306ce1 empirical_frequencies 
(/home/bredelings/Devel/bali-phy/local/clang-3.7/bin/bali-phy)
                   3330d9 get_smodel 
(/home/bredelings/Devel/bali-phy/local/clang-3.7/bin/bali-phy)
                   4dc133 get_smodels 
(/home/bredelings/Devel/bali-phy/local/clang-3.7/bin/bali-phy)
                   4e02ea create_A_and_T_model 
(/home/bredelings/Devel/bali-phy/local/clang-3.7/bin/bali-phy)

This is more what I was expecting, and similar to what I used to get 
with --call-graph=dwarf.

However, the call chains that I get using DWARF tend to be longer and 
lead to more accurate results, so I would prefer to use DWARF instead of 
lbr.  Is there something that I'm doing wrong?  Also, it seems like 
--call-graph=dwarf successfully records call chains that can be seen via 
perf report, but somehow 'perf script' doesn't show them.  Could that 
happen?

-BenRI

P.S. I'm using debian's kernel 4.1.0 and perf tools on a Core i3-4030.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-11-02 18:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-17 16:25 "perf script" broken with --call-graph=dwarf on recent kernels? Ben Redelings
2015-08-18  7:05 ` Jiri Olsa
2015-08-18 18:28   ` Ben Redelings
2015-10-31 13:25 ` Inverted call-graph broken? Ben Redelings
2015-11-01 14:09   ` Milian Wolff
2015-11-02 17:31     ` Arnaldo Carvalho de Melo
2015-11-02 18:29       ` 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).