aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime2.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2023-02-05 15:54:33 -0500
committerAustin Clements <austin@google.com>2023-03-10 17:18:27 +0000
commitf52bede354102a5e16e19381b93d4a469d1286d4 (patch)
treec34f5a0a819f760acceee8411612e758fa9fa041 /src/runtime/runtime2.go
parentdcb4c1c1aad098e6b0da4a64896ff2f98f3a2ad7 (diff)
downloadgo-f52bede354102a5e16e19381b93d4a469d1286d4.tar.xz
runtime: create an API for unwinding inlined frames
We've replicated the code to expand inlined frames in many places in the runtime at this point. This CL adds a simple iterator API that abstracts this out. We also use this to try out a new idea for structuring tests of runtime internals: rather than exporting this whole internal data type and API, we write the test in package runtime and import the few bits of std we need. The idea is that, for tests of internals, it's easier to inject public APIs from std than it is to export non-public APIs from runtime. This is discussed more in #55108. For #54466. Change-Id: Iebccc04ff59a1509694a8ac0e0d3984e49121339 Reviewed-on: https://go-review.googlesource.com/c/go/+/466096 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com> Run-TryBot: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/runtime2.go')
-rw-r--r--src/runtime/runtime2.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go
index 044a9a715f..bb246193cb 100644
--- a/src/runtime/runtime2.go
+++ b/src/runtime/runtime2.go
@@ -924,6 +924,8 @@ type _func struct {
// Pseudo-Func that is returned for PCs that occur in inlined code.
// A *Func can be either a *_func or a *funcinl, and they are distinguished
// by the first uintptr.
+//
+// TODO(austin): Can we merge this with inlinedCall?
type funcinl struct {
ones uint32 // set to ^0 to distinguish from _func
entry uintptr // entry of the real (the "outermost") frame