[igt-dev] [PATCH i-g-t v5 18/30] lib/i915/perf: Set missing metric unit for some counters
Umesh Nerlige Ramappa
umesh.nerlige.ramappa at intel.com
Thu Mar 23 22:55:22 UTC 2023
Some counters do not have units specified, so use 'number' as the unit.
v2: Drop " from commit description (Kamil)
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
---
lib/i915/perf-configs/mdapi-xml-convert.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/i915/perf-configs/mdapi-xml-convert.py b/lib/i915/perf-configs/mdapi-xml-convert.py
index 3b7d0663..eee12ad5 100755
--- a/lib/i915/perf-configs/mdapi-xml-convert.py
+++ b/lib/i915/perf-configs/mdapi-xml-convert.py
@@ -819,9 +819,14 @@ for arg in args.xml:
# XXX Not sure why EU metrics tend to just be bundled under 'gpu'
counter.set('mdapi_hw_unit_type', mdapi_counter.get('HWUnitType').lower())
+ # Some counters do not have MetricUnits, treat them as number.
+ if mdapi_counter.get('MetricUnits') == None:
+ units = "number"
+ else:
+ units = mdapi_counter.get('MetricUnits').lower()
+
# There are counters representing cycle counts that have a semantic
# type of 'duration' which doesn't seem to make sense...
- units = mdapi_counter.get('MetricUnits').lower()
if units == "cycles":
semantic_type = "event"
else:
--
2.36.1
More information about the igt-dev
mailing list