]> Cypherpunks repositories - gostls13.git/commit
runtime: implement getcallersp in Go
authorAustin Clements <austin@google.com>
Thu, 22 Sep 2016 21:02:22 +0000 (17:02 -0400)
committerAustin Clements <austin@google.com>
Mon, 26 Sep 2016 22:01:32 +0000 (22:01 +0000)
commitd211c2d3774d78173e004f0ffb1e2eae9ae19706
tree501a7ece9533e110b6d3a4e78c619313ce2eda37
parentaaf4099a5cabfee52b1c481f2a30ee0dd02ef247
runtime: implement getcallersp in Go

This makes it possible to inline getcallersp. getcallersp is on the
hot path of defers, so this slightly speeds up defer:

name           old time/op  new time/op  delta
Defer-4        78.3ns ± 2%  75.1ns ± 1%  -4.00%   (p=0.000 n=9+8)

Updates #14939.

Change-Id: Icc1cc4cd2f0a81fc4c8344432d0b2e783accacdd
Reviewed-on: https://go-review.googlesource.com/29655
TryBot-Result: Gobot Gobot <gobot@golang.org>
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/runtime/asm_386.s
src/runtime/asm_amd64.s
src/runtime/asm_amd64p32.s
src/runtime/asm_arm.s
src/runtime/asm_arm64.s
src/runtime/asm_mips64x.s
src/runtime/asm_ppc64x.s
src/runtime/asm_s390x.s
src/runtime/stubs.go