]> Cypherpunks repositories - gostls13.git/commit
internal/trace: refactor how experimental batches are exposed
authorMichael Anthony Knyszek <mknyszek@google.com>
Thu, 9 Jan 2025 18:17:49 +0000 (18:17 +0000)
committerGopher Robot <gobot@golang.org>
Fri, 7 Feb 2025 20:12:33 +0000 (12:12 -0800)
commitca1cfea3710a5873132d0c5f6e3710804714efd4
treef2f521159fdf5f3a73a2f2a19f2e02ec1a4cf697
parentd7f6f6fd54bb888606d882cd73df9dcac229b80a
internal/trace: refactor how experimental batches are exposed

This change modifies how per-generation experimental batches are
exposed. Rather than expose them on the ExperimentalEvent, it exposes it
as part of the Sync event, so it's clear to the caller when the
information becomes relevant and when it should be parsed.

This change also adds a field to each ExperimentalEvent indicating which
experiment the event is a part of.

Because this information needs to appear *before* a generation is
observed, we now ensure there is a sync event both before and after each
generation. This means the final sync event is now a special case;
previously we would only emit a sync event after each generation.

This change is based on feedback from Austin Clements on the
experimental events functionality.

For #62627.

Change-Id: I48b0fe12b22abb7ac8820a9e73447bfed8419856
Reviewed-on: https://go-review.googlesource.com/c/go/+/644215
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/internal/trace/base.go
src/internal/trace/event.go
src/internal/trace/event/go122/event.go
src/internal/trace/event_test.go
src/internal/trace/gc.go
src/internal/trace/generation.go
src/internal/trace/internal/oldtrace/parser.go
src/internal/trace/reader.go
src/internal/trace/testtrace/validation.go
src/runtime/crash_test.go