Skip to content

Commit 0902624

Browse files
Kan LiangPeter Zijlstra
authored andcommitted
perf/x86/intel: Rename model-specific pebs_latency_data functions
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) <[email protected]> Signed-off-by: Kan Liang <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Ian Rogers <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent a932aa0 commit 0902624

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
@@ -6509,7 +6509,7 @@ __init int intel_pmu_init(void)
65096509
case INTEL_ATOM_GRACEMONT:
65106510
intel_pmu_init_grt(NULL);
65116511
intel_pmu_pebs_data_source_grt();
6512-
x86_pmu.pebs_latency_data = adl_latency_data_small;
6512+
x86_pmu.pebs_latency_data = grt_latency_data;
65136513
x86_pmu.get_event_constraints = tnt_get_event_constraints;
65146514
td_attr = tnt_events_attrs;
65156515
mem_attr = grt_mem_attrs;
@@ -6523,7 +6523,7 @@ __init int intel_pmu_init(void)
65236523
intel_pmu_init_grt(NULL);
65246524
x86_pmu.extra_regs = intel_cmt_extra_regs;
65256525
intel_pmu_pebs_data_source_cmt();
6526-
x86_pmu.pebs_latency_data = mtl_latency_data_small;
6526+
x86_pmu.pebs_latency_data = cmt_latency_data;
65276527
x86_pmu.get_event_constraints = cmt_get_event_constraints;
65286528
td_attr = cmt_events_attrs;
65296529
mem_attr = grt_mem_attrs;
@@ -6874,7 +6874,7 @@ __init int intel_pmu_init(void)
68746874
*/
68756875
intel_pmu_init_hybrid(hybrid_big_small);
68766876

6877-
x86_pmu.pebs_latency_data = adl_latency_data_small;
6877+
x86_pmu.pebs_latency_data = grt_latency_data;
68786878
x86_pmu.get_event_constraints = adl_get_event_constraints;
68796879
x86_pmu.hw_config = adl_hw_config;
68806880
x86_pmu.get_hybrid_cpu_type = adl_get_hybrid_cpu_type;
@@ -6931,7 +6931,7 @@ __init int intel_pmu_init(void)
69316931
case INTEL_METEORLAKE_L:
69326932
intel_pmu_init_hybrid(hybrid_big_small);
69336933

6934-
x86_pmu.pebs_latency_data = mtl_latency_data_small;
6934+
x86_pmu.pebs_latency_data = cmt_latency_data;
69356935
x86_pmu.get_event_constraints = mtl_get_event_constraints;
69366936
x86_pmu.hw_config = adl_hw_config;
69376937

arch/x86/events/intel/ds.c

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

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

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

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

284284
dse.val = status;
285285

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

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

296296
dse.val = status;
297297

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

303303
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
@@ -1548,9 +1548,9 @@ void intel_pmu_disable_bts(void);
15481548

15491549
int intel_pmu_drain_bts_buffer(void);
15501550

1551-
u64 adl_latency_data_small(struct perf_event *event, u64 status);
1551+
u64 grt_latency_data(struct perf_event *event, u64 status);
15521552

1553-
u64 mtl_latency_data_small(struct perf_event *event, u64 status);
1553+
u64 cmt_latency_data(struct perf_event *event, u64 status);
15541554

15551555
extern struct event_constraint intel_core2_pebs_event_constraints[];
15561556

0 commit comments

Comments
 (0)