Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SnoopCompileCore/src/snoop_inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function addchildren!(parent::InferenceTimingNode, cis, backedges, miidx, backtr
while true
found = false
for k in backedges[j]
k < j && continue # don't get caught in cycles
k j && continue # don't get caught in cycles
be = cis[k]
if be ∉ handled
j = k
Expand Down
17 changes: 17 additions & 0 deletions test/snoop_inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,23 @@ end
@test :printdown ∈ names
end

function countdownrecursive(io::IO, n::Int)
if n == 0
return printfinal(io)
end
return countdownrecursive(io, n-1)
end
function printfinal(io::IO)
println(io, "final")
return nothing
end
@testset "cycles - recursive" begin
tinf = @snoop_inference countdownrecursive(IOBuffer(), 3)
names = [Method(frame).name for frame in flatten(tinf)]
@test :countdownrecursive ∈ names
@test :printfinal ∈ names
end

@testset "Stale and precompile_blockers" begin
cproj = Base.active_project()
cd(joinpath("testmodules", "Stale")) do
Expand Down