From e7d341407950d504e80f92588d08f3a7c81bee37 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Thu, 9 Mar 2017 10:42:58 +0100 Subject: [PATCH] Adapt statprof to new preemptive interrupts * module/statprof.scm (profile-signal-handler): Cut an additional stack frame, corresponding to the handle-interrupts trampoline added recently. --- module/statprof.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/module/statprof.scm b/module/statprof.scm index 1efb15dff..a58fc6da6 100644 --- a/module/statprof.scm +++ b/module/statprof.scm @@ -275,9 +275,11 @@ ;; handler in an inner letrec, so that the compiler sees ;; the inner reference to profile-signal-handler as the ;; same as the procedure, and therefore keeps slot 0 - ;; alive. Nastiness, that. + ;; alive. Nastiness, that. Finally we cut one more + ;; inner frame, corresponding to the handle-interrupts + ;; trampoline. (stack - (or (make-stack #t profile-signal-handler (outer-cut state)) + (or (make-stack #t profile-signal-handler (outer-cut state) 1) (pk 'what! (make-stack #t))))) (sample-stack-procs state stack)