 
 CONSTANT: ignore-words
     { signal-handler leaf-signal-handler profiling minor-gc }
+
+: ignore-word? ( word -- ? ) ignore-words member? ; inline
 
 : get-raw-profile-data ( -- data )
     raw-profile-data get-global [ "No profile data" throw ] unless* ;

    dup redundant-root-node? [ children>> values first trim-root ] when ;

: (top-down) ( samples -- tree )
    collect-threads [
        [ sum-times ] [ collect-tops ] bi <profile-node> trim-root
    ] assoc-map ;

: top-down ( -- tree )
    get-raw-profile-data (top-down) ;

USING: accessors assocs calendar combinators
combinators.short-circuit continuations fry io kernel
kernel.private locals math math.statistics math.vectors memory
namespaces prettyprint sequences sets sorting
tools.profiler.sampling.private hashtables.identity generalizations ;
FROM: sequences => change-nth ;
FROM: assocs => change-at ;
