summaryrefslogtreecommitdiff
path: root/module/statprof.scm
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2013-11-21 16:10:41 +0100
committerAndy Wingo <wingo@pobox.com>2013-11-21 16:10:41 +0100
commit972275eee5326b4628f207996e14e0040fb94256 (patch)
tree399bb9fcf395d12d4e36de19cb1e003b2ab31bb9 /module/statprof.scm
parent6b4ba76d05bf229b45d9f2be189cce29f46e3111 (diff)
downloadguile-972275eee5326b4628f207996e14e0040fb94256.tar.gz
VM accessors take VM as implicit argument, not explicit argument
* libguile/vm.h: * libguile/vm.c: (scm_vm_apply_hook, scm_vm_push_continuation_hook, scm_vm_pop_continuation_hook, scm_vm_abort_continuation_hook, scm_vm_restore_continuation_hook, scm_vm_next_hook, scm_vm_trace_level, scm_set_vm_trace_level_x, scm_vm_engine, scm_set_vm_engine_x, scm_c_set_vm_engine_x): The VM argument is now implicit: the VM for the current thread. * doc/ref/api-debug.texi (VM Hooks): Try to adapt. * module/ice-9/command-line.scm: * module/statprof.scm: * module/system/vm/coverage.scm: * module/system/vm/trace.scm: * module/system/vm/trap-state.scm: * module/system/vm/traps.scm: * test-suite/tests/control.test: * test-suite/tests/eval.test: Adapt users that set hooks or ensure that we have a debug engine.
Diffstat (limited to 'module/statprof.scm')
-rw-r--r--module/statprof.scm16
1 files changed, 7 insertions, 9 deletions
diff --git a/module/statprof.scm b/module/statprof.scm
index 7ef44304d..7c3a339bb 100644
--- a/module/statprof.scm
+++ b/module/statprof.scm
@@ -295,8 +295,7 @@
;; confuse guile wrt re-enabling the trap when
;; count-call finishes.
(if %count-calls?
- (set-vm-trace-level! (the-vm)
- (1- (vm-trace-level (the-vm)))))
+ (set-vm-trace-level! (1- (vm-trace-level))))
(accumulate-time stop-time)))
(setitimer ITIMER_PROF
@@ -308,8 +307,7 @@
(begin
(set! last-start-time (get-internal-run-time))
(if %count-calls?
- (set-vm-trace-level! (the-vm)
- (1+ (vm-trace-level (the-vm)))))))))
+ (set-vm-trace-level! (1+ (vm-trace-level))))))))
(set! inside-profiler? #f))
@@ -357,8 +355,8 @@ than @code{statprof-stop}, @code{#f} otherwise."
(car sampling-frequency)
(cdr sampling-frequency)))
(if %count-calls?
- (add-hook! (vm-apply-hook (the-vm)) count-call))
- (set-vm-trace-level! (the-vm) (1+ (vm-trace-level (the-vm))))
+ (add-hook! (vm-apply-hook) count-call))
+ (set-vm-trace-level! (1+ (vm-trace-level)))
#t)))
;; Do not call this from statprof internal functions -- user only.
@@ -371,9 +369,9 @@ than @code{statprof-stop}, @code{#f} otherwise."
(begin
(set! gc-time-taken
(- (cdr (assq 'gc-time-taken (gc-stats))) gc-time-taken))
- (set-vm-trace-level! (the-vm) (1- (vm-trace-level (the-vm))))
+ (set-vm-trace-level! (1- (vm-trace-level)))
(if %count-calls?
- (remove-hook! (vm-apply-hook (the-vm)) count-call))
+ (remove-hook! (vm-apply-hook) count-call))
;; I believe that we need to do this before getting the time
;; (unless we want to make things even more complicated).
(set! remaining-prof-time (setitimer ITIMER_PROF 0 0 0 0))
@@ -754,7 +752,7 @@ whole call tree, for later analysis. Use @code{statprof-fetch-stacks} or
(set! last-start-time (get-internal-run-time))
(set! gc-time-taken (cdr (assq 'gc-time-taken (gc-stats))))
(add-hook! after-gc-hook gc-callback)
- (set-vm-trace-level! (the-vm) (1+ (vm-trace-level (the-vm))))
+ (set-vm-trace-level! (1+ (vm-trace-level)))
#t)))
(define (stop)