Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
proposal: runtime: Allow GODEBUG flags to be enabled dynamically #28623
Typically, we don't want gc traces to flood our logs, but when debugging specific memory issues, it would be helpful if we could enable features (such as gctrace=1 and scavenge=1) dynamically.
While it doesn't have to be via
What version of Go are you using (
changed the title from
runtime: Allow GODEBUG flags to be enabled dynamically
proposal: runtime: Allow GODEBUG flags to be enabled dynamically
Nov 7, 2018
In general we've assumed that these are constants for the life of the program. It's unclear what would happen if some of these "run-time constants" started changing underfoot, even if we did all the wiring you suggest. It would probably be better to identify things that users really need to change and add explicit functions instead of reparsing $GODEBUG.
For example GODEBUG lets you set memprofilerate but there's a direct way to set it too.