3 ms·
A lot of people don’t grok the contention profiler, even people who work on service performance full-time. The problem is the docs. What you’re getting from the
by jeffbee 6y ago
A lot of people don’t grok the contention profiler, even people who work on service performance full-time. The problem is the docs. What you’re getting from the contention profile is samples of call stacks for contended releases, that is when a lock is released and there are waiters. This isn’t explained anywhere, to my recollection.
- felixge 6y agoYup, there is an upstream issue to improve this: https://github.com/golang/go/issues/44920 https://github.com/golang/go/issues/44920 FWIW I'm planning to work on the problem from downstream as well by adding more docs here: https://github.com/felixge/go-profiler-notes https://github.com/felixge/go-profiler-notes . I haven't gotten to the mutex profile yet, but I've covered the block profile in great detail. It actually overlaps with the mutex profile for contention, but it tracks Lock() rather than Unlock() which is subtly different like you pointed out!