Author: Maciej Fijalkowski <[email protected]>
Branch: share-guard-info
Changeset: r79852:10c6022aa88e
Date: 2015-09-26 12:48 +0200
http://bitbucket.org/pypy/pypy/changeset/10c6022aa88e/
Log: count shared guards
diff --git a/rpython/jit/metainterp/jitprof.py
b/rpython/jit/metainterp/jitprof.py
--- a/rpython/jit/metainterp/jitprof.py
+++ b/rpython/jit/metainterp/jitprof.py
@@ -141,6 +141,7 @@
self._print_intline("recorded ops", cnt[Counters.RECORDED_OPS])
self._print_intline(" calls", calls)
self._print_intline("guards", cnt[Counters.GUARDS])
+ self._print_intline("guards_shared", cnt[Counters.GUARDS_SHARED])
self._print_intline("opt ops", cnt[Counters.OPT_OPS])
self._print_intline("opt guards", cnt[Counters.OPT_GUARDS])
self._print_intline("forcings", cnt[Counters.OPT_FORCINGS])
diff --git a/rpython/jit/metainterp/optimizeopt/optimizer.py
b/rpython/jit/metainterp/optimizeopt/optimizer.py
--- a/rpython/jit/metainterp/optimizeopt/optimizer.py
+++ b/rpython/jit/metainterp/optimizeopt/optimizer.py
@@ -596,8 +596,11 @@
def emit_guard_operation(self, op, pendingfields):
guard_op = self.replace_op_with(op, op.getopnum())
+ opnum = guard_op.getopnum()
if (self._last_guard_op and guard_op.getdescr() is None and
- guard_op.getopnum() != rop.GUARD_VALUE):
+ opnum != rop.GUARD_VALUE):
+ self.metainterp_sd.profiler.count_ops(opnum,
+ jitprof.Counters.GUARDS_SHARED)
op = self._copy_resume_data_from(guard_op,
self._last_guard_op)
else:
diff --git a/rpython/rlib/jit.py b/rpython/rlib/jit.py
--- a/rpython/rlib/jit.py
+++ b/rpython/rlib/jit.py
@@ -1150,6 +1150,7 @@
OPS
RECORDED_OPS
GUARDS
+ GUARDS_SHARED
OPT_OPS
OPT_GUARDS
OPT_FORCINGS
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit