]> Cypherpunks repositories - gostls13.git/commit
runtime: use TOPFRAME to identify top-of-frame functions
authorRuss Cox <rsc@golang.org>
Thu, 28 Jan 2021 21:22:52 +0000 (16:22 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 19 Feb 2021 00:02:49 +0000 (00:02 +0000)
commit54da3ab385686dec5554164ba9558214445deec9
tree93bad7fe11b54fde70f0580d0c0e1766b68e730b
parentfbe74dbf4263841819368a2a3c90e599392e0808
runtime: use TOPFRAME to identify top-of-frame functions

No change to actual runtime, but helps reduce the laundry list
of functions.

mcall, morestack, and asmcgocall are not actually top-of-frame,
so those need more attention in follow-up CLs.

mstart moved to assembly so that it can be marked TOPFRAME.

Since TOPFRAME also tells DWARF consumers not to unwind
this way, this change should also improve debuggers a
marginal amount.

This CL is part of a stack adding windows/arm64
support (#36439), intended to land in the Go 1.17 cycle.
This CL is, however, not windows/arm64-specific.
It is cleanup meant to make the port (and future ports) easier.

Change-Id: If1e0d46ca973de5e46b62948d076f675f285b5d9
Reviewed-on: https://go-review.googlesource.com/c/go/+/288802
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
15 files changed:
src/runtime/asm_386.s
src/runtime/asm_amd64.s
src/runtime/asm_arm.s
src/runtime/asm_arm64.s
src/runtime/asm_mips64x.s
src/runtime/asm_mipsx.s
src/runtime/asm_ppc64x.s
src/runtime/asm_riscv64.s
src/runtime/asm_s390x.s
src/runtime/asm_wasm.s
src/runtime/proc.go
src/runtime/sys_windows_386.s
src/runtime/sys_windows_amd64.s
src/runtime/sys_windows_arm.s
src/runtime/traceback.go