Skip to content

Commit

Permalink
Don't error on empty typeinf flamegraph; print a warning instead (#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
NHDaly authored Jan 6, 2023
1 parent 4e00e22 commit 4dba505
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parcel_snoopi_deep.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1786,7 +1786,7 @@ The empty horizontal periods in the flamegraph correspond to times when somethin
The total width of the flamegraph is set from the `ROOT` node.
"""
function FlameGraphs.flamegraph(tinf::InferenceTimingNode; tmin = 0.0, excluded_modules=Set([Main::Module]), mode=nothing)
isROOT(tinf) && isempty(tinf.children) && error("root node has no children")
isROOT(tinf) && isempty(tinf.children) && @warn "Empty profile: no compilation was recorded."
io = IOBuffer()
# Compute a "root" frame for the top-level node, to cover the whole profile
node_data, _ = _flamegraph_frame(io, tinf, tinf.start_time, true, excluded_modules, mode; toplevel=true)
Expand Down

0 comments on commit 4dba505

Please sign in to comment.