# Trying to understand ProfileView output

**URL:** <https://discourse.julialang.org/t/trying-to-understand-profileview-output/63561>\
**Category:** General Usage\
**Tags:** profiling\
**Created:** [June 25, 2021, 4:11pm UTC](https://discourse.julialang.org/t/trying-to-understand-profileview-output/63561 "2021-06-25T16:11:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arrigo\_Benedetti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/arrigo_benedetti/32/25545_2.png) [@Arrigo\_Benedetti](https://discourse.julialang.org/u/Arrigo_Benedetti)\
**Post date:** [June 25, 2021, 4:11pm UTC](https://discourse.julialang.org/t/trying-to-understand-profileview-output/63561/1 "2021-06-25T16:11:09Z")

</div>

I am trying to figure what’s going on with some code that i am profiling. As you can see there from the graph below, there is a very large area at the left showing code that is clearly part of the Julia system (type\_infer.jl is right above boot.jl). Does it have to do with some type instability? By the way, I am running the profiler inside an IPython notebook. I am also passing an array that my code will modify in place:

```julia
using ProfileView

PDF12 = zeros(256, 256)
@profview PDF = NPWindows.jointPDF!(PDF12, mat1, mat2, 1.0, 1.0, 256, 256, 0.1)

```

I am also wondering why there is a long time in the middle of the graph where the CPU seems to be idling in the same line of code, in other words it seems no other function is called. This would be consistent with a loop where no operation is performed, and there is nothing like that in my code.

 ![Picture1](https://global.discourse-cdn.com/julialang/original/3X/d/7/d7cf192ac8c1f213d4fefbda0bbc4f3b18cfd616.png)

---

<div class="post-metadata">

**Author:** ![Skoffer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/skoffer/32/378_2.png) [@Skoffer](https://discourse.julialang.org/u/Skoffer)\
**Post date:** [June 25, 2021, 4:19pm UTC](https://discourse.julialang.org/t/trying-to-understand-profileview-output/63561/2 "2021-06-25T16:19:57Z")

</div>

Have you tried to run function before executing `@profile`? It looks like together with the function execution, you also show function compilation stacktrace, which is probably not what you want.

---

<div class="post-metadata">

**Author:** ![Arrigo\_Benedetti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/arrigo_benedetti/32/25545_2.png) [@Arrigo\_Benedetti](https://discourse.julialang.org/u/Arrigo_Benedetti)\
**Post date:** [June 25, 2021, 4:37pm UTC](https://discourse.julialang.org/t/trying-to-understand-profileview-output/63561/3 "2021-06-25T16:37:32Z")

</div>

Yes, that fixed it! Thanks @Skoffer

 ![image](https://global.discourse-cdn.com/julialang/original/3X/3/9/39e7838f9389cb9a38ab64cb8b9ce7a35ecc3d86.png)
