[pypy-commit] pypy vmprof: sync vmprof.c

fijal noreply at buildbot.pypy.org
Wed Apr 1 11:40:33 CEST 2015


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: vmprof
Changeset: r76669:9316e03f8cdd
Date: 2015-04-01 11:40 +0200
http://bitbucket.org/pypy/pypy/changeset/9316e03f8cdd/

Log:	sync vmprof.c

diff --git a/pypy/module/_vmprof/src/vmprof.c b/pypy/module/_vmprof/src/vmprof.c
--- a/pypy/module/_vmprof/src/vmprof.c
+++ b/pypy/module/_vmprof/src/vmprof.c
@@ -70,6 +70,8 @@
     prof_word(0);
     prof_word(period_usec);
     prof_word(0);
+    write(profile_file, profile_write_buffer, profile_buffer_position);
+    profile_buffer_position = 0;
 }
 
 static void prof_write_stacktrace(void** stack, int depth, int count) {
@@ -298,9 +300,11 @@
 
 static int remove_sigprof_timer(void) {
     static struct itimerval timer;
+    last_period_usec = 0;
     timer.it_interval.tv_sec = 0;
     timer.it_interval.tv_usec = 0;
-    timer.it_value = timer.it_interval;
+    timer.it_value.tv_sec = 0;
+    timer.it_value.tv_usec = 0;
     if (setitimer(ITIMER_PROF, &timer, NULL) != 0) {
 		return -1;
     }


More information about the pypy-commit mailing list