From 4d66cd26dcc056cbc503320f82ed894944ee4098 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Wed, 2 Nov 2011 16:47:27 -0700 Subject: [PATCH] Keep the profiling results even when the quotation throws an exception. --- basis/tools/profiler/sampling/sampling.factor | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/basis/tools/profiler/sampling/sampling.factor b/basis/tools/profiler/sampling/sampling.factor index bb95a62706..9a0fc783c6 100644 --- a/basis/tools/profiler/sampling/sampling.factor +++ b/basis/tools/profiler/sampling/sampling.factor @@ -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 ;