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: improve goroutine profiler #7926

dvyukov opened this Issue May 2, 2014 · 4 comments


None yet
3 participants

dvyukov commented May 2, 2014

Some concrete suggestions:
1. Add goroutine state (waiting, runnable, syscall) as comment in debug more and/or as
top frame (so that all waiting goroutines converge in a single "Waiting" block
in svg graph.
2. Add "created by" line in debug mode.
3. Dedup stacks, there can be thousands of equal stacks.

This comment has been minimized.


dvyukov commented May 4, 2014

Comment 1:

Another useful piece of information is how long a goroutine is blocked (similar to what
we output in crash reports). But this conflicts with stack deduplication.

This comment has been minimized.


hyangah commented May 6, 2014

Comment 2:

which debug mode do you target? Do you target to add additional display debug mode?
* debug=1 doesn't show each goroutine state or created-by info, but collapses the equal
stacks into a group.
* debug=2 shows each goroutine's state and created-by info along with function arguments.

This comment has been minimized.


dvyukov commented May 7, 2014

Comment 3:

You are right, I've missed debug=2 mode.
So the only potential addition is 1.
I wanted to check how it would look like, but it turned out that pprof does not support
goroutine profiles. That's something to fix.

This comment has been minimized.


rsc commented Sep 18, 2014

Comment 4:

Labels changed: added release-none, removed release-go1.4.

@rsc rsc added this to the Unplanned milestone Apr 10, 2015

@rsc rsc removed release-none labels Apr 10, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment