X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-sprof%2Fsb-sprof.lisp;h=31e9d7bc53e35fa451f078bcd2bba2eeaa9a9ffc;hb=22a6702974b7d6ff4e8f2b3b7b5ff446fc632de0;hp=df8fe7d80883d24c0c6ec2bc3ebd15aefcc6b92a;hpb=d53a7a28a5b5bb16b200afa86f66cdb33fe12189;p=sbcl.git diff --git a/contrib/sb-sprof/sb-sprof.lisp b/contrib/sb-sprof/sb-sprof.lisp index df8fe7d..31e9d7b 100644 --- a/contrib/sb-sprof/sb-sprof.lisp +++ b/contrib/sb-sprof/sb-sprof.lisp @@ -818,6 +818,10 @@ (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)))) @@ -888,7 +892,9 @@ (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))) @@ -896,7 +902,7 @@ (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)))))))