# Is VSCode \`@profview\` broken on 1.11?

**URL:** <https://discourse.julialang.org/t/is-vscode-profview-broken-on-1-11/121630>\
**Category:** General Usage\
**Tags:** vscode, profiling\
**Created:** [October 23, 2024, 9:52am UTC](https://discourse.julialang.org/t/is-vscode-profview-broken-on-1-11/121630 "2024-10-23T09:52:47Z")\
**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:** [October 23, 2024, 9:52am UTC](https://discourse.julialang.org/t/is-vscode-profview-broken-on-1-11/121630/1 "2024-10-23T09:52:47Z")

</div>

When I run the profiling code from [this example](https://www.julia-vscode.org/docs/stable/userguide/profiler/) in VSCode with Julia 1.11, the flame graph is empty. With Julia 1.10 it displays the usual way.

```julia
function profile_test(n)
    for i = 1:n
        A = randn(100,100,20)
        m = maximum(A)
        Am = mapslices(sum, A; dims=2)
        B = A[:,:,5]
        Bsort = mapslices(sort, B; dims=1)
        b = rand(100)
        C = B.*b
    end
end

# compilation
@profview profile_test(1)
# pure runtime
@profview profile_test(10)

```

I’m not sure it is only a VSCode problem because I have observed similar behaviors with ProfileCanvas.jl and ProfileSVG.jl.

---

<div class="post-metadata">

**Author:** ![matthew3245](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@matthew3245](https://discourse.julialang.org/u/matthew3245)\
**Post date:** [October 25, 2024, 2:02am UTC](https://discourse.julialang.org/t/is-vscode-profview-broken-on-1-11/121630/2 "2024-10-25T02:02:30Z")

</div>

Yes I can also confirm its not working, with it always being empty on 1.11.

---

<div class="post-metadata">

**Author:** ![tiemvanderdeure](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tiemvanderdeure/32/211374_2.png) [@tiemvanderdeure](https://discourse.julialang.org/u/tiemvanderdeure)\
**Post date:** [October 25, 2024, 10:45am UTC](https://discourse.julialang.org/t/is-vscode-profview-broken-on-1-11/121630/3 "2024-10-25T10:45:52Z")

</div>

For me it works as normal on my Windows computer, but on Linux it seems to show something the very first time I call @profview, and is completely empty after that.

---

<div class="post-metadata">

**Author:** ![abulak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abulak/32/28314_2.png) [@abulak](https://discourse.julialang.org/u/abulak)\
**Post date:** [October 25, 2024, 3:07pm UTC](https://discourse.julialang.org/t/is-vscode-profview-broken-on-1-11/121630/4 "2024-10-25T15:07:13Z")

</div>

what is worse is that for me even the profile information is empty (it’s not the issue with a particular visualization tool:

```julia
julia> @profile peakflops()
2.5633960272396997e11

julia> Profile.print()
Overhead ╎ [+additional indent] Count File:Line; Function
=========================================================
    ╎6708 @Base/task.jl:694; task_done_hook(t::Task)
    ╎ 6708 @Base/task.jl:1021; wait()
6707╎ 6708 @Base/task.jl:1012; poptask(W::Base.IntrusiveLinkedListSynchronized{Task})
Total snapshots: 6708. Utilization: 0% across all threads and tasks. Use the `groupby` kwarg to break down by thread and/or task.

julia> versioninfo()
Julia Version 1.11.1
Commit 8f5b7ca12ad (2024-10-16 10:53 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × AMD Ryzen 7 7840U w/ Radeon 780M Graphics
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, znver4)
Threads: 8 default, 0 interactive, 4 GC (on 16 virtual cores)
Environment:
  JULIA_NUM_THREADS = 8

```

whereas

```julia
julia> @profile peakflops()
2.4386398606176114e11

julia> Profile.print()
Overhead ╎ [+additional indent] Count File:Line; Function
=========================================================
     ╎1937 @Base/Base.jl:608; (::Base.var"#1055#1056")()
     ╎ 1937 @Base/Base.jl:572; profile_printing_listener()
     ╎ 1937 @Base/asyncevent.jl:159; wait
     ╎ 1937 @Base/asyncevent.jl:142; _trywait(t::Base.AsyncCondition)

...... (lots of lines here)

   ╎ ╎ ╎ ╎ 1233 …a/src/matmul.jl:113; *(A::Matrix{Float64}, B::Matrix…
     ╎ ╎ ╎ ╎ 18 @Base/array.jl:420; similar
     ╎ ╎ ╎ ╎ ╎ 18 @Base/boot.jl:487; Array
   18╎ ╎ ╎ ╎ ╎ 18 @Base/boot.jl:479; Array
     ╎ ╎ ╎ ╎ 1215 …a/src/matmul.jl:237; mul!
     ╎ ╎ ╎ ╎ ╎ 1215 …/src/matmul.jl:263; mul!
     ╎ ╎ ╎ ╎ ╎ 1215 …/src/matmul.jl:352; generic_matmatmul!
     ╎ ╎ ╎ ╎ ╎ 1215 …src/matmul.jl:605; gemm_wrapper!(C::Matrix{Float…
 1215╎ ╎ ╎ ╎ ╎ 1215 …a/src/blas.jl:1524; gemm!(transA::Char, transB:…
    3╎ ╎ ╎ ╎ 3 …LinearAlgebra.jl:616; peakflops(n::Int64; eltype::Data…
     ╎11622 @Base/task.jl:682; task_done_hook(t::Task)
     ╎ 11622 @Base/task.jl:1008; wait()
11622╎ 11622 @Base/task.jl:999; poptask(W::Base.IntrusiveLinkedListSynchronized{Tas…
Total snapshots: 21307. Utilization: 36% across all threads and tasks. Use the `groupby` kwarg to break down by thread and/or task.

julia> versioninfo()
Julia Version 1.10.5
Commit 6f3fdf7b362 (2024-08-27 14:19 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × AMD Ryzen 7 7840U w/ Radeon 780M Graphics
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, znver3)
Threads: 8 default, 0 interactive, 4 GC (on 16 virtual cores)
Environment:
  JULIA_NUM_THREADS = 8

```

> <https://github.com/JuliaLang/julia/issues/56327>
>
> \`\`\`julia
> julia\> @profile peakflops();
> 
> julia\> Profile.print()
> Overhead ╎ \[+addit…ional indent\] Count File:Line; Function
> =========================================================
> ╎6708 @Base/task.jl:694; task\_done\_hook(t::Task)
> ╎ 6708 @Base/task.jl:1021; wait()
> 6707╎ 6708 @Base/task.jl:1012; poptask(W::Base.IntrusiveLinkedListSynchronized{Task})
> Total snapshots: 6708. Utilization: 0% across all threads and tasks. Use the \`groupby\` kwarg to break down by thread and/or task.
> 
> julia\> versioninfo()
> Julia Version 1.11.1
> Commit 8f5b7ca12ad (2024-10-16 10:53 UTC)
> Build Info:
> Official https://julialang.org/ release
> Platform Info:
> OS: Linux (x86\_64-linux-gnu)
> CPU: 16 × AMD Ryzen 7 7840U w/ Radeon 780M Graphics
> WORD\_SIZE: 64
> LLVM: libLLVM-16.0.6 (ORCJIT, znver4)
> Threads: 8 default, 0 interactive, 4 GC (on 16 virtual cores)
> Environment:
> JULIA\_NUM\_THREADS = 8
> \`\`\`
> 
> whereas on julia-1.10.5:
> \`\`\`julia
> julia\> @profile peakflops();
> 
> julia\> Profile.print()
> Overhead ╎ \[+additional indent\] Count File:Line; Function
> =========================================================
> ╎1937 @Base/Base.jl:608; (::Base.var"#1055#1056")()
> ╎ 1937 @Base/Base.jl:572; profile\_printing\_listener()
> ╎ 1937 @Base/asyncevent.jl:159; wait
> ╎ 1937 @Base/asyncevent.jl:142; \_trywait(t::Base.AsyncCondition)
> 
> ...... (lots of lines here)
> 
> ╎ ╎ ╎ ╎ 1233 …a/src/matmul.jl:113; \*(A::Matrix{Float64}, B::Matrix…
> ╎ ╎ ╎ ╎ 18 @Base/array.jl:420; similar
> ╎ ╎ ╎ ╎ ╎ 18 @Base/boot.jl:487; Array
> 18╎ ╎ ╎ ╎ ╎ 18 @Base/boot.jl:479; Array
> ╎ ╎ ╎ ╎ 1215 …a/src/matmul.jl:237; mul!
> ╎ ╎ ╎ ╎ ╎ 1215 …/src/matmul.jl:263; mul!
> ╎ ╎ ╎ ╎ ╎ 1215 …/src/matmul.jl:352; generic\_matmatmul!
> ╎ ╎ ╎ ╎ ╎ 1215 …src/matmul.jl:605; gemm\_wrapper!(C::Matrix{Float…
> 1215╎ ╎ ╎ ╎ ╎ 1215 …a/src/blas.jl:1524; gemm!(transA::Char, transB:…
> 3╎ ╎ ╎ ╎ 3 …LinearAlgebra.jl:616; peakflops(n::Int64; eltype::Data…
> ╎11622 @Base/task.jl:682; task\_done\_hook(t::Task)
> ╎ 11622 @Base/task.jl:1008; wait()
> 11622╎ 11622 @Base/task.jl:999; poptask(W::Base.IntrusiveLinkedListSynchronized{Tas…
> Total snapshots: 21307. Utilization: 36% across all threads and tasks. Use the \`groupby\` kwarg to break down by thread and/or task.
> 
> julia\> versioninfo()
> Julia Version 1.10.5
> Commit 6f3fdf7b362 (2024-08-27 14:19 UTC)
> Build Info:
> Official https://julialang.org/ release
> Platform Info:
> OS: Linux (x86\_64-linux-gnu)
> CPU: 16 × AMD Ryzen 7 7840U w/ Radeon 780M Graphics
> WORD\_SIZE: 64
> LIBM: libopenlibm
> LLVM: libLLVM-15.0.7 (ORCJIT, znver3)
> Threads: 8 default, 0 interactive, 4 GC (on 16 virtual cores)
> Environment:
> JULIA\_NUM\_THREADS = 8
> \`\`\`

---

<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:** [October 26, 2024, 8:45am UTC](https://discourse.julialang.org/t/is-vscode-profview-broken-on-1-11/121630/5 "2024-10-26T08:45:42Z")

</div>

Judging by the discussion on GitHub, this only seems to happen when Julia is launched with multiple threads
