Skip to content
Snippets Groups Projects
Commit 0c5fa7e7 authored by ram's avatar ram
Browse files

Changed TIME to use *GC-RUN-TIME* to print the amount of time spent in GC.

parent 995e3305
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/time.lisp,v 1.10 1992/02/19 21:53:58 wlott Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/time.lisp,v 1.11 1992/02/20 00:59:18 ram Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -352,24 +352,29 @@ ...@@ -352,24 +352,29 @@
(old-run-utime old-run-stime old-page-faults old-bytes-consed) (old-run-utime old-run-stime old-page-faults old-bytes-consed)
(time-get-sys-info)) (time-get-sys-info))
(setq old-real-time (get-internal-real-time)) (setq old-real-time (get-internal-real-time))
(let ((start-gc-run-time *gc-run-time*))
(multiple-value-prog1 (multiple-value-prog1
;; Execute the form and return its values. ;; Execute the form and return its values.
(funcall fun) (funcall fun)
(multiple-value-setq (multiple-value-setq
(new-run-utime new-run-stime new-page-faults new-bytes-consed) (new-run-utime new-run-stime new-page-faults new-bytes-consed)
(time-get-sys-info)) (time-get-sys-info))
(setq new-real-time (- (get-internal-real-time) real-time-overhead)) (setq new-real-time (- (get-internal-real-time) real-time-overhead))
(format *trace-output* (let ((gc-run-time (max (- *gc-run-time* start-gc-run-time) 0)))
"~&Evaluation took:~% ~ (format *trace-output*
~S second~:P of real time~% ~ "~&Evaluation took:~% ~
~S second~:P of user run time~% ~ ~S second~:P of real time~% ~
~S second~:P of system run time~% ~ ~S second~:P of user run time~% ~
~S page fault~:P and~% ~ ~S second~:P of system run time~% ~
~S bytes consed.~%" ~:[~;[Run times include ~S second~:P GC run time]~% ~]~
(max (/ (- new-real-time old-real-time) ~S page fault~:P and~% ~
(float internal-time-units-per-second)) ~S bytes consed.~%"
0.0) (max (/ (- new-real-time old-real-time)
(max (/ (- new-run-utime old-run-utime) 1000000.0) 0.0) (float internal-time-units-per-second))
(max (/ (- new-run-stime old-run-stime) 1000000.0) 0.0) 0.0)
(max (- new-page-faults old-page-faults) 0) (max (/ (- new-run-utime old-run-utime) 1000000.0) 0.0)
(max (- new-bytes-consed old-bytes-consed) 0))))) (max (/ (- new-run-stime old-run-stime) 1000000.0) 0.0)
(not (zerop gc-run-time))
(/ (float gc-run-time) (float internal-time-units-per-second))
(max (- new-page-faults old-page-faults) 0)
(max (- new-bytes-consed old-bytes-consed) 0)))))))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment