Skip to content

Commit d96edc1

Browse files
committed
Check for empty flamegraph
1 parent 055d591 commit d96edc1

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
@@ -911,8 +911,8 @@ The empty horizontal periods in the flamegraph correspond to times when somethin
911911
The total width of the flamegraph is set from the `ROOT` node.
912912
"""
913913
function FlameGraphs.flamegraph(tinf::InferenceTimingNode; tmin = 0.0, excluded_modules=Set([Main::Module]), mode=nothing)
914+
isempty(tinf.children) && error("root node has no children")
914915
io = IOBuffer()
915-
916916
# Compute a "root" frame for the top-level node, to cover the whole profile
917917
node_data, _ = _flamegraph_frame(io, tinf, tinf.start_time, true, excluded_modules, mode; toplevel=true)
918918
root = Node(node_data)

0 commit comments

Comments
 (0)