fix path collection for profiling

svn: r2372
This commit is contained in:
Matthew Flatt 2006-03-06 13:18:14 +00:00
parent d4952b42e7
commit 41b06100e3
2 changed files with 10 additions and 8 deletions

View File

@ -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

View File

@ -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