From: William Harold Newman Date: Sun, 24 Jun 2001 15:54:39 +0000 (+0000) Subject: 0.6.12.41: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=4719b7d5d66c5930d3efd6a6d8e7572b16809f8d;p=sbcl.git 0.6.12.41: 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 --- diff --git a/src/code/pcounter.lisp b/src/code/pcounter.lisp index cfd7421..57a38f7 100644 --- a/src/code/pcounter.lisp +++ b/src/code/pcounter.lisp @@ -18,18 +18,15 @@ (/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 diff --git a/src/code/profile.lisp b/src/code/profile.lisp index 4f4f9ab..bf90865 100644 --- a/src/code/profile.lisp +++ b/src/code/profile.lisp @@ -155,8 +155,8 @@ (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)) @@ -177,15 +177,9 @@ 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)))) @@ -347,11 +341,10 @@ (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)) diff --git a/src/code/time.lisp b/src/code/time.lisp index 34d64c3..e0d001f 100644 --- a/src/code/time.lisp +++ b/src/code/time.lisp @@ -47,16 +47,6 @@ (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 @@ -85,27 +75,6 @@ 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))) ;;;; Encode and decode universal times. diff --git a/src/compiler/fndb.lisp b/src/compiler/fndb.lisp index 3043ffb..ba89f35 100644 --- a/src/compiler/fndb.lisp +++ b/src/compiler/fndb.lisp @@ -1242,6 +1242,13 @@ ;;;; 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) ;;;; magical compiler frobs diff --git a/src/runtime/x86-arch.c b/src/runtime/x86-arch.c index 8bebc18..1bb6ba1 100644 --- a/src/runtime/x86-arch.c +++ b/src/runtime/x86-arch.c @@ -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(); } diff --git a/version.lisp-expr b/version.lisp-expr index 4519446..4efa89e 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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"