aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/traceback.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/traceback.go')
-rw-r--r--src/runtime/traceback.go16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/runtime/traceback.go b/src/runtime/traceback.go
index 944c8473d2..7850eceafa 100644
--- a/src/runtime/traceback.go
+++ b/src/runtime/traceback.go
@@ -5,6 +5,7 @@
package runtime
import (
+ "internal/bytealg"
"runtime/internal/atomic"
"runtime/internal/sys"
"unsafe"
@@ -35,16 +36,6 @@ import (
const usesLR = sys.MinFrameSize > 0
-var skipPC uintptr
-
-func tracebackinit() {
- // Go variable initialization happens late during runtime startup.
- // Instead of initializing the variables above in the declarations,
- // schedinit calls this function so that the variables are
- // initialized and available earlier in the startup sequence.
- skipPC = funcPC(skipPleaseUseCallersFrames)
-}
-
// Traceback over the deferred function calls.
// Report them like calls that have been invoked but not started executing yet.
func tracebackdefers(gp *g, callback func(*stkframe, unsafe.Pointer) bool, v unsafe.Pointer) {
@@ -82,9 +73,6 @@ func tracebackdefers(gp *g, callback func(*stkframe, unsafe.Pointer) bool, v uns
const sizeofSkipFunction = 256
-// This function is defined in asm.s to be sizeofSkipFunction bytes long.
-func skipPleaseUseCallersFrames()
-
// Generic traceback. Handles runtime stack prints (pcbuf == nil),
// the runtime.Callers function (pcbuf != nil), as well as the garbage
// collector (callback != nil). A little clunky to merge these, but avoids
@@ -848,7 +836,7 @@ func showfuncinfo(f funcInfo, firstFrame bool, funcID, childID funcID) bool {
return true
}
- return contains(name, ".") && (!hasPrefix(name, "runtime.") || isExportedRuntime(name))
+ return bytealg.IndexByteString(name, '.') >= 0 && (!hasPrefix(name, "runtime.") || isExportedRuntime(name))
}
// isExportedRuntime reports whether name is an exported runtime function.