From: Jiri Olsa <jolsa@redhat.com>
To: kan.liang@intel.com
Cc: acme@kernel.org, a.p.zijlstra@chello.nl, eranian@google.com,
linux-kernel@vger.kernel.org, mingo@redhat.com, paulus@samba.org,
ak@linux.intel.com, namhyung@kernel.org
Subject: Re: [PATCH V5 0/3] perf tool: Haswell LBR call stack support (user)
Date: Thu, 4 Dec 2014 15:23:30 +0100 [thread overview]
Message-ID: <20141204142330.GB10406@krava.brq.redhat.com> (raw)
In-Reply-To: <1417532814-26208-1-git-send-email-kan.liang@intel.com>
On Tue, Dec 02, 2014 at 10:06:51AM -0500, kan.liang@intel.com wrote:
> From: Kan Liang <kan.liang@intel.com>
>
> This is the user space patch for Haswell LBR call stack support.
> For many profiling tasks we need the callgraph. For example we often
> need to see the caller of a lock or the caller of a memcpy or other
> library function to actually tune the program. Frame pointer unwinding
> is efficient and works well. But frame pointers are off by default on
> 64bit code (and on modern 32bit gccs), so there are many binaries around
> that do not use frame pointers. Profiling unchanged production code is
> very useful in practice. On some CPUs frame pointer also has a high
> cost. Dwarf2 unwinding also does not always work and is extremely slow
> (upto 20% overhead).
>
> Haswell has a new feature that utilizes the existing Last Branch Record
> facility to record call chains. When the feature is enabled, function
> call will be collected as normal, but as return instructions are
> executed the last captured branch record is popped from the on-chip LBR
> registers. The LBR call stack facility provides an alternative to get
> callgraph. It has some limitations too, but should work in most cases
> and is significantly faster than dwarf. Frame pointer unwinding is still
> the best default, but LBR call stack is a good alternative when nothing
> else works.
>
> Please find the kernel part patch at https://lkml.org/lkml/2014/11/6/432
>
> Changes since v1
> - Update help document
> - Force exclude_user to 0 with warning in LBR call stack
> - Dump both lbr and fp info when report -D
> - Reconstruct thread__resolve_callchain_sample and split it into two patches
> - Use has_branch_callstack function to check LBR call stack available
>
> Changes since v2
> - Rebase to 025ce5d33373
>
> Changes since v3
> - Rebase to cc502c23aadf
> - Separated function for lbr call stack sample resolve and print
> - Some minor changes according to comments
>
> Changes since V4
> - Rebase to 09a6a1b
> - Falling back to framepointers if LBR not available, and warning user
looks ok to me..
I'll test it once I get hands on Haswel server again, I guess we
wait for the kernel change to go in first anyway, right?
thanks,
jirka
next prev parent reply other threads:[~2014-12-04 14:28 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-02 15:06 kan.liang
2014-12-02 15:06 ` [PATCH V5 1/3] perf tools: enable LBR call stack support kan.liang
2014-12-12 8:17 ` [tip:perf/urgent] perf callchain: Fixup parameter handling error message tip-bot for Kan Liang
2014-12-02 15:06 ` [PATCH V5 2/3] perf tool: Move cpumode resolve code to add_callchain_ip kan.liang
2014-12-12 8:18 ` [tip:perf/urgent] perf callchain: " tip-bot for Kan Liang
2014-12-02 15:06 ` [PATCH V5 3/3] perf tools: Construct LBR call chain kan.liang
2014-12-04 14:23 ` Jiri Olsa [this message]
2014-12-04 14:49 ` [PATCH V5 0/3] perf tool: Haswell LBR call stack support (user) Liang, Kan
2014-12-04 15:51 ` Arnaldo Carvalho de Melo
2014-12-04 16:02 ` Jiri Olsa
2014-12-04 16:18 ` Liang, Kan
2014-12-09 12:27 ` Arnaldo Carvalho de Melo
2014-12-09 12:53 ` Jiri Olsa
2014-12-09 13:11 ` Arnaldo Carvalho de Melo
2014-12-09 13:22 ` Jiri Olsa
2014-12-09 13:27 ` Arnaldo Carvalho de Melo
2014-12-09 13:33 ` Jiri Olsa
2015-01-05 13:57 ` Peter Zijlstra
2015-01-05 15:58 ` Liang, Kan
2014-12-11 22:21 ` Jiri Olsa
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=20141204142330.GB10406@krava.brq.redhat.com \
--to=jolsa@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=eranian@google.com \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=paulus@samba.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
all inboxes | Powered by JetHome®