[pypy-commit] pypy stmgc-c4: Debugging: always fprintf the inevitable reasons

arigo noreply at buildbot.pypy.org
Mon Sep 9 16:35:44 CEST 2013


Author: Armin Rigo <arigo at tunes.org>
Branch: stmgc-c4
Changeset: r66861:781b5647ee58
Date: 2013-09-09 16:24 +0200
http://bitbucket.org/pypy/pypy/changeset/781b5647ee58/

Log:	Debugging: always fprintf the inevitable reasons

diff --git a/rpython/jit/tl/targettlr.py b/rpython/jit/tl/targettlr.py
--- a/rpython/jit/tl/targettlr.py
+++ b/rpython/jit/tl/targettlr.py
@@ -12,12 +12,20 @@
     # viewcode.py to know the executable whose symbols it should display)
     highleveljitinfo.sys_executable = args[0]
     if len(args) < 3:
-        print "Usage: %s filename x" % (args[0],)
+        print "Usage: %s filename x (repetition)" % (args[0],)
         return 2
     filename = args[1]
     x = int(args[2])
+    if len(args) == 3:
+        repetition = 1
+    else:
+        repetition = int(args[3])
     bytecode = load_bytecode(filename)
-    res = interpret(bytecode, x)
+    while True:
+        res = interpret(bytecode, x)
+        repetition -= 1
+        if repetition <= 0:
+            break
     print res
     return 0
 
diff --git a/rpython/translator/stm/src_stm/et.c b/rpython/translator/stm/src_stm/et.c
--- a/rpython/translator/stm/src_stm/et.c
+++ b/rpython/translator/stm/src_stm/et.c
@@ -1531,8 +1531,8 @@
                 (XXX statically we should know when we're outside
                 a transaction) */
 
-  dprintf(("[%lx] inevitable: %s\n",
-           (long)d->public_descriptor_index, why));
+  fprintf(stderr, "[%lx] inevitable: %s\n",
+           (long)d->public_descriptor_index, why);
 
   cur_time = acquire_inev_mutex_and_mark_global_cur_time(d);
   if (d->start_time != cur_time)


More information about the pypy-commit mailing list