]> Git Repo - linux.git/commit
perf/x86/intel/lbr: Limit LBR accesses to TOS in callstack mode
authorAndi Kleen <[email protected]>
Thu, 28 May 2015 04:13:18 +0000 (21:13 -0700)
committerIngo Molnar <[email protected]>
Tue, 4 Aug 2015 08:16:59 +0000 (10:16 +0200)
commit90405aa02247c1a6313c33e2253f9fd2299ae60b
tree2515d1a1ac3844ac12555b301df2c2e797b81d6c
parente0573364b8c5b17401569ef581f1625803210f4d
perf/x86/intel/lbr: Limit LBR accesses to TOS in callstack mode

In callstack mode the LBR is not a ring buffer, but a stack that grows up
and down. This means in  this case we don't need to access all LBRs, only the
ones up to TOS. Do this optimization for the normal LBR read, and the context
switch save/restore code. For save/restore it can be done unconditionally, as
it only runs when call stack mode is active.

This recovers some of the cost of going to 32 LBRs on Skylake.

Signed-off-by: Andi Kleen <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
arch/x86/kernel/cpu/perf_event_intel_lbr.c
This page took 0.055834 seconds and 4 git commands to generate.