diff options
| author | Michael Pratt <mpratt@google.com> | 2024-09-16 15:58:36 -0400 |
|---|---|---|
| committer | Michael Pratt <mpratt@google.com> | 2024-09-17 17:01:20 +0000 |
| commit | 4f881115d4067bda8a236aabcae8c41cdd13b4d0 (patch) | |
| tree | 2249bfaec1950819e5e22184e61e60dcd076ae40 /src/runtime/mprof.go | |
| parent | 41ca2637d4df8b8edf63436c6caab56821d2af38 (diff) | |
| download | go-4f881115d4067bda8a236aabcae8c41cdd13b4d0.tar.xz | |
runtime: move getcallersp to internal/runtime/sys
Moving these intrinsics to a base package enables other internal/runtime
packages to use them.
For #54766.
Change-Id: I45a530422207dd94b5ad4eee51216c9410a84040
Reviewed-on: https://go-review.googlesource.com/c/go/+/613261
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/runtime/mprof.go')
| -rw-r--r-- | src/runtime/mprof.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime/mprof.go b/src/runtime/mprof.go index 6b6e896e9d..d84f8d26ea 100644 --- a/src/runtime/mprof.go +++ b/src/runtime/mprof.go @@ -810,7 +810,7 @@ func (prof *mLockProfile) captureStack() { var nstk int gp := getg() - sp := getcallersp() + sp := sys.GetCallerSP() pc := sys.GetCallerPC() systemstack(func() { var u unwinder @@ -1401,7 +1401,7 @@ func goroutineProfileWithLabelsConcurrent(p []profilerecord.StackRecord, labels } // Save current goroutine. - sp := getcallersp() + sp := sys.GetCallerSP() pc := sys.GetCallerPC() systemstack(func() { saveg(pc, sp, ourg, &p[0], pcbuf) @@ -1597,7 +1597,7 @@ func goroutineProfileWithLabelsSync(p []profilerecord.StackRecord, labels []unsa r, lbl := p, labels // Save current goroutine. - sp := getcallersp() + sp := sys.GetCallerSP() pc := sys.GetCallerPC() systemstack(func() { saveg(pc, sp, gp, &r[0], pcbuf) @@ -1699,7 +1699,7 @@ func Stack(buf []byte, all bool) int { n := 0 if len(buf) > 0 { gp := getg() - sp := getcallersp() + sp := sys.GetCallerSP() pc := sys.GetCallerPC() systemstack(func() { g0 := getg() |
