commit | 814bf88cf225cd422a50435865fb5b9f55b7e59e | [log] [tgz] |
---|---|---|
author | Nicolas Hillegeer <aktau@google.com> | Thu Feb 22 13:03:07 2024 -0800 |
committer | Gopher Robot <gobot@golang.org> | Thu Feb 22 23:46:43 2024 +0000 |
tree | 2a90bc7671824e9c903c5aed0676617b2a3aa196 | |
parent | e579c86f598ffc9f8172d15b2b0a6a45c520020c [diff] |
trace: make trace byte receiving synchronous This avoids the asynchrony related to the pipe+buffer+goroutine. Using this approach, we can guarantee that once the `Write` call completes, the data is stored in flightrecorder buffers. This is related to https://go.dev/cl/562616. There is a behavioral change: previously, in case of error the recorder goroutine would just stop, which would essentially block the tracing infra by not accepting the `Write`. Now, we actively stop tracing on any error. I did not do real performance tests, but it can't be very different: Before: running go [test . -count 10] ok golang.org/x/exp/trace 60.423s After: running go [test . -count 10] ok golang.org/x/exp/trace 60.394s Change-Id: Ie900fec2b45f1c227c82e68f4f7af1902de3582b Reviewed-on: https://go-review.googlesource.com/c/exp/+/566255 Reviewed-by: Michael Knyszek <mknyszek@google.com> Auto-Submit: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This subrepository holds experimental and deprecated (in the old
directory) packages.
The idea for this subrepository originated as the pkg/exp
directory of the main repository, but its presence there made it unavailable to users of the binary downloads of the Go installation. The subrepository has therefore been created to make it possible to go get
these packages.
Warning: Packages here are experimental and unreliable. Some may one day be promoted to the main repository or other subrepository, or they may be modified arbitrarily or even disappear altogether.
In short, code in this subrepository is not subject to the Go 1 compatibility promise. (No subrepo is, but the promise is even more likely to be violated by go.exp than the others.)
Caveat emptor.