Re: [PATCH] trace2: increment event format version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 11/12/21 5:33 PM, Ævar Arnfjörð Bjarmason wrote:

On Thu, Nov 11 2021, Junio C Hamano wrote:

Josh Steadmon <steadmon@xxxxxxxxxx> writes:

On 2021.11.11 15:03, Junio C Hamano wrote:
Josh Steadmon <steadmon@xxxxxxxxxx> writes:

In 64bc752 (trace2: add trace2_child_ready() to report on background
children, 2021-09-20), we added a new "child_ready" event. In
Documentation/technical/api-trace2.txt, we promise that adding a new
event type will result in incrementing the trace2 event format version
number, but this was not done. Correct this in code & docs.

...

On the field itself I also wonder if it's useful at all. I'd think
anyone implementing a parser for the format would dispatch to a lookup
handling known keys, so having a version indicating "new keys here"
seems rather useless.


That may be true, but it is easier to have a version number and
allow parsers to ignore it, than it is to not have a version number
and at some point in the future require parsers try to figure it
out. IMHO.

So far we've only added new event types (cmd_ancestry and child_ready)
and everything is in regular JSON forms, so parsing and dispatching
is relatively easy and the version number is not really needed.
But, if in the future we decide to change the contents within one of
those events, then the version number may be significant.

Thanks,
Jeff




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux