-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Showing
1 changed file
with
115 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters