guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, master, updated. v2.1.0-924-gda169db


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, master, updated. v2.1.0-924-gda169db
Date: Mon, 14 Apr 2014 15:08:28 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=da169db26ae3ac4c2440b1fcb678cfd18392c5aa

The branch, master has been updated
       via  da169db26ae3ac4c2440b1fcb678cfd18392c5aa (commit)
      from  a234ab929c65f0627a38131ad6c42f16b3aeae9c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit da169db26ae3ac4c2440b1fcb678cfd18392c5aa
Author: Andy Wingo <address@hidden>
Date:   Mon Apr 14 17:06:05 2014 +0200

    statprof avoids mucking with VM trace levels when not counting calls
    
    * module/statprof.scm (statprof-start, statprof-stop): Don't futz the vm
      trace level when we aren't counting calls.  With this change, statprof
      now imposes no overhead on the measured program.

-----------------------------------------------------------------------

Summary of changes:
 module/statprof.scm |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/module/statprof.scm b/module/statprof.scm
index 49b77cf..b9d4702 100644
--- a/module/statprof.scm
+++ b/module/statprof.scm
@@ -403,8 +403,8 @@ than @code{statprof-stop}, @code{#f} otherwise."
         (set-prev-sigprof-handler! state (car prev)))
       (reset-sigprof-timer (if (zero? rpt) (sampling-period state) rpt))
       (when (call-counts state)
-        (add-hook! (vm-apply-hook) count-call))
-      (set-vm-trace-level! (1+ (vm-trace-level)))
+        (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.
@@ -414,12 +414,12 @@ than @code{statprof-stop}, @code{#f} otherwise."
   ;; signals here, but if I'm wrong, please let me know.
   (set-profile-level! state (- (profile-level state) 1))
   (when (zero? (profile-level state))
+    (when (call-counts state)
+      (set-vm-trace-level! (1- (vm-trace-level)))
+      (remove-hook! (vm-apply-hook) count-call))
     (set-gc-time-taken! state
                         (- (assq-ref (gc-stats) 'gc-time-taken)
                            (gc-time-taken state)))
-    (set-vm-trace-level! (1- (vm-trace-level)))
-    (when (call-counts state)
-      (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! state (reset-sigprof-timer 0))


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]