diff options
author | Lionel Landwerlin <lionel.g.landwerlin@intel.com> | 2020-04-01 12:08:29 +0300 |
---|---|---|
committer | Lionel Landwerlin <lionel.g.landwerlin@intel.com> | 2020-09-03 19:07:48 +0300 |
commit | 7c4a8b3113d2fb9f23c1a7f9236a3e5036b82aa2 (patch) | |
tree | d15b8eaa6b2f3defec84d5405f0c37f47db6f014 /lib/i915/perf-configs | |
parent | 5367013246e4ec8f8d141fcaf9123313e2e2fc5c (diff) |
lib/i915/perf: fixup converter script
This script was previous run in python2, but because IGT is python3
only there are differences in what it generates. In particular the
attribute order differs in the tostring() of the ElementTree
function...
Reorder them alphabetically manually.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 53f8f541caae ("lib: Add i915_perf library")
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Diffstat (limited to 'lib/i915/perf-configs')
-rw-r--r-- | lib/i915/perf-configs/oa_guid_registry.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/i915/perf-configs/oa_guid_registry.py b/lib/i915/perf-configs/oa_guid_registry.py index 0ed3983f..2df6bdfb 100644 --- a/lib/i915/perf-configs/oa_guid_registry.py +++ b/lib/i915/perf-configs/oa_guid_registry.py @@ -54,9 +54,19 @@ class Registry: changes that might affect our useages. """ + def reorder_attributes(root): + for el in root.iter(): + attrib = el.attrib + if len(attrib) > 1: + # adjust attribute order, e.g. by sorting + attribs = sorted(attrib.items()) + attrib.clear() + attrib.update(attribs) + config = et.Element('config') for registers in mdapi_metric_set.findall(".//RegConfigStart"): config.append(copy.deepcopy(registers)) + reorder_attributes(config) registers_str = et.tostring(config) return hashlib.md5(registers_str).hexdigest() |