[pypy-commit] pypy new-jit-log: did not log debug counter if it is zero,
plan_rich
pypy.commits at gmail.com
Thu Jul 21 07:35:43 EDT 2016
Author: Richard Plangger <planrichi at gmail.com>
Branch: new-jit-log
Changeset: r85789:f60175c7834a
Date: 2016-07-21 13:35 +0200
http://bitbucket.org/pypy/pypy/changeset/f60175c7834a/
Log: did not log debug counter if it is zero, enable
inject_debug_counters when run only using jitlog
diff --git a/rpython/jit/backend/llsupport/assembler.py b/rpython/jit/backend/llsupport/assembler.py
--- a/rpython/jit/backend/llsupport/assembler.py
+++ b/rpython/jit/backend/llsupport/assembler.py
@@ -411,7 +411,9 @@
length = len(self.loop_run_counters)
for i in range(length):
struct = self.loop_run_counters[i]
- _log_jit_counter(struct)
+ # only log if it has been executed
+ if struct.i > 0:
+ _log_jit_counter(struct)
# reset the counter, flush in a later point in time will
# add up the counters!
struct.i = 0
diff --git a/rpython/jit/metainterp/compile.py b/rpython/jit/metainterp/compile.py
--- a/rpython/jit/metainterp/compile.py
+++ b/rpython/jit/metainterp/compile.py
@@ -6,6 +6,7 @@
from rpython.rlib.rarithmetic import r_uint, intmask
from rpython.rlib import rstack
from rpython.rlib.jit import JitDebugInfo, Counters, dont_look_inside
+from rpython.rlib.rvmprof.rvmprof import _get_vmprof
from rpython.conftest import option
from rpython.jit.metainterp.resoperation import ResOperation, rop,\
@@ -544,6 +545,7 @@
operations = get_deep_immutable_oplist(loop.operations)
metainterp_sd.profiler.start_backend()
debug_start("jit-backend")
+ log = have_debug_prints() or _get_vmprof().cintf.jitlog_enabled()
try:
loopname = jitdriver_sd.warmstate.get_location_str(greenkey)
unique_id = jitdriver_sd.warmstate.get_unique_id(greenkey)
@@ -551,7 +553,7 @@
loop.inputargs,
operations, original_jitcell_token,
name=loopname,
- log=have_debug_prints(),
+ log=log,
memo=memo)
finally:
debug_stop("jit-backend")
@@ -595,10 +597,11 @@
operations = get_deep_immutable_oplist(operations)
metainterp_sd.profiler.start_backend()
debug_start("jit-backend")
+ log = have_debug_prints() or _get_vmprof().cintf.jitlog_enabled()
try:
asminfo = do_compile_bridge(metainterp_sd, faildescr, inputargs,
operations,
- original_loop_token, have_debug_prints(),
+ original_loop_token, log,
memo)
finally:
debug_stop("jit-backend")
More information about the pypy-commit
mailing list