summaryrefslogtreecommitdiff
path: root/module/system
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-03-04 10:33:51 +0100
committerAndy Wingo <wingo@pobox.com>2011-03-04 10:33:51 +0100
commitc7d6f8b27949e12b6e358e4c9580affddb339af6 (patch)
tree9808ebf533471bcf3dd5ad6409fa2b374e425f9e /module/system
parent65fa60ca7a7bbfd712371f7b2471efe7b056839c (diff)
downloadguile-c7d6f8b27949e12b6e358e4c9580affddb339af6.tar.gz
fix ,stat
* module/system/repl/command.scm (statistics): Fix for BDW-GC. Unfortunately we still don't have mallocation or time taken.
Diffstat (limited to 'module/system')
-rw-r--r--module/system/repl/command.scm27
1 files changed, 9 insertions, 18 deletions
diff --git a/module/system/repl/command.scm b/module/system/repl/command.scm
index d4b3e4a77..58ce12e62 100644
--- a/module/system/repl/command.scm
+++ b/module/system/repl/command.scm
@@ -1,6 +1,6 @@
;;; Repl commands
-;; Copyright (C) 2001, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2009, 2010, 2011 Free Software Foundation, Inc.
;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public
@@ -858,30 +858,21 @@ Display statistics."
(display-diff-stat "GC times:" #t this-times last-times "times")
(newline))
;; Memory size
- (let ((this-cells (assq-ref this-gcs 'cells-allocated))
- (this-heap (assq-ref this-gcs 'cell-heap-size))
- (this-bytes (assq-ref this-gcs 'bytes-malloced))
- (this-malloc (assq-ref this-gcs 'gc-malloc-threshold)))
+ (let ((this-heap (assq-ref this-gcs 'heap-size))
+ (this-free (assq-ref this-gcs 'heap-free-size)))
(display-stat-title "Memory size:" "current" "limit")
- (display-stat "heap" #f this-cells this-heap "cells")
- (display-stat "malloc" #f this-bytes this-malloc "bytes")
+ (display-stat "heap" #f (- this-heap this-free) this-heap "bytes")
(newline))
;; Cells collected
- (let ((this-marked (assq-ref this-gcs 'cells-marked))
- (last-marked (assq-ref last-gcs 'cells-marked))
- (this-swept (assq-ref this-gcs 'cells-swept))
- (last-swept (assq-ref last-gcs 'cells-swept)))
- (display-stat-title "Cells collected:" "diff" "total")
- (display-diff-stat "marked" #f this-marked last-marked "cells")
- (display-diff-stat "swept" #f this-swept last-swept "cells")
+ (let ((this-alloc (assq-ref this-gcs 'heap-total-allocated))
+ (last-alloc (assq-ref last-gcs 'heap-total-allocated)))
+ (display-stat-title "Bytes allocated:" "diff" "total")
+ (display-diff-stat "allocated" #f this-alloc last-alloc "bytes")
(newline))
;; 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-total (assq-ref this-gcs 'gc-time-taken))
+ (let ((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 "total" this-total last-total)
(newline))
;; Process time spent