cmd/trace: the "GC pause" column in the user-defined regions table doesn't make sense #62443
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Use go tool trace's custom region to track function execution time.
Test Code: https://go.dev/play/p/idO-4ycK41K
What did you expect to see?
The actual pause time of goroutine due to GC.
What did you see instead?
The GC pause time is extremely large and does not match the time output by GODEBUG='gctrace=1'.
"GC pasue" uses the GCTime field, which corresponds to the GCDone event. It seems that this is the total GC time, and it is calculated for each goroutine.
cmd/trace/goroutines.go#L298
internal/trace/goroutines.go#L275
The text was updated successfully, but these errors were encountered: