[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Stack calibration
From: |
Neil Jerram |
Subject: |
Re: Stack calibration |
Date: |
Mon, 13 Oct 2008 22:37:20 +0100 |
2008/10/12 Neil Jerram <address@hidden>:
>
> Here's the new patch. Please (as ever!) let me know what you think.
One update to this below. It isn't actually necessary or helpful, for
this case, to pull in the GOOPS interface to evaluator traps.
Neil
diff --git a/libguile/measure-hwm.scm b/libguile/measure-hwm.scm
index 364740b..53a30d5 100644
--- a/libguile/measure-hwm.scm
+++ b/libguile/measure-hwm.scm
@@ -35,16 +35,16 @@
;; Define a variable to hold the measured stack high water mark (HWM).
(define top-repl-hwm-measured 0)
-;; Install an evaluator trap to measure the stack size at every
+;; Use an evaluator trap to measure the stack size at every
;; evaluation step, and increase top-repl-hwm-measured if it is less
;; than the measured stack size.
-(use-modules (ice-9 debugging traps)
- (oop goops))
-(install-trap (make <entry-trap>
- #:behaviour (lambda (trap-context)
- (let ((stack-size (%get-stack-size)))
- (if (< top-repl-hwm-measured stack-size)
- (set! top-repl-hwm-measured stack-size))))))
+(trap-set! enter-frame-handler
+ (lambda _
+ (let ((stack-size (%get-stack-size)))
+ (if (< top-repl-hwm-measured stack-size)
+ (set! top-repl-hwm-measured stack-size)))))
+(trap-enable 'enter-frame)
+(trap-enable 'traps)
;; Call (turn-on-debugging) and (top-repl) in order to simulate as
;; closely as possible what happens - and in particular, how much
@@ -74,7 +74,7 @@
;; This is the value of top-repl-hwm-measured that we get on a
;; `canonical' build platform. (See text below for what that means.)
-(define top-repl-hwm-i686-pc-linux-gnu 9685)
+(define top-repl-hwm-i686-pc-linux-gnu 9461)
;; Using the above results, output code that tests can run in order to
;; configure the stack limit correctly for the current build platform.
- Re: Stack calibration, (continued)
- Re: Stack calibration, Ludovic Courtès, 2008/10/06
- Re: Stack calibration, Neil Jerram, 2008/10/06
- Re: Stack calibration, Neil Jerram, 2008/10/09
- Re: Stack calibration, Greg Troxel, 2008/10/10
- Re: Stack calibration, Neil Jerram, 2008/10/10
- Re: Stack calibration, Greg Troxel, 2008/10/10
- Re: Stack calibration, Neil Jerram, 2008/10/10
- Re: Stack calibration, Ludovic Courtès, 2008/10/11
- Re: Stack calibration, Neil Jerram, 2008/10/12
- Re: Stack calibration, Neil Jerram, 2008/10/12
- Re: Stack calibration,
Neil Jerram <=
- Re: Stack calibration, Ludovic Courtès, 2008/10/14
- Re: Stack calibration, Neil Jerram, 2008/10/17
- Re: Stack calibration, Ludovic Courtès, 2008/10/14