Skip to content
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

runtime/pprof: blocking profile time totals are off by several orders of magnitude #19822

Closed
josharian opened this issue Apr 3, 2017 · 2 comments
Milestone

Comments

@josharian
Copy link
Contributor

I ran cmd/compile with the block profiler enabled (see CL 39208), and examined the results with pprof. The header in the pdf says: "Showing nodes accounting for 28.16mins, 99.72% of 28.24mins total". And the biggest node in the pdf showed: "28.16mins (99.72%)". But the total compilation tool less than 5 seconds of real time. Unless I'm holding it wrong, it appears that there's a unit error somewhere in block profiling / pprof.

cc @matloob @rsc

@josharian josharian added this to the Go1.9 milestone Apr 3, 2017
@josharian
Copy link
Contributor Author

Hmmm. Actually, I suppose with enough goroutines all blocked at the same point, the cumulative execution could add up that high.

@rsc
Copy link
Contributor

rsc commented Apr 3, 2017

At a fundamental conceptual level, it's hard to extract signal from noise in the blocking profile model.

If your blocking is coming from mutexes, try the mutex profile instead. It does a better job because it knows more about the structure of the blocking.

gopherbot pushed a commit that referenced this issue Apr 5, 2017
Updates #15756
Updates #19822

Change-Id: I98b17dcbbfd80e7e164b0523185382175fe2d89b
Reviewed-on: https://go-review.googlesource.com/39554
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
lparth pushed a commit to lparth/go that referenced this issue Apr 13, 2017
Updates golang#15756
Updates golang#19822

Change-Id: I98b17dcbbfd80e7e164b0523185382175fe2d89b
Reviewed-on: https://go-review.googlesource.com/39554
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
@golang golang locked and limited conversation to collaborators Apr 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants