# What is wrong with my profiling?

**URL:** <https://discourse.julialang.org/t/what-is-wrong-with-my-profiling/34898>\
**Category:** Performance\
**Created:** [February 20, 2020, 12:40pm UTC](https://discourse.julialang.org/t/what-is-wrong-with-my-profiling/34898 "2020-02-20T12:40:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![HenriDeh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrideh/32/8316_2.png) [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Post date:** [February 20, 2020, 12:40pm UTC](https://discourse.julialang.org/t/what-is-wrong-with-my-profiling/34898/1 "2020-02-20T12:40:41Z")

</div>

I am profiling my Deep Learning algorithm and I am getting this weird shape. That long line on the left does not make sense, is it precompiling or something ? The name of the top bar is `task.jl,poptaskref: line 660`. Maybe this is related to the fact that I am using CuArrays for my computing. But I don’t get why it is not on top of `eval`.

 ![Screenshot from 2020-02-20 13-35-01](https://global.discourse-cdn.com/julialang/original/3X/2/2/2267faa22a4baafa00c1b3094288c5e3b2ef902e.png)

By the way I wanted to ask. If on the flame graph on the right I am seeing a lot of `typeinfer.jl` and `abstractinterpretation.jl` bars, does it mean I have a problem with type stability ?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [February 20, 2020, 1:53pm UTC](https://discourse.julialang.org/t/what-is-wrong-with-my-profiling/34898/2 "2020-02-20T13:53:53Z")

</div>

1. did you make a small run to make sure everything is compiled? otherwise it will profile the compiler, which may not be the objective.

2. you may be running into

> [@Profiling code reveals that most time is used calling 3 functions in task.jl](https://discourse.julialang.org/t/profiling-code-reveals-that-most-time-is-used-calling-3-functions-in-task-jl/30751):
>
> I profiled my call to a function and got the following plot: Those first 3 long horizontal lines are calls to task\_done\_hook, then wait, then poptaskref (in ascending order). This happens even for the 2nd or 3rd call to my function, and I don’t understand what they could be. I stopped specifying a lot of the types used / returned in my functions after a while since I was losing time doing so properly - could this be the cause? How could I find out?

---

<div class="post-metadata">

**Author:** ![HenriDeh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrideh/32/8316_2.png) [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Post date:** [February 20, 2020, 2:33pm UTC](https://discourse.julialang.org/t/what-is-wrong-with-my-profiling/34898/3 "2020-02-20T14:33:49Z")

</div>

1. Yes it was indeed the compiling.
2. I am running this on Juno so this may be the reason I get that weird bar. Next time I’ll try from the linux shell

Thank you

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [February 20, 2020, 2:41pm UTC](https://discourse.julialang.org/t/what-is-wrong-with-my-profiling/34898/4 "2020-02-20T14:41:23Z")

</div>

You could also give Juno’s build in profile viewer (`Juno.@profiler foo(...)`) a go, which should filter out extraneous frames when you’re running with only one thread.

---

<div class="post-metadata">

**Author:** ![HenriDeh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrideh/32/8316_2.png) [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Post date:** [February 20, 2020, 3:26pm UTC](https://discourse.julialang.org/t/what-is-wrong-with-my-profiling/34898/5 "2020-02-20T15:26:36Z")

</div>

Ha yes it works well with the juno profiler
