On Fri, Dec 20, 2019 at 10:52 PM Steven Rostedt <rostedt@xxxxxxxxxxx> wrote: > > On Fri, 13 Dec 2019 17:30:24 +0200 > "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx> wrote: > > > New trace.dat option is introduced: TRACECMD_OPTION_GUEST. > > Written in the host's trace.dat file, it contains information about > > guests, traced at the same time: guest trace ID, number of VCPUs and > > PIDs of the host tasks, running those VCPU. The data is stored in > > the file as NULL terminated string: > > "Guest %s %llu %d\n" -> guest name, number of VCPUs > > "%d %d\n" -> VCPU, PID of host task > > ..... > > "%d %d\n" -> VCPU, PID of host task > > Why is this a string, and not a structure? To avoid endian long long conversions, and to simplify reading of trace.dat file, for debug purposes. I would suggest to keep it text, for two reasons: - this information is not huge, the binary format will not reduce the size of the trace.dat file significantly. - it is very useful to be possible to check what guest information is stored in the file, using simple cat We could think of implementing some stand alone trace.dat file reader, to extract and display that meta data information. > > -- Steve -- Tzvetomir (Ceco) Stoyanov VMware Open Source Technology Center