diff options
| author | Vineet Gupta <vgupta@synopsys.com> | 2015-01-07 02:44:07 -0500 |
|---|---|---|
| committer | Vineet Gupta <vgupta@synopsys.com> | 2015-04-20 08:57:34 -0400 |
| commit | 0a8a47679351f00145ddeaa0a05b510e67b780be (patch) | |
| tree | 6740376fd0296cd29afbe7c18c62966ead9c264e | |
| parent | bde80c237e49983e2b26dfa9925325a070b71de7 (diff) | |
ARC: perf: support cache hit/miss ratio
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
| -rw-r--r-- | arch/arc/include/asm/perf_event.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/arch/arc/include/asm/perf_event.h b/arch/arc/include/asm/perf_event.h index 1c45667c1367..2b8880e953a2 100644 --- a/arch/arc/include/asm/perf_event.h +++ b/arch/arc/include/asm/perf_event.h | |||
| @@ -54,7 +54,10 @@ struct arc_reg_cc_build { | |||
| 54 | #define PERF_COUNT_ARC_BPOK (PERF_COUNT_HW_MAX + 3) | 54 | #define PERF_COUNT_ARC_BPOK (PERF_COUNT_HW_MAX + 3) |
| 55 | #define PERF_COUNT_ARC_EDTLB (PERF_COUNT_HW_MAX + 4) | 55 | #define PERF_COUNT_ARC_EDTLB (PERF_COUNT_HW_MAX + 4) |
| 56 | #define PERF_COUNT_ARC_EITLB (PERF_COUNT_HW_MAX + 5) | 56 | #define PERF_COUNT_ARC_EITLB (PERF_COUNT_HW_MAX + 5) |
| 57 | #define PERF_COUNT_ARC_HW_MAX (PERF_COUNT_HW_MAX + 6) | 57 | #define PERF_COUNT_ARC_LDC (PERF_COUNT_HW_MAX + 6) |
| 58 | #define PERF_COUNT_ARC_STC (PERF_COUNT_HW_MAX + 7) | ||
| 59 | |||
| 60 | #define PERF_COUNT_ARC_HW_MAX (PERF_COUNT_HW_MAX + 8) | ||
| 58 | 61 | ||
| 59 | /* | 62 | /* |
| 60 | * Some ARC pct quirks: | 63 | * Some ARC pct quirks: |
| @@ -96,6 +99,9 @@ static const char * const arc_pmu_ev_hw_map[] = { | |||
| 96 | [PERF_COUNT_ARC_BPOK] = "bpok", /* NP-NT, PT-T, PNT-NT */ | 99 | [PERF_COUNT_ARC_BPOK] = "bpok", /* NP-NT, PT-T, PNT-NT */ |
| 97 | [PERF_COUNT_HW_BRANCH_MISSES] = "bpfail", /* NP-T, PT-NT, PNT-T */ | 100 | [PERF_COUNT_HW_BRANCH_MISSES] = "bpfail", /* NP-T, PT-NT, PNT-T */ |
| 98 | 101 | ||
| 102 | [PERF_COUNT_ARC_LDC] = "imemrdc", /* Instr: mem read cached */ | ||
| 103 | [PERF_COUNT_ARC_STC] = "imemwrc", /* Instr: mem write cached */ | ||
| 104 | |||
| 99 | [PERF_COUNT_ARC_DCLM] = "dclm", /* D-cache Load Miss */ | 105 | [PERF_COUNT_ARC_DCLM] = "dclm", /* D-cache Load Miss */ |
| 100 | [PERF_COUNT_ARC_DCSM] = "dcsm", /* D-cache Store Miss */ | 106 | [PERF_COUNT_ARC_DCSM] = "dcsm", /* D-cache Store Miss */ |
| 101 | [PERF_COUNT_ARC_ICM] = "icm", /* I-cache Miss */ | 107 | [PERF_COUNT_ARC_ICM] = "icm", /* I-cache Miss */ |
| @@ -109,11 +115,11 @@ static const char * const arc_pmu_ev_hw_map[] = { | |||
| 109 | static const unsigned arc_pmu_cache_map[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = { | 115 | static const unsigned arc_pmu_cache_map[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = { |
| 110 | [C(L1D)] = { | 116 | [C(L1D)] = { |
| 111 | [C(OP_READ)] = { | 117 | [C(OP_READ)] = { |
| 112 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 118 | [C(RESULT_ACCESS)] = PERF_COUNT_ARC_LDC, |
| 113 | [C(RESULT_MISS)] = PERF_COUNT_ARC_DCLM, | 119 | [C(RESULT_MISS)] = PERF_COUNT_ARC_DCLM, |
| 114 | }, | 120 | }, |
| 115 | [C(OP_WRITE)] = { | 121 | [C(OP_WRITE)] = { |
| 116 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 122 | [C(RESULT_ACCESS)] = PERF_COUNT_ARC_STC, |
| 117 | [C(RESULT_MISS)] = PERF_COUNT_ARC_DCSM, | 123 | [C(RESULT_MISS)] = PERF_COUNT_ARC_DCSM, |
| 118 | }, | 124 | }, |
| 119 | [C(OP_PREFETCH)] = { | 125 | [C(OP_PREFETCH)] = { |
| @@ -123,7 +129,7 @@ static const unsigned arc_pmu_cache_map[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = { | |||
| 123 | }, | 129 | }, |
| 124 | [C(L1I)] = { | 130 | [C(L1I)] = { |
| 125 | [C(OP_READ)] = { | 131 | [C(OP_READ)] = { |
| 126 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 132 | [C(RESULT_ACCESS)] = PERF_COUNT_HW_INSTRUCTIONS, |
| 127 | [C(RESULT_MISS)] = PERF_COUNT_ARC_ICM, | 133 | [C(RESULT_MISS)] = PERF_COUNT_ARC_ICM, |
| 128 | }, | 134 | }, |
| 129 | [C(OP_WRITE)] = { | 135 | [C(OP_WRITE)] = { |
| @@ -151,9 +157,10 @@ static const unsigned arc_pmu_cache_map[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = { | |||
| 151 | }, | 157 | }, |
| 152 | [C(DTLB)] = { | 158 | [C(DTLB)] = { |
| 153 | [C(OP_READ)] = { | 159 | [C(OP_READ)] = { |
| 154 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 160 | [C(RESULT_ACCESS)] = PERF_COUNT_ARC_LDC, |
| 155 | [C(RESULT_MISS)] = PERF_COUNT_ARC_EDTLB, | 161 | [C(RESULT_MISS)] = PERF_COUNT_ARC_EDTLB, |
| 156 | }, | 162 | }, |
| 163 | /* DTLB LD/ST Miss not segregated by h/w*/ | ||
| 157 | [C(OP_WRITE)] = { | 164 | [C(OP_WRITE)] = { |
| 158 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 165 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
| 159 | [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, | 166 | [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, |
