jit/metainterp/test/test_jitiface.py::TestJitHookInterface::()::test_on_compile
self = <rpython.jit.metainterp.test.test_jitiface.TestJitHookInterface object at 0x0000000036196138>
def test_on_compile(self):
called = []
class MyJitIface(JitHookInterface):
def after_compile(self, di):
called.append(("compile", di.greenkey[1].getint(),
di.greenkey[0].getint(), di.type))
def before_compile(self, di):
called.append(("optimize", di.greenkey[1].getint(),
di.greenkey[0].getint(), di.type))
#def before_optimize(self, jitdriver, logger, looptoken, oeprations,
# type, greenkey):
# called.append(("trace", greenkey[1].getint(),
# greenkey[0].getint(), type))
iface = MyJitIface()
driver = JitDriver(greens = ['n', 'm'], reds = ['i'])
def loop(n, m):
i = 0
while i < n + m:
driver.can_enter_jit(n=n, m=m, i=i)
driver.jit_merge_point(n=n, m=m, i=i)
i += 1
> self.meta_interp(loop, [1, 4], policy=JitPolicy(iface))
jit/metainterp/test/test_jitiface.py:83:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
jit/metainterp/test/support.py:265: in meta_interp
return ll_meta_interp(*args, **kwds)
jit/metainterp/warmspot.py:89: in ll_meta_interp
return jittify_and_run(interp, graph, args, backendopt=backendopt, **kwds)
jit/metainterp/warmspot.py:127: in jittify_and_run
res = interp.eval_graph(graph, args)
rtyper/llinterp.py:102: in eval_graph
retval = llframe.eval()
rtyper/llinterp.py:300: in eval
nextblock, args = self.eval_block(nextblock)
rtyper/llinterp.py:324: in eval_block
self.eval_operation(op)
rtyper/llinterp.py:427: in eval_operation
retval = ophandler(*vals)
rtyper/llinterp.py:702: in op_direct_call
return self.perform_call(f, FTYPE.ARGS, args)
rtyper/llinterp.py:689: in perform_call
return self.invoke_callable_with_pyexceptions(f, *args)
rtyper/llinterp.py:512: in invoke_callable_with_pyexceptions
self.make_llexception()
rtyper/llinterp.py:489: in make_llexception
evalue = exdata.get_standard_ll_exc_instance_by_class(exc.__class__)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <rpython.rtyper.exceptiondata.ExceptionData object at 0x000000003619edb0>
exceptionclass = <class 'rpython.rtyper.exceptiondata.UnknownException'>
def get_standard_ll_exc_instance_by_class(self, exceptionclass):
if exceptionclass not in self.standardexceptions:
> raise UnknownException(exceptionclass)
E UnknownException: <class 'rpython.rtyper.exceptiondata.UnknownException'>
rtyper/exceptiondata.py:42: UnknownException
---------- Captured stdout call ----------
~~~ Crash in JIT!
~~~ <class 'rpython.translator.platform.CompilationError'>: CompilationError(err="""
gcc: fatal error: cannot execute ‘/opt/rh/gcc-toolset-14/root/usr/libexec/gcc/x86_64-redhat-linux/14/cc1’: posix_spawn: Operation not permitted
compilation terminated.
""")
---------- Captured stderr call ----------
[rtyper] -=- specialized 6 blocks -=-
[rtyper] -=- specialized 4 more blocks -=-
[rtyper] -=- specialized 2 more blocks -=-
[rtyper] -=- specialized 7 more blocks -=-
[rtyper] -=- specialized 6 more blocks -=-
[rtyper] -=- specialized 17 more blocks -=-
[rtyper] -=- specialized 2 more blocks -=-
[rtyper] -=- specialized 3 more blocks -=-
[jitcodewriter:info] making JitCodes...
[jitcodewriter:info] There are 1 JitCode instances.
[jitcodewriter:info] There are 5 -live- ops. Size of liveness is 8 bytes
[jitcodewriter] compute_bitstrings:
[jitcodewriter] 0 effectinfos:
[jitcodewriter] 0 descrs for arrays
[jitcodewriter] 0 descrs for fields
[jitcodewriter] 0 descrs for interiorfields
[platform:Error] gcc: fatal error: cannot execute ‘/opt/rh/gcc-toolset-14/root/usr/libexec/gcc/x86_64-redhat-linux/14/cc1’: posix_spawn: Operation not permitted
[platform:Error] compilation terminated.
builder: rpython-linux-x86-64 build #948+
test: jit/metainterp/test/test_jitiface.py::TestJitHookInterface::()::test_on_compile