runtime: remove getcallerpc argument

Now that getcallerpc is a compiler intrinsic on x86 and non-x86
platforms don't need the argument, we can drop it.

Sadly, this doesn't let us remove any dummy arguments since all of
those cases also use getcallersp, which still takes the argument
pointer, but this is at least an improvement.

Change-Id: I9c34a41cf2c18cba57f59938390bf9491efb22d2
Reviewed-on: https://go-review.googlesource.com/65474
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
Austin Clements 2017-09-22 15:16:26 -04:00
parent 8cb2952f2f
commit 229aaac19e
20 changed files with 85 additions and 85 deletions

View file

@ -81,7 +81,7 @@ func makeslice64(et *_type, len64, cap64 int64) slice {
// The SSA backend might prefer the new length or to return only ptr/cap and save stack space.
func growslice(et *_type, old slice, cap int) slice {
if raceenabled {
callerpc := getcallerpc(unsafe.Pointer(&et))
callerpc := getcallerpc()
racereadrangepc(old.array, uintptr(old.len*int(et.size)), callerpc, funcPC(growslice))
}
if msanenabled {
@ -179,7 +179,7 @@ func slicecopy(to, fm slice, width uintptr) int {
}
if raceenabled {
callerpc := getcallerpc(unsafe.Pointer(&to))
callerpc := getcallerpc()
pc := funcPC(slicecopy)
racewriterangepc(to.array, uintptr(n*int(width)), callerpc, pc)
racereadrangepc(fm.array, uintptr(n*int(width)), callerpc, pc)
@ -210,7 +210,7 @@ func slicestringcopy(to []byte, fm string) int {
}
if raceenabled {
callerpc := getcallerpc(unsafe.Pointer(&to))
callerpc := getcallerpc()
pc := funcPC(slicestringcopy)
racewriterangepc(unsafe.Pointer(&to[0]), uintptr(n), callerpc, pc)
}