diff options
| author | Sean Liao <sean@liao.dev> | 2025-05-11 21:55:57 +0100 |
|---|---|---|
| committer | Sean Liao <sean@liao.dev> | 2025-05-13 10:01:48 -0700 |
| commit | 4aeb9ba0deac4eced472a8fc7869a14fb9340d04 (patch) | |
| tree | f007bc3415004df0212ad9690e95490b614245d5 /src/runtime/pprof/pprof.go | |
| parent | a632009c4a0b0826871baae7e7ce7804b4089d93 (diff) | |
| download | go-4aeb9ba0deac4eced472a8fc7869a14fb9340d04.tar.xz | |
runtime/pprof: return errors from writing profiles
Fixes #73107
Change-Id: I41f3e1bd1fdaca2f0e94151b2320bd569e258a51
Reviewed-on: https://go-review.googlesource.com/c/go/+/671576
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/runtime/pprof/pprof.go')
| -rw-r--r-- | src/runtime/pprof/pprof.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/runtime/pprof/pprof.go b/src/runtime/pprof/pprof.go index d295991ef7..55563009b3 100644 --- a/src/runtime/pprof/pprof.go +++ b/src/runtime/pprof/pprof.go @@ -446,8 +446,7 @@ func printCountCycleProfile(w io.Writer, countName, cycleName string, records [] locs = b.appendLocsForStack(locs[:0], expandedStack[:n]) b.pbSample(values, locs, nil) } - b.build() - return nil + return b.build() } // printCountProfile prints a countProfile at the specified debug level. @@ -517,8 +516,7 @@ func printCountProfile(w io.Writer, debug int, name string, p countProfile) erro } b.pbSample(values, locs, labels) } - b.build() - return nil + return b.build() } // keysByCount sorts keys with higher counts first, breaking ties by key string order. |
