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

Invalidation parsing failure on 1.9.0-beta2 #325

Closed johnbcoughlin closed 1 year ago

johnbcoughlin commented 1 year ago

First of all, thank you for your work on the pkgimages merge! I am all-too-eagerly giving it a test drive.

invalidation_trees is failing to parse an invalidations list from @snoopr on the latest beta version. On my machine, I get the following:

$ julia --startup-file=no
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.9.0-beta2 (2022-12-29)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using SnoopCompileCore

julia> invals = @snoopr using OrdinaryDiffEq;

julia> length(invals)
7350

julia> using SnoopCompile

julia> invalidation_trees(invals)
ERROR: KeyError: key MethodInstance for LoopVectorization.avx_config_val(::Val{(false, 0, 0, 0, false, 0x0000000000000001, 1, true)}, ::Static.StaticInt{2}) not found
Stacktrace:
 [1] getindex(h::Dict{Union{Int32, Core.MethodInstance}, Union{Tuple{Any, Vector{Any}}, SnoopCompile.InstanceNode}}, key::Core.MethodInstance)
   @ Base ./dict.jl:484
 [2] invalidation_trees(list::Vector{Any}; exclude_corecompiler::Bool)
   @ SnoopCompile ~/.julia/packages/SnoopCompile/Q8zUg/src/invalidations.jl:403
 [3] invalidation_trees(list::Vector{Any})
   @ SnoopCompile ~/.julia/packages/SnoopCompile/Q8zUg/src/invalidations.jl:294
 [4] top-level scope
   @ REPL[5]:1
jaakkor2 commented 1 year ago

Seems to work with SnoopCompile v2.9.6, SnoopCompileCore v2.9.0. I think I saw this with some earlier version.

timholy commented 1 year ago

Fixed by #329