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

net/http/pprof: Heap profiler is missing from package #26572

Closed
chasebrewsky opened this issue Jul 24, 2018 · 2 comments
Closed

net/http/pprof: Heap profiler is missing from package #26572

chasebrewsky opened this issue Jul 24, 2018 · 2 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@chasebrewsky
Copy link

What version of Go are you using (go version)?

1.10.2

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

GOHOSTARCH="amd64"
GOHOSTOS="darwin"

What did you do?

Tried to read the pprof heap profiler using the net/http/pprof package, as mentioned in the documentation line 23, but noticed that it's completely missing. I'm unsure if this was intentional, but there is no http.Handler for the heap profiler. There are handles like Profile for CPU profiling, but none for memory insights.

@agnivade
Copy link
Contributor

I am not sure what the bug is. Are you saying that you did go tool pprof http://localhost:6060/debug/pprof/heap and did not get a heap profile ? Or just simply that you could not find the code for the heap profile ?

If it is the latter, that is because it is inside runtime/pprof. And not just heap profile, allocs, block, mutex are also coming from runtime/pprof.

You just need to look closely here - https://tip.golang.org/src/net/http/pprof/pprof.go#L268.

@agnivade agnivade added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Jul 24, 2018
@chasebrewsky
Copy link
Author

You're right, my mistake. I was trying to do custom URL mappings to just the heap and couldn't find the individual http handler. I didn't notice that it was grouped with other utilities in the Index handler. Thanks, and sorry for the inconvenience!

@golang golang locked and limited conversation to collaborators Aug 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants