Changeset 13533
- Timestamp:
- Mar 15, 2010, 4:58:47 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/lib/misc.lisp
r13500 r13533 1043 1043 data))) 1044 1044 1045 (defun collect-heap-ivector-utilization-by-typecode () 1046 (let* ((counts (make-array 256 :initial-element 0)) 1047 (sizes (make-array 256 :initial-element 0)) 1048 (physical-sizes (make-array 256 :initial-element 0)) 1049 (array-size-function (arch::target-array-data-size-function 1050 (backend-target-arch *host-backend*))) 1051 (result ())) 1052 (declare (dynamic-extent counts sizes)) 1053 (with-lock-grabbed (*heap-ivector-lock*) 1054 (dolist (vector *heap-ivectors*) 1055 (let* ((typecode (typecode vector)) 1056 (logsize (funcall array-size-function typecode (uvsize vector))) 1057 (physsize (+ logsize 1058 ;; header, delta, round up 1059 #+32-bit-target (+ 4 2 7) 1060 #+64-bit-target (+ 8 2 15)))) 1061 (incf (aref counts typecode)) 1062 (incf (aref sizes typecode) logsize) 1063 (incf (aref physical-sizes typecode) physsize)))) 1064 (dotimes (i 256 result) 1065 (when (plusp (aref counts i)) 1066 (push (list (aref *heap-utilization-vector-type-names* i) 1067 (aref counts i) 1068 (aref sizes i) 1069 (aref physical-sizes i)) 1070 result))))) 1071 1072 (defun heap-ivector-utilization (&key (stream *debug-io*) 1073 (unit nil) 1074 (sort :size)) 1075 (let* ((data (collect-heap-ivector-utilization-by-typecode))) 1076 (report-heap-utilization data :stream stream :unit unit :sort sort))) 1077 1045 1078 (defvar *heap-utilization-vector-type-names* 1046 1079 (let* ((a (make-array 256)))
Note: See TracChangeset
for help on using the changeset viewer.