1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 19:50:24 +02:00

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.
This commit is contained in:
Andy Wingo 2017-03-09 10:42:58 +01:00
parent bfa3883592
commit e7d3414079

View file

@ -275,9 +275,11 @@
;; handler in an inner letrec, so that the compiler sees ;; handler in an inner letrec, so that the compiler sees
;; the inner reference to profile-signal-handler as the ;; the inner reference to profile-signal-handler as the
;; same as the procedure, and therefore keeps slot 0 ;; 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 (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))))) (pk 'what! (make-stack #t)))))
(sample-stack-procs state stack) (sample-stack-procs state stack)