felixge / felixge/pprofutils

Incorrect values produced compared to pprof command

Open
#14 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
149
Forks
18
PR merge metrics
No merged PRs in 30d

Description

We're seeing this for Go memory profiles, but not for jemalloc heap profiles converted into pprof format.

Here's an example:

```
$ pprof heap.pprof
File: rrdns-external-auth
Build ID: b4d05855f9b8b7cb25be5eb6fb8eb56b21bf5a22
Type: inuse_space
Time: May 15, 2025 at 11:15pm (UTC)
Entering interactive mode (type "help" for commands, "o" for options)
(pprof) top1
Showing nodes accounting for 755.15MB, 21.54% of 3506.41MB total
Dropped 318 nodes (cum <= 17.53MB)
Showing top 1 nodes out of 157
flat flat% sum% cum cum%
755.15MB 21.54% 21.54% 755.15MB 21.54% io.ReadAll
```

Compare to what `pprofutils` produces for just one stack leading to `ReadAll`:

```
$ pprofutils folded -headers heap.pprof - | grep io.ReadAll | head -n1
go.cfdata.org/dns/rrdns/rrdns/util.Reloader.func1;...;io.ReadAll 2937092155 1503791184027 0 0
```

All of the numbers in the output are already too bigto fit into 3506.41MB of total allocation.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.