hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
kernel/arch/powerpc/perf/power9-events-list.h
....@@ -1,12 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * Performance counter support for POWER9 processors.
34 *
45 * Copyright 2016 Madhavan Srinivasan, IBM Corporation.
5
- *
6
- * This program is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU General Public License
8
- * as published by the Free Software Foundation; either version
9
- * 2 of the License, or (at your option) any later version.
106 */
117
128 /*
....@@ -63,8 +59,6 @@
6359 /* Instruction Dispatched */
6460 EVENT(PM_INST_DISP, 0x200f2)
6561 EVENT(PM_INST_DISP_ALT, 0x300f2)
66
-/* Alternate Branch event code */
67
-EVENT(PM_BR_CMPL_ALT, 0x10012)
6862 /* Branch event that are not strongly biased */
6963 EVENT(PM_BR_2PATH, 0x20036)
7064 /* ALternate branch event that are not strongly biased */
....@@ -97,3 +91,27 @@
9791 EVENT(PM_DTLB_MISS_16M, 0x4c056)
9892 EVENT(PM_DTLB_MISS_1G, 0x4c05a)
9993 EVENT(PM_MRK_DTLB_MISS_16M, 0x4c15e)
94
+
95
+/*
96
+ * Memory Access Events
97
+ *
98
+ * Primary PMU event used here is PM_MRK_INST_CMPL (0x401e0)
99
+ * To enable capturing of memory profiling, these MMCRA bits
100
+ * needs to be programmed and corresponding raw event format
101
+ * encoding.
102
+ *
103
+ * MMCRA bits encoding needed are
104
+ * SM (Sampling Mode)
105
+ * EM (Eligibility for Random Sampling)
106
+ * TECE (Threshold Event Counter Event)
107
+ * TS (Threshold Start Event)
108
+ * TE (Threshold End Event)
109
+ *
110
+ * Corresponding Raw Encoding bits:
111
+ * sample [EM,SM]
112
+ * thresh_sel (TECE)
113
+ * thresh start (TS)
114
+ * thresh end (TE)
115
+ */
116
+EVENT(MEM_LOADS, 0x34340401e0)
117
+EVENT(MEM_STORES, 0x343c0401e0)