diff -Naur chicken-1.92/chicken-profile.scm chicken-1.92.alejo/chicken-profile.scm --- chicken-1.92/chicken-profile.scm 2004-07-19 14:00:07.000000000 -0500 +++ chicken-1.92.alejo/chicken-profile.scm 2005-02-28 18:21:53.000000000 -0500 @@ -104,13 +104,21 @@ (set! sort-by sort-by-time) +(define (read-profile) + (let ((hash (make-hash-table))) + (do ((line (read) (read))) + ((eof-object? line)) + (hash-table-set! hash (first line) + (map + (hash-table-ref hash (first line) '(0 0)) (cdr line)))) + (hash-table->list hash))) + (define (write-profile) (let ([data (sort (map (lambda (t) (append t (let ((c (second t)) (t (third t))) (list (or (and (> c 0) (/ t c)) 0))))) - (with-input-from-file file read-file)) sort-by)] + (with-input-from-file file read-profile)) sort-by)] [line (make-string (+ 48 8 8 8 4) #\-)] ) (format #t " ~48A address@hidden address@hidden address@hidden" "procedure" "calls" "seconds" "average") (print line) diff -Naur chicken-1.92/profiler.scm chicken-1.92.alejo/profiler.scm --- chicken-1.92/profiler.scm 2004-07-19 14:01:13.000000000 -0500 +++ chicken-1.92.alejo/profiler.scm 2005-02-28 18:08:48.000000000 -0500 @@ -126,4 +126,5 @@ (write (##sys#slot vec (+ i 3))) (write-char #\)) (write-char #\newline) ) ) ) - ##sys#profile-vector-list) ) ) ) ) ) + ##sys#profile-vector-list) ) + #:append) ) ) )