X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcompiler%2Fmain.lisp;h=f1fc8518914fc740279e71c8bde0b5f9f764228b;hb=2f492b2a39b1361e1dd97d5243bc47238b98ca8f;hp=234264fc1db0a6c632e85c35fd3b15b2bf7c6a17;hpb=0c8643845555805048f50c783e118762e2c43a26;p=sbcl.git diff --git a/src/compiler/main.lisp b/src/compiler/main.lisp index 234264f..f1fc851 100644 --- a/src/compiler/main.lisp +++ b/src/compiler/main.lisp @@ -176,7 +176,7 @@ (*compiler-note-count* 0) (*undefined-warnings* nil) (*in-compilation-unit* t)) - (sb!thread:with-recursive-lock (*big-compiler-lock*) + (with-world-lock () (handler-bind ((parse-unknown-type (lambda (c) (note-undefined-reference @@ -758,7 +758,7 @@ (print-unreadable-object (s stream :type t)))) (:copier nil)) ;; the UT that compilation started at - (start-time (get-universal-time) :type unsigned-byte) + (start-time (get-internal-real-time) :type unsigned-byte) ;; the FILE-INFO structure for this compilation (file-info nil :type (or file-info null)) ;; the stream that we are using to read the FILE-INFO, or NIL if @@ -1031,7 +1031,8 @@ (functional-lexenv locall-fun)))) (fun (ir1-convert-lambda (make-xep-lambda-expression locall-fun) :source-name source-name - :debug-name (debug-name 'tl-xep debug-name-tail)))) + :debug-name (debug-name 'tl-xep debug-name-tail) + :system-lambda t))) (when name (assert-global-function-definition-type name locall-fun)) (setf (functional-entry-fun fun) locall-fun @@ -1605,10 +1606,13 @@ ((try-with-type pathname "lisp" nil)) ((try-with-type pathname "lisp" t)))))) -(defun elapsed-time-to-string (tsec) - (multiple-value-bind (tmin sec) (truncate tsec 60) - (multiple-value-bind (thr min) (truncate tmin 60) - (format nil "~D:~2,'0D:~2,'0D" thr min sec)))) +(defun elapsed-time-to-string (internal-time-delta) + (multiple-value-bind (tsec remainder) + (truncate internal-time-delta internal-time-units-per-second) + (let ((ms (truncate remainder (/ internal-time-units-per-second 1000)))) + (multiple-value-bind (tmin sec) (truncate tsec 60) + (multiple-value-bind (thr min) (truncate tmin 60) + (format nil "~D:~2,'0D:~2,'0D.~3,'0D" thr min sec ms)))))) ;;; Print some junk at the beginning and end of compilation. (defun print-compile-start-note (source-info) @@ -1629,7 +1633,7 @@ (compiler-mumble "~&; compilation ~:[aborted after~;finished in~] ~A~&" won (elapsed-time-to-string - (- (get-universal-time) + (- (get-internal-real-time) (source-info-start-time source-info)))) (values))