snoop_inference is broken on latest after stackless inference change
We should be able to restore basically the old behavior with the new stack.
I wasn't certain how to maintain the old code, since it was working with incomplete and inaccurate information available. Now all required information is available in
function typeinf(interp::AbstractInterpreter, frame::InferenceState), so this could be reimplemented there in some form.
Originally posted by @vtjnash in https://github.com/JuliaLang/julia/pull/55575#discussion_r1795702974
CC: @timholy
FWIW, this also affects PrecompileTools.jl.
In particular https://github.com/JuliaLang/PrecompileTools.jl/blob/61138b566718652a4033f528ff2dcabcf4cff2cb/src/workloads.jl#L88-L100
Can we confirm that PrecompileTools and SnoopCompile works properly brute closing this?
Attempts to validate this:
- Checked PrecompileTools CI on nightly. Errors, not sure if related https://github.com/JuliaLang/PrecompileTools.jl/pull/46
- Checked GPUCompiler CI on nightly. The error reported doesn't show up (the
ptx/precompiletests pass), but not sure if it's just hitting other errors earlier https://github.com/JuliaGPU/GPUCompiler.jl/pull/676 - Tried
pkg> statuslocally with--trace-compile=stderrand still see some precompile statements
% ./julia --trace-compile=stderr --trace-compile-timing --start=no -q
julia> #= 17.3 ms =# precompile(Tuple{Base.var"#readcb_specialized#uv_readcb##0", Base.TTY, Int64, UInt64})
#= 16.5 ms =# precompile(Tuple{typeof(Base.peek), Base.TTY, Type{UInt8}})
#= 6.8 ms =# precompile(Tuple{typeof(Base.get), Base.Dict{Char, Any}, Char, Nothing})
#= 11.2 ms =# precompile(Tuple{typeof(Base.Compiler.scan_specified_partitions), Base.Compiler.var"#global_assignment_rt_exct##0#global_assignment_rt_exct##1"{Type{Float64}}, Base.Compiler.var"#scan_partitions##0#scan_partitions##1", Base.Compiler.NativeInterpreter, GlobalRef, Base.Compiler.WorldWithRange})
#= 16.6 ms =# precompile(Tuple{typeof(REPL.Pkg_promptf)})
#= 1.4 ms =# precompile(Tuple{typeof(Base.Unicode.textwidth), String})
(@v1.13) pkg> #= 3.2 ms =# precompile(Tuple{REPL.var"#setup_interface##26#setup_interface##27"{REPL.LineEdit.MIState, REPL.LineEditREPL, REPL.LineEdit.Prompt}})
#= 5.4 ms =# precompile(Tuple{REPL.var"#setup_interface##28#setup_interface##29"{Module, REPL.LineEditREPL, REPL.LineEdit.Prompt}, REPL.LineEdit.MIState})
#= 2.9 ms =# precompile(Tuple{REPL.var"#setup_interface##30#setup_interface##31"{REPL.LineEdit.MIState, REPL.LineEdit.Prompt}})
(@v1.13) pkg> s#= 20.2 ms =# precompile(Tuple{typeof(Core.kwcall), NamedTuple{names, T} where T<:Tuple where names, typeof(REPL.LineEdit.complete_line), REPL.LineEdit.CompletionProvider, Any, Module})
#= 9.5 ms =# precompile(Tuple{typeof(Base.filter), REPLExt.var"#47#48", Array{String, 1}})
(@v1.13) pkg> sta#= 67.9 ms =# precompile(Tuple{typeof(Core.kwcall), NamedTuple{(:color,), Tuple{Symbol}}, typeof(Base.printstyled), REPL.Terminals.TTYTerminal, String})
tus#= 1.6 ms =# precompile(Tuple{typeof(REPL.Terminals.cmove_left), REPL.Terminals.TTYTerminal, Int64})
(@v1.13) pkg> status
#= 6.0 ms =# precompile(Tuple{Base.Returns{Symbol}, Any})
#= 5.7 ms =# precompile(Tuple{typeof(Base.indexed_iterate), Tuple{Base.GenericIOBuffer{Memory{UInt8}}, Bool, Bool}, Int64})
#= 5.3 ms =# precompile(Tuple{typeof(Base.indexed_iterate), Tuple{Base.GenericIOBuffer{Memory{UInt8}}, Bool, Bool}, Int64, Int64})
#= 4.0 ms =# precompile(Tuple{REPLExt.var"#create_mode##0#create_mode##1"{REPL.LineEditREPL}, REPL.LineEdit.MIState, Base.GenericIOBuffer{Memory{UInt8}}, Bool})
#= 2.7 ms =# precompile(Tuple{typeof(Base.length), Array{Pkg.Types.PackageSpec, 1}})
#= 12.9 ms =# precompile(Tuple{Pkg.API.var"##status#108", Base.IOContext{IO}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, typeof(Pkg.API.status), Array{Pkg.Types.PackageSpec, 1}})
#= 2.9 ms =# precompile(Tuple{Base.var"#698#699"{Base.Process}})
#= 3.0 ms =# precompile(Tuple{Type{Array{Dates.DateTime, 1}}, UndefInitializer, Tuple{Int64}})
#= 1.5 ms =# precompile(Tuple{Type{Pair{A, B} where B where A}, String, Dates.DateTime})
#= 2.5 ms =# precompile(Tuple{typeof(Base.similar), Array{Any, 1}})
#= 2.2 ms =# precompile(Tuple{typeof(Base.similar), Array{String, 1}})
#= 1.3 ms =# precompile(Tuple{typeof(Base.Iterators.enumerate), Array{String, 1}})
#= 1.7 ms =# precompile(Tuple{typeof(Base.setindex!), Array{String, 1}, String, Int64})
#= 1.9 ms =# precompile(Tuple{typeof(Core.kwcall), NamedTuple{(:io,), Tuple{Base.IOContext{IO}}}, typeof(Pkg.API.status), Pkg.Types.Context, Array{Pkg.Types.PackageSpec, 1}})
#= 1.1 ms =# precompile(Tuple{typeof(Base.print), Base.IOContext{Base.GenericIOBuffer{Memory{UInt8}}}, Char})
Status#= 2.1 ms =# precompile(Tuple{typeof(Base.lock), Base.TTY})
`~/.julia/environments/v1.13/Project.toml`
#= 2.4 ms =# precompile(Tuple{typeof(Base.unlock), Base.TTY})
#= 1.3 ms =# precompile(Tuple{typeof(Base.values), Base.Dict{String, Any}})
#= 10.2 ms =# precompile(Tuple{typeof(Base.Broadcast.broadcasted), Type{Base.UUID}, Base.ValueIterator{Base.Dict{String, Any}}})
#= 9.8 ms =# precompile(Tuple{typeof(Base.Broadcast.materialize), Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, Type{Base.UUID}, Tuple{Array{Any, 1}}}})
Looks like it's still broken https://github.com/JuliaGPU/GPUCompiler.jl/pull/676#issuecomment-2729792994
Closed by accident?
Indeed, looks like a GitHub bug, thanks for undoing it.
Anyone know what the status is here?
I was waiting for #58346, but now that it's done I'll get back to fixing SnoopCompile after the holiday weekend. I had almost everything ready to go but tests were failing (the fix for #58346 should fix that), so I don't think it will take very long.
If this is on the SnoopCompile side now I'll remove the milestone from here
There's a chance there will be some additional Julia changes...the two have typically gone hand-in-hand. I'll try to get to this soon so there's no issue with the 1.12 release.
xref https://github.com/JuliaLang/julia/pull/58124 (which is on the 1.12 milestone)