Skip to content

Commit d2d2b5c

Browse files
committed
Update to merged version
1 parent 3262f50 commit d2d2b5c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

SnoopCompileCore/src/snoop_inference.jl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ struct InferenceTimingNode
8686
end
8787
end
8888

89-
function timingtree(cis, backtraces)
89+
function timingtree(cis, _backtraces::Vector{Any})
9090
root = InferenceTimingNode(Core.Compiler.Timings.ROOTmi.cache, nothing)
9191
# the cis are added in the order children-before-parents, we need to be able to reverse that
9292
# We index on MethodInstance rather than CodeInstance, because constprop can result in a distinct
@@ -102,7 +102,12 @@ function timingtree(cis, backtraces)
102102
end
103103
end
104104
end
105-
backtraces = Dict{CodeInstance,Vector{Union{Ptr{Nothing}, Base.InterpreterIP}}}(ci => bt for (ci, bt) in backtraces)
105+
backtraces = Dict{CodeInstance,Vector{Union{Ptr{Nothing}, Base.InterpreterIP}}}()
106+
for i = 1:2:length(_backtraces)
107+
ci, trace = _backtraces[i], _backtraces[i+1]
108+
bt = Base._reformat_bt(trace[1], trace[2])
109+
backtraces[ci] = bt
110+
end
106111
addchildren!(root, cis, backedges, miidx, backtraces)
107112
return root
108113
end

0 commit comments

Comments
 (0)