# Group profiling flame graph tiles

**URL:** <https://discourse.julialang.org/t/group-profiling-flame-graph-tiles/108384>\
**Category:** Performance\
**Tags:** profiling\
**Created:** [January 5, 2024, 11:59am UTC](https://discourse.julialang.org/t/group-profiling-flame-graph-tiles/108384 "2024-01-05T11:59:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Post date:** [January 5, 2024, 11:59am UTC](https://discourse.julialang.org/t/group-profiling-flame-graph-tiles/108384/1 "2024-01-05T11:59:41Z")

</div>

An integration + optimization code I’m working on generates flame graphs like this one, which are very hard to parse. Indeed, the same underlying function is called by several different lines of the code, so even if I spend lots of time in it, this time is spread across the many columns of tiles.  
Is there a way to get rid of the call stack hierarchy and instead group by function? Or do I have to use the text-based `Profile` interface instead?

 ![image](https://global.discourse-cdn.com/julialang/original/3X/b/1/b139122a5c930855a1635f919ab93392c90438b0.png)

---

<div class="post-metadata">

**Author:** ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Post date:** [January 5, 2024, 12:50pm UTC](https://discourse.julialang.org/t/group-profiling-flame-graph-tiles/108384/2 "2024-01-05T12:50:18Z")

</div>

I think the answer is to group sections of code with

> **[GitHub - KristofferC/TimerOutputs.jl: Formatted output of timed sections in...](https://github.com/KristofferC/TimerOutputs.jl)**
>
> Formatted output of timed sections in Julia. Contribute to KristofferC/TimerOutputs.jl development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![Zentrik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zentrik/32/35409_2.png) [@Zentrik](https://discourse.julialang.org/u/Zentrik)\
**Post date:** [January 5, 2024, 1:51pm UTC](https://discourse.julialang.org/t/group-profiling-flame-graph-tiles/108384/3 "2024-01-05T13:51:32Z")

</div>

I think this is just a limitation of FlameGraphs. Personally, to get around this I tend to use VSCode’s inbuilt profiler which annotates the source code itself with time spent thereby grouping by source line. Alternatively, I think StatProfileHTML or PProf can group by function.

---

<div class="post-metadata">

**Author:** ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Post date:** [January 5, 2024, 8:06pm UTC](https://discourse.julialang.org/t/group-profiling-flame-graph-tiles/108384/4 "2024-01-05T20:06:50Z")

</div>

What do you mean by the built-in profiler?

---

<div class="post-metadata">

**Author:** ![Zentrik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zentrik/32/35409_2.png) [@Zentrik](https://discourse.julialang.org/u/Zentrik)\
**Post date:** [January 5, 2024, 9:17pm UTC](https://discourse.julialang.org/t/group-profiling-flame-graph-tiles/108384/5 "2024-01-05T21:17:01Z")

</div>

Sorry, I meant this [Profiler · Julia in VS Code (julia-vscode.org)](https://www.julia-vscode.org/docs/stable/userguide/profiler/). The thing you get when you use `@profview` in the REPL.
