efficios / barectf

Generator of ANSI C tracers which output CTF data streams
https://barectf.org
MIT License
65 stars 17 forks source link

Mutliple yaml includes causes the metadata enumerations to mismatch with traces #17

Closed prakashanurag closed 4 years ago

prakashanurag commented 4 years ago

Here is an exemplary include hierarchy:

  1. a.yaml -> b.yaml ->events.yaml
  2. a.yaml -> events.yaml
  3. a.yaml has enumerations

Issue: The generated metadata has incorrect enumeration number mapping. Version: Barectf 2.3.0

eepp commented 4 years ago

This is not a bug.

Including external YAML files says, for arrays (which the members property is because barectf follows the CTF/TSDL model):

  • Property exists in base object:
    • Base property is an array: new elements are appended to base array
    • Base property is not an array: base property is replaced by included property
  • Property does not exist in base object: included property is appended to base object

The observed behaviour above is normal considering that:

Both points above are features, which is why we can't change that behaviour in barectf.

Closing this.