[lkml]   [2018]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] perf/x86/intel/lbr: Optimize context switches for LBR
> > 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)

This change is only optimizing the case when call stack mode is not used.

Of course in call stack mode the context switch overhead is even higher,
because it not only writes, but also reads.


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