mcst-linux-kernel/patches-2024.06.26/papi-5.4.3/0004-define-e2k-uncore-even...

89 lines
3.6 KiB
Diff

Link:
Subject: define e2k uncore events
Bug: 83034
Tags: e2k
diff -rupN a/src/libpfm4/include/perfmon/pfmlib.h b/src/libpfm4/include/perfmon/pfmlib.h
--- a/src/libpfm4/include/perfmon/pfmlib.h 2020-11-27 04:21:23.835902229 +0300
+++ b/src/libpfm4/include/perfmon/pfmlib.h 2020-11-27 04:53:18.768832389 +0300
@@ -299,6 +299,16 @@ typedef enum {
PFM_PMU_E2K_V3, /* MCST elbrus-4c (e2s) */
PFM_PMU_E2K_V4, /* MCST elbrus-8c */
PFM_PMU_E2K_V5, /* MCST elbrus-8c2 */
+
+ PFM_PMU_E2K_SIC_0_MCM0_UNCORE, /*MCST elbrus sic_0_MCM0 uncore*/
+ PFM_PMU_E2K_SIC_1_MCM0_UNCORE, /*MCST elbrus sic_1_MCM0 uncore*/
+ PFM_PMU_E2K_SIC_2_MCM0_UNCORE, /*MCST elbrus sic_2_MCM0 uncore*/
+ PFM_PMU_E2K_SIC_3_MCM0_UNCORE, /*MCST elbrus sic_3_MCM0 uncore*/
+ PFM_PMU_E2K_SIC_0_MCM1_UNCORE, /*MCST elbrus sic_0_MCM1 uncore*/
+ PFM_PMU_E2K_SIC_1_MCM1_UNCORE, /*MCST elbrus sic_1_MCM1 uncore*/
+ PFM_PMU_E2K_SIC_2_MCM1_UNCORE, /*MCST elbrus sic_2_MCM1 uncore*/
+ PFM_PMU_E2K_SIC_3_MCM1_UNCORE, /*MCST elbrus sic_3_MCM1 uncore*/
+
/* MUST ADD NEW PMU MODELS HERE */
PFM_PMU_MAX /* end marker */
diff -rupN a/src/libpfm4/lib/Makefile b/src/libpfm4/lib/Makefile
--- a/src/libpfm4/lib/Makefile 2020-11-27 04:21:23.835902229 +0300
+++ b/src/libpfm4/lib/Makefile 2020-11-27 04:50:31.469561174 +0300
@@ -147,11 +147,11 @@ endif
ifeq ($(CONFIG_PFMLIB_ARCH_E2K),y)
ifeq ($(SYS),Linux)
-SRCS += pfmlib_e2k_perf_event.c
+SRCS += pfmlib_e2k_perf_event.c
endif
INCARCH = $(INC_E2K)
-SRCS += pfmlib_e2k.c pfmlib_e2k_all.c
+SRCS += pfmlib_e2k.c pfmlib_e2k_all.c pfmlib_e2k_uncore.c
CFLAGS += -DCONFIG_PFMLIB_ARCH_E2K
endif
#
@@ -310,7 +310,8 @@ INC_E2K=events/e2k_elbrus_v1_events.h
events/e2k_elbrus_v2_events.h \
events/e2k_elbrus_v3_events.h \
events/e2k_elbrus_v4_events.h \
- events/e2k_elbrus_v5_events.h
+ events/e2k_elbrus_v5_events.h \
+ events/e2k_elbrus_uncore_events.h
INC_CELL=events/cell_events.h
diff -rupN a/src/libpfm4/lib/pfmlib_common.c b/src/libpfm4/lib/pfmlib_common.c
--- a/src/libpfm4/lib/pfmlib_common.c 2020-11-27 04:21:23.835902229 +0300
+++ b/src/libpfm4/lib/pfmlib_common.c 2020-11-27 04:50:31.469561174 +0300
@@ -241,6 +241,14 @@ static pfmlib_pmu_t *pfmlib_pmus[]=
&e2k_elbrus_v3_support,
&e2k_elbrus_v4_support,
&e2k_elbrus_v5_support,
+ &e2k_elbrus_uncore_sic_0_MCM0_support,
+ &e2k_elbrus_uncore_sic_1_MCM0_support,
+ &e2k_elbrus_uncore_sic_2_MCM0_support,
+ &e2k_elbrus_uncore_sic_3_MCM0_support,
+ &e2k_elbrus_uncore_sic_0_MCM1_support,
+ &e2k_elbrus_uncore_sic_1_MCM1_support,
+ &e2k_elbrus_uncore_sic_2_MCM1_support,
+ &e2k_elbrus_uncore_sic_3_MCM1_support,
#endif
#ifdef CONFIG_PFMLIB_CELL
diff -rupN a/src/libpfm4/lib/pfmlib_priv.h b/src/libpfm4/lib/pfmlib_priv.h
--- a/src/libpfm4/lib/pfmlib_priv.h 2020-11-27 04:21:23.835902229 +0300
+++ b/src/libpfm4/lib/pfmlib_priv.h 2020-11-27 04:50:31.469561174 +0300
@@ -376,6 +376,14 @@ extern pfmlib_pmu_t e2k_elbrus_v2_suppor
extern pfmlib_pmu_t e2k_elbrus_v3_support;
extern pfmlib_pmu_t e2k_elbrus_v4_support;
extern pfmlib_pmu_t e2k_elbrus_v5_support;
+extern pfmlib_pmu_t e2k_elbrus_uncore_sic_0_MCM0_support;
+extern pfmlib_pmu_t e2k_elbrus_uncore_sic_1_MCM0_support;
+extern pfmlib_pmu_t e2k_elbrus_uncore_sic_2_MCM0_support;
+extern pfmlib_pmu_t e2k_elbrus_uncore_sic_3_MCM0_support;
+extern pfmlib_pmu_t e2k_elbrus_uncore_sic_0_MCM1_support;
+extern pfmlib_pmu_t e2k_elbrus_uncore_sic_1_MCM1_support;
+extern pfmlib_pmu_t e2k_elbrus_uncore_sic_2_MCM1_support;
+extern pfmlib_pmu_t e2k_elbrus_uncore_sic_3_MCM1_support;
extern pfmlib_pmu_t cell_support;
extern pfmlib_pmu_t perf_event_support;
extern pfmlib_pmu_t perf_event_raw_support;