Stefan Hajnoczi <stefa...@gmail.com> writes: [...] > So forget I said "self-describing" :). I think the only changes from > the v1 format we need are: > > 1. New magic number to mark v2 format. > > 2. Trace records are no longer fixed-length, they include a size field: > > typedef struct { > uint32_t length; /* in bytes */ > uint32_t reserved; /* unused */ > uint64_t event; > uint64_t timestamp_ns; > uint8_t arguments[]; > } TraceRecord; > > 3. Strings are serialized like this: > > uint16_t length; > char chars[length];
16 bit length? Sure you want that? > These changes enable: > > 1. Variable number of trace event arguments. > > 2. Variable-length strings. Byte strings, i.e. zero bytes not special.