From: Stas Boukarev Date: Fri, 12 Apr 2013 15:27:50 +0000 (+0400) Subject: Disassemble: print the function size in bytes. X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=91a071d43c4fdca0ad2fb6ad488453fa1bcc9ed1;p=sbcl.git Disassemble: print the function size in bytes. Print "; Size: 981 bytes" at the beginning of DISASSEMBLE output. --- diff --git a/src/compiler/target-disassem.lisp b/src/compiler/target-disassem.lisp index b1f09cc..5473481 100644 --- a/src/compiler/target-disassem.lisp +++ b/src/compiler/target-disassem.lisp @@ -1428,13 +1428,15 @@ (type stream stream) (type disassem-state dstate)) (unless (null segments) + (format t "~&; Size: ~a bytes" + (reduce #'+ segments :key #'seg-length)) (let ((first (car segments)) (last (car (last segments)))) (set-location-printing-range dstate - (seg-virtual-location first) - (- (+ (seg-virtual-location last) - (seg-length last)) - (seg-virtual-location first))) + (seg-virtual-location first) + (- (+ (seg-virtual-location last) + (seg-length last)) + (seg-virtual-location first))) (setf (dstate-output-state dstate) :beginning) (dolist (seg segments) (disassemble-segment seg stream dstate)))))