diff options
author | liu-xuewen <liiuxuewen@gmail.com> | 2020-07-13 09:15:38 +0000 |
---|---|---|
committer | Keith Randall <khr@golang.org> | 2020-08-17 21:05:19 +0000 |
commit | ba97be4b58241bebbc4ff70574bd82152ab19ffe (patch) | |
tree | d31e5c470ecd73f487acbf3f5ef5ff9694371e8b /src/runtime/traceback.go | |
parent | 17553c6e7154deab8501595f4fa387c0b718337a (diff) | |
download | go-ba97be4b58241bebbc4ff70574bd82152ab19ffe.tar.gz go-ba97be4b58241bebbc4ff70574bd82152ab19ffe.zip |
runtime: remove tracebackinit and unused skipPC
CL [152537](https://go-review.googlesource.com/c/go/+/152537/) changed the way inlined frames are represented in tracebacks to no longer use skipPC
Change-Id: I42386fdcc5cf72f3c122e789b6af9cbd0c6bed4b
GitHub-Last-Rev: 79c26dcd532907eda4ffc30951845c1c01243501
GitHub-Pull-Request: golang/go#39829
Reviewed-on: https://go-review.googlesource.com/c/go/+/239701
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/runtime/traceback.go')
-rw-r--r-- | src/runtime/traceback.go | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/runtime/traceback.go b/src/runtime/traceback.go index 96e552524ed..7850eceafa0 100644 --- a/src/runtime/traceback.go +++ b/src/runtime/traceback.go @@ -36,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) { @@ -83,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 |