pub const TRACE_FORMAT_VERSION: u32 = 4;Expand description
The version of the JSONL trace format this build writes, and the only one it reads.
Version 2 gave every host_call the id of the task that made it, gave
every run a terminal run_ended event, and settled heap_collected’s
task on the same convention the other two use, so the entry is task
crate::runtime::ENTRY_TASK rather than a null. A version 1 trace can
answer none of the three questions this build’s reader now asks of one, and
a reader that met a run_ended it had never heard of would report a broken
line rather than an old file — so the version says what changed and a
version 1 trace is refused for its version.
Version 3 added TraceHeader::backend, so a file says which of the two
backends wrote it and cove replay reads that rather than guessing it.
ADR 0026 is the decision. A version 2 trace is refused for its version,
exactly as a version 1 one is: this reader has always read one version,
and a version 2 file is precisely a file that cannot answer the question a
version 3 replay asks first.
Version 4 reshaped heap_summary. It had six fields and all six described
a heap that is a set of objects, because the only machine that wrote one
had such a heap. The linear-memory backend’s heap is a run of words, and
issue #240 decided not to make
the event choose: “Do not force heap_summary to choose between objects
and words. They answer different questions.” So the event now carries
both families, every figure is null from a machine that does not count
it, and no reader is handed a zero that reads as a measurement. A version
3 trace is refused for its version like the two before it.