]> Cypherpunks repositories - gostls13.git/commit
runtime: eliminate uses of BP on amd64
authorAustin Clements <austin@google.com>
Tue, 27 Jan 2015 23:29:02 +0000 (18:29 -0500)
committerAustin Clements <austin@google.com>
Mon, 2 Feb 2015 19:35:56 +0000 (19:35 +0000)
commit20a6ff7261adecc1ba0dc3f3cd6a29054fdf90b7
treee761e716f8d5da8497154c81206ee407551f699a
parent28b51184156e1261bb92e7ec4050a794dd606fa6
runtime: eliminate uses of BP on amd64

Any place that clobbers BP in the runtime can potentially interfere
with frame pointer unwinding with GOEXPERIMENT=framepointer.  This
change eliminates uses of BP in the runtime to address this problem.
We have spare registers everywhere this occurs, so there's no downside
to eliminating BP.  Where possible, this uses the same new register as
the amd64p32 runtime, which doesn't use BP due to restrictions placed
on it by NaCL.

One nice side effect of this is that it will let perf/VTune unwind the
call stack even through a call to systemstack, which will let us get
really good call graphs from the garbage collector.

Change-Id: I0ffa14cb4dd2b613a7049b8ec59df37c52286212
Reviewed-on: https://go-review.googlesource.com/3390
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/runtime/asm_amd64.s
src/runtime/sys_dragonfly_amd64.s
src/runtime/sys_freebsd_amd64.s
src/runtime/sys_linux_amd64.s
src/runtime/sys_netbsd_amd64.s
src/runtime/sys_openbsd_amd64.s