From 3504da456591acf1b1ab479d4a5b2c91345a7f22 Mon Sep 17 00:00:00 2001 From: Michael Anthony Knyszek Date: Tue, 9 Apr 2024 03:09:34 +0000 Subject: [PATCH] internal/trace/v2: halve the memory footprint of TestGCStress This test has been OOMing on 32-bit platforms for a bit. I suspect the very high allocation rate is causing the program to outrun the GC in some corner-case scenarios, especially on 32-bit Windows. I don't have a strong grasp of what's going on yet, but lowering the memory footprint should help with the flakiness. This shouldn't represent a loss in test coverage, since we're still allocating and assisting plenty (tracing the latter is a strong reason this test exists). For #66624. Change-Id: Idd832cfc5cde04701386919df4490f201c71130a Reviewed-on: https://go-review.googlesource.com/c/go/+/577475 LUCI-TryBot-Result: Go LUCI Reviewed-by: David Chase Auto-Submit: Michael Knyszek --- src/internal/trace/v2/testdata/testprog/gc-stress.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/internal/trace/v2/testdata/testprog/gc-stress.go b/src/internal/trace/v2/testdata/testprog/gc-stress.go index 017f7f07bf..e56245bb8f 100644 --- a/src/internal/trace/v2/testdata/testprog/gc-stress.go +++ b/src/internal/trace/v2/testdata/testprog/gc-stress.go @@ -38,16 +38,16 @@ func makeTree(depth int) *node { } var trees [16]*node -var ballast *[16]*[8192]*node +var ballast *[16]*[1024]*node var sink [][]byte func main() { for i := range trees { trees[i] = makeTree(6) } - ballast = new([16]*[8192]*node) + ballast = new([16]*[1024]*node) for i := range ballast { - ballast[i] = new([8192]*node) + ballast[i] = new([1024]*node) for j := range ballast[i] { ballast[i][j] = &node{ data: [128]byte{1, 2, 3, 4}, -- 2.48.1