feat(profiler): support the experimental goroutine leak profile#4420
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files
🚀 New features to boost your workflow:
|
3e084dc to
a3b34cb
Compare
BenchmarksBenchmark execution time: 2026-03-09 15:13:17 Comparing candidate commit fe0699a in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 156 metrics, 8 unstable metrics.
|
Go 1.26 added an experimental goroutine leak profiler. See the proposal in https://go.dev/issue/74609. This profiler collects tracebacks for goroutines which are permanently blocked on synchronization, e.g. a goroutine blocked on acquiring a locked mutex where that goroutine has the only remaining reference to the mutex. This profiler is only available if the program is built with GOEXPERIMENT=goroutineleakprofile This commit updates the profiler to collect this profile if it is available. Currently, the profile will be collected unconditionally if the program is built with that GOEXPERIMENT, under the assumption that the presence of that GOEXPERIMENT means the user wants that data. This commit doesn't introduce any other knobs to toggle the profile type. Since the profile type is experimental and the runtime API isn't finalized, we shouldn't commit to a public API in our library.
a3b34cb to
6b793d7
Compare
|
✨ Fix all issues with BitsAI or with Cursor
|
6d35d80 to
fde1f15
Compare
Test that a program built with the goroutine leak experiment produces a goroutine leak profiler when instrumented with our library. And test that a program build without that experiment doesn't produce the profile. The first draft of this was generated using Sonnet 4.6 and I tidied it up.
fde1f15 to
fe0699a
Compare
|
I will merge this myself once backend support lands. |
5160dbf
into
main
Go 1.26 added an experimental goroutine leak profiler. See the proposal
in https://go.dev/issue/74609. This profiler collects tracebacks for
goroutines which are permanently blocked on synchronization, e.g. a
goroutine blocked on acquiring a locked mutex where that goroutine has
the only remaining reference to the mutex. This profiler is only
available if the program is built with GOEXPERIMENT=goroutineleakprofile
This commit updates the profiler to collect this profile if it is
available. Currently, the profile will be collected unconditionally if
the program is built with that GOEXPERIMENT, under the assumption that
the presence of that GOEXPERIMENT means the user wants that data. This
commit doesn't introduce any other knobs to toggle the profile type.
Since the profile type is experimental and the runtime API isn't
finalized, we shouldn't commit to a public API in our library.