tools.profiler.sampling: don't mis-use collect-by.

db4
John Benediktsson 2013-04-22 06:24:02 -07:00
parent 0f8ab38723
commit 8574b25a96
1 changed files with 3 additions and 1 deletions

View File

@ -101,7 +101,9 @@ CONSTANT: zero-counts { 0 0 0 0 0 }
] [ f ] if ; inline
:: collect-tops ( samples max-depth depth -- node )
samples [ drop unclip-callstack ] collect-by [
samples H{ } clone [
'[ unclip-callstack _ push-at ] each
] keep [
[ sum-counts ]
[ max-depth depth [ max-depth depth 1 + collect-tops ] (collect-subtrees) ] bi
depth <profile-node>