X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Froom.lisp;h=0b9a24abb792f385f2732322757648b6b92ba36e;hb=90ca09b75fbc3b63b2f7d09c67b04b866dd783f6;hp=b8d966e1d8e4e69108c83a356b9dc59e99b70522;hpb=89eb73c035f05ae53b1148ef8a83e1d4030b2dd8;p=sbcl.git diff --git a/src/code/room.lisp b/src/code/room.lisp index b8d966e..0b9a24a 100644 --- a/src/code/room.lisp +++ b/src/code/room.lisp @@ -15,13 +15,13 @@ (eval-when (:compile-toplevel :load-toplevel :execute) (def!struct (room-info (:make-load-form-fun just-dump-it-normally)) - ;; The name of this type. + ;; the name of this type (name nil :type symbol) - ;; Kind of type (how we determine length). - (kind (required-argument) + ;; kind of type (how we determine length) + (kind (missing-arg) :type (member :lowtag :fixed :header :vector :string :code :closure :instance)) - ;; Length if fixed-length, shift amount for element size if :VECTOR. + ;; length if fixed-length, shift amount for element size if :VECTOR (length nil :type (or fixnum null)))) (eval-when (:compile-toplevel :execute) @@ -316,7 +316,7 @@ (format t "~%~A:~% ~:D bytes, ~:D object~:P" name total-bytes total-objects) (dolist (space (spaces)) - (format t ", ~D% ~(~A~)" + (format t ", ~W% ~(~A~)" (round (* (cdr space) 100) total-bytes) (car space))) (format t ".~%") @@ -465,7 +465,7 @@ #.instance-header-widetag) (incf descriptor-words (truncate size n-word-bytes))) (t - (error "bogus type: ~D" type)))) + (error "bogus widetag: ~W" type)))) space)) (format t "~:D words allocated for descriptor objects.~%" descriptor-words) @@ -478,7 +478,7 @@ ;;; TOP-N types with largest usage. (defun instance-usage (space &key (top-n 15)) (declare (type spaces space) (type (or fixnum null) top-n)) - (format t "~2&~@[Top ~D ~]~(~A~) instance types:~%" top-n space) + (format t "~2&~@[Top ~W ~]~(~A~) instance types:~%" top-n space) (let ((totals (make-hash-table :test 'eq)) (total-objects 0) (total-bytes 0)) @@ -515,13 +515,13 @@ (objects (cadr what))) (incf printed-bytes bytes) (incf printed-objects objects) - (format t " ~A: ~:D bytes, ~D object~:P.~%" (car what) + (format t " ~A: ~:D bytes, ~:D object~:P.~%" (car what) bytes objects))) (let ((residual-objects (- total-objects printed-objects)) (residual-bytes (- total-bytes printed-bytes))) (unless (zerop residual-objects) - (format t " Other types: ~:D bytes, ~D object~:P.~%" + (format t " Other types: ~:D bytes, ~:D object~:P.~%" residual-bytes residual-objects)))) (format t " ~:(~A~) instance total: ~:D bytes, ~:D object~:P.~%" @@ -548,11 +548,11 @@ (setf start-addr (sb!di::get-lisp-obj-address object) total-bytes bytes)) (when start-addr - (format t "~D bytes at #X~X~%" total-bytes start-addr) + (format t "~:D bytes at #X~X~%" total-bytes start-addr) (setf start-addr nil)))) space) (when start-addr - (format t "~D bytes at #X~X~%" total-bytes start-addr)))) + (format t "~:D bytes at #X~X~%" total-bytes start-addr)))) (values)) ;;;; PRINT-ALLOCATED-OBJECTS @@ -600,7 +600,7 @@ ;; FIXME: What is this? (ERROR "Argh..")? or ;; a warning? or code that can be removed ;; once the system is stable? or what? - (format stream "~2&**** Page ~D, address ~X:~%" + (format stream "~2&**** Page ~W, address ~X:~%" pages-so-far addr)) (setq last-page this-page) (incf pages-so-far))))