linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Redelings <benjamin.redelings@gmail.com>
To: linux-perf-users@vger.kernel.org
Subject: "perf script" broken with --call-graph=dwarf on recent kernels?
Date: Mon, 17 Aug 2015 12:25:29 -0400	[thread overview]
Message-ID: <55D20AF9.9040705@gmail.com> (raw)

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.

             reply	other threads:[~2015-08-17 16:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-17 16:25 Ben Redelings [this message]
2015-08-18  7:05 ` "perf script" broken with --call-graph=dwarf on recent kernels? 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55D20AF9.9040705@gmail.com \
    --to=benjamin.redelings@gmail.com \
    --cc=linux-perf-users@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).