-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime/trace: Bad HeapGoal/NextGC Metric #63864
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Ugh. I think this might not be a bug, just an artifact of what happens when I've always disliked this logic. Perhaps it's time to finally fix it. This also made me realize we definitely do not emit enough |
Actually, how should we represent setting |
Ah, I didn't realize the encoding/json tests are calling SetGCPercent(-1). I think zero is a good value for the reason you mentioned. And it also works out nicely with the current cmd/trace code. So +1 to zero. |
Change https://go.dev/cl/639417 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, including tip.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Capture a trace of running the
encoding/json
tests and then viewing it in go tool trace:(I did this while implementing heap metrics for CL 538515. At first I thought it's a bug in my code, but then I realized the problem exists in the old tracer as well 😅.)
What did you expect to see?
A reasonable NextGC metric value.
What did you see instead?
An unreasonable NextGC metric value. Maybe caused by a
uint64
underflow?As far as I can tell, the problem appears to be in the data, not the trace viewer.
cc @mknyszek @prattmic
The text was updated successfully, but these errors were encountered: