I'm trying to figure out how pprof calculates the %cum of each node in my Go application output. I've attached part of my pprof png output to emphesise the problem which I'm trying to figure out pprof png output In this part of the pprof output there are two nodes:
Node A) runtime scanobject -
flat=1.06s %flat=5.54%
cum=1.64s %cum=8.57%
Node B) runtime findobject (which is being called by scanobject)-
flat=0.46s %flat=2.4%
cum=0.54s %cum=2.82%
No metter how cumulative A is being calculated, the numbers does not sum up to func A cumulative (1.64s):
A flat + B flat = 1.06s + 0.46s = 1.52s
A flat + B cum = 1.06s + 0.54s = 1.6s
One thing that might explain this difference, is that pprof dropps cumulatives which are less than 0.10s, so it might be that there are minor functions which are related to node A that are missing from the pprof output. If that is the root cause, I was wondering if there is a way to tell pprof to make full pprof output
Thanks
you can use --trim=false
to show all nodes in the report
https://github.com/google/pprof/blob/master/internal/driver/commands.go#L165