diff options
| author | Michael Pratt <mpratt@google.com> | 2022-09-30 17:08:43 -0400 |
|---|---|---|
| committer | Michael Pratt <mpratt@google.com> | 2022-10-14 14:48:40 +0000 |
| commit | a401468b0092446d537edc2000c23e8015ce6b58 (patch) | |
| tree | 38b59e415f489ac13d4ba25ff9c384dfcc9ae2a3 /src/runtime/pprof/runtime.go | |
| parent | f2656f20ea420ada5f15ef06ddf18d2797e18841 (diff) | |
| download | go-a401468b0092446d537edc2000c23e8015ce6b58.tar.xz | |
runtime/pprof: set Function.start_line field
Now that we plumb the start line to the runtime, we can include in pprof
files. Since runtime.Frame.startLine is not (currently) exported, we
need a runtime helper to get the value.
For #55022.
Updates #56135.
Change-Id: Ifc5b68a7b7170fd7895e4099deb24df7977b22ea
Reviewed-on: https://go-review.googlesource.com/c/go/+/438255
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/pprof/runtime.go')
| -rw-r--r-- | src/runtime/pprof/runtime.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/runtime/pprof/runtime.go b/src/runtime/pprof/runtime.go index dd2545b339..57e9ca480b 100644 --- a/src/runtime/pprof/runtime.go +++ b/src/runtime/pprof/runtime.go @@ -6,9 +6,13 @@ package pprof import ( "context" + "runtime" "unsafe" ) +// runtime_FrameStartLine is defined in runtime/symtab.go. +func runtime_FrameStartLine(f *runtime.Frame) int + // runtime_expandFinalInlineFrame is defined in runtime/symtab.go. func runtime_expandFinalInlineFrame(stk []uintptr) []uintptr |
