]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: set GOEXPERIMENT=runtimefreegc to disabled by default
authorthepudds <thepudds1460@gmail.com>
Thu, 13 Nov 2025 01:50:39 +0000 (20:50 -0500)
committert hepudds <thepudds1460@gmail.com>
Fri, 14 Nov 2025 21:37:56 +0000 (13:37 -0800)
This CL is part of a set of CLs that attempt to reduce how much work the
GC must do. See the design in https://go.dev/design/74299-runtime-freegc

The plan has been for GOEXPERIMENT=runtimefreegc to be disabled
by default for Go 1.26, so here we disable it.

Also, we update the name of the GOEXPERIMENT to reflect the latest name.

Updates #74299

Change-Id: I94a34784700152e13ca93ef6711ee9b7f1769d9a
Reviewed-on: https://go-review.googlesource.com/c/go/+/720120
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/internal/buildcfg/exp.go
src/internal/goexperiment/exp_runtimefree_off.go [deleted file]
src/internal/goexperiment/exp_runtimefree_on.go [deleted file]
src/internal/goexperiment/exp_runtimefreegc_off.go [new file with mode: 0644]
src/internal/goexperiment/exp_runtimefreegc_on.go [new file with mode: 0644]
src/internal/goexperiment/flags.go

index 31195f94c08c86a7a7e74222834e7c16431d866e..f1a1d8632ef50729d7b450a1895b3425ce9f6d6f 100644 (file)
@@ -83,7 +83,6 @@ func ParseGOEXPERIMENT(goos, goarch, goexp string) (*ExperimentFlags, error) {
                RegabiArgs:            regabiSupported,
                Dwarf5:                dwarf5Supported,
                RandomizedHeapBase64:  true,
-               RuntimeFree:           true,
                SizeSpecializedMalloc: true,
                GreenTeaGC:            true,
        }
diff --git a/src/internal/goexperiment/exp_runtimefree_off.go b/src/internal/goexperiment/exp_runtimefree_off.go
deleted file mode 100644 (file)
index 3affe43..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// Code generated by mkconsts.go. DO NOT EDIT.
-
-//go:build !goexperiment.runtimefree
-
-package goexperiment
-
-const RuntimeFree = false
-const RuntimeFreeInt = 0
diff --git a/src/internal/goexperiment/exp_runtimefree_on.go b/src/internal/goexperiment/exp_runtimefree_on.go
deleted file mode 100644 (file)
index 176278b..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// Code generated by mkconsts.go. DO NOT EDIT.
-
-//go:build goexperiment.runtimefree
-
-package goexperiment
-
-const RuntimeFree = true
-const RuntimeFreeInt = 1
diff --git a/src/internal/goexperiment/exp_runtimefreegc_off.go b/src/internal/goexperiment/exp_runtimefreegc_off.go
new file mode 100644 (file)
index 0000000..195f031
--- /dev/null
@@ -0,0 +1,8 @@
+// Code generated by mkconsts.go. DO NOT EDIT.
+
+//go:build !goexperiment.runtimefreegc
+
+package goexperiment
+
+const RuntimeFreegc = false
+const RuntimeFreegcInt = 0
diff --git a/src/internal/goexperiment/exp_runtimefreegc_on.go b/src/internal/goexperiment/exp_runtimefreegc_on.go
new file mode 100644 (file)
index 0000000..2afe055
--- /dev/null
@@ -0,0 +1,8 @@
+// Code generated by mkconsts.go. DO NOT EDIT.
+
+//go:build goexperiment.runtimefreegc
+
+package goexperiment
+
+const RuntimeFreegc = true
+const RuntimeFreegcInt = 1
index b3a3c8a4974975daf25fbfd7a1f21142b91424b7..957c41c0f5c61e42d0be57980e0c98445383db16 100644 (file)
@@ -113,8 +113,8 @@ type Flags struct {
        // platforms.
        RandomizedHeapBase64 bool
 
-       // RuntimeFree enables the runtime to free and reuse memory more eagerly in some circumstances with compiler help.
-       RuntimeFree bool
+       // RuntimeFreegc enables the runtime to free and reuse memory more eagerly in some circumstances with compiler help.
+       RuntimeFreegc bool
 
        // SizeSpecializedMalloc enables malloc implementations that are specialized per size class.
        SizeSpecializedMalloc bool