timholy / SnoopCompile.jl

Provide insights about latency (TTFX) for Julia packages
https://timholy.github.io/SnoopCompile.jl/dev/
Other
309 stars 48 forks source link

Sorting on number of children seems to have regressed #373

Open KristofferC opened 8 months ago

KristofferC commented 8 months ago
              68: superseding isequal(x, y) @ Base operators.jl:133 with MethodInstance for isequal(::IRTools.Inner.Block, ::Any) (1 children)
              69: superseding isequal(x, y) @ Base operators.jl:133 with MethodInstance for isequal(::IRTools.Inner.Variable, ::Any) (16 children)
              70: superseding isequal(x, y) @ Base operators.jl:133 with MethodInstance for isequal(::IRTools.Inner.IR, ::Any) (4 children)
              71: superseding isequal(x, y) @ Base operators.jl:133 with MethodInstance for isequal(::Expr, ::Any) (13 children)
              72: superseding isequal(x, y) @ Base operators.jl:133 with MethodInstance for isequal(::Symbol, ::Any) (6 children)
              73: superseding isequal(x, y) @ Base operators.jl:133 with MethodInstance for isequal(::Symbol, ::Any) (1 children)
              74: superseding isequal(x, y) @ Base operators.jl:133 with MethodInstance for isequal(::Symbol, ::Any) (4 children)
              75: superseding isequal(x, y) @ Base operators.jl:133 with MethodInstance for isequal(::Nothing, ::Any) (1 children)
              76: superseding isequal(x, y) @ Base operators.jl:133 with MethodInstance for isequal(::Symbol, ::Any) (5 children)
              77: superseding isequal(x, y) @ Base operators.jl:133 with MethodInstance for isequal(::Symbol, ::Any) (1 children)
              78: superseding isequal(x, y) @ Base operators.jl:133 with MethodInstance for isequal(::Symbol, ::Any) (4 children)
              79: superseding isequal(x, y) @ Base operators.jl:133 with MethodInstance for isequal(::Symbol, ::Any) (1 children)
              80: superseding isequal(x, y) @ Base operators.jl:133 with MethodInstance for isequal(::Symbol, ::Any) (1 children)
              81: superseding isequal(x, y) @ Base operators.jl:133 with MethodInstance for isequal(::LLVM.LLVMType, ::Any) (1 children)
              82: superseding isequal(x, y) @ Base operators.jl:133 with MethodInstance for isequal(::Core.MethodInstance, ::Any) (3 children)
              83: superseding isequal(x, y) @ Base operators.jl:133 with MethodInstance for isequal(::Core.MethodInstance, ::Any) (1 children)
              84: superseding isequal(x, y) @ Base operators.jl:133 with MethodInstance for isequal(::String, ::Any) (3 children)
              85: superseding isequal(x, y) @ Base operators.jl:133 with MethodInstance for isequal(::Core.MethodInstance, ::Any) (4 children)
              86: superseding isequal(x, y) @ Base operators.jl:133 with MethodInstance for isequal(::LLVM.Function, ::Any) (1 children)
              87: superseding isequal(x, y) @ Base operators.jl:133 with MethodInstance for isequal(::Tuple{String, Vector{Base.StackTraces.StackFrame}, Any}, ::Any) (12 children)
              88: superseding isequal(x, y) @ Base operators.jl:133 with MethodInstance for isequal(::String, ::Any) (2 children)
              89: superseding isequal(x, y) @ Base operators.jl:133 with MethodInstance for isequal(::Vector{Base.StackTraces.StackFrame}, ::Any) (1 children)
              90: superseding isequal(x, y) @ Base operators.jl:133 with MethodInstance for isequal(::Base.StackTraces.StackFrame, ::Any) (1 children)
              91: superseding isequal(x, y) @ Base operators.jl:133 with MethodInstance for isequal(::Symbol, ::Any) (1 children)

From the docs:

The most consequential ones (the ones with the most children) are listed last, and should be where you direct your attention first.

xlxs4 commented 8 months ago

I've come across this 3 weeks ago, if that helps.

julia> methinvs.backedges
14-element Vector{SnoopCompile.InstanceNode}:
 MethodInstance for Base.unsafe_convert(::Union{Type{Ptr{T}}, Type{Ptr{Nothing}}}, ::Base.RefValue{T}) where T at depth 0 with 1 children
 MethodInstance for Base.unsafe_convert(::Type{Ptr{T}}, ::Base.RefValue{T}) where T<:Function at depth 0 with 2 children
 MethodInstance for Base.unsafe_convert(::Type{Ptr{T}}, ::Base.RefValue{T}) where T<:Function at depth 1 with 1 children
 MethodInstance for Base.unsafe_convert(::Type{Ptr{T}}, ::Base.RefValue{T}) where T<:Function at depth 1 with 356 children
 MethodInstance for Base.unsafe_convert(::Type{Ptr{T}}, ::Base.RefValue{T}) where T<:Function at depth 1 with 1 children
 MethodInstance for Base.unsafe_convert(::Type{Ptr{T}}, ::Base.RefValue{T}) where T<:Function at depth 1 with 3 children
 ⋮
 MethodInstance for Base.unsafe_convert(::Type{Ptr{T}}, ::Base.RefValue{T}) where T<:Function at depth 1 with 3 children
 MethodInstance for Base.unsafe_convert(::Type{Ptr{T}}, ::Base.RefValue{T}) where T<:Function at depth 1 with 1 children
 MethodInstance for Base.unsafe_convert(::Type{Ptr{T}}, ::Base.RefValue{T}) where T<:Function at depth 1 with 3 children
 MethodInstance for Base.unsafe_convert(::Type{Ptr{T}}, ::Base.RefValue{T}) where T<:Function at depth 1 with 1 children
 MethodInstance for Base.unsafe_convert(::Type{Ptr{T}}, ::Base.RefValue{T}) where T<:Function at depth 1 with 3 children
timholy commented 8 months ago

Yeah, there's a lot broken right now. Currently waiting on https://github.com/JuliaLang/julia/issues/53020