|
|
55cf49 |
From ed3f51c4690685675cf2766edb90acbc0c1cdb67 Mon Sep 17 00:00:00 2001
|
|
|
55cf49 |
From: Will Schmidt <will_schmidt@vnet.ibm.com>
|
|
|
55cf49 |
Date: Sun, 3 Dec 2017 09:42:44 -0800
|
|
|
55cf49 |
Subject: [PATCH] Add alternate event numbers for power9.
|
|
|
55cf49 |
|
|
|
55cf49 |
I had previously missed adding the _ALT entries, which allow some
|
|
|
55cf49 |
events to be specified on different counters. This patch fills
|
|
|
55cf49 |
those in.
|
|
|
55cf49 |
|
|
|
55cf49 |
This patch also adds a few validation tests for the ALT events.
|
|
|
55cf49 |
|
|
|
55cf49 |
Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
|
|
|
55cf49 |
---
|
|
|
55cf49 |
lib/events/power9_events.h | 93 +++++++++++++++++++++++++++++++++++++++++++++-
|
|
|
55cf49 |
tests/validate_power.c | 21 +++++++++++
|
|
|
55cf49 |
2 files changed, 113 insertions(+), 1 deletion(-)
|
|
|
55cf49 |
|
|
|
55cf49 |
diff --git a/lib/events/power9_events.h b/lib/events/power9_events.h
|
|
|
55cf49 |
index 72c481b..d77bab3 100644
|
|
|
55cf49 |
--- a/lib/events/power9_events.h
|
|
|
55cf49 |
+++ b/lib/events/power9_events.h
|
|
|
55cf49 |
@@ -9,6 +9,7 @@
|
|
|
55cf49 |
* Mods:
|
|
|
55cf49 |
* Initial content generated by Will Schmidt. (Jan 31, 2017).
|
|
|
55cf49 |
* Refresh/update generated Jun 06, 2017 by Will Schmidt.
|
|
|
55cf49 |
+* missing _ALT events added, Nov 16, 2017 by Will Schmidt.
|
|
|
55cf49 |
*
|
|
|
55cf49 |
* Contributed by
|
|
|
55cf49 |
* (C) Copyright IBM Corporation, 2017. All Rights Reserved.
|
|
|
55cf49 |
@@ -969,6 +970,18 @@
|
|
|
55cf49 |
#define POWER9_PME_PM_XLATE_HPT_MODE 943
|
|
|
55cf49 |
#define POWER9_PME_PM_XLATE_MISS 944
|
|
|
55cf49 |
#define POWER9_PME_PM_XLATE_RADIX_MODE 945
|
|
|
55cf49 |
+#define POWER9_PME_PM_BR_2PATH_ALT 946
|
|
|
55cf49 |
+#define POWER9_PME_PM_CYC_ALT 947
|
|
|
55cf49 |
+#define POWER9_PME_PM_CYC_ALT2 948
|
|
|
55cf49 |
+#define POWER9_PME_PM_CYC_ALT3 949
|
|
|
55cf49 |
+#define POWER9_PME_PM_INST_CMPL_ALT 950
|
|
|
55cf49 |
+#define POWER9_PME_PM_INST_CMPL_ALT2 951
|
|
|
55cf49 |
+#define POWER9_PME_PM_INST_CMPL_ALT3 952
|
|
|
55cf49 |
+#define POWER9_PME_PM_INST_DISP_ALT 953
|
|
|
55cf49 |
+#define POWER9_PME_PM_LD_MISS_L1_ALT 954
|
|
|
55cf49 |
+#define POWER9_PME_PM_SUSPENDED_ALT 955
|
|
|
55cf49 |
+#define POWER9_PME_PM_SUSPENDED_ALT2 956
|
|
|
55cf49 |
+#define POWER9_PME_PM_SUSPENDED_ALT3 957
|
|
|
55cf49 |
|
|
|
55cf49 |
static const pme_power_entry_t power9_pe[] = {
|
|
|
55cf49 |
[ POWER9_PME_PM_1FLOP_CMPL ] = {
|
|
|
55cf49 |
@@ -1031,6 +1044,7 @@ static const pme_power_entry_t power9_pe[] = {
|
|
|
55cf49 |
.pme_short_desc = "Cycles in which all 4 Binary Floating Point units are busy.",
|
|
|
55cf49 |
.pme_long_desc = "Cycles in which all 4 Binary Floating Point units are busy. The BFU is running at capacity",
|
|
|
55cf49 |
},
|
|
|
55cf49 |
+/* See also alternate entries for 0000020036 / POWER9_PME_PM_BR_2PATH with code(s) 0000040036 at the bottom of this table. \n */
|
|
|
55cf49 |
[ POWER9_PME_PM_BR_2PATH ] = {
|
|
|
55cf49 |
.pme_name = "PM_BR_2PATH",
|
|
|
55cf49 |
.pme_code = 0x0000020036,
|
|
|
55cf49 |
@@ -1559,6 +1573,7 @@ static const pme_power_entry_t power9_pe[] = {
|
|
|
55cf49 |
.pme_short_desc = "Continuous 16 cycle (2to1) window where this signals rotates thru sampling each CO machine busy.",
|
|
|
55cf49 |
.pme_long_desc = "Continuous 16 cycle (2to1) window where this signals rotates thru sampling each CO machine busy. PMU uses this wave to then do 16 cyc count to sample total number of machs running",
|
|
|
55cf49 |
},
|
|
|
55cf49 |
+/* See also alternate entries for 000001001E / POWER9_PME_PM_CYC with code(s) 000002001E 000003001E 000004001E at the bottom of this table. \n */
|
|
|
55cf49 |
[ POWER9_PME_PM_CYC ] = {
|
|
|
55cf49 |
.pme_name = "PM_CYC",
|
|
|
55cf49 |
.pme_code = 0x000001001E,
|
|
|
55cf49 |
@@ -2669,12 +2684,14 @@ static const pme_power_entry_t power9_pe[] = {
|
|
|
55cf49 |
.pme_short_desc = "Initial and Final Pump Scope was chip pump (prediction=correct) for an instruction fetch",
|
|
|
55cf49 |
.pme_long_desc = "Initial and Final Pump Scope was chip pump (prediction=correct) for an instruction fetch",
|
|
|
55cf49 |
},
|
|
|
55cf49 |
+/* See also alternate entries for 0000010002 / POWER9_PME_PM_INST_CMPL with code(s) 0000020002 0000030002 0000040002 at the bottom of this table. \n */
|
|
|
55cf49 |
[ POWER9_PME_PM_INST_CMPL ] = {
|
|
|
55cf49 |
.pme_name = "PM_INST_CMPL",
|
|
|
55cf49 |
.pme_code = 0x0000010002,
|
|
|
55cf49 |
.pme_short_desc = "Number of PowerPC Instructions that completed.",
|
|
|
55cf49 |
.pme_long_desc = "Number of PowerPC Instructions that completed.",
|
|
|
55cf49 |
},
|
|
|
55cf49 |
+/* See also alternate entries for 00000200F2 / POWER9_PME_PM_INST_DISP with code(s) 00000300F2 at the bottom of this table. \n */
|
|
|
55cf49 |
[ POWER9_PME_PM_INST_DISP ] = {
|
|
|
55cf49 |
.pme_name = "PM_INST_DISP",
|
|
|
55cf49 |
.pme_code = 0x00000200F2,
|
|
|
55cf49 |
@@ -4007,6 +4024,7 @@ static const pme_power_entry_t power9_pe[] = {
|
|
|
55cf49 |
.pme_short_desc = "Number of load instructions that finished with an L1 miss.",
|
|
|
55cf49 |
.pme_long_desc = "Number of load instructions that finished with an L1 miss. Note that even if a load spans multiple slices this event will increment only once per load op.",
|
|
|
55cf49 |
},
|
|
|
55cf49 |
+/* See also alternate entries for 000003E054 / POWER9_PME_PM_LD_MISS_L1 with code(s) 00000400F0 at the bottom of this table. \n */
|
|
|
55cf49 |
[ POWER9_PME_PM_LD_MISS_L1 ] = {
|
|
|
55cf49 |
.pme_name = "PM_LD_MISS_L1",
|
|
|
55cf49 |
.pme_code = 0x000003E054,
|
|
|
55cf49 |
@@ -6149,6 +6167,7 @@ static const pme_power_entry_t power9_pe[] = {
|
|
|
55cf49 |
.pme_short_desc = "Fetching is stopped due to an incoming instruction that will result in a flush",
|
|
|
55cf49 |
.pme_long_desc = "Fetching is stopped due to an incoming instruction that will result in a flush",
|
|
|
55cf49 |
},
|
|
|
55cf49 |
+/* See also alternate entries for 0000010000 / POWER9_PME_PM_SUSPENDED with code(s) 0000020000 0000030000 0000040000 at the bottom of this table. \n */
|
|
|
55cf49 |
[ POWER9_PME_PM_SUSPENDED ] = {
|
|
|
55cf49 |
.pme_name = "PM_SUSPENDED",
|
|
|
55cf49 |
.pme_code = 0x0000010000,
|
|
|
55cf49 |
@@ -6647,6 +6666,78 @@ static const pme_power_entry_t power9_pe[] = {
|
|
|
55cf49 |
.pme_short_desc = "LSU reports every cycle the thread is in radix translation mode (as opposed to HPT mode)",
|
|
|
55cf49 |
.pme_long_desc = "LSU reports every cycle the thread is in radix translation mode (as opposed to HPT mode)",
|
|
|
55cf49 |
},
|
|
|
55cf49 |
-/* total 945 */
|
|
|
55cf49 |
+[ POWER9_PME_PM_BR_2PATH_ALT ] = {
|
|
|
55cf49 |
+ .pme_name = "PM_BR_2PATH_ALT",
|
|
|
55cf49 |
+ .pme_code = 0x0000040036,
|
|
|
55cf49 |
+ .pme_short_desc = "Branches that are not strongly biased",
|
|
|
55cf49 |
+ .pme_long_desc = "Branches that are not strongly biased",
|
|
|
55cf49 |
+},
|
|
|
55cf49 |
+[ POWER9_PME_PM_CYC_ALT ] = {
|
|
|
55cf49 |
+ .pme_name = "PM_CYC_ALT",
|
|
|
55cf49 |
+ .pme_code = 0x000002001E,
|
|
|
55cf49 |
+ .pme_short_desc = "Processor cycles",
|
|
|
55cf49 |
+ .pme_long_desc = "Processor cycles",
|
|
|
55cf49 |
+},
|
|
|
55cf49 |
+[ POWER9_PME_PM_CYC_ALT2 ] = {
|
|
|
55cf49 |
+ .pme_name = "PM_CYC_ALT2",
|
|
|
55cf49 |
+ .pme_code = 0x000003001E,
|
|
|
55cf49 |
+ .pme_short_desc = "Processor cycles",
|
|
|
55cf49 |
+ .pme_long_desc = "Processor cycles",
|
|
|
55cf49 |
+},
|
|
|
55cf49 |
+[ POWER9_PME_PM_CYC_ALT3 ] = {
|
|
|
55cf49 |
+ .pme_name = "PM_CYC_ALT3",
|
|
|
55cf49 |
+ .pme_code = 0x000004001E,
|
|
|
55cf49 |
+ .pme_short_desc = "Processor cycles",
|
|
|
55cf49 |
+ .pme_long_desc = "Processor cycles",
|
|
|
55cf49 |
+},
|
|
|
55cf49 |
+[ POWER9_PME_PM_INST_CMPL_ALT ] = {
|
|
|
55cf49 |
+ .pme_name = "PM_INST_CMPL_ALT",
|
|
|
55cf49 |
+ .pme_code = 0x0000020002,
|
|
|
55cf49 |
+ .pme_short_desc = "Number of PowerPC Instructions that completed.",
|
|
|
55cf49 |
+ .pme_long_desc = "Number of PowerPC Instructions that completed.",
|
|
|
55cf49 |
+},
|
|
|
55cf49 |
+[ POWER9_PME_PM_INST_CMPL_ALT2 ] = {
|
|
|
55cf49 |
+ .pme_name = "PM_INST_CMPL_ALT2",
|
|
|
55cf49 |
+ .pme_code = 0x0000030002,
|
|
|
55cf49 |
+ .pme_short_desc = "Number of PowerPC Instructions that completed.",
|
|
|
55cf49 |
+ .pme_long_desc = "Number of PowerPC Instructions that completed.",
|
|
|
55cf49 |
+},
|
|
|
55cf49 |
+[ POWER9_PME_PM_INST_CMPL_ALT3 ] = {
|
|
|
55cf49 |
+ .pme_name = "PM_INST_CMPL_ALT3",
|
|
|
55cf49 |
+ .pme_code = 0x0000040002,
|
|
|
55cf49 |
+ .pme_short_desc = "Number of PowerPC Instructions that completed.",
|
|
|
55cf49 |
+ .pme_long_desc = "Number of PowerPC Instructions that completed.",
|
|
|
55cf49 |
+},
|
|
|
55cf49 |
+[ POWER9_PME_PM_INST_DISP_ALT ] = {
|
|
|
55cf49 |
+ .pme_name = "PM_INST_DISP_ALT",
|
|
|
55cf49 |
+ .pme_code = 0x00000300F2,
|
|
|
55cf49 |
+ .pme_short_desc = "# PPC Dispatched",
|
|
|
55cf49 |
+ .pme_long_desc = "# PPC Dispatched",
|
|
|
55cf49 |
+},
|
|
|
55cf49 |
+[ POWER9_PME_PM_LD_MISS_L1_ALT ] = {
|
|
|
55cf49 |
+ .pme_name = "PM_LD_MISS_L1_ALT",
|
|
|
55cf49 |
+ .pme_code = 0x00000400F0,
|
|
|
55cf49 |
+ .pme_short_desc = "Load Missed L1, counted at execution time (can be greater than loads finished).",
|
|
|
55cf49 |
+ .pme_long_desc = "Load Missed L1, counted at execution time (can be greater than loads finished). LMQ merges are not included in this count. i.e. if a load instruction misses on an address that is already allocated on the LMQ, this event will not increment for that load). Note that this count is per slice, so if a load spans multiple slices this event will increment multiple times for a single load.",
|
|
|
55cf49 |
+},
|
|
|
55cf49 |
+[ POWER9_PME_PM_SUSPENDED_ALT ] = {
|
|
|
55cf49 |
+ .pme_name = "PM_SUSPENDED_ALT",
|
|
|
55cf49 |
+ .pme_code = 0x0000020000,
|
|
|
55cf49 |
+ .pme_short_desc = "Counter OFF",
|
|
|
55cf49 |
+ .pme_long_desc = "Counter OFF",
|
|
|
55cf49 |
+},
|
|
|
55cf49 |
+[ POWER9_PME_PM_SUSPENDED_ALT2 ] = {
|
|
|
55cf49 |
+ .pme_name = "PM_SUSPENDED_ALT2",
|
|
|
55cf49 |
+ .pme_code = 0x0000030000,
|
|
|
55cf49 |
+ .pme_short_desc = "Counter OFF",
|
|
|
55cf49 |
+ .pme_long_desc = "Counter OFF",
|
|
|
55cf49 |
+},
|
|
|
55cf49 |
+[ POWER9_PME_PM_SUSPENDED_ALT3 ] = {
|
|
|
55cf49 |
+ .pme_name = "PM_SUSPENDED_ALT3",
|
|
|
55cf49 |
+ .pme_code = 0x0000040000,
|
|
|
55cf49 |
+ .pme_short_desc = "Counter OFF",
|
|
|
55cf49 |
+ .pme_long_desc = "Counter OFF",
|
|
|
55cf49 |
+},
|
|
|
55cf49 |
+/* total 957 */
|
|
|
55cf49 |
};
|
|
|
55cf49 |
#endif
|
|
|
55cf49 |
diff --git a/tests/validate_power.c b/tests/validate_power.c
|
|
|
55cf49 |
index 617efca..2e38f32 100644
|
|
|
55cf49 |
--- a/tests/validate_power.c
|
|
|
55cf49 |
+++ b/tests/validate_power.c
|
|
|
55cf49 |
@@ -171,6 +171,27 @@ static const test_event_t ppc_test_events[]={
|
|
|
55cf49 |
.codes[0] = 0x200f2,
|
|
|
55cf49 |
.fstr = "power9::PM_INST_DISP",
|
|
|
55cf49 |
},
|
|
|
55cf49 |
+ { SRC_LINE,
|
|
|
55cf49 |
+ .name = "power9::PM_CYC_ALT",
|
|
|
55cf49 |
+ .ret = PFM_SUCCESS,
|
|
|
55cf49 |
+ .count = 1,
|
|
|
55cf49 |
+ .codes[0] = 0x2001e,
|
|
|
55cf49 |
+ .fstr = "power9::PM_CYC_ALT",
|
|
|
55cf49 |
+ },
|
|
|
55cf49 |
+ { SRC_LINE,
|
|
|
55cf49 |
+ .name = "power9::PM_CYC_ALT2",
|
|
|
55cf49 |
+ .ret = PFM_SUCCESS,
|
|
|
55cf49 |
+ .count = 1,
|
|
|
55cf49 |
+ .codes[0] = 0x3001e,
|
|
|
55cf49 |
+ .fstr = "power9::PM_CYC_ALT2",
|
|
|
55cf49 |
+ },
|
|
|
55cf49 |
+ { SRC_LINE,
|
|
|
55cf49 |
+ .name = "power9::PM_INST_CMPL_ALT",
|
|
|
55cf49 |
+ .ret = PFM_SUCCESS,
|
|
|
55cf49 |
+ .count = 1,
|
|
|
55cf49 |
+ .codes[0] = 0x20002,
|
|
|
55cf49 |
+ .fstr = "power9::PM_INST_CMPL_ALT",
|
|
|
55cf49 |
+ },
|
|
|
55cf49 |
{ SRC_LINE,
|
|
|
55cf49 |
.name = "powerpc_nest_mcs_read::MCS_00",
|
|
|
55cf49 |
.ret = PFM_SUCCESS,
|
|
|
55cf49 |
--
|
|
|
55cf49 |
2.13.6
|
|
|
55cf49 |
|