diff options
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/pprof/pprof.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/runtime/pprof/pprof.go b/src/runtime/pprof/pprof.go index b6253b1aa5..21ea25ce36 100644 --- a/src/runtime/pprof/pprof.go +++ b/src/runtime/pprof/pprof.go @@ -401,7 +401,11 @@ func printCountProfile(w io.Writer, debug int, name string, p countProfile) erro for _, addr := range p.Stack(index[k]) { // For count profiles, all stack addresses are // return PCs, which is what locForPC expects. - locs = append(locs, b.locForPC(addr)) + l := b.locForPC(addr) + if l == 0 { // runtime.goexit + continue + } + locs = append(locs, l) } b.pbSample(values, locs, nil) } |
