1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 22:10:21 +02:00

make ,stats work

* module/system/repl/command.scm (display-time-stat, display-mips-stat):
  Always convert to float.

* module/system/vm/frame.scm (print-frame): Write the args, don't display them.

* module/system/repl/command.scm (statistics): gc-sweep-time is no more.
This commit is contained in:
Andy Wingo 2008-08-11 19:51:33 +02:00
parent 482015afec
commit b9d8ed0502
2 changed files with 3 additions and 6 deletions

View file

@ -399,13 +399,10 @@ Display statistics."
;; GC time taken
(let ((this-mark (assq-ref this-gcs 'gc-mark-time-taken))
(last-mark (assq-ref last-gcs 'gc-mark-time-taken))
(this-sweep (assq-ref this-gcs 'gc-sweep-time-taken))
(last-sweep (assq-ref last-gcs 'gc-sweep-time-taken))
(this-total (assq-ref this-gcs 'gc-time-taken))
(last-total (assq-ref last-gcs 'gc-time-taken)))
(display-stat-title "GC time taken:" "diff" "total")
(display-time-stat "mark" this-mark last-mark)
(display-time-stat "sweep" this-sweep last-sweep)
(display-time-stat "total" this-total last-total)
(newline))
;; Process time spent
@ -451,12 +448,12 @@ Display statistics."
(define (display-time-stat title this last)
(define (conv num)
(format #f "~10,2F" (/ num internal-time-units-per-second)))
(format #f "~10,2F" (exact->inexact (/ num internal-time-units-per-second))))
(display-stat title #f (conv (- this last)) (conv this) "s"))
(define (display-mips-stat title this-time this-clock last-time last-clock)
(define (mips time clock)
(if (= time 0) "----" (format #f "~10,2F" (/ clock time 1000000))))
(if (= time 0) "----" (format #f "~10,2F" (/ clock time 1000000.0))))
(display-stat title #f
(mips (- this-time last-time) (- this-clock last-clock))
(mips this-time this-clock) "mips"))

View file

@ -85,7 +85,7 @@
"current input"))))
(define (print-frame frame)
(format #t "~4@a: ~a ~a\n" (frame-line-number frame) (frame-number frame)
(format #t "~4@a: ~a ~s\n" (frame-line-number frame) (frame-number frame)
(frame-call-representation frame)))