Skip to content

Commit 0ad1e5f

Browse files
authored
Don't error on empty typeinf flamegraph; print a warning instead
See #212 (comment).
1 parent 4e00e22 commit 0ad1e5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/parcel_snoopi_deep.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1786,7 +1786,7 @@ The empty horizontal periods in the flamegraph correspond to times when somethin
17861786
The total width of the flamegraph is set from the `ROOT` node.
17871787
"""
17881788
function FlameGraphs.flamegraph(tinf::InferenceTimingNode; tmin = 0.0, excluded_modules=Set([Main::Module]), mode=nothing)
1789-
isROOT(tinf) && isempty(tinf.children) && error("root node has no children")
1789+
isROOT(tinf) && isempty(tinf.children) && @warn "Empty profile: no compilation was recorded."
17901790
io = IOBuffer()
17911791
# Compute a "root" frame for the top-level node, to cover the whole profile
17921792
node_data, _ = _flamegraph_frame(io, tinf, tinf.start_time, true, excluded_modules, mode; toplevel=true)

0 commit comments

Comments
 (0)