flamegraph x-axis #289
Replies: 1 comment 2 replies
-
The left to right order is not the order in which they're called. It's somewhat arbitrary. For one thing, multiple calls to the same stack are merged into a single stack in the flamegraph. So you might have callstacks C1, C2, C1, C2 allocating in your code. The resulting flamegraph will have C1, C2, or maybe C2, C1, but in either case you're not getting a view of execution order. And you can imagine for some applications it's "here's (literally) a million little tiny interleaved allocations", not just four large ones. So given the nature of the visualization, you just can't get meaningful ordering out of a flamegraph. Perhaps... a table of N largest allocations, with timestamps? Won't help with lots-of-small-allocations cases, but would help anything that does large allocations. Separately, I'm working on a commercial performance+memory profiler for production data science/scientific computing batch jobs, and that has the benefit of (potentially) allowing even more informative visualizations because:
|
Beta Was this translation helpful? Give feedback.
-
My apologies for what is probably an obvious thing.
I suppose technically the x-axis is memory usage, but can you also confirm that it represents, from left-to-right, the order in which functions in the process are called?
Incidentally, if that's the case, it would be super useful for me to see a beginning and end time for each horizontal function call. Perhaps on hover in the HTML page? Obviously they are non-linear with respect to memory usage, but having those timestamps would help a lot.
Beta Was this translation helpful? Give feedback.
All reactions