mirror of
https://github.com/golang/go.git
synced 2025-05-05 23:53:05 +00:00
[dev.ssa] cmd/compile: shrink stack guard
Our stack frame sizes look pretty good now. Lower the stack guard from 1024 to 720. Tip is currently using 720. We could go lower (to 640 at least) except PPC doesn't like that. Change-Id: Ie5f96c0e822435638223f1e8a2bd1a1eed68e6aa Reviewed-on: https://go-review.googlesource.com/19922 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
parent
378a863682
commit
d3f15ff6bc
@ -11,7 +11,7 @@ const (
|
|||||||
STACKSYSTEM = 0
|
STACKSYSTEM = 0
|
||||||
StackSystem = STACKSYSTEM
|
StackSystem = STACKSYSTEM
|
||||||
StackBig = 4096
|
StackBig = 4096
|
||||||
StackGuard = 1024*stackGuardMultiplier + StackSystem
|
StackGuard = 720*stackGuardMultiplier + StackSystem
|
||||||
StackSmall = 128
|
StackSmall = 128
|
||||||
StackLimit = StackGuard - StackSystem - StackSmall
|
StackLimit = StackGuard - StackSystem - StackSmall
|
||||||
)
|
)
|
||||||
|
@ -90,7 +90,7 @@ const (
|
|||||||
|
|
||||||
// The stack guard is a pointer this many bytes above the
|
// The stack guard is a pointer this many bytes above the
|
||||||
// bottom of the stack.
|
// bottom of the stack.
|
||||||
_StackGuard = 1024*sys.StackGuardMultiplier + _StackSystem
|
_StackGuard = 720*sys.StackGuardMultiplier + _StackSystem
|
||||||
|
|
||||||
// After a stack split check the SP is allowed to be this
|
// After a stack split check the SP is allowed to be this
|
||||||
// many bytes below the stack guard. This saves an instruction
|
// many bytes below the stack guard. This saves an instruction
|
||||||
|
@ -302,13 +302,13 @@ TestCases:
|
|||||||
// Instead of rewriting the test cases above, adjust
|
// Instead of rewriting the test cases above, adjust
|
||||||
// the first stack frame to use up the extra bytes.
|
// the first stack frame to use up the extra bytes.
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
size += (1024 - 128) - 128
|
size += (720 - 128) - 128
|
||||||
// Noopt builds have a larger stackguard.
|
// Noopt builds have a larger stackguard.
|
||||||
// See ../src/cmd/dist/buildruntime.go:stackGuardMultiplier
|
// See ../src/cmd/dist/buildruntime.go:stackGuardMultiplier
|
||||||
// This increase is included in obj.StackGuard
|
// This increase is included in obj.StackGuard
|
||||||
for _, s := range strings.Split(os.Getenv("GO_GCFLAGS"), " ") {
|
for _, s := range strings.Split(os.Getenv("GO_GCFLAGS"), " ") {
|
||||||
if s == "-N" {
|
if s == "-N" {
|
||||||
size += 1024
|
size += 720
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user