0.6.12.41:
authorWilliam Harold Newman <william.newman@airmail.net>
Sun, 24 Jun 2001 15:54:39 +0000 (15:54 +0000)
committerWilliam Harold Newman <william.newman@airmail.net>
Sun, 24 Jun 2001 15:54:39 +0000 (15:54 +0000)
removed various REMOVEME stuff
more profiling/PCOUNTER stuff..
..restored "grep ';.*decla.*type'" stuff in profile.lisp,
and did other un-fluidifications of pcounter.lisp
and profile.lisp
..converted various PCOUNTER-related DECLAIMs to DEFKNOWNs

src/code/pcounter.lisp
src/code/profile.lisp
src/code/time.lisp
src/compiler/fndb.lisp
src/runtime/x86-arch.c
version.lisp-expr

index cfd7421..57a38f7 100644 (file)
 (/show0 "pcounter.lisp 16")
 
 (defstruct (pcounter (:copier nil))
-  (integer 0);; :type unsigned-byte)
-  (fixnum 0));; :type (and fixnum unsigned-byte)))
+  (integer 0 :type unsigned-byte)
+  (fixnum 0 :type (and fixnum unsigned-byte)))
 
 (/show0 "pcounter.lisp 22")
 
-(declaim (ftype (function (pcounter unsigned-byte) pcounter) incf-pcounter))
-;;;(declaim (inline incf-pcounter)) ; FIXME: maybe inline when more stable
+(declaim (maybe-inline incf-pcounter))
 (defun incf-pcounter (pcounter delta)
   (aver (typep delta 'unsigned-byte))
   (let ((sum (+ (pcounter-fixnum pcounter) delta)))
-    (aver (typep sum 'unsigned-byte))
-    ;;(declare (type unsigned-byte sum))
     (cond ((typep sum 'fixnum)
           (setf (pcounter-fixnum pcounter) sum))
          (t
@@ -39,7 +36,6 @@
 
 (/show0 "pcounter.lisp 36")
 
-(declaim (ftype (function (pcounter) integer) pcounter->integer))
 ;;;(declaim (inline pcounter->integer)) ; FIXME: maybe inline when more stable
 (defun pcounter->integer (pcounter)
   (+ (pcounter-integer pcounter)
@@ -53,8 +49,7 @@
 
 (/show0 "pcounter.lisp 50")
 
-(declaim (ftype (function ((or pcounter fixnum) integer) (or pcounter fixnum)) %incf-pcounter-or-fixnum))
-;;;(declaim (inline %incf-pcounter-or-fixnum)) ; FIXME: maybe inline when more stable
+(declaim (inline %incf-pcounter-or-fixnum))
 (defun %incf-pcounter-or-fixnum (x delta)
   (etypecase x
     (fixnum
@@ -83,7 +78,6 @@
 
 (/show0 "pcounter.lisp 80")
 
-(declaim (ftype (function ((or pcounter fixnum)) integer) pcounter-or-fixnum->integer))
 (declaim (maybe-inline pcounter-or-fixnum->integer))
 (defun pcounter-or-fixnum->integer (x)
   (etypecase x
index 4f4f9ab..bf90865 100644 (file)
        (let ((dticks 0)
             (dconsing 0)
             (inner-enclosed-profiles 0))
-        ;;(declare (type unsigned-byte dticks dconsing))
-        ;;(declare (type unsigned-byte inner-enclosed-profiles))
+        (declare (type unsigned-byte dticks dconsing))
+        (declare (type unsigned-byte inner-enclosed-profiles))
         (aver (typep dticks 'unsigned-byte))
         (aver (typep dconsing 'unsigned-byte))
         (aver (typep inner-enclosed-profiles 'unsigned-byte))
                         dconsing (fastbig- (get-bytes-consed) start-consing))
                   (setf inner-enclosed-profiles
                         (pcounter-or-fixnum->integer *enclosed-profiles*))
-                  (aver (not (minusp dconsing))) ; REMOVEME
-                  (aver (not (minusp inner-enclosed-profiles))) ; REMOVEME
                   (let ((net-dticks (fastbig- dticks *enclosed-ticks*)))
                     (fastbig-incf-pcounter-or-fixnum ticks net-dticks))
                   (let ((net-dconsing (fastbig- dconsing *enclosed-consing*)))
-                    (when (minusp net-dconsing) ; REMOVEME
-                      (unprofile-all)
-                      (error "huh? DCONSING=~S, *ENCLOSED-CONSING*=~S"
-                             dticks *enclosed-ticks*))
                     (fastbig-incf-pcounter-or-fixnum consing net-dconsing))
                   (fastbig-incf-pcounter-or-fixnum profiles
                                                    inner-enclosed-profiles))))
     (max raw-compensated 0.0)))
 
 (defun report ()
-  "Report results from profiling. The results are
-approximately adjusted for profiling overhead, but when RAW is true
-the unadjusted results are reported. The compensation may be somewhat
-inaccurate when bignums are involved in runtime calculation, as in
-a very-long-running Lisp process."
+  "Report results from profiling. The results are approximately adjusted
+for profiling overhead. The compensation may be rather inaccurate when
+bignums are involved in runtime calculation, as in a very-long-running
+Lisp process."
   (declare #.*optimize-external-despite-byte-compilation*)
   (unless (boundp '*overhead*)
     (setf *overhead*
@@ -426,9 +419,7 @@ a very-long-running Lisp process."
 
 ;;; We average the timing overhead over this many iterations.
 (defconstant +timer-overhead-iterations+
-  50 ; REMOVEME
-  ;;50000
-  )
+  50000)
 
 ;;; a dummy function that we profile to find profiling overhead
 (declaim (notinline compute-overhead-aux))
index 34d64c3..e0d001f 100644 (file)
             (setq *internal-real-time-base-seconds* seconds)
             uint)))))
 
-;;; REMOVEME once runtime nonmonotonicity problem is debugged
-(defvar *last-utime-sec*)
-(defvar *last-utime-usec*)
-(defvar *last-stime-sec*)
-(defvar *last-stime-usec*)
-(defvar *last-internal-run-time*)
-(push (lambda ()
-       (makunbound '*last-internal-run-time*))
-      *before-save-initializations*)
-
 (defun get-internal-run-time ()
   #!+sb-doc
   "Return the run time in the internal time format. This is useful for
                               stime-usec
                               (floor micro-seconds-per-internal-time-unit 2))
                            micro-seconds-per-internal-time-unit))))
-
-      ;; REMOVEME once runtime nonmonotonicity problem is debugged
-      (when (boundp '*last-internal-run-time*)
-       (unless (>= result *last-internal-run-time*)
-         (error "non-monotonic:~@
-                  UTIME-SEC ~S ~S~@
-                  UTIME-USEC ~S ~S~@
-                  STIME-SEC ~S ~S~@
-                  STIME-USEC ~S ~S~@
-                  RESULT ~S ~S"
-                *last-utime-sec* utime-sec
-                *last-utime-usec* utime-usec
-                *last-stime-sec* stime-sec
-                *last-stime-usec* stime-usec
-                *last-internal-run-time* result)))
-      (setf *last-utime-sec* utime-sec
-           *last-utime-usec* utime-usec
-           *last-stime-sec* stime-sec
-           *last-stime-usec* stime-usec
-           *last-internal-run-time* result)
-      
       result)))
 \f
 ;;;; Encode and decode universal times.
index 3043ffb..ba89f35 100644 (file)
 ;;;; miscellaneous extensions
 
 (defknown get-bytes-consed () unsigned-byte (flushable))
+
+;;; PCOUNTERs
+(defknown incf-pcounter (pcounter unsigned-byte) pcounter)
+(defknown pcounter->integer (pcounter) unsigned-byte)
+(defknown %incf-pcounter-or-fixnum ((or pcounter fixnum) unsigned-byte)
+  (or pcounter fixnum))
+(defknown pcounter-or-fixnum->integer ((or pcounter fixnum)) unsigned-byte)
 \f
 ;;;; magical compiler frobs
 
index 8bebc18..1bb6ba1 100644 (file)
@@ -265,7 +265,6 @@ sigtrap_handler(int signal, siginfo_t *info, void *void_context)
 static void
 sigill_handler(int signal, siginfo_t *siginfo, void *void_context) {
     os_context_t *context = (os_context_t*)void_context;
-    fprintf(stderr, "\n/entering sigill_handler()\n"); /*REMOVEME*/
     fake_foreign_function_call(context);
     ldb_monitor();
 }
index 4519446..4efa89e 100644 (file)
@@ -16,4 +16,4 @@
 ;;; four numeric fields, is used for versions which aren't released
 ;;; but correspond only to CVS tags or snapshots.
 
-"0.6.12.39"
+"0.6.12.41"