Keep the profiling results even when the quotation throws an exception.

db4
Doug Coleman 2011-11-02 16:47:27 -07:00
parent 05c96477f3
commit 4d66cd26dc
1 changed files with 3 additions and 2 deletions

View File

@ -24,8 +24,9 @@ CONSTANT: ignore-words
: profile ( quot -- )
samples-per-second get-global profiling
[ 0 profiling ] [ ] cleanup
(get-samples) raw-profile-data set-global ; inline
[ 0 profiling ] [
(get-samples) raw-profile-data set-global
] cleanup ; inline
: total-sample-count ( sample -- count ) 0 swap nth ;
: gc-sample-count ( sample -- count ) 1 swap nth ;