]> Cypherpunks repositories - gostls13.git/commit
internal/trace: refactor Stack.Frames to return iter.Seq
authorFelix Geisendörfer <felix.geisendoerfer@datadoghq.com>
Tue, 27 Aug 2024 18:46:33 +0000 (20:46 +0200)
committerMichael Knyszek <mknyszek@google.com>
Mon, 23 Sep 2024 15:02:19 +0000 (15:02 +0000)
commit89a5a60da623ca9e7f91a93cd34b35785e30ab7e
treecc8a8a2ee862115fab3c011d34bf3f4f46e16161
parentcfbd2e7b40fac7809a404c49c46106e259078a61
internal/trace: refactor Stack.Frames to return iter.Seq

The Frames function is almost an iter.Seq, except for its bool return
value.

Since none of the callers in the Go tree rely on the bool, we can remove
it. However, doing so might still obscure the intended usage as an iterator.

This refactor changes the API to return iter.Seq, making the intended
usage explicit. Refactoring the existing callers to take advantage of
the new interface will be done in a follow-up CL.

Change-Id: I03e4d6d762910e418cc37d59a6c519eb7f39b3b0
Reviewed-on: https://go-review.googlesource.com/c/go/+/608855
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/cmd/trace/gstate.go
src/cmd/trace/pprof.go
src/cmd/trace/regions.go
src/cmd/trace/viewer.go
src/internal/trace/event.go
src/internal/trace/summary.go
src/internal/trace/testtrace/validation.go
src/internal/trace/trace_test.go
src/runtime/trace_cgo_test.go