Skip to content

Commit 6d89c1c

Browse files
committed
perf/x86/intel: Apply static call for drain_pebs
JIRA: https://issues.redhat.com/browse/RHEL-47444 upstream ======== commit 314dfe1 Author: Peter Zijlstra (Intel) <peterz@infradead.org> Date: Tue Jan 21 07:23:00 2025 -0800 description =========== The x86_pmu_drain_pebs static call was introduced in commit 7c9903c ("x86/perf, static_call: Optimize x86_pmu methods"), but it's not really used to replace the old method. Apply the static call for drain_pebs. Fixes: 7c9903c ("x86/perf, static_call: Optimize x86_pmu methods") Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20250121152303.3128733-1-kan.liang@linux.intel.com Signed-off-by: Michael Petlan <mpetlan@redhat.com>
1 parent 0349164 commit 6d89c1c

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

arch/x86/events/intel/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3067,7 +3067,7 @@ static int handle_pmi_common(struct pt_regs *regs, u64 status)
30673067

30683068
handled++;
30693069
x86_pmu_handle_guest_pebs(regs, &data);
3070-
x86_pmu.drain_pebs(regs, &data);
3070+
static_call(x86_pmu_drain_pebs)(regs, &data);
30713071
status &= intel_ctrl | GLOBAL_STATUS_TRACE_TOPAPMI;
30723072

30733073
/*

arch/x86/events/intel/ds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ void intel_pmu_drain_pebs_buffer(void)
956956
{
957957
struct perf_sample_data data;
958958

959-
x86_pmu.drain_pebs(NULL, &data);
959+
static_call(x86_pmu_drain_pebs)(NULL, &data);
960960
}
961961

962962
/*

arch/x86/events/perf_event.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,7 @@ extern struct x86_pmu x86_pmu __read_mostly;
11061106

11071107
DECLARE_STATIC_CALL(x86_pmu_set_period, *x86_pmu.set_period);
11081108
DECLARE_STATIC_CALL(x86_pmu_update, *x86_pmu.update);
1109+
DECLARE_STATIC_CALL(x86_pmu_drain_pebs, *x86_pmu.drain_pebs);
11091110

11101111
static __always_inline struct x86_perf_task_context_opt *task_context_opt(void *ctx)
11111112
{

0 commit comments

Comments
 (0)