perf/x86: Add constraint to create guest LBR event without hw counter
The hypervisor may request the perf subsystem to schedule a time window to directly access the LBR records msrs for its own use. Normally, it would create a guest LBR event with callstack mode enabled, which is scheduled along with other ordinary LBR events on the host but in an exclusive way. To avoid wasting a counter for the guest LBR event, the perf tracks its hw->idx via INTEL_PMC_IDX_FIXED_VLBR and assigns it with a fake VLBR counter with the help of new vlbr_constraint. As with the BTS event, there is actually no hardware counter assigned for the guest LBR event. Signed-off-by:Like Xu <like.xu@linux.intel.com> Signed-off-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20200514083054.62538-5-like.xu@linux.intel.com
Showing
- arch/x86/events/core.c 1 addition, 0 deletionsarch/x86/events/core.c
- arch/x86/events/intel/core.c 18 additions, 0 deletionsarch/x86/events/intel/core.c
- arch/x86/events/intel/lbr.c 4 additions, 0 deletionsarch/x86/events/intel/lbr.c
- arch/x86/events/perf_event.h 1 addition, 0 deletionsarch/x86/events/perf_event.h
- arch/x86/include/asm/perf_event.h 21 additions, 1 deletionarch/x86/include/asm/perf_event.h
Loading
Please register or sign in to comment