linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Milian Wolff <mail@milianw.de>
To: linux-perf-users@vger.kernel.org
Subject: Re: Haswell LBR call stacks - broken
Date: Tue, 04 Aug 2015 19:24:04 +0200	[thread overview]
Message-ID: <8643019.4YmQ1Xdl9W@milian-kdab2> (raw)
In-Reply-To: <1682663.JO3lAz5bZo@agathebauer>

On Sunday 14 June 2015 13:02:57 Milian Wolff wrote:
> Hey all,
> 
> Some time ago I read this interesting article:
> 
> http://article.gmane.org/gmane.linux.kernel/1809078
> 
> It mentions a new call stack unwinding for perf, based on Haswell LBR
> facility. I now have a new Laptop with a Broadwell i7-5600U CPU, but my perf
> version 4.0.3 running against a Linux 4.0.4 kernel (all vanilla Archlinux
> versions) does not seem to support this feature. Was it ever included in
> the mainline? Is a special compiler flag required to enable this feature?
> Anything else I'm missing?
> 
> callchain: Unknown --call-graph option value: lbr
> 
>  usage: perf record [<options>] [<command>]
>     or: perf record [<options>] -- <command> [<options>]
> 
>         --call-graph <mode[,dump_size]>
>                           setup and enables call-graph (stack
> chain/backtrace) recording: fp dwarf

OK, with a more recent perf v4.2.rc5 on a Intel(R) Core(TM) i7-4770 CPU @ 
3.40GHz it actually works. Somewhat :) It is much faster, but the callstacks 
don't terminate properly, and are sometimes not correctly demangled. I observe 
the following behavior:

    15.56%  ex_string_compa  libQt5Core.so.5.5.0   [.] QString::compare_helper                 
            |          
            |--5.84%-- 
_ZN7QString14compare_helperEPK5QChariS2_iN2Qt15CaseSensitivityE@plt
            |          QString::compare_helper
            |          main
            |          |          
            |          |--4.24%-- main
            |          |          |          
            |          |          |--1.60%-- main
            |          |          |          |          
            |          |          |          |--1.07%-- main
            |          |          |          |          |          
            |          |          |          |          |--0.54%-- main
            |          |          |          |          |          main
            |          |          |          |          |          
            |          |          |          |           --0.53%-- 
QString::compare_helper
            |          |          |          |                     main
            |          |          |          |          
            |          |          |           --0.53%-- 
QString::compare_helper
            |          |          |                     main
            |          |          |                     main
            |          |          |                     
QString::compare_helper
            |          |          |                     main
            |          |          |                     
QString::compare_helper
...

The correct callgraph, as shown by --call-graph dwarf, is:

    21.62%  ex_string_compa  libQt5Core.so.5.5.0   [.] QString::compare_helper                                        
            |
            ---QString::compare_helper
               main

Is this a known (undocumented) limitation or a bug? Is there anything I could 
do to get this fixed?

Thanks
-- 
Milian Wolff
mail@milianw.de
http://milianw.de

  reply	other threads:[~2015-08-04 17:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-14 11:02 Haswell LBR call stacks Milian Wolff
2015-08-04 17:24 ` Milian Wolff [this message]
2015-08-04 18:10   ` Haswell LBR call stacks - broken Andi Kleen
2015-08-04 21:41     ` Liang, Kan
2015-08-05  9:02       ` 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=8643019.4YmQ1Xdl9W@milian-kdab2 \
    --to=mail@milianw.de \
    --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).