brendangregg / FlameGraph

Stack trace visualizer
http://www.brendangregg.com/flamegraphs.html
17.08k stars 1.95k forks source link

flamegraph.pl miscalculating width #343

Open dudeuter opened 3 weeks ago

dudeuter commented 3 weeks ago

I'm not entirely sure the preconditions; but I've been doing some work on visualizing heaps from a couple of formats.

https://github.com/user-attachments/assets/7082c152-4363-42f7-921b-b200657b5e02

I'm a little confused as to what's causing this because my other implementations are very similar; but the issue only occurs with this implementation. Perhaps it's due to having such a large amount of small allocations? Is this a known issue?

Originally I thought it might be due to missing frames between the root node and leafs.

ie:

foo;bar 1024

vs

foo 0
foo;bar 1024

But after making sure that I properly create a full tree of my heap (including frames without allocations) I still was able to reproduce.

dudeuter commented 2 weeks ago

I ran this against another heap dump that I took and wasn't able to reproduce the issue 🤔

Not sure why the first heap dump I took would cause this; while the other doesn't. If you can point me in correct place to look I can check if this is something wrong with my heap dump or if it's common to flamegraph.pl.

But otherwise maybe this can just be closed.