tools.profiler.sampling: don't mis-use collect-by.
parent
0f8ab38723
commit
8574b25a96
|
@ -101,7 +101,9 @@ CONSTANT: zero-counts { 0 0 0 0 0 }
|
||||||
] [ f ] if ; inline
|
] [ f ] if ; inline
|
||||||
|
|
||||||
:: collect-tops ( samples max-depth depth -- node )
|
:: collect-tops ( samples max-depth depth -- node )
|
||||||
samples [ drop unclip-callstack ] collect-by [
|
samples H{ } clone [
|
||||||
|
'[ unclip-callstack _ push-at ] each
|
||||||
|
] keep [
|
||||||
[ sum-counts ]
|
[ sum-counts ]
|
||||||
[ max-depth depth [ max-depth depth 1 + collect-tops ] (collect-subtrees) ] bi
|
[ max-depth depth [ max-depth depth 1 + collect-tops ] (collect-subtrees) ] bi
|
||||||
depth <profile-node>
|
depth <profile-node>
|
||||||
|
|
Loading…
Reference in New Issue