From: Joe Marshall Date: Sat, 21 Jan 2012 20:02:10 +0000 (-0800) Subject: Pass profile into run-with-stack-sampling. X-Git-Tag: release-9.2.0~334^2~2 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=d6028c031603bd3e1651a991cc12eac988b6135f;p=mit-scheme.git Pass profile into run-with-stack-sampling. --- diff --git a/src/runtime/stack-sample.scm b/src/runtime/stack-sample.scm index c38fc1f52..bd9370d54 100644 --- a/src/runtime/stack-sample.scm +++ b/src/runtime/stack-sample.scm @@ -115,9 +115,8 @@ ;;;; Running with Stack Sampling -(define (run-with-stack-sampling sample-interval thunk) - (let ((profile (make-profile)) - (timer-registration #t)) +(define (run-with-stack-sampling profile sample-interval thunk) + (let ((timer-registration #t)) (define (register-event) (if timer-registration (set! timer-registration @@ -279,7 +278,7 @@ (with-notification (lambda (output-port) (write-string "Stack-sampling" output-port)) (lambda () - (run-with-stack-sampling sample-interval thunk))) + (run-with-stack-sampling (make-profile) sample-interval thunk))) (write-notification-line (lambda (output-port) (display-profile profile output-port)))