summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJonathan Marek <[email protected]>2019-11-27 10:40:59 -0500
committerJonathan Marek <[email protected]>2019-11-27 12:11:57 -0500
commitbaab4017b90d25bcf213a4d5403123e8c5c35b87 (patch)
tree5214a20d5128289d53e120d99dae8df7b2b958fe /src
parent0d0c8a9e82930ad368ad17c23b1df630e7346ac9 (diff)
freedreno/perfcntrs: add a2xx MH counters
Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Rob Clark <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/freedreno/perfcntrs/fd2_perfcntr.c190
1 files changed, 186 insertions, 4 deletions
diff --git a/src/freedreno/perfcntrs/fd2_perfcntr.c b/src/freedreno/perfcntrs/fd2_perfcntr.c
index 17ffb5e2c85..eac2de0214b 100644
--- a/src/freedreno/perfcntrs/fd2_perfcntr.c
+++ b/src/freedreno/perfcntrs/fd2_perfcntr.c
@@ -578,6 +578,191 @@ static const struct fd_perfcntr_countable sx_countables[] = {
COUNTABLE(SX_RB_COLOR_STALL, UINT64, AVERAGE),
};
+static const struct fd_perfcntr_countable mh_countables[] = {
+ COUNTABLE(CP_R0_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(CP_R1_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(CP_R2_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(CP_R3_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(CP_R4_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(CP_TOTAL_READ_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(CP_TOTAL_WRITE_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(CP_TOTAL_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(CP_DATA_BYTES_WRITTEN, UINT64, AVERAGE),
+ COUNTABLE(CP_WRITE_CLEAN_RESPONSES, UINT64, AVERAGE),
+ COUNTABLE(CP_R0_READ_BURSTS_RECEIVED, UINT64, AVERAGE),
+ COUNTABLE(CP_R1_READ_BURSTS_RECEIVED, UINT64, AVERAGE),
+ COUNTABLE(CP_R2_READ_BURSTS_RECEIVED, UINT64, AVERAGE),
+ COUNTABLE(CP_R3_READ_BURSTS_RECEIVED, UINT64, AVERAGE),
+ COUNTABLE(CP_R4_READ_BURSTS_RECEIVED, UINT64, AVERAGE),
+ COUNTABLE(CP_TOTAL_READ_BURSTS_RECEIVED, UINT64, AVERAGE),
+ COUNTABLE(CP_R0_DATA_BEATS_READ, UINT64, AVERAGE),
+ COUNTABLE(CP_R1_DATA_BEATS_READ, UINT64, AVERAGE),
+ COUNTABLE(CP_R2_DATA_BEATS_READ, UINT64, AVERAGE),
+ COUNTABLE(CP_R3_DATA_BEATS_READ, UINT64, AVERAGE),
+ COUNTABLE(CP_R4_DATA_BEATS_READ, UINT64, AVERAGE),
+ COUNTABLE(CP_TOTAL_DATA_BEATS_READ, UINT64, AVERAGE),
+ COUNTABLE(VGT_R0_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(VGT_R1_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(VGT_TOTAL_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(VGT_R0_READ_BURSTS_RECEIVED, UINT64, AVERAGE),
+ COUNTABLE(VGT_R1_READ_BURSTS_RECEIVED, UINT64, AVERAGE),
+ COUNTABLE(VGT_TOTAL_READ_BURSTS_RECEIVED, UINT64, AVERAGE),
+ COUNTABLE(VGT_R0_DATA_BEATS_READ, UINT64, AVERAGE),
+ COUNTABLE(VGT_R1_DATA_BEATS_READ, UINT64, AVERAGE),
+ COUNTABLE(VGT_TOTAL_DATA_BEATS_READ, UINT64, AVERAGE),
+ COUNTABLE(TC_TOTAL_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(TC_ROQ_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(TC_INFO_SENT, UINT64, AVERAGE),
+ COUNTABLE(TC_READ_BURSTS_RECEIVED, UINT64, AVERAGE),
+ COUNTABLE(TC_DATA_BEATS_READ, UINT64, AVERAGE),
+ COUNTABLE(TCD_BURSTS_READ, UINT64, AVERAGE),
+ COUNTABLE(RB_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(RB_DATA_BYTES_WRITTEN, UINT64, AVERAGE),
+ COUNTABLE(RB_WRITE_CLEAN_RESPONSES, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_REQUESTS_ID_0, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_REQUESTS_ID_1, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_REQUESTS_ID_2, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_REQUESTS_ID_3, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_REQUESTS_ID_4, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_REQUESTS_ID_5, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_REQUESTS_ID_6, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_REQUESTS_ID_7, UINT64, AVERAGE),
+ COUNTABLE(AXI_TOTAL_READ_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_REQUESTS_ID_0, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_REQUESTS_ID_1, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_REQUESTS_ID_2, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_REQUESTS_ID_3, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_REQUESTS_ID_4, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_REQUESTS_ID_5, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_REQUESTS_ID_6, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_REQUESTS_ID_7, UINT64, AVERAGE),
+ COUNTABLE(AXI_TOTAL_WRITE_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(AXI_TOTAL_REQUESTS_ID_0, UINT64, AVERAGE),
+ COUNTABLE(AXI_TOTAL_REQUESTS_ID_1, UINT64, AVERAGE),
+ COUNTABLE(AXI_TOTAL_REQUESTS_ID_2, UINT64, AVERAGE),
+ COUNTABLE(AXI_TOTAL_REQUESTS_ID_3, UINT64, AVERAGE),
+ COUNTABLE(AXI_TOTAL_REQUESTS_ID_4, UINT64, AVERAGE),
+ COUNTABLE(AXI_TOTAL_REQUESTS_ID_5, UINT64, AVERAGE),
+ COUNTABLE(AXI_TOTAL_REQUESTS_ID_6, UINT64, AVERAGE),
+ COUNTABLE(AXI_TOTAL_REQUESTS_ID_7, UINT64, AVERAGE),
+ COUNTABLE(AXI_TOTAL_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_CHANNEL_BURSTS_ID_0, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_CHANNEL_BURSTS_ID_1, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_CHANNEL_BURSTS_ID_2, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_CHANNEL_BURSTS_ID_3, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_CHANNEL_BURSTS_ID_4, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_CHANNEL_BURSTS_ID_5, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_CHANNEL_BURSTS_ID_6, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_CHANNEL_BURSTS_ID_7, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_CHANNEL_TOTAL_BURSTS, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_CHANNEL_DATA_BEATS_READ_ID_0, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_CHANNEL_DATA_BEATS_READ_ID_1, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_CHANNEL_DATA_BEATS_READ_ID_2, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_CHANNEL_DATA_BEATS_READ_ID_3, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_CHANNEL_DATA_BEATS_READ_ID_4, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_CHANNEL_DATA_BEATS_READ_ID_5, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_CHANNEL_DATA_BEATS_READ_ID_6, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_CHANNEL_DATA_BEATS_READ_ID_7, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_CHANNEL_TOTAL_DATA_BEATS_READ, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_CHANNEL_BURSTS_ID_0, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_CHANNEL_BURSTS_ID_1, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_CHANNEL_BURSTS_ID_2, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_CHANNEL_BURSTS_ID_3, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_CHANNEL_BURSTS_ID_4, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_CHANNEL_BURSTS_ID_5, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_CHANNEL_BURSTS_ID_6, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_CHANNEL_BURSTS_ID_7, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_CHANNEL_TOTAL_BURSTS, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_CHANNEL_DATA_BYTES_WRITTEN_ID_0, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_CHANNEL_DATA_BYTES_WRITTEN_ID_1, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_CHANNEL_DATA_BYTES_WRITTEN_ID_2, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_CHANNEL_DATA_BYTES_WRITTEN_ID_3, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_CHANNEL_DATA_BYTES_WRITTEN_ID_4, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_CHANNEL_DATA_BYTES_WRITTEN_ID_5, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_CHANNEL_DATA_BYTES_WRITTEN_ID_6, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_CHANNEL_DATA_BYTES_WRITTEN_ID_7, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_CHANNEL_TOTAL_DATA_BYTES_WRITTEN, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_RESPONSE_CHANNEL_RESPONSES_ID_0, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_RESPONSE_CHANNEL_RESPONSES_ID_1, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_RESPONSE_CHANNEL_RESPONSES_ID_2, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_RESPONSE_CHANNEL_RESPONSES_ID_3, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_RESPONSE_CHANNEL_RESPONSES_ID_4, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_RESPONSE_CHANNEL_RESPONSES_ID_5, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_RESPONSE_CHANNEL_RESPONSES_ID_6, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_RESPONSE_CHANNEL_RESPONSES_ID_7, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_RESPONSE_CHANNEL_TOTAL_RESPONSES, UINT64, AVERAGE),
+ COUNTABLE(TOTAL_MMU_MISSES, UINT64, AVERAGE),
+ COUNTABLE(MMU_READ_MISSES, UINT64, AVERAGE),
+ COUNTABLE(MMU_WRITE_MISSES, UINT64, AVERAGE),
+ COUNTABLE(TOTAL_MMU_HITS, UINT64, AVERAGE),
+ COUNTABLE(MMU_READ_HITS, UINT64, AVERAGE),
+ COUNTABLE(MMU_WRITE_HITS, UINT64, AVERAGE),
+ COUNTABLE(SPLIT_MODE_TC_HITS, UINT64, AVERAGE),
+ COUNTABLE(SPLIT_MODE_TC_MISSES, UINT64, AVERAGE),
+ COUNTABLE(SPLIT_MODE_NON_TC_HITS, UINT64, AVERAGE),
+ COUNTABLE(SPLIT_MODE_NON_TC_MISSES, UINT64, AVERAGE),
+ COUNTABLE(STALL_AWAITING_TLB_MISS_FETCH, UINT64, AVERAGE),
+ COUNTABLE(MMU_TLB_MISS_READ_BURSTS_RECEIVED, UINT64, AVERAGE),
+ COUNTABLE(MMU_TLB_MISS_DATA_BEATS_READ, UINT64, AVERAGE),
+ COUNTABLE(CP_CYCLES_HELD_OFF, UINT64, AVERAGE),
+ COUNTABLE(VGT_CYCLES_HELD_OFF, UINT64, AVERAGE),
+ COUNTABLE(TC_CYCLES_HELD_OFF, UINT64, AVERAGE),
+ COUNTABLE(TC_ROQ_CYCLES_HELD_OFF, UINT64, AVERAGE),
+ COUNTABLE(TC_CYCLES_HELD_OFF_TCD_FULL, UINT64, AVERAGE),
+ COUNTABLE(RB_CYCLES_HELD_OFF, UINT64, AVERAGE),
+ COUNTABLE(TOTAL_CYCLES_ANY_CLNT_HELD_OFF, UINT64, AVERAGE),
+ COUNTABLE(TLB_MISS_CYCLES_HELD_OFF, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_REQUEST_HELD_OFF, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_REQUEST_HELD_OFF, UINT64, AVERAGE),
+ COUNTABLE(AXI_REQUEST_HELD_OFF, UINT64, AVERAGE),
+ COUNTABLE(AXI_REQUEST_HELD_OFF_INFLIGHT_LIMIT, UINT64, AVERAGE),
+ COUNTABLE(AXI_WRITE_DATA_HELD_OFF, UINT64, AVERAGE),
+ COUNTABLE(CP_SAME_PAGE_BANK_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(VGT_SAME_PAGE_BANK_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(TC_SAME_PAGE_BANK_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(TC_ARB_HOLD_SAME_PAGE_BANK_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(RB_SAME_PAGE_BANK_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(TOTAL_SAME_PAGE_BANK_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(CP_SAME_PAGE_BANK_REQUESTS_KILLED_FAIRNESS_LIMIT, UINT64, AVERAGE),
+ COUNTABLE(VGT_SAME_PAGE_BANK_REQUESTS_KILLED_FAIRNESS_LIMIT, UINT64, AVERAGE),
+ COUNTABLE(TC_SAME_PAGE_BANK_REQUESTS_KILLED_FAIRNESS_LIMIT, UINT64, AVERAGE),
+ COUNTABLE(RB_SAME_PAGE_BANK_REQUESTS_KILLED_FAIRNESS_LIMIT, UINT64, AVERAGE),
+ COUNTABLE(TOTAL_SAME_PAGE_BANK_KILLED_FAIRNESS_LIMIT, UINT64, AVERAGE),
+ COUNTABLE(TOTAL_MH_READ_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(TOTAL_MH_WRITE_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(TOTAL_MH_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(MH_BUSY, UINT64, AVERAGE),
+ COUNTABLE(CP_NTH_ACCESS_SAME_PAGE_BANK_SEQUENCE, UINT64, AVERAGE),
+ COUNTABLE(VGT_NTH_ACCESS_SAME_PAGE_BANK_SEQUENCE, UINT64, AVERAGE),
+ COUNTABLE(TC_NTH_ACCESS_SAME_PAGE_BANK_SEQUENCE, UINT64, AVERAGE),
+ COUNTABLE(RB_NTH_ACCESS_SAME_PAGE_BANK_SEQUENCE, UINT64, AVERAGE),
+ COUNTABLE(TC_ROQ_N_VALID_ENTRIES, UINT64, AVERAGE),
+ COUNTABLE(ARQ_N_ENTRIES, UINT64, AVERAGE),
+ COUNTABLE(WDB_N_ENTRIES, UINT64, AVERAGE),
+ COUNTABLE(MH_READ_LATENCY_OUTST_REQ_SUM, UINT64, AVERAGE),
+ COUNTABLE(MC_READ_LATENCY_OUTST_REQ_SUM, UINT64, AVERAGE),
+ COUNTABLE(MC_TOTAL_READ_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(ELAPSED_CYCLES_MH_GATED_CLK, UINT64, AVERAGE),
+ COUNTABLE(ELAPSED_CLK_CYCLES, UINT64, AVERAGE),
+ COUNTABLE(CP_W_16B_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(CP_W_32B_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(TC_16B_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(TC_32B_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(PA_REQUESTS, UINT64, AVERAGE),
+ COUNTABLE(PA_DATA_BYTES_WRITTEN, UINT64, AVERAGE),
+ COUNTABLE(PA_WRITE_CLEAN_RESPONSES, UINT64, AVERAGE),
+ COUNTABLE(PA_CYCLES_HELD_OFF, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_REQUEST_DATA_BEATS_ID_0, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_REQUEST_DATA_BEATS_ID_1, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_REQUEST_DATA_BEATS_ID_2, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_REQUEST_DATA_BEATS_ID_3, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_REQUEST_DATA_BEATS_ID_4, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_REQUEST_DATA_BEATS_ID_5, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_REQUEST_DATA_BEATS_ID_6, UINT64, AVERAGE),
+ COUNTABLE(AXI_READ_REQUEST_DATA_BEATS_ID_7, UINT64, AVERAGE),
+ COUNTABLE(AXI_TOTAL_READ_REQUEST_DATA_BEATS, UINT64, AVERAGE),
+};
+
static const struct fd_perfcntr_countable rb_countables[] = {
COUNTABLE(RBPERF_CNTX_BUSY, UINT64, AVERAGE),
COUNTABLE(RBPERF_CNTX_BUSY_MAX, UINT64, AVERAGE),
@@ -755,13 +940,10 @@ static const struct fd_perfcntr_counter sx_counters[] = {
COUNTER(SX_PERFCOUNTER0_SELECT, SX_PERFCOUNTER0_LOW, SX_PERFCOUNTER0_HI),
};
-// We don't have the enums for MH perfcntrs
-#if 0
static const struct fd_perfcntr_counter mh_counters[] = {
COUNTER(MH_PERFCOUNTER0_SELECT, MH_PERFCOUNTER0_LOW, MH_PERFCOUNTER0_HI),
COUNTER(MH_PERFCOUNTER1_SELECT, MH_PERFCOUNTER1_LOW, MH_PERFCOUNTER1_HI),
};
-#endif
static const struct fd_perfcntr_counter rbbm_counters[] = {
COUNTER(RBBM_PERFCOUNTER1_SELECT, RBBM_PERFCOUNTER1_LO, RBBM_PERFCOUNTER1_HI),
@@ -786,7 +968,7 @@ const struct fd_perfcntr_group a2xx_perfcntr_groups[] = {
GROUP("TCF", tcf_counters, tcf_countables),
GROUP("SQ", sq_counters, sq_countables),
GROUP("SX", sx_counters, sx_countables),
-// GROUP("MH", mh_counters, mh_countables),
+ GROUP("MH", mh_counters, mh_countables),
GROUP("RBBM", rbbm_counters, rbbm_countables),
GROUP("RB", rb_counters, rb_countables),
};