aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/proc.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2017-09-22 15:16:26 -0400
committerAustin Clements <austin@google.com>2017-09-22 22:17:15 +0000
commit229aaac19e041ac74ab043d6ef09c8406bb0a9e7 (patch)
treebfe5daa095c648c67152a4cfdc7365b55c203876 /src/runtime/proc.go
parent8cb2952f2f9c80246572b951e2663e79962796c0 (diff)
downloadgo-229aaac19e041ac74ab043d6ef09c8406bb0a9e7.tar.xz
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>
Diffstat (limited to 'src/runtime/proc.go')
-rw-r--r--src/runtime/proc.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go
index 29e681e26b..c58e806e0d 100644
--- a/src/runtime/proc.go
+++ b/src/runtime/proc.go
@@ -2545,7 +2545,7 @@ func reentersyscall(pc, sp uintptr) {
// Standard syscall entry used by the go syscall library and normal cgo calls.
//go:nosplit
func entersyscall(dummy int32) {
- reentersyscall(getcallerpc(unsafe.Pointer(&dummy)), getcallersp(unsafe.Pointer(&dummy)))
+ reentersyscall(getcallerpc(), getcallersp(unsafe.Pointer(&dummy)))
}
func entersyscall_sysmon() {
@@ -2588,7 +2588,7 @@ func entersyscallblock(dummy int32) {
_g_.m.p.ptr().syscalltick++
// Leave SP around for GC and traceback.
- pc := getcallerpc(unsafe.Pointer(&dummy))
+ pc := getcallerpc()
sp := getcallersp(unsafe.Pointer(&dummy))
save(pc, sp)
_g_.syscallsp = _g_.sched.sp
@@ -2613,7 +2613,7 @@ func entersyscallblock(dummy int32) {
systemstack(entersyscallblock_handoff)
// Resave for traceback during blocked call.
- save(getcallerpc(unsafe.Pointer(&dummy)), getcallersp(unsafe.Pointer(&dummy)))
+ save(getcallerpc(), getcallersp(unsafe.Pointer(&dummy)))
_g_.m.locks--
}
@@ -2941,7 +2941,7 @@ func malg(stacksize int32) *g {
//go:nosplit
func newproc(siz int32, fn *funcval) {
argp := add(unsafe.Pointer(&fn), sys.PtrSize)
- pc := getcallerpc(unsafe.Pointer(&siz))
+ pc := getcallerpc()
systemstack(func() {
newproc1(fn, (*uint8)(argp), siz, 0, pc)
})