Skip to content

Commit b679221

Browse files
committed
perf/x86/intel: Rename model-specific pebs_latency_data functions
JIRA: https://issues.redhat.com/browse/RHEL-20059 upstream ======== commit 0902624 Author: Kan Liang <kan.liang@linux.intel.com> Date: Wed Jun 26 07:35:36 2024 -0700 description =========== The model-specific pebs_latency_data functions of ADL and MTL use the "small" as a postfix to indicate the e-core. The postfix is too generic for a model-specific function. It cannot provide useful information that can directly map it to a specific uarch, which can facilitate the development and maintenance. Use the abbr of the uarch to rename the model-specific functions. Suggested-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> Reviewed-by: Ian Rogers <irogers@google.com> Link: https://lkml.kernel.org/r/20240626143545.480761-5-kan.liang@linux.intel.com Signed-off-by: Michael Petlan <mpetlan@redhat.com>
1 parent 9ef08bd commit b679221

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

arch/x86/events/intel/core.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6515,7 +6515,7 @@ __init int intel_pmu_init(void)
65156515
case INTEL_ATOM_GRACEMONT:
65166516
intel_pmu_init_grt(NULL);
65176517
intel_pmu_pebs_data_source_grt();
6518-
x86_pmu.pebs_latency_data = adl_latency_data_small;
6518+
x86_pmu.pebs_latency_data = grt_latency_data;
65196519
x86_pmu.get_event_constraints = tnt_get_event_constraints;
65206520
td_attr = tnt_events_attrs;
65216521
mem_attr = grt_mem_attrs;
@@ -6529,7 +6529,7 @@ __init int intel_pmu_init(void)
65296529
intel_pmu_init_grt(NULL);
65306530
x86_pmu.extra_regs = intel_cmt_extra_regs;
65316531
intel_pmu_pebs_data_source_cmt();
6532-
x86_pmu.pebs_latency_data = mtl_latency_data_small;
6532+
x86_pmu.pebs_latency_data = cmt_latency_data;
65336533
x86_pmu.get_event_constraints = cmt_get_event_constraints;
65346534
td_attr = cmt_events_attrs;
65356535
mem_attr = grt_mem_attrs;
@@ -6880,7 +6880,7 @@ __init int intel_pmu_init(void)
68806880
*/
68816881
intel_pmu_init_hybrid(hybrid_big_small);
68826882

6883-
x86_pmu.pebs_latency_data = adl_latency_data_small;
6883+
x86_pmu.pebs_latency_data = grt_latency_data;
68846884
x86_pmu.get_event_constraints = adl_get_event_constraints;
68856885
x86_pmu.hw_config = adl_hw_config;
68866886
x86_pmu.get_hybrid_cpu_type = adl_get_hybrid_cpu_type;
@@ -6937,7 +6937,7 @@ __init int intel_pmu_init(void)
69376937
case INTEL_METEORLAKE_L:
69386938
intel_pmu_init_hybrid(hybrid_big_small);
69396939

6940-
x86_pmu.pebs_latency_data = mtl_latency_data_small;
6940+
x86_pmu.pebs_latency_data = cmt_latency_data;
69416941
x86_pmu.get_event_constraints = mtl_get_event_constraints;
69426942
x86_pmu.hw_config = adl_hw_config;
69436943

arch/x86/events/intel/ds.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ static inline void pebs_set_tlb_lock(u64 *val, bool tlb, bool lock)
256256
}
257257

258258
/* Retrieve the latency data for e-core of ADL */
259-
static u64 __adl_latency_data_small(struct perf_event *event, u64 status,
260-
u8 dse, bool tlb, bool lock, bool blk)
259+
static u64 __grt_latency_data(struct perf_event *event, u64 status,
260+
u8 dse, bool tlb, bool lock, bool blk)
261261
{
262262
u64 val;
263263

@@ -276,27 +276,27 @@ static u64 __adl_latency_data_small(struct perf_event *event, u64 status,
276276
return val;
277277
}
278278

279-
u64 adl_latency_data_small(struct perf_event *event, u64 status)
279+
u64 grt_latency_data(struct perf_event *event, u64 status)
280280
{
281281
union intel_x86_pebs_dse dse;
282282

283283
dse.val = status;
284284

285-
return __adl_latency_data_small(event, status, dse.ld_dse,
286-
dse.ld_locked, dse.ld_stlb_miss,
287-
dse.ld_data_blk);
285+
return __grt_latency_data(event, status, dse.ld_dse,
286+
dse.ld_locked, dse.ld_stlb_miss,
287+
dse.ld_data_blk);
288288
}
289289

290290
/* Retrieve the latency data for e-core of MTL */
291-
u64 mtl_latency_data_small(struct perf_event *event, u64 status)
291+
u64 cmt_latency_data(struct perf_event *event, u64 status)
292292
{
293293
union intel_x86_pebs_dse dse;
294294

295295
dse.val = status;
296296

297-
return __adl_latency_data_small(event, status, dse.mtl_dse,
298-
dse.mtl_stlb_miss, dse.mtl_locked,
299-
dse.mtl_fwd_blk);
297+
return __grt_latency_data(event, status, dse.mtl_dse,
298+
dse.mtl_stlb_miss, dse.mtl_locked,
299+
dse.mtl_fwd_blk);
300300
}
301301

302302
static u64 load_latency_data(struct perf_event *event, u64 status)

arch/x86/events/perf_event.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1535,9 +1535,9 @@ void intel_pmu_disable_bts(void);
15351535

15361536
int intel_pmu_drain_bts_buffer(void);
15371537

1538-
u64 adl_latency_data_small(struct perf_event *event, u64 status);
1538+
u64 grt_latency_data(struct perf_event *event, u64 status);
15391539

1540-
u64 mtl_latency_data_small(struct perf_event *event, u64 status);
1540+
u64 cmt_latency_data(struct perf_event *event, u64 status);
15411541

15421542
extern struct event_constraint intel_core2_pebs_event_constraints[];
15431543

0 commit comments

Comments
 (0)