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


Groups > linux.kernel > #1479623

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

From "Jin, Yao" <yao.jin@intel.com>
Newsgroups linux.kernel
Subject RE: [RFC][PATCH 7/7] perf/annotate: Add branch stack / basic block information
Date 2016-09-09 04:50 +0200
Message-ID <sfk37-5BV-5@gated-at.bofh.it> (permalink)
References (4 earlier) <rSGYO-7fn-33@gated-at.bofh.it> <sfadr-84F-3@gated-at.bofh.it> <sfaGt-8ej-5@gated-at.bofh.it> <sfaQa-8hz-15@gated-at.bofh.it> <sfb9v-bn-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi, 

The idea of my patch is a little bit different.  It targets to associate the branch
coverage percentage and branch mispredict rate with the source code then user
can see them directly in perf annotate source code / assembly view.

The screenshot to show the branch%. 
https://github.com/yaoj/perf/blob/master/2.png

The screenshot to show the mispredict rate.
https://github.com/yaoj/perf/blob/master/3.png

The --stdio mode is tested working well now and will do for --tui mode in next.

The internal review comments require the patch to keep the existing "Percent"
column unchanged and add new columns "Branch%" and "Mispred%" if LBRs
are recorded in perf.data. For example, following 3 columns will be shown at
default if LBRs are in perf.data when executing perf annotate --stdio.

Percent | Branch% | Mispred% |

With this comment, the patch needs to be changed. 

Please let me know what do you think for this patch and  if I should go ahead. 

Thanks
Jin Yao

-----Original Message-----
From: Arnaldo Carvalho de Melo [mailto:acme@kernel.org] 
Sent: Friday, September 9, 2016 1:11 AM
To: Andi Kleen <andi@firstfloor.org>
Cc: Stephane Eranian <eranian@google.com>; Peter Zijlstra <peterz@infradead.org>; Ingo Molnar <mingo@kernel.org>; LKML <linux-kernel@vger.kernel.org>; Jiri Olsa <jolsa@kernel.org>; Linus Torvalds <torvalds@linux-foundation.org>; David Carrillo-Cisneros <davidcc@google.com>; Alexander Shishkin <alexander.shishkin@linux.intel.com>; Namhyung Kim <namhyung@kernel.org>; Liang, Kan <kan.liang@intel.com>; Anshuman Khandual <khandual@linux.vnet.ibm.com>; Jin, Yao <yao.jin@intel.com>
Subject: Re: [RFC][PATCH 7/7] perf/annotate: Add branch stack / basic block information

Em Thu, Sep 08, 2016 at 09:59:15AM -0700, Andi Kleen escreveu:
> On Thu, Sep 08, 2016 at 09:43:53AM -0700, Stephane Eranian wrote:
> > Hi,
> > 
> > On Thu, Sep 8, 2016 at 9:18 AM, Arnaldo Carvalho de Melo 
> > <acme@kernel.org> wrote:
> > >
> > > Em Fri, Jul 08, 2016 at 06:36:32PM +0200, Peter Zijlstra escreveu:
> > > > On Fri, Jul 08, 2016 at 06:27:33PM +0200, Peter Zijlstra wrote:
> > > >
> > > > > I've been thinking of filtering all targets and branches that 
> > > > > are smaller than 0.1% in order to avoid this, but so far I've 
> > > > > just been ignoring these things.
> > > >
> > > > Like so... seems to 'work'.
> > >
> > > So I merged this one with 7/7 and this is the result, screenshot 
> > > to capture the colors:
> > >
> > >   http://vger.kernel.org/~acme/perf/annotate_basic_blocks.png
> > >
> > > Please let me know if I should go ahead and push with the combined 
> > > patch, that is now at:
> > >
> > > https://git.kernel.org/cgit/linux/kernel/git/acme/linux.git/commit
> > > /?h=perf/annotate_basic_blocks&id=baf41a43fa439ac534d21e41882a7858
> > > d5cee1e5
> > >
> > > git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git 
> > > perf/annotate_basic_blocks
> > >
> > > Is that ok?
> > >
> > 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?
> > How do I interpret the percentages in the comments of the assembly:
> > -54.50% (p: 42%)
> > Why not have dedicated columns before the assembly with proper column headers?
> 
> Yes columns with headers are better. Jin Yao has been looking at this 
> and already has some patches.

For --tui as well?

- Arnaldo

Back to linux.kernel | Previous | NextPrevious in thread | Next 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