If a field name differs slightly between two generations then this
change will still add the fields into the same group.
For example, these will be treated as equal:
* "Software Exception" and "Software Exception"
* "Per Thread" and "Per-Thread"
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
self.length_by_gen[gen] = xml_attrs['length']
def get_field(self, field_name, create=False):
- if field_name not in self.fields:
+ key = to_alphanum(field_name)
+ if key not in self.fields:
if create:
- self.fields[field_name] = Field(self, field_name)
+ self.fields[key] = Field(self, field_name)
else:
return None
- return self.fields[field_name]
+ return self.fields[key]
def has_prop(self, prop):
if prop == 'length':