(:constructor %make-vop-stats (name))
(:constructor make-vop-stats-key)
(:copier nil))
- (name (required-argument) :type simple-string)
+ (name (missing-arg) :type simple-string)
(data (make-array 2 :element-type 'double-float) :type count-vector))
(defmacro vop-stats-count (x) `(aref (vop-stats-data ,x) 0))
(without-gcing
(dolist (space spaces)
(sb!vm::map-allocated-objects
- #'(lambda (object type-code size)
- (declare (ignore type-code size))
- (when (dyncount-info-p object)
- (clear-dyncount-info object)))
+ (lambda (object type-code size)
+ (declare (ignore type-code size))
+ (when (dyncount-info-p object)
+ (clear-dyncount-info object)))
space)))))
;;; Call NOTE-DYNCOUNT-INFO on all DYNCOUNT-INFO structure allocated in the
#!+sb-doc
"Return a hash-table mapping string VOP names to VOP-STATS structures
describing the VOPs executed. If clear is true, then reset all counts to
- zero as a side-effect."
+ zero as a side effect."
(locally
(declare (optimize (speed 3) (safety 0))
(inline sb!vm::map-allocated-objects))
(without-gcing
(dolist (space spaces)
(sb!vm::map-allocated-objects
- #'(lambda (object type-code size)
- (declare (ignore type-code size))
- (when (dyncount-info-p object)
- (note-dyncount-info object)
- (when clear
- (clear-dyncount-info object))))
+ (lambda (object type-code size)
+ (declare (ignore type-code size))
+ (when (dyncount-info-p object)
+ (note-dyncount-info object)
+ (when clear
+ (clear-dyncount-info object))))
space))))
(let ((counts (make-hash-table :test 'equal)))
;;; Return the DYNCOUNT-INFO for FUNCTION.
(defun find-info-for (function)
(declare (type function function))
- (let* ((function (%primitive closure-function function))
- (component (sb!di::function-code-header function)))
+ (let* ((function (%primitive closure-fun function))
+ (component (sb!di::fun-code-header function)))
(do ((end (get-header-data component))
(i sb!vm:code-constants-offset (1+ i)))
((= end i))
(clear-vop-counts spaces)
(apply function args)
(if by-space
- (mapcar #'(lambda (space)
- (get-vop-counts (list space) :clear t))
+ (mapcar (lambda (space)
+ (get-vop-counts (list space) :clear t))
spaces)
(get-vop-counts spaces)))
\f
("Simple type predicate" "STRUCTUREP" "LISTP" "FIXNUMP")
("Simple type check" "CHECK-LIST" "CHECK-FIXNUM" "CHECK-STRUCTURE")
("Array bounds check" "CHECK-BOUND")
- ("Complex type check" "$CHECK-" "COERCE-TO-FUNCTION")
+ ("Complex type check" "$CHECK-" "COERCE-TO-FUN")
("Special read" "SYMBOL-VALUE")
("Special bind" "BIND$")
("Tagging" "MOVE-FROM")
("List/string utility" "LENGTH/LIST" "SXHASH" "BIT-BASH" "$LENGTH$")
("Alien operations" "SAP" "ALLOC-NUMBER-STACK" "$CALL-OUT$")
("Function call/return" "CALL" "RETURN" "ALLOCATE-FRAME"
- "COPY-MORE-ARG" "LISTIFY-REST-ARG" "VERIFY-ARGUMENT-COUNT")
+ "COPY-MORE-ARG" "LISTIFY-REST-ARG" "VERIFY-ARG-COUNT")
("Allocation" "MAKE-" "ALLOC" "$CONS$" "$LIST$" "$LIST*$")
("Float conversion" "%SINGLE-FLOAT" "%DOUBLE-FLOAT" "-BITS$")
("Complex type predicate" "P$")))
(defun sort-result (table by)
(sort (hash-list table) #'>
- :key #'(lambda (x)
- (abs (ecase by
- (:count (vop-stats-count x))
- (:cost (vop-stats-cost x)))))))
+ :key (lambda (x)
+ (abs (ecase by
+ (:count (vop-stats-count x))
+ (:cost (vop-stats-cost x)))))))
;;; Report about VOPs in the list of stats structures.
(defun entry-report (entries cut-off compensated compare total-cost)
cost)
total-cost))
(when (zerop (decf counter))
- (format t "[End of top ~D]~%" cut-off))))))
+ (format t "[End of top ~W]~%" cut-off))))))
;;; Divide SORTED into two lists, the first CUT-OFF elements long. Any VOP
;;; names that match one of the report strings are moved into the REPORT list
(compared (if compare
(compare-stats compensated compare)
compensated))
- (*gc-verbose* nil)
(*gc-notify-stream* nil))
(multiple-value-bind (total-count total-cost) (cost-summary compensated)
(multiple-value-bind (compare-total-count compare-total-cost)