Author: Armin Rigo <[email protected]>
Branch:
Changeset: r74425:e9b9afa6edb7
Date: 2014-11-10 13:29 +0100
http://bitbucket.org/pypy/pypy/changeset/e9b9afa6edb7/
Log: If we don't enable the debug prints, don't call get_location_str().
diff --git a/rpython/jit/metainterp/pyjitpl.py
b/rpython/jit/metainterp/pyjitpl.py
--- a/rpython/jit/metainterp/pyjitpl.py
+++ b/rpython/jit/metainterp/pyjitpl.py
@@ -14,7 +14,8 @@
from rpython.jit.metainterp.optimizeopt.util import args_dict
from rpython.jit.metainterp.resoperation import rop
from rpython.rlib import nonconst, rstack
-from rpython.rlib.debug import debug_start, debug_stop, debug_print,
make_sure_not_resized
+from rpython.rlib.debug import debug_start, debug_stop, debug_print
+from rpython.rlib.debug import have_debug_prints, make_sure_not_resized
from rpython.rlib.jit import Counters
from rpython.rlib.objectmodel import we_are_translated, specialize
from rpython.rlib.unroll import unrolling_iterable
@@ -1122,8 +1123,9 @@
def debug_merge_point(self, jitdriver_sd, jd_index, portal_call_depth,
current_call_id, greenkey):
# debugging: produce a DEBUG_MERGE_POINT operation
- loc = jitdriver_sd.warmstate.get_location_str(greenkey)
- debug_print(loc)
+ if have_debug_prints():
+ loc = jitdriver_sd.warmstate.get_location_str(greenkey)
+ debug_print(loc)
args = [ConstInt(jd_index), ConstInt(portal_call_depth),
ConstInt(current_call_id)] + greenkey
self.metainterp.history.record(rop.DEBUG_MERGE_POINT, args, None)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit