summaryrefslogtreecommitdiff
path: root/module/system
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2009-12-11 12:38:47 +0100
committerAndy Wingo <wingo@pobox.com>2009-12-11 12:39:02 +0100
commit6c20a0b34b3c79c999213320eabf3d46eddd1c6e (patch)
tree3a862c425e186494fceab8196612cac526478dc2 /module/system
parent349d5c442834ee467fd2dbf4caed778310f96932 (diff)
downloadguile-6c20a0b34b3c79c999213320eabf3d46eddd1c6e.tar.gz
vm no longer measures bogoclock or times, relies on os for that
* libguile/vm.h (struct scm_vm): Remove "time" and "clock" members. The time was bogusly measured, and the "clock" measured instructions retired, which is not a very useful measurement, and it was causing lots of memory accesses. Not that I have done a proper profile, though... (scm_vm_stats): Remove this procedure, which provided access to "time" and "clock". * libguile/vm.c: * libguile/vm-engine.h: * libguile/vm-engine.c: * libguile/vm-i-system.c: Adapt to scm_vm changes and scm_vm_stats removal. * module/system/repl/command.scm: * module/system/vm/vm.scm: Adapt to vm-stats removal by removing vm-stats from <repl>.
Diffstat (limited to 'module/system')
-rw-r--r--module/system/repl/command.scm13
-rw-r--r--module/system/repl/common.scm7
-rw-r--r--module/system/vm/vm.scm2
3 files changed, 4 insertions, 18 deletions
diff --git a/module/system/repl/command.scm b/module/system/repl/command.scm
index 1da2d6c6f..0b1434c2d 100644
--- a/module/system/repl/command.scm
+++ b/module/system/repl/command.scm
@@ -413,10 +413,8 @@ Garbage collection."
"statistics
Display statistics."
(let ((this-tms (times))
- (this-vms (vm-stats (repl-vm repl)))
(this-gcs (gc-stats))
(last-tms (repl-tm-stats repl))
- (last-vms (repl-vm-stats repl))
(last-gcs (repl-gc-stats repl)))
;; GC times
(let ((this-times (assq-ref this-gcs 'gc-times))
@@ -465,20 +463,9 @@ Display statistics."
(display-time-stat "child user" this-cutime last-cutime)
(display-time-stat "child system" this-cstime last-cstime)
(newline))
- ;; VM statistics
- (let ((this-time (vms:time this-vms))
- (last-time (vms:time last-vms))
- (this-clock (vms:clock this-vms))
- (last-clock (vms:clock last-vms)))
- (display-stat-title "VM statistics:" "diff" "total")
- (display-time-stat "time spent" this-time last-time)
- (display-diff-stat "bogoclock" #f this-clock last-clock "clock")
- (display-mips-stat "bogomips" this-time this-clock last-time last-clock)
- (newline))
;; Save statistics
;; Save statistics
(set! (repl-tm-stats repl) this-tms)
- (set! (repl-vm-stats repl) this-vms)
(set! (repl-gc-stats repl) this-gcs)))
(define (display-stat title flag field1 field2 unit)
diff --git a/module/system/repl/common.scm b/module/system/repl/common.scm
index ba18e2ea0..9570d1d18 100644
--- a/module/system/repl/common.scm
+++ b/module/system/repl/common.scm
@@ -24,7 +24,7 @@
#:use-module (system base language)
#:use-module (system vm vm)
#:export (<repl> make-repl repl-vm repl-language repl-options
- repl-tm-stats repl-gc-stats repl-vm-stats
+ repl-tm-stats repl-gc-stats
repl-welcome repl-prompt repl-read repl-compile repl-eval
repl-parse repl-print repl-option-ref repl-option-set!
puts ->string user-error))
@@ -34,7 +34,7 @@
;;; Repl type
;;;
-(define-record/keywords <repl> vm language options tm-stats gc-stats vm-stats)
+(define-record/keywords <repl> vm language options tm-stats gc-stats)
(define repl-default-options
'((trace . #f)
@@ -46,8 +46,7 @@
#:language (lookup-language lang)
#:options repl-default-options
#:tm-stats (times)
- #:gc-stats (gc-stats)
- #:vm-stats (vm-stats (the-vm))))
+ #:gc-stats (gc-stats)))
(define (repl-welcome repl)
(let ((language (repl-language repl)))
diff --git a/module/system/vm/vm.scm b/module/system/vm/vm.scm
index 688170363..9d8f97790 100644
--- a/module/system/vm/vm.scm
+++ b/module/system/vm/vm.scm
@@ -24,7 +24,7 @@
#:export (vm? the-vm make-vm vm-version
vm:ip vm:sp vm:fp vm:last-ip
- vm-load vm-option set-vm-option! vm-version vm-stats
+ vm-load vm-option set-vm-option! vm-version
vms:time vms:clock
vm-trace-frame