1.0.35.19: fix SB-EXT:GENERATION-* accessors for generation > 0
authorNathan Froyd <froydnj@cs.rice.edu>
Sat, 27 Feb 2010 16:01:21 +0000 (16:01 +0000)
committerNathan Froyd <froydnj@cs.rice.edu>
Sat, 27 Feb 2010 16:01:21 +0000 (16:01 +0000)
Add the `lutexes' slot to `struct generation' as defined from Lisp.
Not paying attention to OAOO bites again.  Unfortunately, several things
are still OAOOM...

NEWS
src/code/gc.lisp
tests/gc.impure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 68ac632..c58fb1f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -35,6 +35,8 @@ changes relative to sbcl-1.0.35:
     before reaching the erring stack frame.
   * bug fix: Fix type derivation for EXPT when raising a fixnum to a
     real power.  (launchpad bug lp#525949)
+  * bug fix: Fix SB-EXT:GENERATION-* accessors for generations > 0 on
+    GENCGC platforms.  (launchpad bug lp#529014)
 
 changes in sbcl-1.0.35 relative to sbcl-1.0.34:
   * optimization: ROUND with a single single-float or double-float argument
index 8839b3e..eb7f13d 100644 (file)
@@ -346,7 +346,9 @@ collection is initiated. This can be set with SETF."
             (number-of-gcs int)
             (number-of-gcs-before-promotion int)
             (cum-sum-bytes-allocated unsigned-long)
-            (minimum-age-before-gc double)))
+            (minimum-age-before-gc double)
+            ;; `struct lutex *' or `void *', depending.
+            (lutexes (* char))))
 
 #!+gencgc
 (define-alien-variable generations
index c00438b..fbe284b 100644 (file)
     (sleep 1)
     (assert gc-happend)))
 
+;;; SB-EXT:GENERATION-* accessors returned bogus values for generation > 0
+#+gencgc
+(with-test (:name :bug-529014)
+  ;; FIXME: These parameters are a) tunable in the source and b)
+  ;; duplicated multiple times there and now here.  It would be good to
+  ;; OAOO-ify them (probably to src/compiler/generic/params.lisp).
+  (loop for i from 0 to sb-vm:+pseudo-static-generation+
+     do (assert (= (sb-ext:generation-bytes-consed-between-gcs i) 2000000))
+       (assert (= (sb-ext:generation-minimum-age-before-gc i) 0.75))
+       (assert (= (sb-ext:generation-number-of-gcs-before-promotion i) 1))))
index c828100..bca08cd 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.35.18"
+"1.0.35.19"