rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (C) 2019 MediaTek Inc. |
| 3 | * |
| 4 | * This program is free software: you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License version 2 as |
| 6 | * published by the Free Software Foundation. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | */ |
| 13 | |
| 14 | |
| 15 | #ifndef _MIPS_PMU_NAME_H_ |
| 16 | #define _MIPS_PMU_NAME_H_ |
| 17 | |
| 18 | /* MIPS 1004K */ |
| 19 | #define MIPS_MAX_HWEVENTS (4) |
| 20 | |
| 21 | #define PMU_1004K_MAX_HW_REGS (128) |
| 22 | struct pmu_desc mips_1004k_pmu_desc[][PMU_1004K_MAX_HW_REGS] = { |
| 23 | /* COUNT 0 */ |
| 24 | { |
| 25 | {0, "CPU_CYCLES"}, |
| 26 | {1, "CPU_INST"}, |
| 27 | {2, "BRANCH_INSNS"}, |
| 28 | {3, "JR_31_INSNS"}, |
| 29 | {4, "JR_NON_31_INSNS"}, |
| 30 | {5, "ITLB_ACCESSES"}, |
| 31 | {6, "DTLB_ACCESSES"}, |
| 32 | {7, "JTLB_INSN_ACCESSES"}, |
| 33 | {8, "JTLB_DATA_ACCESSES"}, |
| 34 | {9, "ICACHE_ACCESSES"}, |
| 35 | {10, "DCACHE_ACCESSES"}, |
| 36 | {11, "DCACHE_MISSES"}, |
| 37 | {12, "RESERVED"}, |
| 38 | {13, "STORE_MISS_INSNS"}, |
| 39 | {14, "INTEGER_INSNS"}, |
| 40 | {15, "LOAD_INSNS"}, |
| 41 | {16, "J_JAL_INSNS"}, |
| 42 | {17, "NO_OPS_INSNS"}, |
| 43 | {18, "ALL_STALLS"}, |
| 44 | {19, "SC_INSNS"}, |
| 45 | {20, "PREFETCH_INSNS"}, |
| 46 | {21, "L2_CACHE_WRITEBACKS"}, |
| 47 | {22, "L2_CACHE_MISSES"}, |
| 48 | {23, "EXCEPTIONS_TAKEN"}, |
| 49 | {24, "CACHE_FIXUP_CYCLES"}, |
| 50 | {25, "IFU_STALLS"}, |
| 51 | {26, "DSP_INSNS"}, |
| 52 | {27, "RESERVED"}, |
| 53 | {28, "POLICY_EVENTS"}, |
| 54 | {29, "ISPRAM_EVENTS"}, |
| 55 | {30, "COREEXTEND_EVENTS"}, |
| 56 | {31, "YIELD_EVENTS"}, |
| 57 | {32, "ITC_LOADS"}, |
| 58 | {33, "UNCACHED_LOAD_INSNS"}, |
| 59 | {34, "FORK_INSNS"}, |
| 60 | {35, "CP2_ARITH_INSNS"}, |
| 61 | {36, "INTERVENTION_STALLS"}, |
| 62 | {37, "ICACHE_MISS_STALLS"}, |
| 63 | {38, "RESERVED"}, |
| 64 | {39, "DCACHE_MISS_CYCLES"}, |
| 65 | {40, "UNCACHED_STALLS"}, |
| 66 | {41, "MDU_STALLS"}, |
| 67 | {42, "CP2_STALLS"}, |
| 68 | {43, "ISPRAM_STALLS"}, |
| 69 | {44, "CACHE_INSN_STALLS"}, |
| 70 | {45, "LOAD_USE_STALLS"}, |
| 71 | {46, "INTERLOCK_STALLS"}, |
| 72 | {47, "RELAX_STALLS"}, |
| 73 | {48, "IFU_FB_FULL_REFETCHES"}, |
| 74 | {49, "EJTAG_INSN_TRIGGERS"}, |
| 75 | {50, "FSB_LESS_25_FULL"}, |
| 76 | {51, "FSB_OVER_50_FULL"}, |
| 77 | {52, "LDQ_LESS_25_FULL"}, |
| 78 | {53, "LDQ_OVER_50_FULL"}, |
| 79 | {54, "WBB_LESS_25_FULL"}, |
| 80 | {55, "WBB_OVER_50_FULL"}, |
| 81 | {56, "INTERVENTION_HIT_COUNT"}, |
| 82 | {57, "INVALIDATE_INTERVENTION_COUNT"}, |
| 83 | {58, "EVICTION_COUNT"}, |
| 84 | {59, "MESI_INVAL_COUNT"}, |
| 85 | {60, "MESI_MODIFIED_COUNT"}, |
| 86 | {61, "SELF_INTERVENTION_LATENCY"}, |
| 87 | {62, "READ_RESPONSE_LATENCY"}, |
| 88 | {63, "RESERVED"}, |
| 89 | {64, "SI_PCEVENT1"}, |
| 90 | {65, "SI_PCEVENT3"}, |
| 91 | {66, "SI_PCEVENT5"}, |
| 92 | {67, "SI_PCEVENT7"}, |
| 93 | {-1, "RESERVED"}, |
| 94 | /* 68 - 127 for Reserved */ |
| 95 | }, |
| 96 | /* COUNT 1 */ |
| 97 | { |
| 98 | {0, "CPU_CYCLES"}, |
| 99 | {1, "CPU_INST"}, |
| 100 | {2, "MISPREDICTED_BRANCH_INSNS"}, |
| 101 | {3, "JR_31_MISPREDICTIONS"}, |
| 102 | {4, "JR_31_NO_PREDICTIONS"}, |
| 103 | {5, "ITLB_MISSES"}, |
| 104 | {6, "DTLB_MISSES"}, |
| 105 | {7, "JTLB_INSN_MISSES"}, |
| 106 | {8, "JTLB_DATA_MISSES"}, |
| 107 | {9, "ICACHE_MISSES"}, |
| 108 | {10, "DCACHE_WRITEBACKS"}, |
| 109 | {11, "DCACHE_MISSES"}, |
| 110 | {12, "RESERVED"}, |
| 111 | {13, "LOAD_MISS_INSNS"}, |
| 112 | {14, "FPU_INSNS"}, |
| 113 | {15, "STORE_INSNS"}, |
| 114 | {16, "MIPS16_INSNS"}, |
| 115 | {17, "INT_MUL_DIV_INSNS"}, |
| 116 | {18, "REPLAYED_INSNS"}, |
| 117 | {19, "SC_INSNS_FAILED"}, |
| 118 | {20, "CACHE_HIT_PREFETCH_INSNS"}, |
| 119 | {21, "L2_CACHE_ACCESSES"}, |
| 120 | {22, "L2_CACHE_SINGLE_BIT_ERRORS"}, |
| 121 | {23, "SINGLE_THREADED_CYCLES"}, |
| 122 | {24, "REFETCHED_INSNS"}, |
| 123 | {25, "ALU_STALLS"}, |
| 124 | {26, "ALU_DSP_SATURATION_INSNS"}, |
| 125 | {27, "MDU_DSP_SATURATION_INSNS"}, |
| 126 | {28, "CP2_EVENTS"}, |
| 127 | {29, "DSPRAM_EVENTS"}, |
| 128 | {30, "RESERVED"}, |
| 129 | {31, "ITC_EVENT"}, |
| 130 | {33, "UNCACHED_STORE_INSNS"}, |
| 131 | {34, "YIELD_IN_COMP"}, |
| 132 | {35, "CP2_TO_FROM_INSNS"}, |
| 133 | {36, "INTERVENTION_MISS_STALLS"}, |
| 134 | {37, "DCACHE_MISS_STALLS"}, |
| 135 | {38, "RESERVED"}, |
| 136 | /* 38 was listed in OPROFILE web page, but not listed 1004k mips spec */ |
| 137 | /* {38, "FSB_INDEX_CONFLICT_STALLS"}, */ |
| 138 | {39, "L2_CACHE_MISS_CYCLES"}, |
| 139 | {40, "ITC_STALLS"}, |
| 140 | {41, "FPU_STALLS"}, |
| 141 | {42, "COREEXTEND_STALLS"}, |
| 142 | {43, "DSPRAM_STALLS"}, |
| 143 | {45, "ALU_TO_AGEN_STALLS"}, |
| 144 | {46, "MISPREDICTION_STALLS"}, |
| 145 | {47, "RESERVED"}, |
| 146 | {48, "FB_ENTRY_ALLOCATED_CYCLES"}, |
| 147 | {49, "EJTAG_DATA_TRIGGERS"}, |
| 148 | {50, "FSB_25_50_FULL"}, |
| 149 | {51, "FSB_FULL_STALLS"}, |
| 150 | {52, "LDQ_25_50_FULL"}, |
| 151 | {53, "LDQ_FULL_STALLS"}, |
| 152 | {54, "WBB_25_50_FULL"}, |
| 153 | {55, "WBB_FULL_STALLS"}, |
| 154 | {56, "INTERVENTION_COUNT"}, |
| 155 | {57, "INVALID_INTERVENT_HIT_CNT"}, |
| 156 | {58, "WRITEBACK_COUNT"}, |
| 157 | {59, "MESI_EXCLUSIVE_COUNT"}, |
| 158 | {60, "MESI_SHARED_COUNT"}, |
| 159 | {61, "SELF_INTERVENTION_COUNT"}, |
| 160 | {62, "READ_RESPONSE_COUNT"}, |
| 161 | {63, "RESERVED"}, |
| 162 | {64, "SI_PCEVENT0"}, |
| 163 | {65, "SI_PCEVENT2"}, |
| 164 | {66, "SI_PCEVENT4"}, |
| 165 | {67, "SI_PCEVENT6"}, |
| 166 | {-1, "RESERVED"}, |
| 167 | }, |
| 168 | }; |
| 169 | |
| 170 | #define MIPS_1004K_PMU_DESC_SIZE (sizeof(mips_1004k_pmu_desc[0])) |
| 171 | #define MIPS_1004K_PMU_DESC_COUNT (sizeof(mips_1004k_pmu_desc) / MIPS_1004K_PMU_DESC_SIZE) |
| 172 | |
| 173 | #endif /* _V8_PMU_NAME_H_ */ |