summaryrefslogtreecommitdiff
path: root/arch/x86/events/perf_event.h
diff options
context:
space:
mode:
authorKan Liang <kan.liang@linux.intel.com>2020-07-03 05:49:09 -0700
committerPeter Zijlstra <peterz@infradead.org>2020-07-08 11:38:51 +0200
commitc301b1d80ed5b806834fe0f739f028f65fb4fb16 (patch)
tree5a03db4be9ad56692522d734ae2d348b223bc8e0 /arch/x86/events/perf_event.h
parent9f354a726cb1d4eb00a0784a27eaa0a3283cff71 (diff)
perf/x86/intel/lbr: Add a function pointer for LBR read
The method to read Architectural LBRs is different from previous model-specific LBR. Perf has to implement a different function. A function pointer for LBR read is introduced. Perf should initialize the corresponding function at boot time, and avoid checking lbr_format at run time. The current 64-bit LBR read function is set as default. Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/1593780569-62993-4-git-send-email-kan.liang@linux.intel.com
Diffstat (limited to 'arch/x86/events/perf_event.h')
-rw-r--r--arch/x86/events/perf_event.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/events/perf_event.h b/arch/x86/events/perf_event.h
index 5c1ad4360715..312d27f269e6 100644
--- a/arch/x86/events/perf_event.h
+++ b/arch/x86/events/perf_event.h
@@ -694,6 +694,7 @@ struct x86_pmu {
bool lbr_pt_coexist; /* (LBR|BTS) may coexist with PT */
void (*lbr_reset)(void);
+ void (*lbr_read)(struct cpu_hw_events *cpuc);
/*
* Intel PT/LBR/BTS are exclusive
@@ -1085,6 +1086,10 @@ void intel_pmu_lbr_disable_all(void);
void intel_pmu_lbr_read(void);
+void intel_pmu_lbr_read_32(struct cpu_hw_events *cpuc);
+
+void intel_pmu_lbr_read_64(struct cpu_hw_events *cpuc);
+
void intel_pmu_lbr_init_core(void);
void intel_pmu_lbr_init_nhm(void);