0.9.12.15:
authorJuho Snellman <jsnell@iki.fi>
Sat, 13 May 2006 18:43:42 +0000 (18:43 +0000)
committerJuho Snellman <jsnell@iki.fi>
Sat, 13 May 2006 18:43:42 +0000 (18:43 +0000)
Use component address in addition to the debug-name to distinguish
        functions in SB-SPROF. Call-graphs tended to be pretty useless due
        to all (LAMBDA ())'s getting clustered into the same profiler node.

contrib/sb-sprof/sb-sprof.lisp
version.lisp-expr

index df8fe7d..31e9d7b 100644 (file)
             (end-offset (sb-c::compiled-debug-fun-elsewhere-pc cdf))
             (component (sb-di::compiled-debug-fun-component info))
             (start-pc (code-start component)))
+       ;; Call graphs are mostly useless unless we somehow
+       ;; distinguish a gazillion different (LAMBDA ())'s.
+       (when (equal name '(lambda ()))
+         (setf name (format nil "Unknown component: #x~x" start-pc)))
        (%make-node :name name
                    :start-pc (+ start-pc start-offset)
                    :end-pc (+ start-pc end-offset))))
       (let ((info (debug-info pc)))
         (when info
           (let* ((new (make-node info))
-                 (found (gethash (node-name new) *name->node*)))
+                 (key (cons (node-name new)
+                            (node-start-pc new)))
+                 (found (gethash key *name->node*)))
             (cond (found
                    (setf (node-start-pc found)
                          (min (node-start-pc found) (node-start-pc new)))
                          (max (node-end-pc found) (node-end-pc new)))
                    found)
                   (t
-                   (setf (gethash (node-name new) *name->node*) new)
+                   (setf (gethash key *name->node*) new)
                    (tree-insert new)
                    new)))))))
 
index 6bca97b..c1207ce 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.12.14"
+"0.9.12.15"