From 5c32d45ede2efab8c9a24e5a4aeb57a86373e9c5 Mon Sep 17 00:00:00 2001 From: Lukas Zapolskas Date: Wed, 19 Mar 2025 16:28:11 +0000 Subject: [PATCH] pps: Add the Primitive, Instruction, Pixel and Fragment unit types The Perfetto spec supports several units that are supported directly by Mali performance counters, which are not being expressed in the data source. Signed-off-by: Lukas Zapolskas --- src/tool/pps/pps_counter.h | 4 ++++ src/tool/pps/pps_datasource.cc | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/tool/pps/pps_counter.h b/src/tool/pps/pps_counter.h index 7b032be81cb..c8f57b9d4b9 100644 --- a/src/tool/pps/pps_counter.h +++ b/src/tool/pps/pps_counter.h @@ -40,6 +40,10 @@ class Counter Byte, Hertz, None, + Primitive, + Instruction, + Pixel, + Fragment }; using Value = std::variant; diff --git a/src/tool/pps/pps_datasource.cc b/src/tool/pps/pps_datasource.cc index 32223ad03df..3cc494b3409 100644 --- a/src/tool/pps/pps_datasource.cc +++ b/src/tool/pps/pps_datasource.cc @@ -183,6 +183,18 @@ template void add_descriptors(GpuCounterDescript case Counter::Units::None: units = GpuCounterDescriptor::NONE; break; + case Counter::Units::Primitive: + units = GpuCounterDescriptor::PRIMITIVE; + break; + case Counter::Units::Instruction: + units = GpuCounterDescriptor::INSTRUCTION; + break; + case Counter::Units::Pixel: + units = GpuCounterDescriptor::PIXEL; + break; + case Counter::Units::Fragment: + units = GpuCounterDescriptor::FRAGMENT; + break; default: assert(false && "Missing counter units type!"); break;