translator/c/test/test_newgc.py::TestIncrementalMiniMarkGCMostCompact::()::test_framework_static_roots
cls = <class 'rpython.translator.c.test.test_newgc.TestIncrementalMiniMarkGCMostCompact'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = option.keyword
if keyword.startswith('test_') and not keyword.endswith(':'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.__name__ = 'f_' + name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
assert name_to_func
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
translator/c/test/test_newgc.py:117:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
translator/c/test/test_newgc.py:58: in _makefunc_str_int
exename = t.compile()
translator/interactive.py:117: in compile
getattr(self.driver, 'compile_' + backend)()
translator/driver.py:108: in proc
return self.proceed(backend_goal)
translator/driver.py:568: in proceed
result = self._execute(goals, task_skip = self._maybe_skip())
translator/tool/taskengine.py:114: in _execute
res = self._do(goal, taskcallable, *args, **kwds)
translator/driver.py:278: in _do
res = func()
translator/driver.py:435: in task_database_c
database = cbuilder.build_database()
translator/c/genc.py:102: in build_database
self.config.translation.reverse_debugger)
translator/c/database.py:64: in __init__
self.gctransformer = self.gcpolicy.gettransformer(translator, gchooks)
translator/c/gc.py:452: in gettransformer
return shadowstack.ShadowStackFrameworkGCTransformer(translator, gchooks)
memory/gctransform/framework.py:132: in __init__
GCClass, GC_PARAMS = choose_gc_from_config(translator.config)
memory/gc/base.py:593: in choose_gc_from_config
globals(), locals(), [classname])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"""
# XXX Should find a way to bound the major collection threshold by the
# XXX total addressable size. Maybe by keeping some minimarkpage arenas
# XXX pre-reserved, enough for a few nursery collections? What about
# XXX raw-malloced memory?
# XXX try merging old_objects_pointing_to_pinned into
# XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w)
import sys
import os
import time
from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup
from rpython.rtyper.lltypesystem.lloperation import llop
from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage
from rpython.memory.gc.base import GCBase, MovingGCBase
> from rpython.memory.gc import env
E File "/build_dir/rpython-linux-x86-64/build/rpython/memory/gc/env.py", line 423
E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/rpython-linux-x86-64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
memory/gc/incminimark.py:70: SyntaxError
builder: rpython-linux-x86-64 build #898+
test: translator/c/test/test_newgc.py::TestIncrementalMiniMarkGCMostCompact::()::test_framework_static_roots