From 41b06100e3c79c3de0e7af1f3682f884f55242e3 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 6 Mar 2006 13:18:14 +0000 Subject: [PATCH] fix path collection for profiling svn: r2372 --- collects/errortrace/doc.txt | 12 ++++++------ collects/errortrace/errortrace-lib.ss | 6 ++++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/collects/errortrace/doc.txt b/collects/errortrace/doc.txt index 9b29b70f80..fe56c967f3 100644 --- a/collects/errortrace/doc.txt +++ b/collects/errortrace/doc.txt @@ -109,12 +109,12 @@ Profiling records: * the procedure's source in the form of a syntax object (which might, in turn, provide a source location file and position). - * optionally, information about the procedure call path (something - like the stack trace) for every call to the procedure. Path - information is collected when the `profile-paths-enabled' boolean - parameter is #t; the default is #f, but setting the parameter to #t - immediately affects all procedure instrumented for profiling - information: + * optionally, information about the procedure call path (i.e., a + stack trace) for every call to the procedure; follecting this + information is expensive. Path information is collected when the + `profile-paths-enabled' boolean parameter is #t; the default is #f, + but setting the parameter to #t immediately affects all procedure + instrumented for profiling information: > (profile-paths-enabled) - returns #t if profiling collects path information, #f otherwise diff --git a/collects/errortrace/errortrace-lib.ss b/collects/errortrace/errortrace-lib.ss index ee081bb829..b63b25aa1b 100644 --- a/collects/errortrace/errortrace-lib.ss +++ b/collects/errortrace/errortrace-lib.ss @@ -44,8 +44,10 @@ [v (cdr v)]) (set-car! v (add1 (car v))) (when (profile-paths-enabled) - (let ([v (cdddr v)]) - (set-car! v (cons (current-continuation-marks profile-key) + (let ([v (cddddr v)]) + (set-car! v (cons (continuation-mark-set->list + (current-continuation-marks) + profile-key) (car v))))) (if (unbox b) #f