-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime: lost non-Go profiling samples are overcounted #21836
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
Change https://golang.org/cl/63270 mentions this issue: |
Change https://golang.org/cl/63310 mentions this issue: |
…ra to 0 after flush After the number of lost extra events are written to the the cpuprof log, the number of lost extra events should be set to zero, or else, the next time time addExtra is logged, lostExtra will be overcounted. This change resets lostExtra after its value is written to the log. Fixes #21836 Change-Id: I8a6ac9c61e579e7a5ca7bdb0f3463f8ae8b9f863 Reviewed-on: https://go-review.googlesource.com/63270 Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> (cherry picked from commit 96b1eff) Reviewed-on: https://go-review.googlesource.com/63310 Run-TryBot: Ian Lance Taylor <iant@golang.org>
|
Change https://golang.org/cl/70974 mentions this issue: |
…ra to 0 after flush After the number of lost extra events are written to the the cpuprof log, the number of lost extra events should be set to zero, or else, the next time time addExtra is logged, lostExtra will be overcounted. This change resets lostExtra after its value is written to the log. Fixes #21836 Change-Id: I8a6ac9c61e579e7a5ca7bdb0f3463f8ae8b9f864 Reviewed-on: https://go-review.googlesource.com/63270 Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-on: https://go-review.googlesource.com/70974 Run-TryBot: Russ Cox <rsc@golang.org>
go1.9.2 has been packaged and includes: The release is posted at golang.org/dl. — golang.org/x/build/cmd/releasebot, Oct 26 21:09:14 UTC |
cpuProfile.addExtra is called from the Go profiling signal handler to flush any accumulated non-Go profiling samples. If we lost any non-Go profiling samples, it flushes this as a special
_LostExternalCode
sample. However, it fails to reset the lost sample count, so every subsequentaddExtra
call will record another_LostExternalCode
sample.This fix should be as simple as setting
p.lostExtra
to 0, but this should get back-ported to 1.9.1./cc @ianlancetaylor @matloob
The text was updated successfully, but these errors were encountered: