[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sbcl-commits
Subject:    [Sbcl-commits] CVS: sbcl/src/code purify.lisp, 1.10, 1.11 save.lisp,
From:       Juho Snellman <jsnell () users ! sourceforge ! net>
Date:       2007-04-30 20:55:45
Message-ID: E1HicuP-0007f8-RM () sc8-pr-cvs8 ! sourceforge ! net
[Download RAW message or body]

Update of /cvsroot/sbcl/sbcl/src/code
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29413/src/code

Modified Files:
	purify.lisp save.lisp 
Log Message:
1.0.5.14: make PURIFY a no-op on gencgc

         * Purification doesn't really make any sense with gencgc, since we
           have an uncollected generation with a write barrier these days.
         * Apparently it had also bitrotted on ppc/gencgc between 1.0.0 and
           1.0.4, causing crashes with software doing (SAVE-LISP-AND-DIE
           ... :PURIFY T), for example Maxima. (Reported by Rex Dieter)
         * So make PURIFY a no-op on gencgc, and remove about 600 lines worth of
           #ifdeffed OAOO violations from purify.c.
         * Allows shrinking the static and read-only spaces into something
           sensible (arbitrary value of 1MB selected), and moving all of them
           closer together to reduce the virtual address space footprint.
         * Move + shrink the linkage-table while we're at it.


Index: purify.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/code/purify.lisp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- purify.lisp	22 Nov 2005 01:01:17 -0000	1.10
+++ purify.lisp	30 Apr 2007 20:55:43 -0000	1.11
@@ -42,8 +42,15 @@
 
    ENVIRONMENT-NAME is gratuitous documentation for compacted version of the
    current global environment (as seen in SB!C::*INFO-ENVIRONMENT*.) If NIL is
-   supplied, then environment compaction is inhibited."
+   supplied, then environment compaction is inhibited.
 
-  (when environment-name (compact-environment-aux environment-name 200))
-  (%purify (get-lisp-obj-address root-structures)
-           (get-lisp-obj-address nil)))
+   This function is a no-op on platforms using the generational garbage
+   collector (x86, x86-64, ppc)."
+  #!+gencgc
+  (declare (ignore root-structures environment-name))
+  #!-gencgc
+  (progn
+    (when environment-name
+      (compact-environment-aux environment-name 200))
+    (%purify (get-lisp-obj-address root-structures)
+             (get-lisp-obj-address nil))))

Index: save.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/code/save.lisp,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- save.lisp	12 Apr 2007 19:19:07 -0000	1.35
+++ save.lisp	30 Apr 2007 20:55:43 -0000	1.36
@@ -32,8 +32,7 @@
 
 (defun save-lisp-and-die (core-file-name &key
                                          (toplevel #'toplevel-init)
-                                         (purify #!+gencgc nil
-                                                 #!-gencgc t)
+                                         (purify t)
                                          (root-structures ())
                                          (environment-name "auxiliary")
                                          (executable nil))
@@ -61,9 +60,8 @@
      somewhat longer than the normal GC which is otherwise done, but
      it's only done once, and subsequent GC's will be done less often
      and will take less time in the resulting core file. See the PURIFY
-     function. For platforms that use the generational garbage collector
-     (x86 and x86-64) purification generally results in a loss of
-     performance.
+     function. This parameter has no effect on platforms using the
+     generational garbage collector.
 
   :ROOT-STRUCTURES
      This should be a list of the main entry points in any newly loaded
@@ -108,6 +106,8 @@
 This isn't because we like it this way, but just because there don't
 seem to be good quick fixes for either limitation and no one has been
 sufficiently motivated to do lengthy fixes."
+  #!+gencgc
+  (declare (ignore purify root-structures environment-name))
   (tune-hashtable-sizes-of-all-packages)
   (deinit)
   ;; FIXME: Would it be possible to unmix the PURIFY logic from this
@@ -135,7 +135,8 @@
     ;; access to it even after the GC has moved it.
     #!+gencgc
     (setf sb!vm::*restart-lisp-function* #'restart-lisp)
-    (cond (purify
+    (cond #!-gencgc
+          (purify
            (purify :root-structures root-structures
                    :environment-name environment-name)
            (save-core nil))


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Sbcl-commits mailing list
Sbcl-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-commits
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic