Commit 7c99942a authored by Carl Friedrich Bolz-Tereick's avatar Carl Friedrich Bolz-Tereick
Browse files

a test that shows the problem of #3402: when disabling inlining we can get into

a situation where we retrace again and again the same loop, because it is
itself too huge
parent ea4be17b2f91
Pipeline #19209 passed with stage
in 7 minutes and 32 seconds
......@@ -1333,5 +1333,47 @@ class RecursiveTests:
def check_get_unique_id(self, lst):
def test_huge_trace_without_inlining(self):
py.test.skip("fix this!")
def p(pc, code):
code = hlstr(code)
return "%s %d %s" % (code, pc, code[pc])
myjitdriver = JitDriver(greens=['pc', 'code'], reds=['n'],
def f(code, n):
pc = 0
while pc < len(code):
myjitdriver.jit_merge_point(n=n, code=code, pc=pc)
op = code[pc]
if op == "-":
n -= 1
elif op == "c":
f('--------------------', n)
elif op == "l":
if n > 0:
myjitdriver.can_enter_jit(n=n, code=code, pc=0)
pc = 0
assert 0
pc += 1
return n
def g(m):
set_param(None, 'inlining', True)
set_param(None, 'trace_limit', 40)
if m > 1000000:
f('', 0)
result = 0
for i in range(m):
result += f('-' * 50 + '-c-l-', i+100)
self.meta_interp(g, [10], backendopt=True)
self.check_resops(call=0, call_assembler_i=2)
class TestLLtype(RecursiveTests, LLJitMixin):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment