Skip to content

Conversation

@d-netto
Copy link

@d-netto d-netto commented Sep 24, 2024

PR Description

Extends @nickrobinson251's #177.

Needs further testing to check whether the output produced on Linux/MacOS makes sense.

There are a few code changes which are vestigial from the time I was thinking about adding a ptls for the signal listener thread -- but figured this was not needed after discussing with @kpamnany.

MWE

using Base.Threads

function main()
    s = Threads.Atomic{Float64}(0)
    Threads.@sync begin
        Threads.@spawn begin
            for _ in 1:1_000
                Threads.atomic_add!(s, maximum(randn(1_000_000)))
            end
        end
    end
    return s
end

using Profile
@profile_all main()
Profile.print()

Example Output on Linux (--threads=8)

Overhead ╎ [+additional indent] Count File:Line; Function
=========================================================
   ╎173  @Base/Base.jl:609; (::Base.var"#1056#1057")()
   ╎ 173  @Base/Base.jl:572; profile_printing_listener()
   ╎  173  @Base/asyncevent.jl:159; wait
   ╎   173  @Base/asyncevent.jl:142; _trywait(t::Base.AsyncCondition)
   ╎    173  @Base/condition.jl:125; wait
   ╎     173  @Base/condition.jl:130; wait(c::Base.GenericCondition{SpinLock}; …
   ╎    ╎ 173  @Base/task.jl:994; wait()
173╎    ╎  173  @Base/task.jl:985; poptask(W::Base.IntrusiveLinkedListSynchroni…
   ╎422  @Base/client.jl:552; _start()
   ╎ 422  @Base/client.jl:318; exec_options(opts::Base.JLOptions)
   ╎  422  @Base/Base.jl:495; include(mod::Module, _path::String)
   ╎   422  @Base/loading.jl:2144; _include(mapexpr::Function, mod::Module, _pa…
   ╎    422  @Base/loading.jl:2084; include_string(mapexpr::typeof(identity), m…
  2╎     422  @Base/boot.jl:385; eval
   ╎    ╎ 420  …ia-RAI/quick_test.jl:5; main()
   ╎    ╎  420  @Base/task.jl:480; macro expansion
   ╎    ╎   420  @Base/task.jl:407; sync_end(c::Channel{Any})
   ╎    ╎    420  @Base/task.jl:310; _wait(t::Task)
   ╎    ╎     420  @Base/condition.jl:125; wait
   ╎    ╎    ╎ 420  @Base/condition.jl:130; wait(c::Base.GenericCondition{SpinL…
   ╎    ╎    ╎  420  @Base/task.jl:995; wait()
420╎    ╎    ╎   420  @Base/task.jl:921; try_yieldto(undo::typeof(Base.ensure_r…
   ╎3    …compiler/typeinfer.jl:1078; typeinf_ext_toplevel(mi::Core.MethodInsta…
   ╎ 3    …compiler/typeinfer.jl:1082; typeinf_ext_toplevel(interp::Core.Compil…
   ╎  3    …compiler/typeinfer.jl:1051; typeinf_ext(interp::Core.Compiler.Nativ…
   ╎   3    …compiler/typeinfer.jl:216; typeinf(interp::Core.Compiler.NativeInt…
   ╎    3    …ompiler/typeinfer.jl:247; _typeinf(interp::Core.Compiler.NativeIn…
   ╎     3    …ctinterpretation.jl:3186; typeinf_nocycle(interp::Core.Compiler.…
   ╎    ╎ 3    …ctinterpretation.jl:3098; typeinf_local(interp::Core.Compiler.N…
   ╎    ╎  3    …ctinterpretation.jl:2913; abstract_eval_basic_statement(interp…
   ╎    ╎   3    …tinterpretation.jl:2624; abstract_eval_statement(interp::Core…
   ╎    ╎    3    …tinterpretation.jl:2380; abstract_eval_statement_expr(interp…
   ╎    ╎     3    …interpretation.jl:2370; abstract_eval_call(interp::Core.Com…
   ╎    ╎    ╎ 3    …interpretation.jl:2354; abstract_call(interp::Core.Compile…
   ╎    ╎    ╎  3    …interpretation.jl:2162; abstract_call(interp::Core.Compil…
   ╎    ╎    ╎   3    …nterpretation.jl:2169; abstract_call(interp::Core.Compil…
   ╎    ╎    ╎    3    …nterpretation.jl:2087; abstract_call_known(interp::Core…
   ╎    ╎    ╎     3    …nterpretation.jl:95; abstract_call_gf_by_type(interp::…
   ╎    ╎    ╎    ╎ 3    …terpretation.jl:629; abstract_call_method(interp::Cor…
   ╎    ╎    ╎    ╎  3    …er/typeinfer.jl:930; typeinf_edge(interp::Core.Compi…
   ╎    ╎    ╎    ╎   3    …er/typeinfer.jl:216; typeinf(interp::Core.Compiler.…
   ╎    ╎    ╎    ╎    3    …r/typeinfer.jl:247; _typeinf(interp::Core.Compiler…
   ╎    ╎    ╎    ╎     3    …rpretation.jl:3186; typeinf_nocycle(interp::Core.…
   ╎    ╎    ╎    ╎    ╎ 3    …rpretation.jl:3098; typeinf_local(interp::Core.C…
   ╎    ╎    ╎    ╎    ╎  3    …rpretation.jl:2913; abstract_eval_basic_stateme…
   ╎    ╎    ╎    ╎    ╎   3    …pretation.jl:2624; abstract_eval_statement(int…
   ╎    ╎    ╎    ╎    ╎    3    …pretation.jl:2380; abstract_eval_statement_ex…
   ╎    ╎    ╎    ╎    ╎     3    …retation.jl:2370; abstract_eval_call(interp:…
   ╎    ╎    ╎    ╎    ╎    ╎ 3    …retation.jl:2354; abstract_call(interp::Cor…
   ╎    ╎    ╎    ╎    ╎    ╎  3    …retation.jl:2162; abstract_call(interp::Co…
   ╎    ╎    ╎    ╎    ╎    ╎   3    …retation.jl:2169; abstract_call(interp::C…
   ╎    ╎    ╎    ╎    ╎    ╎    3    …retation.jl:2004; abstract_call_known(in…
   ╎    ╎    ╎    ╎    ╎    ╎     3    …retation.jl:1612; abstract_apply(interp…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎ 3    …retation.jl:2169; abstract_call(interp…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎  3    …retation.jl:2087; abstract_call_known…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎   3    …retation.jl:95; abstract_call_gf_by_…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    3    …retation.jl:629; abstract_call_meth…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     3    …ypeinfer.jl:930; typeinf_edge(inte…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ 3    …ypeinfer.jl:216; typeinf(interp::…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  3    …ypeinfer.jl:247; _typeinf(interp…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎   3    …retation.jl:3186; typeinf_nocyc…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎    3    …retation.jl:3098; typeinf_loca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎     3    …retation.jl:2913; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +1 3    …retation.jl:2624; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +2 3    …retation.jl:2380; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +3 3    …retation.jl:2370; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +4 3    …retation.jl:2354; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +5 3    …retation.jl:2162; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +6 3    …retation.jl:2169; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +7 3    …retation.jl:2087; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +8 3    …retation.jl:95; abstract_call…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +9 3    …retation.jl:629; abstract_cal…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +10 3    …ypeinfer.jl:930; typeinf_edge…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +11 3    …ypeinfer.jl:216; typeinf(inte…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +12 3    …ypeinfer.jl:247; _typeinf(int…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +13 3    …retation.jl:3186; typeinf_noc…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +14 3    …retation.jl:3098; typeinf_loc…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +15 3    …retation.jl:2913; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +16 3    …retation.jl:2624; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +17 3    …retation.jl:2380; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +18 3    …retation.jl:2370; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +19 3    …retation.jl:2354; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +20 3    …retation.jl:2162; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +21 3    …retation.jl:2169; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +22 3    …retation.jl:2087; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +23 3    …retation.jl:95; abstract_call…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +24 3    …retation.jl:629; abstract_cal…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +25 3    …ypeinfer.jl:930; typeinf_edge…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +26 3    …ypeinfer.jl:216; typeinf(inte…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +27 3    …ypeinfer.jl:247; _typeinf(int…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +28 3    …retation.jl:3186; typeinf_noc…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +29 3    …retation.jl:3098; typeinf_loc…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +30 3    …retation.jl:2913; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +31 3    …retation.jl:2624; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +32 3    …retation.jl:2380; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +33 3    …retation.jl:2370; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +34 3    …retation.jl:2354; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +35 3    …retation.jl:2162; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +36 3    …retation.jl:2169; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +37 3    …retation.jl:2087; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +38 3    …retation.jl:95; abstract_call…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +39 3    …retation.jl:629; abstract_cal…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +40 3    …ypeinfer.jl:930; typeinf_edge…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +41 3    …ypeinfer.jl:216; typeinf(inte…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +42 3    …ypeinfer.jl:247; _typeinf(int…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +43 3    …retation.jl:3186; typeinf_noc…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +44 3    …retation.jl:3098; typeinf_loc…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +45 3    …retation.jl:2913; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +46 3    …retation.jl:2624; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +47 3    …retation.jl:2380; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +48 3    …retation.jl:2370; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +49 3    …retation.jl:2354; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +50 3    …retation.jl:2162; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +51 3    …retation.jl:2169; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +52 3    …retation.jl:2087; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +53 3    …retation.jl:95; abstract_call…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +54 3    …retation.jl:629; abstract_cal…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +55 3    …ypeinfer.jl:930; typeinf_edge…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +56 3    …ypeinfer.jl:216; typeinf(inte…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +57 3    …ypeinfer.jl:247; _typeinf(int…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +58 3    …retation.jl:3186; typeinf_noc…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +59 3    …retation.jl:3098; typeinf_loc…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +60 3    …retation.jl:2913; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +61 3    …retation.jl:2624; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +62 3    …retation.jl:2380; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +63 3    …retation.jl:2370; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +64 3    …retation.jl:2354; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +65 3    …retation.jl:2162; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +66 3    …retation.jl:2169; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +67 3    …retation.jl:2087; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +68 3    …retation.jl:95; abstract_call…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +69 3    …retation.jl:629; abstract_cal…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +70 3    …ypeinfer.jl:930; typeinf_edge…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +71 3    …ypeinfer.jl:216; typeinf(inte…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +72 3    …ypeinfer.jl:247; _typeinf(int…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +73 3    …retation.jl:3186; typeinf_noc…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +74 3    …retation.jl:3098; typeinf_loc…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +75 3    …retation.jl:2913; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +76 3    …retation.jl:2624; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +77 3    …retation.jl:2380; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +78 3    …retation.jl:2370; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +79 3    …retation.jl:2354; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +80 3    …retation.jl:2162; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +81 3    …retation.jl:2169; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +82 3    …retation.jl:2087; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +83 3    …retation.jl:95; abstract_call…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +84 3    …retation.jl:629; abstract_cal…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +85 3    …ypeinfer.jl:930; typeinf_edge…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +86 3    …ypeinfer.jl:216; typeinf(inte…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +87 3    …ypeinfer.jl:247; _typeinf(int…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +88 3    …retation.jl:3186; typeinf_noc…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +89 3    …retation.jl:3098; typeinf_loc…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +90 3    …retation.jl:2889; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +91 3    …retation.jl:2624; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +92 3    …retation.jl:2380; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +93 3    …retation.jl:2370; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +94 3    …retation.jl:2354; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +95 3    …retation.jl:2162; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +96 3    …retation.jl:2169; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +97 3    …retation.jl:2087; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +98 3    …retation.jl:95; abstract_call…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +99 3    …retation.jl:629; abstract_cal…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +100 3    …ypeinfer.jl:930; typeinf_edge…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +101 3    …ypeinfer.jl:216; typeinf(inte…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +102 2    …ypeinfer.jl:247; _typeinf(int…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +103 2    …retation.jl:3186; typeinf_noc…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +104 2    …retation.jl:3098; typeinf_loc…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +105 2    …retation.jl:2913; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +106 2    …retation.jl:2624; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +107 2    …retation.jl:2380; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +108 2    …retation.jl:2370; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +109 2    …retation.jl:2354; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +110 2    …retation.jl:2162; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +111 2    …retation.jl:2169; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +112 2    …retation.jl:2087; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +113 2    …retation.jl:95; abstract_call…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +114 2    …retation.jl:629; abstract_cal…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +115 2    …ypeinfer.jl:930; typeinf_edge…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +116 2    …ypeinfer.jl:216; typeinf(inte…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +117 2    …ypeinfer.jl:247; _typeinf(int…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +118 2    …retation.jl:3186; typeinf_noc…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +119 2    …retation.jl:3098; typeinf_loc…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +120 2    …retation.jl:2889; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +121 2    …retation.jl:2624; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +122 2    …retation.jl:2380; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +123 2    …retation.jl:2370; abstract_ev…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +124 2    …retation.jl:2354; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +125 2    …retation.jl:2162; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +126 2    …retation.jl:2169; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +127 2    …retation.jl:2087; abstract_ca…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +128 2    …retation.jl:95; abstract_call…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +129 2    …retation.jl:629; abstract_cal…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +130 1    …ypeinfer.jl:920; typeinf_edge…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +131 1    …ncestate.jl:430; Core.Compile…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +132 1    …tilities.jl:135; retrieve_cod…
  1╎    ╎    ╎    ╎    ╎    ╎    ╎     +133 1    …tilities.jl:123; get_staged(m…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +130 1    …ypeinfer.jl:930; typeinf_edge…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +131 1    …ypeinfer.jl:216; typeinf(inte…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +132 1    …ypeinfer.jl:272; _typeinf(int…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +133 1    …optimize.jl:453; optimize
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +134 1    …optimize.jl:504; run_passes
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +135 1    …optimize.jl:489; run_passes(c…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +136 1    …r/passes.jl:973; sroa_pass!(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +137 1    …r/passes.jl:5; is_known_call(…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +138 1    …optimize.jl:340; argextype
  1╎    ╎    ╎    ╎    ╎    ╎    ╎     +139 1    …optimize.jl:341; argextype(x:…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +102 1    …ypeinfer.jl:272; _typeinf(int…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +103 1    …optimize.jl:453; optimize
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +104 1    …optimize.jl:504; run_passes
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +105 1    …optimize.jl:489; run_passes(c…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +106 1    …inlining.jl:81; ssa_inlining_…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +107 1    …inlining.jl:672; batch_inline…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +108 1    …ssair/ir.jl:641; Core.Compile…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +109 1    …ssair/ir.jl:198; Core.Compile…
  1╎    ╎    ╎    ╎    ╎    ╎    ╎     +110 1    …ase/boot.jl:477; Array
   ╎433  …lia-RAI/quick_test.jl:8; (::var"#1#2"{Atomic{Float64}})()
   ╎ 68   @Base/reducedim.jl:1010; maximum
   ╎  68   @Base/reducedim.jl:1010; #maximum#837
   ╎   68   @Base/reducedim.jl:1014; _maximum
   ╎    68   @Base/reducedim.jl:1014; #_maximum#839
   ╎     68   @Base/reducedim.jl:1015; _maximum
   ╎    ╎ 68   @Base/reducedim.jl:1015; #_maximum#840
   ╎    ╎  68   @Base/reducedim.jl:357; mapreduce
   ╎    ╎   68   @Base/reducedim.jl:357; #mapreduce#822
   ╎    ╎    68   @Base/reducedim.jl:365; _mapreduce_dim
   ╎    ╎     68   @Base/reduce.jl:447; _mapreduce(f::typeof(identity), op::typ…
   ╎    ╎    ╎ 1    @Base/reduce.jl:651; mapreduce_impl(f::typeof(identity), op…
  1╎    ╎    ╎  1    @Base/int.jl:514; <=
   ╎    ╎    ╎ 34   @Base/reduce.jl:653; mapreduce_impl(f::typeof(identity), op…
   ╎    ╎    ╎  34   @Base/reduce.jl:626; _fast
 34╎    ╎    ╎   34   …ase/essentials.jl:647; ifelse
   ╎    ╎    ╎ 7    @Base/reduce.jl:654; mapreduce_impl(f::typeof(identity), op…
   ╎    ╎    ╎  7    @Base/reduce.jl:626; _fast
  6╎    ╎    ╎   6    …ase/essentials.jl:647; ifelse
   ╎    ╎    ╎   1    @Base/float.jl:620; isnan
  1╎    ╎    ╎    1    @Base/float.jl:535; !=
   ╎    ╎    ╎ 26   @Base/reduce.jl:657; mapreduce_impl(f::typeof(identity), op…
   ╎    ╎    ╎  26   @Base/range.jl:901; iterate
 26╎    ╎    ╎   26   @Base/promotion.jl:521; ==
   ╎ 365  @Random/src/normal.jl:258; randn
   ╎  365  @Random/src/normal.jl:252; randn
   ╎   4    @Base/boot.jl:491; Array
  4╎    4    @Base/boot.jl:477; Array
   ╎   172  @Random/src/normal.jl:237; randn!(rng::Random.TaskLocalRNG, A::Vect…
   ╎    172  @Random/src/Random.jl:269; rand!
   ╎     172  @Random/src/Random.jl:269; rand!
   ╎    ╎ 172  …/src/XoshiroSimd.jl:299; rand!
   ╎    ╎  172  …/src/XoshiroSimd.jl:141; xoshiro_bulk
   ╎    ╎   172  …/src/XoshiroSimd.jl:142; xoshiro_bulk
  1╎    ╎    49   …src/XoshiroSimd.jl:248; xoshiro_bulk_simd(rng::Random.TaskLo…
 48╎    ╎     48   @Base/int.jl:514; <=
   ╎    ╎    1    …src/XoshiroSimd.jl:249; xoshiro_bulk_simd(rng::Random.TaskLo…
  1╎    ╎     1    …src/XoshiroSimd.jl:71; _plus
   ╎    ╎    2    …src/XoshiroSimd.jl:250; xoshiro_bulk_simd(rng::Random.TaskLo…
  2╎    ╎     2    …src/XoshiroSimd.jl:65; _shl17
   ╎    ╎    1    …src/XoshiroSimd.jl:252; xoshiro_bulk_simd(rng::Random.TaskLo…
  1╎    ╎     1    …src/XoshiroSimd.jl:77; _xor
   ╎    ╎    3    …src/XoshiroSimd.jl:253; xoshiro_bulk_simd(rng::Random.TaskLo…
  3╎    ╎     3    …src/XoshiroSimd.jl:77; _xor
   ╎    ╎    1    …src/XoshiroSimd.jl:254; xoshiro_bulk_simd(rng::Random.TaskLo…
  1╎    ╎     1    …src/XoshiroSimd.jl:77; _xor
   ╎    ╎    1    …src/XoshiroSimd.jl:256; xoshiro_bulk_simd(rng::Random.TaskLo…
  1╎    ╎     1    …src/XoshiroSimd.jl:55; _rotl45
   ╎    ╎    114  …src/XoshiroSimd.jl:257; xoshiro_bulk_simd(rng::Random.TaskLo…
   ╎    ╎     114  @Base/pointer.jl:146; unsafe_store!
114╎    ╎    ╎ 114  @Base/pointer.jl:146; unsafe_store!
   ╎   164  @Random/src/normal.jl:240; randn!(rng::Random.TaskLocalRNG, A::Vect…
  8╎    8    @Base/array.jl:1021; setindex!
  6╎    6    @Base/essentials.jl:13; getindex
   ╎    34   @Random/src/normal.jl:63; _randn
   ╎     34   @Base/int.jl:534; >>
 34╎    ╎ 34   @Base/int.jl:528; >>
   ╎    57   @Random/src/normal.jl:65; _randn
  1╎     1    @Base/essentials.jl:13; getindex
  3╎     3    @Base/essentials.jl:647; ifelse
 13╎     13   @Base/int.jl:85; -
   ╎     17   @Base/int.jl:627; rem
   ╎    ╎ 17   @Base/operators.jl:276; !=
   ╎    ╎  17   @Base/int.jl:518; ==
 17╎    ╎   17   @Base/promotion.jl:521; ==
   ╎     23   @Base/promotion.jl:423; *
 19╎    ╎ 19   @Base/float.jl:411; *
   ╎    ╎ 4    @Base/promotion.jl:393; promote
   ╎    ╎  4    @Base/promotion.jl:370; _promote
   ╎    ╎   4    @Base/number.jl:7; convert
  4╎    ╎    4    @Base/float.jl:159; Float64
   ╎    18   @Random/src/normal.jl:66; _randn
   ╎     18   @Base/int.jl:519; <
 18╎    ╎ 18   @Base/int.jl:513; <
  1╎    41   @Random/src/normal.jl:67; _randn
  1╎     1    @Base/special/exp.jl:327; exp(x::Float64)
  2╎     2    @Random/src/normal.jl:40; randn(rng::Random.TaskLocalRNG)
  5╎     5    @Random/src/normal.jl:0; randn_unlikely(rng::Random.TaskLocalRNG,…
  2╎     2    @Random/src/normal.jl:72; randn_unlikely(rng::Random.TaskLocalRNG…
   ╎     2    @Random/src/normal.jl:73; randn_unlikely(rng::Random.TaskLocalRNG…
  2╎    ╎ 2    @Base/promotion.jl:521; ==
   ╎     23   @Random/src/normal.jl:80; randn_unlikely(rng::Random.TaskLocalRNG…
  1╎    ╎ 1    @Base/float.jl:411; *
  3╎    ╎ 3    @Base/float.jl:409; +
   ╎    ╎ 17   @Base/special/exp.jl:327; exp(x::Float64)
   ╎    ╎  2    @Base/special/exp.jl:211; exp_impl
  2╎    ╎   2    @Base/float.jl:410; -
   ╎    ╎  1    @Base/special/exp.jl:213; exp_impl
  1╎    ╎   1    @Base/float.jl:414; muladd
   ╎    ╎  3    @Base/special/exp.jl:215; exp_impl
   ╎    ╎   1    @Base/special/exp.jl:181; table_unpack
  1╎    ╎    1    @Base/int.jl:347; &
   ╎    ╎   2    @Base/special/exp.jl:182; table_unpack
   ╎    ╎    2    @Base/int.jl:534; >>
  2╎    ╎     2    @Base/int.jl:528; >>
   ╎    ╎  9    @Base/special/exp.jl:216; exp_impl
  2╎    ╎   2    @Base/float.jl:409; +
   ╎    ╎   7    @Base/special/exp.jl:78; expm1b_kernel
  4╎    ╎    4    @Base/float.jl:411; *
   ╎    ╎    3    @Base/math.jl:186; evalpoly
   ╎    ╎     3    @Base/math.jl:187; macro expansion
  3╎    ╎    ╎ 3    @Base/float.jl:414; muladd
   ╎    ╎  1    @Base/special/exp.jl:218; exp_impl
  1╎    ╎   1    @Base/float.jl:537; <=
   ╎    ╎  1    @Base/special/exp.jl:229; exp_impl
  1╎    ╎   1    @Base/essentials.jl:581; reinterpret
   ╎    ╎ 2    …andom/src/Random.jl:258; rand
   ╎    ╎  2    …andom/src/Random.jl:258; rand
   ╎    ╎   2    …ndom/src/Xoshiro.jl:244; rand
   ╎    ╎    2    …ndom/src/Random.jl:258; rand
   ╎    ╎     1    …dom/src/Xoshiro.jl:146; rand
   ╎    ╎    ╎ 1    @Base/int.jl:536; <<
  1╎    ╎    ╎  1    @Base/int.jl:529; <<
   ╎    ╎     1    …dom/src/Xoshiro.jl:153; rand
  1╎    ╎    ╎ 1    @Base/Base.jl:41; setproperty!
  1╎     5    @Random/src/normal.jl:83; randn_unlikely(rng::Random.TaskLocalRNG…
   ╎    ╎ 2    @Random/src/normal.jl:49; randn(rng::Random.TaskLocalRNG)
   ╎    ╎  2    …andom/src/Random.jl:255; rand
   ╎    ╎   2    …ndom/src/Xoshiro.jl:235; rand
   ╎    ╎    2    …ndom/src/Random.jl:258; rand
   ╎    ╎     1    …dom/src/Xoshiro.jl:143; rand
  1╎    ╎    ╎ 1    @Base/task.jl:182; getproperty
   ╎    ╎     1    …dom/src/Xoshiro.jl:153; rand
  1╎    ╎    ╎ 1    @Base/Base.jl:41; setproperty!
   ╎    ╎ 2    @Random/src/normal.jl:54; randn(rng::Random.TaskLocalRNG)
  1╎    ╎  1    @Base/int.jl:85; -
   ╎    ╎  1    @Base/promotion.jl:423; *
  1╎    ╎   1    @Base/float.jl:411; *
   ╎   20   @Random/src/normal.jl:241; randn!(rng::Random.TaskLocalRNG, A::Vect…
   ╎    20   @Base/range.jl:901; iterate
 20╎     20   @Base/promotion.jl:521; ==
  5╎   5    @Random/src/normal.jl:72; randn_unlikely(rng::Random.TaskLocalRNG, …
Total snapshots: 1816. Utilization: 100% across all threads and tasks. Use the `groupby` kwarg to break down by thread and/or task.

Example Output on MacOS (--threads=8)

Overhead ╎ [+additional indent] Count File:Line; Function
=========================================================
   ╎167 …julia-RAI/quick_test.jl:8; (::var"#1#2"{Atomic{Float64}})()
   ╎ 46  @Base/reducedim.jl:1010; maximum
   ╎  46  @Base/reducedim.jl:1010; #maximum#837
   ╎   46  @Base/reducedim.jl:1014; _maximum
   ╎    46  @Base/reducedim.jl:1014; #_maximum#839
   ╎     46  @Base/reducedim.jl:1015; _maximum
   ╎    ╎ 46  @Base/reducedim.jl:1015; #_maximum#840
   ╎    ╎  46  @Base/reducedim.jl:357; mapreduce
   ╎    ╎   46  @Base/reducedim.jl:357; #mapreduce#822
   ╎    ╎    46  @Base/reducedim.jl:365; _mapreduce_dim
   ╎    ╎     46  @Base/reduce.jl:447; _mapreduce(f::typeof(identity), op::type…
   ╎    ╎    ╎ 6   @Base/reduce.jl:654; mapreduce_impl(f::typeof(identity), op:…
   ╎    ╎    ╎  6   @Base/reduce.jl:626; _fast
  6╎    ╎    ╎   6   …ase/essentials.jl:647; ifelse
   ╎    ╎    ╎ 16  @Base/reduce.jl:655; mapreduce_impl(f::typeof(identity), op:…
  1╎    ╎    ╎  1   …ase/essentials.jl:13; getindex
   ╎    ╎    ╎  15  @Base/reduce.jl:626; _fast
 15╎    ╎    ╎   15  …ase/essentials.jl:647; ifelse
   ╎    ╎    ╎ 19  @Base/reduce.jl:656; mapreduce_impl(f::typeof(identity), op:…
   ╎    ╎    ╎  19  @Base/reduce.jl:626; _fast
 19╎    ╎    ╎   19  …ase/essentials.jl:647; ifelse
   ╎    ╎    ╎ 5   @Base/reduce.jl:657; mapreduce_impl(f::typeof(identity), op:…
   ╎    ╎    ╎  5   @Base/range.jl:901; iterate
  5╎    ╎    ╎   5   @Base/promotion.jl:521; ==
   ╎ 121 @Random/src/normal.jl:258; randn
   ╎  121 @Random/src/normal.jl:252; randn
   ╎   55  @Random/src/normal.jl:237; randn!(rng::Random.TaskLocalRNG, A::Vecto…
   ╎    55  @Random/src/Random.jl:269; rand!
   ╎     55  @Random/src/Random.jl:269; rand!
   ╎    ╎ 55  …m/src/XoshiroSimd.jl:299; rand!
   ╎    ╎  55  …/src/XoshiroSimd.jl:141; xoshiro_bulk
   ╎    ╎   55  …/src/XoshiroSimd.jl:142; xoshiro_bulk
   ╎    ╎    9   …/src/XoshiroSimd.jl:249; xoshiro_bulk_simd(rng::Random.TaskLo…
  9╎    ╎     9   …/src/XoshiroSimd.jl:58; _rotl23
   ╎    ╎    3   …/src/XoshiroSimd.jl:250; xoshiro_bulk_simd(rng::Random.TaskLo…
  3╎    ╎     3   …/src/XoshiroSimd.jl:65; _shl17
   ╎    ╎    3   …/src/XoshiroSimd.jl:252; xoshiro_bulk_simd(rng::Random.TaskLo…
  3╎    ╎     3   …/src/XoshiroSimd.jl:77; _xor
   ╎    ╎    1   …/src/XoshiroSimd.jl:253; xoshiro_bulk_simd(rng::Random.TaskLo…
  1╎    ╎     1   …/src/XoshiroSimd.jl:77; _xor
   ╎    ╎    1   …/src/XoshiroSimd.jl:255; xoshiro_bulk_simd(rng::Random.TaskLo…
  1╎    ╎     1   …/src/XoshiroSimd.jl:77; _xor
   ╎    ╎    12  …/src/XoshiroSimd.jl:256; xoshiro_bulk_simd(rng::Random.TaskLo…
 12╎    ╎     12  …/src/XoshiroSimd.jl:55; _rotl45
   ╎    ╎    26  …/src/XoshiroSimd.jl:257; xoshiro_bulk_simd(rng::Random.TaskLo…
   ╎    ╎     26  @Base/pointer.jl:146; unsafe_store!
 26╎    ╎    ╎ 26  @Base/pointer.jl:146; unsafe_store!
   ╎   66  @Random/src/normal.jl:240; randn!(rng::Random.TaskLocalRNG, A::Vecto…
 10╎    10  @Base/array.jl:1021; setindex!
  3╎    29  @Random/src/normal.jl:66; _randn
 26╎     26  @Base/essentials.jl:13; getindex
  9╎    27  @Random/src/normal.jl:67; _randn
  8╎     8   @Random/src/normal.jl:0; randn_unlikely(rng::Random.TaskLocalRNG, …
   ╎     1   @Random/src/normal.jl:76; randn_unlikely(rng::Random.TaskLocalRNG,…
   ╎    ╎ 1   @Random/src/Random.jl:258; rand
   ╎    ╎  1   …andom/src/Random.jl:258; rand
   ╎    ╎   1   …ndom/src/Xoshiro.jl:244; rand
  1╎    ╎    1   @Base/float.jl:165; Float64
  1╎     1   @Random/src/normal.jl:80; randn_unlikely(rng::Random.TaskLocalRNG,…
  5╎     8   @Random/src/normal.jl:83; randn_unlikely(rng::Random.TaskLocalRNG,…
   ╎    ╎ 1   @Random/src/normal.jl:49; randn(rng::Random.TaskLocalRNG)
   ╎    ╎  1   …andom/src/Random.jl:255; rand
   ╎    ╎   1   …ndom/src/Xoshiro.jl:235; rand
   ╎    ╎    1   …andom/src/Random.jl:258; rand
   ╎    ╎     1   …dom/src/Xoshiro.jl:153; rand
  1╎    ╎    ╎ 1   @Base/Base.jl:41; setproperty!
   ╎    ╎ 1   @Random/src/normal.jl:54; randn(rng::Random.TaskLocalRNG)
   ╎    ╎  1   @Base/promotion.jl:423; *
   ╎    ╎   1   @Base/promotion.jl:393; promote
   ╎    ╎    1   @Base/promotion.jl:370; _promote
   ╎    ╎     1   @Base/number.jl:7; convert
  1╎    ╎    ╎ 1   @Base/float.jl:159; Float64
   ╎    ╎ 1   @Random/src/normal.jl:56; randn(rng::Random.TaskLocalRNG)
  1╎    ╎  1   @Random/src/normal.jl:0; randn_unlikely(rng::Random.TaskLocalRNG…
   ╎4   …usr/lib/julia/sys.dylib:?; typeinf_ext_toplevel(mi::Core.MethodInstanc…
   ╎ 4   …usr/lib/julia/sys.dylib:?; typeinf_ext_toplevel(interp::Core.Compiler…
   ╎  4   …compiler/typeinfer.jl:1051; typeinf_ext(interp::Core.Compiler.Native…
   ╎   4   …sr/lib/julia/sys.dylib:?; typeinf(interp::Core.Compiler.NativeInter…
   ╎    4   …r/lib/julia/sys.dylib:?; _typeinf(interp::Core.Compiler.NativeInte…
   ╎     4   …r/lib/julia/sys.dylib:?; typeinf_nocycle(interp::Core.Compiler.Na…
   ╎    ╎ 4   …r/lib/julia/sys.dylib:?; typeinf_local(interp::Core.Compiler.Nat…
   ╎    ╎  4   …/lib/julia/sys.dylib:?; abstract_eval_basic_statement(interp::C…
   ╎    ╎   4   …/lib/julia/sys.dylib:?; abstract_eval_statement(interp::Core.C…
   ╎    ╎    4   …lib/julia/sys.dylib:?; abstract_eval_statement_expr(interp::C…
   ╎    ╎     4   …lib/julia/sys.dylib:?; abstract_eval_call(interp::Core.Compi…
   ╎    ╎    ╎ 4   …lib/julia/sys.dylib:?; abstract_call(interp::Core.Compiler.…
   ╎    ╎    ╎  4   …ib/julia/sys.dylib:?; abstract_call(interp::Core.Compiler.…
   ╎    ╎    ╎   4   …interpretation.jl:2169; abstract_call(interp::Core.Compil…
   ╎    ╎    ╎    4   …b/julia/sys.dylib:?; abstract_call_known(interp::Core.Co…
   ╎    ╎    ╎     4   …interpretation.jl:95; abstract_call_gf_by_type(interp::…
   ╎    ╎    ╎    ╎ 4   …nterpretation.jl:629; abstract_call_method(interp::Cor…
   ╎    ╎    ╎    ╎  4   …er/typeinfer.jl:930; typeinf_edge(interp::Core.Compil…
   ╎    ╎    ╎    ╎   4   …/julia/sys.dylib:?; typeinf(interp::Core.Compiler.Na…
   ╎    ╎    ╎    ╎    4   …julia/sys.dylib:?; _typeinf(interp::Core.Compiler.N…
   ╎    ╎    ╎    ╎     4   …julia/sys.dylib:?; typeinf_nocycle(interp::Core.Co…
   ╎    ╎    ╎    ╎    ╎ 4   …julia/sys.dylib:?; typeinf_local(interp::Core.Com…
   ╎    ╎    ╎    ╎    ╎  4   …ulia/sys.dylib:?; abstract_eval_basic_statement(…
   ╎    ╎    ╎    ╎    ╎   4   …ulia/sys.dylib:?; abstract_eval_statement(inter…
   ╎    ╎    ╎    ╎    ╎    4   …lia/sys.dylib:?; abstract_eval_statement_expr(…
   ╎    ╎    ╎    ╎    ╎     4   …lia/sys.dylib:?; abstract_eval_call(interp::C…
   ╎    ╎    ╎    ╎    ╎    ╎ 4   …lia/sys.dylib:?; abstract_call(interp::Core.…
   ╎    ╎    ╎    ╎    ╎    ╎  4   …ia/sys.dylib:?; abstract_call(interp::Core.…
   ╎    ╎    ╎    ╎    ╎    ╎   4   …retation.jl:2169; abstract_call(interp::Co…
   ╎    ╎    ╎    ╎    ╎    ╎    4   …a/sys.dylib:?; abstract_call_known(interp…
   ╎    ╎    ╎    ╎    ╎    ╎     3   …retation.jl:1612; abstract_apply(interp:…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎ 3   …retation.jl:2169; abstract_call(interp:…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎  3   …a/sys.dylib:?; abstract_call_known(int…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎   3   …retation.jl:95; abstract_call_gf_by_t…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    3   …retation.jl:629; abstract_call_metho…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     3   …ypeinfer.jl:930; typeinf_edge(inter…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ 3   …a/sys.dylib:?; typeinf(interp::Cor…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  3   …a/sys.dylib:?; _typeinf(interp::C…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎   3   …a/sys.dylib:?; typeinf_nocycle(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎    3   …a/sys.dylib:?; typeinf_local(in…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎     3   …a/sys.dylib:?; abstract_eval_b…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +1 3   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +2 3   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +3 3   …a/sys.dylib:?; abstract_eval_c…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +4 3   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +5 3   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +6 3   …retation.jl:2169; abstract_cal…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +7 3   …a/sys.dylib:?; abstract_call_k…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +8 3   …retation.jl:95; abstract_call_…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +9 3   …retation.jl:629; abstract_call…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +10 3   …ypeinfer.jl:930; typeinf_edge(…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +11 3   …a/sys.dylib:?; typeinf(interp:…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +12 3   …a/sys.dylib:?; _typeinf(interp…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +13 3   …a/sys.dylib:?; typeinf_nocycle…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +14 3   …a/sys.dylib:?; typeinf_local(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +15 3   …a/sys.dylib:?; abstract_eval_b…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +16 3   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +17 3   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +18 3   …a/sys.dylib:?; abstract_eval_c…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +19 3   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +20 3   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +21 3   …retation.jl:2169; abstract_cal…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +22 3   …a/sys.dylib:?; abstract_call_k…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +23 3   …retation.jl:95; abstract_call_…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +24 3   …retation.jl:629; abstract_call…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +25 3   …ypeinfer.jl:930; typeinf_edge(…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +26 3   …a/sys.dylib:?; typeinf(interp:…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +27 3   …a/sys.dylib:?; _typeinf(interp…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +28 3   …a/sys.dylib:?; typeinf_nocycle…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +29 3   …a/sys.dylib:?; typeinf_local(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +30 3   …a/sys.dylib:?; abstract_eval_b…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +31 3   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +32 3   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +33 3   …a/sys.dylib:?; abstract_eval_c…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +34 3   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +35 3   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +36 3   …retation.jl:2169; abstract_cal…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +37 3   …a/sys.dylib:?; abstract_call_k…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +38 3   …retation.jl:95; abstract_call_…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +39 3   …retation.jl:629; abstract_call…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +40 3   …ypeinfer.jl:930; typeinf_edge(…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +41 3   …a/sys.dylib:?; typeinf(interp:…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +42 3   …a/sys.dylib:?; _typeinf(interp…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +43 3   …a/sys.dylib:?; typeinf_nocycle…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +44 3   …a/sys.dylib:?; typeinf_local(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +45 3   …a/sys.dylib:?; abstract_eval_b…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +46 3   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +47 3   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +48 3   …a/sys.dylib:?; abstract_eval_c…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +49 3   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +50 3   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +51 3   …retation.jl:2169; abstract_cal…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +52 3   …a/sys.dylib:?; abstract_call_k…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +53 3   …retation.jl:95; abstract_call_…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +54 3   …retation.jl:629; abstract_call…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +55 3   …ypeinfer.jl:930; typeinf_edge(…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +56 3   …a/sys.dylib:?; typeinf(interp:…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +57 3   …a/sys.dylib:?; _typeinf(interp…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +58 3   …a/sys.dylib:?; typeinf_nocycle…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +59 3   …a/sys.dylib:?; typeinf_local(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +60 3   …a/sys.dylib:?; abstract_eval_b…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +61 3   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +62 3   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +63 3   …a/sys.dylib:?; abstract_eval_c…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +64 3   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +65 3   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +66 3   …retation.jl:2169; abstract_cal…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +67 3   …a/sys.dylib:?; abstract_call_k…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +68 3   …retation.jl:95; abstract_call_…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +69 3   …retation.jl:629; abstract_call…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +70 3   …ypeinfer.jl:930; typeinf_edge(…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +71 3   …a/sys.dylib:?; typeinf(interp:…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +72 3   …a/sys.dylib:?; _typeinf(interp…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +73 3   …a/sys.dylib:?; typeinf_nocycle…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +74 3   …a/sys.dylib:?; typeinf_local(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +75 3   …a/sys.dylib:?; abstract_eval_b…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +76 3   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +77 3   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +78 3   …a/sys.dylib:?; abstract_eval_c…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +79 3   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +80 3   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +81 3   …retation.jl:2169; abstract_cal…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +82 3   …a/sys.dylib:?; abstract_call_k…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +83 3   …retation.jl:95; abstract_call_…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +84 3   …retation.jl:629; abstract_call…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +85 3   …ypeinfer.jl:930; typeinf_edge(…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +86 3   …a/sys.dylib:?; typeinf(interp:…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +87 3   …a/sys.dylib:?; _typeinf(interp…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +88 3   …a/sys.dylib:?; typeinf_nocycle…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +89 3   …a/sys.dylib:?; typeinf_local(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +90 3   …a/sys.dylib:?; abstract_eval_b…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +91 3   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +92 3   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +93 3   …a/sys.dylib:?; abstract_eval_c…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +94 3   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +95 3   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +96 3   …retation.jl:2169; abstract_cal…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +97 3   …a/sys.dylib:?; abstract_call_k…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +98 3   …retation.jl:95; abstract_call_…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +99 3   …retation.jl:629; abstract_call…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +100 3   …ypeinfer.jl:930; typeinf_edge(…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +101 3   …a/sys.dylib:?; typeinf(interp:…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +102 3   …a/sys.dylib:?; _typeinf(interp…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +103 3   …a/sys.dylib:?; typeinf_nocycle…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +104 3   …a/sys.dylib:?; typeinf_local(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +105 3   …a/sys.dylib:?; abstract_eval_b…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +106 3   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +107 3   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +108 3   …a/sys.dylib:?; abstract_eval_c…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +109 3   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +110 3   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +111 3   …retation.jl:2169; abstract_cal…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +112 3   …a/sys.dylib:?; abstract_call_k…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +113 3   …retation.jl:95; abstract_call_…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +114 3   …retation.jl:629; abstract_call…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +115 3   …ypeinfer.jl:930; typeinf_edge(…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +116 3   …a/sys.dylib:?; typeinf(interp:…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +117 3   …a/sys.dylib:?; _typeinf(interp…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +118 3   …a/sys.dylib:?; typeinf_nocycle…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +119 3   …a/sys.dylib:?; typeinf_local(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +120 3   …a/sys.dylib:?; abstract_eval_b…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +121 3   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +122 3   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +123 3   …a/sys.dylib:?; abstract_eval_c…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +124 3   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +125 3   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +126 3   …retation.jl:2169; abstract_cal…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +127 3   …a/sys.dylib:?; abstract_call_k…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +128 3   …retation.jl:95; abstract_call_…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +129 3   …retation.jl:629; abstract_call…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +130 1   …ypeinfer.jl:920; typeinf_edge(…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +131 1   …a/sys.dylib:?; Core.Compiler.I…
  1╎    ╎    ╎    ╎    ╎    ╎    ╎     +132 1   …a/sys.dylib:?; get_staged(mi::…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +130 2   …ypeinfer.jl:930; typeinf_edge(…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +131 2   …a/sys.dylib:?; typeinf(interp:…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +132 2   …a/sys.dylib:?; _typeinf(interp…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +133 1   …a/sys.dylib:?; run_passes(ci::…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +134 1   …a/sys.dylib:?; adce_pass!(ir::…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +135 1   …a/sys.dylib:?; iterate_compact…
  1╎    ╎    ╎    ╎    ╎    ╎    ╎     +136 1   …a/sys.dylib:?; process_node!(c…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +133 1   …a/sys.dylib:?; typeinf_nocycle…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +134 1   …a/sys.dylib:?; typeinf_local(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +135 1   …a/sys.dylib:?; abstract_eval_b…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +136 1   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +137 1   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +138 1   …a/sys.dylib:?; abstract_eval_c…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +139 1   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +140 1   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +141 1   …retation.jl:2169; abstract_cal…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +142 1   …a/sys.dylib:?; abstract_call_k…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +143 1   …retation.jl:103; abstract_call…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +144 1   …a/sys.dylib:?; abstract_call_m…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +145 1   …a/sys.dylib:?; abstract_call_m…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +146 1   …retation.jl:1207; const_prop_c…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +147 1   …a/sys.dylib:?; typeinf(interp:…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +148 1   …a/sys.dylib:?; _typeinf(interp…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +149 1   …a/sys.dylib:?; finish(interp::…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     +150 1   …a/sys.dylib:?; inline_cost(ir:…
  1╎    ╎    ╎    ╎    ╎    ╎    ╎     +151 1   …a/sys.dylib:?; statement_cost(…
   ╎    ╎    ╎    ╎    ╎    ╎     1   …retation.jl:95; abstract_call_gf_by_type…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎ 1   …retation.jl:629; abstract_call_method(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎  1   …ypeinfer.jl:930; typeinf_edge(interp::…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎   1   …a/sys.dylib:?; typeinf(interp::Core.C…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    1   …a/sys.dylib:?; _typeinf(interp::Core…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎     1   …a/sys.dylib:?; typeinf_nocycle(inte…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ 1   …a/sys.dylib:?; typeinf_local(inter…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  1   …a/sys.dylib:?; abstract_eval_basi…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎   1   …a/sys.dylib:?; abstract_eval_sta…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎    1   …a/sys.dylib:?; abstract_eval_st…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎     1   …a/sys.dylib:?; abstract_eval_c…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +1 1   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +2 1   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +3 1   …retation.jl:2169; abstract_cal…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +4 1   …a/sys.dylib:?; abstract_call_k…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +5 1   …retation.jl:95; abstract_call_…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +6 1   …retation.jl:629; abstract_call…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +7 1   …ypeinfer.jl:930; typeinf_edge(…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +8 1   …a/sys.dylib:?; typeinf(interp:…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎  +9 1   …a/sys.dylib:?; _typeinf(interp…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +10 1   …a/sys.dylib:?; typeinf_nocycle…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +11 1   …a/sys.dylib:?; typeinf_local(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +12 1   …a/sys.dylib:?; abstract_eval_b…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +13 1   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +14 1   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +15 1   …a/sys.dylib:?; abstract_eval_c…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +16 1   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +17 1   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +18 1   …retation.jl:2169; abstract_cal…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +19 1   …a/sys.dylib:?; abstract_call_k…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +20 1   …retation.jl:95; abstract_call_…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +21 1   …retation.jl:629; abstract_call…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +22 1   …ypeinfer.jl:930; typeinf_edge(…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +23 1   …a/sys.dylib:?; typeinf(interp:…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +24 1   …a/sys.dylib:?; _typeinf(interp…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +25 1   …a/sys.dylib:?; typeinf_nocycle…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +26 1   …a/sys.dylib:?; typeinf_local(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +27 1   …a/sys.dylib:?; abstract_eval_b…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +28 1   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +29 1   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +30 1   …a/sys.dylib:?; abstract_eval_c…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +31 1   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +32 1   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +33 1   …retation.jl:2169; abstract_cal…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +34 1   …a/sys.dylib:?; abstract_call_k…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +35 1   …retation.jl:95; abstract_call_…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +36 1   …retation.jl:629; abstract_call…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +37 1   …ypeinfer.jl:930; typeinf_edge(…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +38 1   …a/sys.dylib:?; typeinf(interp:…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +39 1   …a/sys.dylib:?; _typeinf(interp…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +40 1   …a/sys.dylib:?; typeinf_nocycle…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +41 1   …a/sys.dylib:?; typeinf_local(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +42 1   …a/sys.dylib:?; abstract_eval_b…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +43 1   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +44 1   …a/sys.dylib:?; abstract_eval_s…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +45 1   …a/sys.dylib:?; abstract_eval_c…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +46 1   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +47 1   …a/sys.dylib:?; abstract_call(i…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +48 1   …retation.jl:2169; abstract_cal…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +49 1   …a/sys.dylib:?; abstract_call_k…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +50 1   …retation.jl:24; abstract_call_…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +51 1   …a/sys.dylib:?; find_matching_m…
   ╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +52 1   …a/sys.dylib:?; findall(sig::Ty…
  1╎    ╎    ╎    ╎    ╎    ╎    ╎    ╎ +53 1   …a/sys.dylib:?; _methods_by_fty…
   ╎5   @Random/src/normal.jl:80; randn_unlikely(rng::Random.TaskLocalRNG, idx:…
   ╎ 5   @Base/special/exp.jl:327; exp(x::Float64)
   ╎  2   @Base/special/exp.jl:215; exp_impl
   ╎   2   @Base/special/exp.jl:181; table_unpack
  2╎    2   @Base/int.jl:347; &
   ╎  1   @Base/special/exp.jl:216; exp_impl
   ╎   1   @Base/special/exp.jl:78; expm1b_kernel
   ╎    1   @Base/math.jl:186; evalpoly
   ╎     1   @Base/math.jl:187; macro expansion
  1╎    ╎ 1   @Base/float.jl:414; muladd
   ╎  1   @Base/special/exp.jl:218; exp_impl
  1╎   1   @Base/float.jl:610; abs
   ╎  1   @Base/special/exp.jl:229; exp_impl
  1╎   1   @Base/essentials.jl:581; reinterpret
Total snapshots: 882. Utilization: 100% across all threads and tasks. Use the `groupby` kwarg to break down by thread and/or task.

Checklist

Requirements for merging:

  • I have opened an issue or PR upstream on JuliaLang/julia: <link to JuliaLang/julia>
  • I have removed the port-to-* labels that don't apply.
  • I have opened a PR on raicode to test these changes:

@github-actions github-actions bot added port-to-v1.10 port-to-v1.12 This change should apply to Julia v1.12 builds labels Sep 24, 2024
@d-netto d-netto force-pushed the dcn-all-task-profiler branch from 87182ca to 7cb8d0e Compare September 24, 2024 19:57
@d-netto d-netto requested a review from NHDaly September 24, 2024 19:59
@nickrobinson251
Copy link
Member

Thanks for posting the MWE!

Changing @profile_all --> @profile results in many more samples, e.g. at the bottom of Profile.print() for @profile_all we see

Total snapshots: 882

but for @profile i see:

Total snapshots: 39933. 

which is more ~45x times larger (much more than the number of threads we have, even including gcthreads)

So it'd be good to know how many samples we're dropping (because we failed to select a task / selected a DONE task) ...and maybe consider recording a "placeholder" for those?

bt_data_prof[bt_size_cur++].jlvalue = (jl_value_t*)t;

// store cpu cycle clock. XXX(Diogo, Nick): why are we recording the cycleclock here?
bt_data_prof[bt_size_cur++].uintptr = cycleclock();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nathan guessed it's so some profile viewing tools can display the profile over time (rather than as a single aggregated flamegraph), although idk if any tools are using this. Still, seems trivial to keep the same as with the existing profiler

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO(Diogo): investigate why we need to measure the cycle-clock and whether we can just keep this line as it is for the task profiler.

bt_context_t c;
int16_t old = -1;
while (!jl_atomic_cmpswap(&t->tid, &old, ptls->tid) && old != ptls->tid) {
while (!jl_atomic_cmpswap(&t->tid, &old, tid) && old != tid) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to remember to look into what's up with sticky tasks https://relationalai.slack.com/archives/C07KVKH87DH/p1727113728609429

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added some println debugging to this

diff --git a/src/stackwalk.c b/src/stackwalk.c
index 5c8893d286..3512cdff8a 100644
--- a/src/stackwalk.c
+++ b/src/stackwalk.c
@@ -891,7 +891,15 @@ int jl_rec_backtrace(jl_task_t *t) JL_NOTSAFEPOINT
     bt_context_t *context = NULL;
     bt_context_t c;
     int16_t old = -1;
+    if (t->tid == -1) {
+        jl_safe_printf("\nwwwwwwwwwwww");
+    }
+    if (t->sticky) {
+        jl_safe_printf("\n***sticky***");
+    }
+    jl_safe_printf("\n[Before] t->tid %d old %d tid %d", t->tid, old, tid);
     while (!jl_atomic_cmpswap(&t->tid, &old, tid) && old != tid) {
+        jl_safe_printf("\n[Loop]   t->tid %d old %d tid %d", t->tid, old, tid);
         int lockret = jl_lock_stackwalk();
         // if this task is already running somewhere, we need to stop the thread it is running on and query its state
         if (!jl_thread_suspend_and_get_state(old, 0, &c)) {
@@ -911,6 +919,7 @@ int jl_rec_backtrace(jl_task_t *t) JL_NOTSAFEPOINT
         // got the wrong thread stopped, try again
         jl_thread_resume(old);
     }
+    jl_safe_printf("\n[After]  t->tid %d old %d tid %d\n", t->tid, old, tid);
     if (context == NULL && (!t->copy_stack && t->started && t->stkbuf != NULL)) {
         // need to read the context from the task stored state
 #if defined(_OS_WINDOWS_)

e.g.

[Before] t->tid 1 old -1 tid 32767
[Loop]   t->tid 1 old 1 tid 32767
[After]  t->tid 1 old 1 tid 32767

[Before] t->tid 1 old -1 tid 32767
[Loop]   t->tid 1 old 1 tid 32767
[After]  t->tid 1 old 1 tid 32767

[Before] t->tid 1 old -1 tid 32767
[Loop]   t->tid 1 old 1 tid 32767
[After]  t->tid 1 old 1 tid 32767

wwwwwwwwwwww
[Before] t->tid -1 old -1 tid 32767
[After]  t->tid 32767 old -1 tid 32767

wwwwwwwwwwww
[Before] t->tid -1 old -1 tid 32767
[After]  t->tid 32767 old -1 tid 32767

wwwwwwwwwwww
[Before] t->tid -1 old -1 tid 32767
[After]  t->tid 32767 old -1 tid 32767

wwwwwwwwwwww
[Before] t->tid -1 old -1 tid 32767
[After]  t->tid 32767 old -1 tid 32767

wwwwwwwwwwww
[Before] t->tid -1 old -1 tid 32767
[After]  t->tid 32767 old -1 tid 32767

[Before] t->tid 1 old -1 tid 32767
[Loop]   t->tid 1 old 1 tid 32767
[After]  t->tid 1 old 1 tid 32767

***sticky***
[Before] t->tid 16 old -1 tid 32767
[Loop]   t->tid 16 old 16 tid 32767
[After]  t->tid 16 old 16 tid 32767

***sticky***
[Before] t->tid 0 old -1 tid 32767
[Loop]   t->tid 0 old 0 tid 32767
[After]  t->tid 0 old 0 tid 32767

***sticky***
[Before] t->tid 0 old -1 tid 32767
[Loop]   t->tid 0 old 0 tid 32767
[After]  t->tid 0 old 0 tid 32767

***sticky***
[Before] t->tid 0 old -1 tid 32767
[Loop]   t->tid 0 old 0 tid 32767
[After]  t->tid 0 old 0 tid 32767

***sticky***
[Before] t->tid 16 old -1 tid 32767
[Loop]   t->tid 16 old 16 tid 32767
[After]  t->tid 16 old 16 tid 32767

***sticky***
[Before] t->tid 0 old -1 tid 32767
[Loop]   t->tid 0 old 0 tid 32767
[After]  t->tid 0 old 0 tid 32767

***sticky***
[Before] t->tid 16 old -1 tid 32767
[Loop]   t->tid 16 old 16 tid 32767
[After]  t->tid 16 old 16 tid 32767

***sticky***
[Before] t->tid 16 old -1 tid 32767
[Loop]   t->tid 16 old 16 tid 32767
[After]  t->tid 16 old 16 tid 32767

***sticky***
[Before] t->tid 16 old -1 tid 32767
[Loop]   t->tid 16 old 16 tid 32767
[After]  t->tid 16 old 16 tid 32767

wwwwwwwwwwww
[Before] t->tid -1 old -1 tid 32767
[After]  t->tid 32767 old -1 tid 32767

wwwwwwwwwwww
[Before] t->tid -1 old -1 tid 32767
[After]  t->tid 32767 old -1 tid 32767

wwwwwwwwwwww
[Before] t->tid -1 old -1 tid 32767
[After]  t->tid 32767 old -1 tid 32767

wwwwwwwwwwww
[Before] t->tid -1 old -1 tid 32767
[After]  t->tid 32767 old -1 tid 32767

wwwwwwwwwwww
[Before] t->tid -1 old -1 tid 32767
[After]  t->tid 32767 old -1 tid 32767

wwwwwwwwwwww
[Before] t->tid -1 old -1 tid 32767
[After]  t->tid 32767 old -1 tid 32767

***sticky***
[Before] t->tid 0 old -1 tid 32767
[Loop]   t->tid 0 old 0 tid 32767
[After]  t->tid 0 old 0 tid 32767

***sticky***
[Before] t->tid 0 old -1 tid 32767
[Loop]   t->tid 0 old 0 tid 32767
[After]  t->tid 0 old 0 tid 32767

***sticky***
[Before] t->tid 0 old -1 tid 32767
[Loop]   t->tid 0 old 0 tid 32767
[After]  t->tid 0 old 0 tid 32767

wwwwwwwwwwww
[Before] t->tid -1 old -1 tid 32767
[After]  t->tid 32767 old -1 tid 32767

wwwwwwwwwwww
[Before] t->tid -1 old -1 tid 32767
[After]  t->tid 32767 old -1 tid 32767

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From discussion: there might be an issue with this code when we are attempting to record a backtrace from a sticky task.

More specifically, sticky tasks (even if unscheduled) always have their thread-id set to a thread-id of the Julia thread that may run it, so there is a chance that this code will look at the thread-id of a sticky task, think that it's actually a task that's running, and then record the context of the Julia thread at the moment it was stopped -- which may be different from the tasks's context if that Julia thread happens to be running another task.

@d-netto d-netto force-pushed the dcn-all-task-profiler branch 4 times, most recently from 1bf5ba7 to 5e46012 Compare September 26, 2024 12:39
@d-netto d-netto force-pushed the dcn-all-task-profiler branch 2 times, most recently from 66004cc to d48fd77 Compare October 1, 2024 13:28
@d-netto d-netto force-pushed the dcn-all-task-profiler branch from d48fd77 to 2defb28 Compare October 1, 2024 18:17
@d-netto d-netto closed this Oct 27, 2024
@d-netto
Copy link
Author

d-netto commented Oct 27, 2024

Will open another PR to backport JuliaLang#55889.

@d-netto d-netto removed the port-to-v1.12 This change should apply to Julia v1.12 builds label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants