Author: Antonio Cuni <[email protected]>
Branch: core-only-tracing
Changeset: r51534:730dac0eff41
Date: 2012-01-20 15:08 +0100
http://bitbucket.org/pypy/pypy/changeset/730dac0eff41/
Log: always disable inlining when setting the jitmode to core-only
diff --git a/pypy/jit/metainterp/test/test_warmstate.py
b/pypy/jit/metainterp/test/test_warmstate.py
--- a/pypy/jit/metainterp/test/test_warmstate.py
+++ b/pypy/jit/metainterp/test/test_warmstate.py
@@ -324,3 +324,12 @@
cell = get_jitcell(True, i)
cell.counter = -2
assert len(warmstate._jitcell_dict) == i + 1
+
+def test_set_params():
+ warmstate = WarmEnterState(None, None)
+ assert warmstate.inlining == 1
+ assert warmstate.jitmode == 'full'
+ warmstate.set_param_jitmode('core-only')
+ assert warmstate.inlining == 0
+ assert warmstate.jitmode == 'core-only'
+
diff --git a/pypy/jit/metainterp/warmstate.py b/pypy/jit/metainterp/warmstate.py
--- a/pypy/jit/metainterp/warmstate.py
+++ b/pypy/jit/metainterp/warmstate.py
@@ -215,6 +215,8 @@
def set_param_jitmode(self, value):
self.jitmode = value
+ if value == 'core-only':
+ self.set_param_inlining(0)
def set_param_enable_opts(self, value):
from pypy.jit.metainterp.optimizeopt import ALL_OPTS_DICT,
ALL_OPTS_NAMES
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit