Alternatives to flame graphs for profiler

Hello there,

I am wondering if there is an alternative way to show profiler results (at best in VS Code) than a simple flame graph. What I’m basically looking for is a way to see cumulated time spend in a function/line of code that might have been called multiple times from different functions. So e.g. I have a function foo which is called from function_1, function_2 and function_3 - the flame graph will show me how much time was spent for function 1-3, but it’s hard to see when foo was indeed the bottleneck as it’s split up between the three functions.

I tried to illustrate my problem in my real world profiling results

So I’m wondering if there is a function in these many small bars that occurs many times and where it’s worth to improve performance or which might give me a hint to e.g. if it’s worth using StaticArrays. The overall model is many thousand lines of code.

1 Like

You can use PProf’s directed graph view,
by using PProf.jl

6 Likes

This may address your problem:

1 Like

To me it sounds like it should be solved by the builtin @profview in vscode which has both the flame graph and an inline view.
https://www.julia-vscode.org/docs/stable/userguide/profiler/
The inline view can show how many samples were collected for any single row of code IIUC.

1 Like

Thanks already for the replies! PProfs top-view is what I was searching for. I would really like to see a view like that implemented in the vscode profiler as well.