Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1479423

Re: [RFC][PATCH 7/7] perf/annotate: Add branch stack / basic block information

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [RFC][PATCH 7/7] perf/annotate: Add branch stack / basic block information
Date 2016-09-08 20:20 +0200
Message-ID <sfc5A-OX-5@gated-at.bofh.it> (permalink)
References (2 earlier) <rSFq1-68d-1@gated-at.bofh.it> <rSGPb-79Y-123@gated-at.bofh.it> <rSGYO-7fn-33@gated-at.bofh.it> <sfadr-84F-3@gated-at.bofh.it> <sfaGt-8ej-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Sep 08, 2016 at 09:43:53AM -0700, Stephane Eranian wrote:

> I like the idea and yes, branch stack can be used for this, but I have
> a hard time understanding the colored output.

> What is the explanation for the color changes?

In general, or the changes acme made? I can only answer the first.

For code: NORMAL <1%, BLUE otherwise, quickly shows you the code in a
function that's not ran at all. This quickly eliminated a big chunk of
the function I was looking at at the time, since the benchmark in
question simply didn't touch most of it.

For address: NORMAL <1%, RED > 75%, MAGENTA otherwise. Quickly shows the
hottest blocks in a function. The 75% is a random number otherwise. Not
sure if we can do better.

> How do I interpret the percentages in the comments of the assembly:
> -54.50% (p: 42%)

-54.50% is 54.40% of the coverage is leaving here, aka 54.40% take this
branch. p: 42% mean the branch is predicted 42% of the time.

Similarly, +50.46% is a branch target and means that of all the times
this instruction gets executed, 50.46% of those joined at this
instruction.

> Why not have dedicated columns before the assembly with proper column headers?

I found it too noisy, you only want to annotate branch instructions and
branch targets. Adding columns just adds a whole heap of whitespace
(wasted screen-estate) on the left.

Something I did want to look at was attempting to align the # comments,
but I never did bother.

But to each their own I suppose.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [RFC][PATCH 7/7] perf/annotate: Add branch stack / basic block  information Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-08 18:20 +0200
  Re: [RFC][PATCH 7/7] perf/annotate: Add branch stack / basic block  information Peter Zijlstra <peterz@infradead.org> - 2016-09-08 18:50 +0200
    Re: [RFC][PATCH 7/7] perf/annotate: Add branch stack / basic block  information Peter Zijlstra <peterz@infradead.org> - 2016-09-08 19:00 +0200
      Re: [RFC][PATCH 7/7] perf/annotate: Add branch stack / basic block  information Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-08 19:10 +0200
  Re: [RFC][PATCH 7/7] perf/annotate: Add branch stack / basic block information Stephane Eranian <eranian@google.com> - 2016-09-08 18:50 +0200
    Re: [RFC][PATCH 7/7] perf/annotate: Add branch stack / basic block  information Andi Kleen <andi@firstfloor.org> - 2016-09-08 19:00 +0200
      Re: [RFC][PATCH 7/7] perf/annotate: Add branch stack / basic block  information Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-08 19:20 +0200
        RE: [RFC][PATCH 7/7] perf/annotate: Add branch stack / basic block  information "Jin, Yao" <yao.jin@intel.com> - 2016-09-09 04:50 +0200
    Re: [RFC][PATCH 7/7] perf/annotate: Add branch stack / basic block  information Peter Zijlstra <peterz@infradead.org> - 2016-09-08 20:20 +0200

csiph-web