]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/{asm,compile,internal/obj}: add "maymorestack" support
authorAustin Clements <austin@google.com>
Tue, 20 Aug 2019 21:39:09 +0000 (17:39 -0400)
committerAustin Clements <austin@google.com>
Fri, 5 Nov 2021 00:52:06 +0000 (00:52 +0000)
commit3839b6001470f7bc73c9a80f6458f7111ae3d9cc
treeb7689db44468d159b06f7618dc0a895903e9a032
parent1c4cfd80109da81a2c6cf49b4d3ff49c45af8e03
cmd/{asm,compile,internal/obj}: add "maymorestack" support

This adds a debugging hook for optionally calling a "maymorestack"
function in the prologue of any function that might call morestack
(whether it does at run time or not). The maymorestack function will
let us improve lock checking and add debugging modes that stress
function preemption and stack growth.

Passes toolstash-check -all (except on js/wasm, where toolstash
appears to be broken)

Fixes #48297.

Change-Id: I27197947482b329af75dafb9971fc0d3a52eaf31
Reviewed-on: https://go-review.googlesource.com/c/go/+/359795
Trust: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
14 files changed:
src/cmd/asm/internal/flags/flags.go
src/cmd/asm/main.go
src/cmd/compile/internal/base/debug.go
src/cmd/compile/internal/base/flag.go
src/cmd/internal/obj/arm/obj5.go
src/cmd/internal/obj/arm64/obj7.go
src/cmd/internal/obj/link.go
src/cmd/internal/obj/mips/obj0.go
src/cmd/internal/obj/ppc64/obj9.go
src/cmd/internal/obj/riscv/obj.go
src/cmd/internal/obj/s390x/objz.go
src/cmd/internal/obj/wasm/wasmobj.go
src/cmd/internal/obj/x86/obj6.go
test/maymorestack.go [new file with mode: 0644]