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

One-off Go blocking profile #4

Open
bboreham opened this issue Jun 30, 2021 · 0 comments
Open

One-off Go blocking profile #4

bboreham opened this issue Jun 30, 2021 · 0 comments

Comments

@bboreham
Copy link
Owner

The goroutine dump /debug/pprof/goroutine can show you where things are blocked on a lock, but it can be much harder to figure out where the lock is held.

There is a blocking profile, but it must be enabled in code with runtime.SetBlockProfileRate(), and it records all events over a period. If I have a problem from blocking it will generally come up all the time, which is why a one-off dump is attractive.

(I'm assuming that, given an arbitrary lock, one can figure out something about where it is held. That may not be true)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant