diff --git a/src/panfrost/ds/pan_pps_perf.cpp b/src/panfrost/ds/pan_pps_perf.cpp index 4211ff2beae..bbf4e64033d 100644 --- a/src/panfrost/ds/pan_pps_perf.cpp +++ b/src/panfrost/ds/pan_pps_perf.cpp @@ -174,7 +174,7 @@ PanfrostPerf::create_available_counters() const auto &pan_driver = PanfrostDriver::into(d); struct pan_perf *perf = static_cast( pan_driver.perf->get_subinstance()); - return pan_perf_counter_read_raw(perf, cinfo, block_idx); + return pan_perf_counter_read(perf, cinfo, block_idx); }); group.counters.push_back(counter.id); diff --git a/src/panfrost/perf/pan_perf.c b/src/panfrost/perf/pan_perf.c index aa53c0993cd..f1905aab02d 100644 --- a/src/panfrost/perf/pan_perf.c +++ b/src/panfrost/perf/pan_perf.c @@ -18,8 +18,8 @@ #include int64_t -pan_perf_counter_read_raw(const struct pan_perf *perf, - const struct pan_perf_counter *counter, uint8_t block) +pan_perf_counter_read(const struct pan_perf *perf, + const struct pan_perf_counter *counter, uint8_t block) { STATIC_ASSERT((int)PAN_KMOD_PERF_CAT_FRONTEND == (int)PAN_PERF_COUNTER_CAT_FRONTEND); STATIC_ASSERT((int)PAN_KMOD_PERF_CAT_TILER == (int)PAN_PERF_COUNTER_CAT_TILER); @@ -38,17 +38,17 @@ pan_perf_counter_read_raw(const struct pan_perf *perf, } int64_t -pan_perf_counter_read(const struct pan_perf_counter *counter, - const struct pan_perf *perf) +pan_perf_counter_read_block_sum(const struct pan_perf_counter *counter, + const struct pan_perf *perf) { - int64_t ret = pan_perf_counter_read_raw(perf, counter, 0); + int64_t ret = pan_perf_counter_read(perf, counter, 0); /* If counter belongs to shader core, sum values for all cores. */ if (counter->category_index == PAN_PERF_COUNTER_CAT_SHADER) { uint32_t n_cores = perf->mem_layout.category[PAN_PERF_COUNTER_CAT_SHADER].n_blocks; for (uint32_t core = 1; core < n_cores; ++core) { - ret += pan_perf_counter_read_raw(perf, counter, core); + ret += pan_perf_counter_read(perf, counter, core); assert(ret >= 0 && "counter sum should not overflow"); } } diff --git a/src/panfrost/perf/pan_perf.h b/src/panfrost/perf/pan_perf.h index 1e8446b62a4..5be5dfd1265 100644 --- a/src/panfrost/perf/pan_perf.h +++ b/src/panfrost/perf/pan_perf.h @@ -78,12 +78,12 @@ struct pan_perf { struct pan_kmod_perf_buffer_layout mem_layout; }; -int64_t pan_perf_counter_read_raw(const struct pan_perf *perf, - const struct pan_perf_counter *counter, - uint8_t block); +int64_t pan_perf_counter_read(const struct pan_perf *perf, + const struct pan_perf_counter *counter, + uint8_t block); -int64_t pan_perf_counter_read(const struct pan_perf_counter *counter, - const struct pan_perf *perf); +int64_t pan_perf_counter_read_block_sum(const struct pan_perf_counter *counter, + const struct pan_perf *perf); void pan_perf_init(struct pan_perf *perf, int fd); diff --git a/src/panfrost/perf/quick.c b/src/panfrost/perf/quick.c index afe114fe198..f221ec909d0 100644 --- a/src/panfrost/perf/quick.c +++ b/src/panfrost/perf/quick.c @@ -45,7 +45,7 @@ main(void) for (unsigned j = 0; j < cat->n_counters; ++j) { const struct pan_perf_counter *ctr = &cat->counters[j]; - int64_t val = pan_perf_counter_read(ctr, perf); + int64_t val = pan_perf_counter_read_block_sum(ctr, perf); printf("%s (%s): %ld\n", ctr->name, ctr->symbol_name, val); }