lkml.org 
[lkml]   [2018]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf/x86/intel/lbr: Optimize context switches for LBR
On Fri, Sep 14, 2018 at 08:39:36AM -0400, Liang, Kan wrote:
>
>
> On 9/14/2018 5:22 AM, Alexey Budankov wrote:
> >
> > Hi Andi,
> >
> > On 14.09.2018 11:54, Andi Kleen wrote:
> > > > > In principle the LBRs need to be flushed between threads. So does
> > > > > current code.
> > > >
> > > > IMHO, ideally, LBRs stack would be preserved and restored when
> > > > switching between execution stacks. That would allow implementing
> > > > per-thread statistical call graph view in Perf tools, fully based
> > > > on HW capabilities. It could be advantageous for some cases, in
> > > > comparison with traditional dwarf based call graph.
> > >
> > > This is already supported when you use LBR call stack mode
> > > (perf record --call-graph lbr)
> >
> > Which kernel versions does it make sense to try?
> >
>
> The optimization for LBR call stack has been merged into 4.19.
> commit id: 8b077e4a69bef5c4121426e99497975860191e53
> perf/x86/intel/lbr: Optimize context switches for the LBR call stack

I think he mean support for LBR call stack in general. This has been there
for a long time (since Haswell) Any reasonable kernel version should
support it.

The commit Kan pointed out just optimize it for cases when it is not
needed, like switch to kernel, because we only use LBR call stack
for ring 3.

-Andi

\
 
 \ /
  Last update: 2018-09-14 16:30    [W:0.062 / U:3.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site