]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: add -smallframes gc flag for GC latency diagnosis
authorDavid Chase <drchase@google.com>
Wed, 5 Jun 2019 18:53:28 +0000 (14:53 -0400)
committerDavid Chase <drchase@google.com>
Thu, 6 Jun 2019 11:38:40 +0000 (11:38 +0000)
commit037ac2bd84480e0a06c4d1e7a2c1f133109466a5
tree76911ef95781efdc35bbdbbc189b78a76bc6e2ea
parentf31b7b9b5b43277fb8b77ee57389a0b2f5278c1e
cmd/compile: add -smallframes gc flag for GC latency diagnosis

Shrinks the size of things that can be stack allocated from
10M to 128k for declared variables and from 64k to 16k for
implicit allocations (new(T), &T{}, etc).

Usage: "go build -gcflags -smallframes hello.go"

An earlier GOEXPERIMENT version of this caused only one
problem, when a gc-should-detect-oversize-stack test no
longer had an oversized stack to detect.  The change was
converted to a flag to make it easier to access (for
diagnosing "long" GC-related single-thread pauses) and to
remove interference with the test.

Includes test to verify behavior.

Updates #27732.

Change-Id: I1255d484331e77185e07c78389a8b594041204c2
Reviewed-on: https://go-review.googlesource.com/c/go/+/180817
Run-TryBot: David Chase <drchase@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/gc/go.go
src/cmd/compile/internal/gc/main.go
src/cmd/compile/internal/gc/walk.go
test/fixedbugs/issue27732a.go [new file with mode: 0644]