runtime: GODEBUG=profstackdepth=N not usable with //go:debug #71187
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone
Go 1.23 increased the default profiling stack depth from 32 to 128 (https://go.dev/cl/572396). It also introduced
GODEBUG=profstackdepth=32
as a way to revert back to the old default (https://go.dev/cl/581917).However, that new GODEBUG doesn't appear in the
internal/godebugs
table, which means it is not eligible for use ingo.mod
godebug
blocks or//go:debug
directives (https://go.dev/doc/godebug).Given that the main purpose of this GODEBUG is for compatibility, it seems like it should be eligible for use there, and perhaps this should be backported to 1.23.
This came up in #69590 (comment), where a user would like the old behavior.
One thing that is a bit unclear to me: I think if we add this as an "official" compatibility GODEBUG, then we will tie it to the version in
go.mod
. i.e., modules withgo 1.22.0
will useprofstackdepth=32
, even if built with 1.23. They must setgo 1.23.0
to get the new behavior. That is probably the right thing to do, but might be a bit odd to change in a minor release.cc @felixge @golang/runtime
The text was updated successfully, but these errors were encountered: