Skip to content

Commit 743767d

Browse files
Stephane EranianPeter Zijlstra
authored andcommitted
perf/x86/intel/uncore: Add events for Intel SPR IMC PMU
Add missing clockticks and cas_count_* events for Intel SapphireRapids IMC PMU. These events are useful to measure memory bandwidth. Signed-off-by: Stephane Eranian <eranian@google.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Kan Liang <kan.liang@linux.intel.com> Link: https://lore.kernel.org/r/20230419214241.2310385-1-eranian@google.com
1 parent 15def34 commit 743767d

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

arch/x86/events/intel/uncore_snbep.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6068,13 +6068,25 @@ static struct intel_uncore_ops spr_uncore_mmio_ops = {
60686068
.read_counter = uncore_mmio_read_counter,
60696069
};
60706070

6071+
static struct uncore_event_desc spr_uncore_imc_events[] = {
6072+
INTEL_UNCORE_EVENT_DESC(clockticks, "event=0x01,umask=0x00"),
6073+
INTEL_UNCORE_EVENT_DESC(cas_count_read, "event=0x05,umask=0xcf"),
6074+
INTEL_UNCORE_EVENT_DESC(cas_count_read.scale, "6.103515625e-5"),
6075+
INTEL_UNCORE_EVENT_DESC(cas_count_read.unit, "MiB"),
6076+
INTEL_UNCORE_EVENT_DESC(cas_count_write, "event=0x05,umask=0xf0"),
6077+
INTEL_UNCORE_EVENT_DESC(cas_count_write.scale, "6.103515625e-5"),
6078+
INTEL_UNCORE_EVENT_DESC(cas_count_write.unit, "MiB"),
6079+
{ /* end: all zeroes */ },
6080+
};
6081+
60716082
static struct intel_uncore_type spr_uncore_imc = {
60726083
SPR_UNCORE_COMMON_FORMAT(),
60736084
.name = "imc",
60746085
.fixed_ctr_bits = 48,
60756086
.fixed_ctr = SNR_IMC_MMIO_PMON_FIXED_CTR,
60766087
.fixed_ctl = SNR_IMC_MMIO_PMON_FIXED_CTL,
60776088
.ops = &spr_uncore_mmio_ops,
6089+
.event_descs = spr_uncore_imc_events,
60786090
};
60796091

60806092
static void spr_uncore_pci_enable_event(struct intel_uncore_box *box,

0 commit comments

Comments
 (0)