Handbook
Glossary
(collect-subtrees) ( samples max-depth depth child-quot: ( samples -- child ) -- children )
Vocabulary
tools
.
profiler
.
sampling
.
private
Inputs
samples
an
object
max-depth
an
object
depth
an
object
child-quot
a
quotation
with stack effect
( samples -- child )
Outputs
children
an
object
Definition
USING:
kernel
math
sequences
tools.profiler.sampling
;
IN:
tools.profiler.sampling.private
::
(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