]> Cypherpunks repositories - gostls13.git/commit
internal/trace: add end-of-generation signal to trace
authorMichael Anthony Knyszek <mknyszek@google.com>
Tue, 5 Aug 2025 21:37:07 +0000 (21:37 +0000)
committerMichael Knyszek <mknyszek@google.com>
Fri, 15 Aug 2025 21:01:30 +0000 (14:01 -0700)
commit4a7fde922ff12dce9d4e00f1b1e658fa907e488d
tree74b130e4a531bc6bce41cb34e66431d3966a80b8
parentcb814bd5bc3f0575e8d0e26370c05456770cb3da
internal/trace: add end-of-generation signal to trace

This change takes the EvEndOfGeneration event and promotes it to a real
event that appears in the trace.

This allows the trace parser to unambiguously identify truncated traces
vs. broken traces. It also makes a lot of the logic around parsing
simpler, because there's no more batch spilling necessary.

Fixes #73904.

Change-Id: I37c359b32b6b5f894825aafc02921adeaacf2595
Reviewed-on: https://go-review.googlesource.com/c/go/+/693398
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/internal/trace/batch.go
src/internal/trace/generation.go
src/internal/trace/internal/testgen/trace.go
src/internal/trace/reader.go
src/internal/trace/tracev2/events.go
src/internal/trace/version/version.go
src/runtime/trace.go
src/runtime/trace/batch.go
src/runtime/trace/flightrecorder.go
src/runtime/trace/recorder.go
src/runtime/trace/subscribe.go