From: kan.liang@linux.intel.com
To: peterz@infradead.org, mingo@kernel.org, acme@kernel.org,
namhyung@kernel.org, irogers@google.com, adrian.hunter@intel.com,
alexander.shishkin@linux.intel.com, linux-kernel@vger.kernel.org
Cc: ak@linux.intel.com, eranian@google.com,
Kan Liang <kan.liang@linux.intel.com>
Subject: [PATCH V3 04/13] perf/x86/intel: Rename model-specific pebs_latency_data functions
Date: Wed, 26 Jun 2024 07:35:36 -0700 [thread overview]
Message-ID: <20240626143545.480761-5-kan.liang@linux.intel.com> (raw)
In-Reply-To: <20240626143545.480761-1-kan.liang@linux.intel.com>
From: Kan Liang <kan.liang@linux.intel.com>
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>
Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
---
arch/x86/events/intel/core.c | 8 ++++----
arch/x86/events/intel/ds.c | 20 ++++++++++----------
arch/x86/events/perf_event.h | 4 ++--
3 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index 73dbbbdcc421..50033023125d 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -6509,7 +6509,7 @@ __init int intel_pmu_init(void)
case INTEL_ATOM_GRACEMONT:
intel_pmu_init_grt(NULL);
intel_pmu_pebs_data_source_grt();
- x86_pmu.pebs_latency_data = adl_latency_data_small;
+ x86_pmu.pebs_latency_data = adl_latency_data_grt;
x86_pmu.get_event_constraints = tnt_get_event_constraints;
td_attr = tnt_events_attrs;
mem_attr = grt_mem_attrs;
@@ -6523,7 +6523,7 @@ __init int intel_pmu_init(void)
intel_pmu_init_grt(NULL);
x86_pmu.extra_regs = intel_cmt_extra_regs;
intel_pmu_pebs_data_source_cmt();
- x86_pmu.pebs_latency_data = mtl_latency_data_small;
+ x86_pmu.pebs_latency_data = mtl_latency_data_cmt;
x86_pmu.get_event_constraints = cmt_get_event_constraints;
td_attr = cmt_events_attrs;
mem_attr = grt_mem_attrs;
@@ -6874,7 +6874,7 @@ __init int intel_pmu_init(void)
*/
intel_pmu_init_hybrid(hybrid_big_small);
- x86_pmu.pebs_latency_data = adl_latency_data_small;
+ x86_pmu.pebs_latency_data = adl_latency_data_grt;
x86_pmu.get_event_constraints = adl_get_event_constraints;
x86_pmu.hw_config = adl_hw_config;
x86_pmu.get_hybrid_cpu_type = adl_get_hybrid_cpu_type;
@@ -6931,7 +6931,7 @@ __init int intel_pmu_init(void)
case INTEL_METEORLAKE_L:
intel_pmu_init_hybrid(hybrid_big_small);
- x86_pmu.pebs_latency_data = mtl_latency_data_small;
+ x86_pmu.pebs_latency_data = mtl_latency_data_cmt;
x86_pmu.get_event_constraints = mtl_get_event_constraints;
x86_pmu.hw_config = adl_hw_config;
diff --git a/arch/x86/events/intel/ds.c b/arch/x86/events/intel/ds.c
index 79e23dec6714..8a11f72a22b6 100644
--- a/arch/x86/events/intel/ds.c
+++ b/arch/x86/events/intel/ds.c
@@ -257,8 +257,8 @@ static inline void pebs_set_tlb_lock(u64 *val, bool tlb, bool lock)
}
/* Retrieve the latency data for e-core of ADL */
-static u64 __adl_latency_data_small(struct perf_event *event, u64 status,
- u8 dse, bool tlb, bool lock, bool blk)
+static u64 __adl_latency_data_grt(struct perf_event *event, u64 status,
+ u8 dse, bool tlb, bool lock, bool blk)
{
u64 val;
@@ -277,27 +277,27 @@ static u64 __adl_latency_data_small(struct perf_event *event, u64 status,
return val;
}
-u64 adl_latency_data_small(struct perf_event *event, u64 status)
+u64 adl_latency_data_grt(struct perf_event *event, u64 status)
{
union intel_x86_pebs_dse dse;
dse.val = status;
- return __adl_latency_data_small(event, status, dse.ld_dse,
- dse.ld_locked, dse.ld_stlb_miss,
- dse.ld_data_blk);
+ return __adl_latency_data_grt(event, status, dse.ld_dse,
+ dse.ld_locked, dse.ld_stlb_miss,
+ dse.ld_data_blk);
}
/* Retrieve the latency data for e-core of MTL */
-u64 mtl_latency_data_small(struct perf_event *event, u64 status)
+u64 mtl_latency_data_cmt(struct perf_event *event, u64 status)
{
union intel_x86_pebs_dse dse;
dse.val = status;
- return __adl_latency_data_small(event, status, dse.mtl_dse,
- dse.mtl_stlb_miss, dse.mtl_locked,
- dse.mtl_fwd_blk);
+ return __adl_latency_data_grt(event, status, dse.mtl_dse,
+ dse.mtl_stlb_miss, dse.mtl_locked,
+ dse.mtl_fwd_blk);
}
static u64 load_latency_data(struct perf_event *event, u64 status)
diff --git a/arch/x86/events/perf_event.h b/arch/x86/events/perf_event.h
index 3c781dabce76..e9374b4360d4 100644
--- a/arch/x86/events/perf_event.h
+++ b/arch/x86/events/perf_event.h
@@ -1548,9 +1548,9 @@ void intel_pmu_disable_bts(void);
int intel_pmu_drain_bts_buffer(void);
-u64 adl_latency_data_small(struct perf_event *event, u64 status);
+u64 adl_latency_data_grt(struct perf_event *event, u64 status);
-u64 mtl_latency_data_small(struct perf_event *event, u64 status);
+u64 mtl_latency_data_cmt(struct perf_event *event, u64 status);
extern struct event_constraint intel_core2_pebs_event_constraints[];
--
2.38.1
next prev parent reply other threads:[~2024-06-26 14:35 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-26 14:35 [PATCH V3 00/13] Support Lunar Lake and Arrow Lake core PMU kan.liang
2024-06-26 14:35 ` [PATCH V3 01/13] perf/x86/intel: Support the PEBS event mask kan.liang
2024-06-28 8:42 ` Peter Zijlstra
2024-07-05 21:06 ` [tip: perf/core] " tip-bot2 for Kan Liang
2024-06-26 14:35 ` [PATCH V3 02/13] perf/x86: Support counter mask kan.liang
2024-07-05 21:06 ` [tip: perf/core] " tip-bot2 for Kan Liang
2024-06-26 14:35 ` [PATCH V3 03/13] perf/x86: Add Lunar Lake and Arrow Lake support kan.liang
2024-07-05 21:06 ` [tip: perf/core] " tip-bot2 for Kan Liang
2024-06-26 14:35 ` kan.liang [this message]
2024-07-05 21:06 ` [tip: perf/core] perf/x86/intel: Rename model-specific pebs_latency_data functions tip-bot2 for Kan Liang
2024-06-26 14:35 ` [PATCH V3 05/13] perf/x86/intel: Support new data source for Lunar Lake kan.liang
2024-07-05 21:06 ` [tip: perf/core] " tip-bot2 for Kan Liang
2024-06-26 14:35 ` [PATCH V3 06/13] perf/x86: Add config_mask to represent EVENTSEL bitmask kan.liang
2024-07-05 21:06 ` [tip: perf/core] " tip-bot2 for Kan Liang
2024-06-26 14:35 ` [PATCH V3 07/13] perf/x86/intel: Support PERFEVTSEL extension kan.liang
2024-07-05 21:06 ` [tip: perf/core] " tip-bot2 for Kan Liang
2024-06-26 14:35 ` [PATCH V3 08/13] perf/x86/intel: Support Perfmon MSRs aliasing kan.liang
2024-07-05 21:06 ` [tip: perf/core] " tip-bot2 for Kan Liang
2024-06-26 14:35 ` [PATCH V3 09/13] perf/x86: Extend event update interface kan.liang
2024-06-26 14:35 ` [PATCH V3 10/13] perf: Extend perf_output_read kan.liang
2024-06-26 14:35 ` [PATCH V3 11/13] perf/x86/intel: Move PEBS event update after the sample output kan.liang
2024-06-26 14:35 ` [PATCH V3 12/13] perf/x86/intel: Support PEBS counters snapshotting kan.liang
2024-06-26 14:35 ` [PATCH V3 13/13] perf/x86/intel: Support RDPMC metrics clear mode kan.liang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240626143545.480761-5-kan.liang@linux.intel.com \
--to=kan.liang@linux.intel.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=eranian@google.com \
--cc=irogers@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox