(collect-subtrees) ( samples max-depth depth child-quot: ( samples -- child ) -- children )


Vocabulary
tools.profiler.sampling.private

Inputs
samplesan object
max-depthan object
depthan object
child-quota quotation with stack effect ( samples -- child )


Outputs
childrenan object


Definition


:: (collect-subtrees)
( samples max-depth depth child-quot: ( samples -- child ) -- children )
max-depth depth > [
samples [ sample-callstack leaf-callstack? ] reject
[ f ] [ child-quot call ] if-empty
] [ f ] if ; inline