aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/proc.go
diff options
context:
space:
mode:
authorAndy Pan <panjf2000@gmail.com>2024-02-01 10:21:14 +0800
committerGopher Robot <gobot@golang.org>2024-03-25 19:53:03 +0000
commit4c2b1e0feb3d3112da94fa4cd11ebe995003fa89 (patch)
treeb3d9dfee9dc61d066c0abfdf875e1995ef5e042f /src/runtime/proc.go
parentb1182f22c0e557840239dfa80259d6b8c67fb559 (diff)
downloadgo-4c2b1e0feb3d3112da94fa4cd11ebe995003fa89.tar.xz
runtime: migrate internal/atomic to internal/runtime
For #65355 Change-Id: I65dd090fb99de9b231af2112c5ccb0eb635db2be Reviewed-on: https://go-review.googlesource.com/c/go/+/560155 Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ibrahim Bazoka <ibrahimbazoka729@gmail.com> Auto-Submit: Emmanuel Odeke <emmanuel@orijtech.com>
Diffstat (limited to 'src/runtime/proc.go')
-rw-r--r--src/runtime/proc.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go
index 7f70100538..3b7d4f4d5d 100644
--- a/src/runtime/proc.go
+++ b/src/runtime/proc.go
@@ -10,7 +10,7 @@ import (
"internal/goarch"
"internal/goexperiment"
"internal/goos"
- "runtime/internal/atomic"
+ "internal/runtime/atomic"
"runtime/internal/sys"
"unsafe"
)
@@ -5269,22 +5269,22 @@ func sigprof(pc, sp, lr uintptr, gp *g, mp *m) {
}
// On mips{,le}/arm, 64bit atomics are emulated with spinlocks, in
- // runtime/internal/atomic. If SIGPROF arrives while the program is inside
+ // internal/runtime/atomic. If SIGPROF arrives while the program is inside
// the critical section, it creates a deadlock (when writing the sample).
// As a workaround, create a counter of SIGPROFs while in critical section
// to store the count, and pass it to sigprof.add() later when SIGPROF is
// received from somewhere else (with _LostSIGPROFDuringAtomic64 as pc).
if GOARCH == "mips" || GOARCH == "mipsle" || GOARCH == "arm" {
if f := findfunc(pc); f.valid() {
- if hasPrefix(funcname(f), "runtime/internal/atomic") {
+ if hasPrefix(funcname(f), "internal/runtime/atomic") {
cpuprof.lostAtomic++
return
}
}
if GOARCH == "arm" && goarm < 7 && GOOS == "linux" && pc&0xffff0000 == 0xffff0000 {
- // runtime/internal/atomic functions call into kernel
+ // internal/runtime/atomic functions call into kernel
// helpers on arm < 7. See
- // runtime/internal/atomic/sys_linux_arm.s.
+ // internal/runtime/atomic/sys_linux_arm.s.
cpuprof.lostAtomic++
return
}