0.8.17.11:
[sbcl.git] / src / code / profile.lisp
index 30bd69d..97dba1f 100644 (file)
        (let ((dticks 0)
             (dconsing 0)
             (inner-enclosed-profiles 0))
+         (declare (optimize (safety 0)))
         (declare (type unsigned-byte dticks dconsing))
         (declare (type unsigned-byte inner-enclosed-profiles))
         (aver (typep dticks 'unsigned-byte))
                         (pcounter-or-fixnum->integer *enclosed-profiles*))
                   (let ((net-dticks (fastbig- dticks *enclosed-ticks*)))
                     (fastbig-incf-pcounter-or-fixnum ticks net-dticks))
-                  (let ((net-dconsing (fastbig- dconsing
-                                                (pcounter-or-fixnum->integer
-                                                 *enclosed-consing*))))
+                  (let ((net-dconsing (fastbig-
+                                        (fastbig- dconsing
+                                                  (pcounter-or-fixnum->integer
+                                                   *enclosed-consing*))
+                                        ;; three variables with value
+                                        ;; cells two bytes each.
+                                        (* 3 2 sb-vm:n-word-bytes))))
                     (fastbig-incf-pcounter-or-fixnum consing net-dconsing))
                   (fastbig-incf-pcounter-or-fixnum profiles
                                                    inner-enclosed-profiles))))
@@ -516,7 +521,6 @@ Lisp process."
 ;;; then load the old *OVERHEAD* value from the .core file into a
 ;;; different machine running at a different speed. We avoid this by
 ;;; erasing *CALL-OVERHEAD* whenever we save a .core file.
-(pushnew (lambda ()
-          (without-package-locks
-           (makunbound '*overhead*)))
-        *before-save-initializations*)
+(defun profile-deinit ()
+  (without-package-locks
+    (makunbound '*overhead*)))