anchor.diff:                   (loop
                       for s across samples
                       do
  -                      (format t "  --------------------~%")
  +                      (format stream "  --------------------~%")
                         (let ((callers (make-array 10 :adjustable t :fill-pointer 0)))
                           (maphash (lambda (caller count)
                                      (vector-push-extend (cons caller count) callers))
                                    (profile-entry-callers s))
                           (setf callers (sort callers #'> :key #'cdr))
                           (loop for (caller . count) across callers do
  -                             (format t "    ~D~10T~S~%" count caller)))
  -                      (format t "  ~S~10T~S~%" (profile-entry-total-count s) (profile-entry-function s))
  +                             (format stream "    ~D~10T~S~%" count caller)))
  +                      (format stream "  ~S~10T~S~%" (profile-entry-total-count s) (profile-entry-function s))
                         (let ((callees (make-array 10 :adjustable t :fill-pointer 0)))
                           (maphash (lambda (callee count)
                                      (vector-push-extend (cons callee count) callees))
                                    (profile-entry-callees s))
                           (setf callees (sort callees #'> :key #'cdr))
                           (loop for (callee . count) across callees do
  -                             (format t "    ~D~10T~S~%" count callee))))))
  +                             (format stream "    ~D~10T~S~%" count callee))))))
                threads)))
   
   (defun generate-flame-graph (profile stream)
  
positive.code:     :callers (make-hash-table)
      :callees (make-hash-table)))
  
  (defun generate-report (profile order-by)
    (setf profile (profile-data profile))
    (let ((threads (make-hash-table)))
      (labels ((entry-for (thread function)
  
negative.code:               (when (not (eql fn 0))
                  (cond (first (setf first nil))
                        (t (write-char #\; stream)))
                  (let ((*print-pretty* nil))
                    (write-string (substitute #\_ #\Space (substitute #\L #\< (substitute #\G #\> (format nil "~(~S~)" (sys.int::function-name fn))))) stream))))
           (write-char #\Space stream)
           (write 1 :stream stream)
           (terpri stream)))
    profile)
  