Home - Summaries: (main) : (py3.11) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

translator/sandbox/test/test_sandbox.py::test_hybrid_gc

def test_hybrid_gc():
        def entry_point(argv):
            l = []
            for i in range(int(argv[1])):
                l.append("x" * int(argv[2]))
            return int(len(l) > 1000)
    
>       exe = compile(entry_point, gc='hybrid', lldebug=True)

translator/sandbox/test/test_sandbox.py:201: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
translator/sandbox/test/test_sandbox.py:43: in compile
    return str(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])
memory/gc/hybrid.py:3: in <module>
    from rpython.memory.gc.generation import GenerationGC, WORD
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import sys
    from rpython.memory.gc.semispace import SemiSpaceGC
    from rpython.memory.gc.semispace import GCFLAG_EXTERNAL, GCFLAG_FORWARDED
    from rpython.memory.gc.semispace import GC_HASH_TAKEN_ADDR
>   from rpython.memory.gc import env
E     File "/build_dir/rpython-linux-x86-32/build/rpython/memory/gc/env.py", line 423
E   SyntaxError: Non-ASCII character '\xe2' in file /build_dir/rpython-linux-x86-32/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/generation.py:5: SyntaxError
---------- Captured stderr call ----------
[flowgraph] (rpython.translator.sandbox.test.test_sandbox:195)entry_point
[translation:info] Annotating&simplifying...
[c5819a97a1bdc00] {translation-task
starting annotate 
[translation:info] with policy: rpython.annotator.policy.AnnotatorPolicy
[c5819a97a604f80] translation-task}
[translation:info] RTyping...
[c5819a97a61e400] {translation-task
starting rtype_lltype 
[flowgraph] (rpython.rtyper.rclass:1170)ll_runtime_type_info
[flowgraph] (rpython.rtyper.rlist:572)ll_len
[flowgraph] (rpython.rtyper.lltypesystem.rlist:365)ll_length
[flowgraph] (rpython.rtyper.lltypesystem.rlist:357)ll_newemptylist
[flowgraph] (rpython.rtyper.lltypesystem.rlist:351)_ll_new_empty_item_array
[flowgraph] (?:1)memo__ll_prebuilt_empty_array_0
[flowgraph] (rpython.rtyper.rlist:688)ll_getitem_nonneg
[flowgraph] (rpython.rtyper.rlist:717)ll_getitem_fast
[flowgraph] (rpython.rtyper.lltypesystem.rlist:372)ll_getitem_fast
[flowgraph] (rpython.rtyper.lltypesystem.rlist:369)ll_items
[flowgraph] (rpython.rtyper.lltypesystem.rstr:1058)ll_int
[flowgraph] (rpython.rtyper.lltypesystem.rrange:70)ll_newrange
[flowgraph] (rpython.rtyper.lltypesystem.rrange:91)ll_rangeiter
[flowgraph] (rpython.rtyper.lltypesystem.rstr:333)ll_char_mul
[flowgraph] (?:2)mallocstr
[flowgraph] (rpython.rtyper.lltypesystem.rstr:36)mallocstr
[flowgraph] (rpython.rtyper.rlist:588)ll_append
[flowgraph] (rpython.rtyper.lltypesystem.rlist:280)_ll_list_resize_ge
[flowgraph] (rpython.rlib.jit:269)isconstant
[flowgraph] (rpython.rlib.jit:1300)conditional_call
[flowgraph] (rpython.rlib.jit:269)isconstant
[flowgraph] (?:11)_ll_list_resize_hint_really_look_inside_iff
[flowgraph] (rpython.rtyper.lltypesystem.rlist:198)_ll_list_resize_hint_really
[flowgraph] (rpython.rtyper.lltypesystem.rlist:198)<lambda>
[flowgraph] (rpython.rlib.jit:269)isconstant
[flowgraph] (?:2)ll_arraycopy
[flowgraph] (rpython.rlib.rgc:362)ll_arraycopy
[flowgraph] (rpython.rlib.rgc:342)copy_item
[flowgraph] (rpython.rtyper.lltypesystem.llmemory:411)sizeof
[flowgraph] (rpython.rlib.jit:269)isconstant
[flowgraph] (rpython.rtyper.lltypesystem.rlist:377)ll_setitem_fast
[flowgraph] (?:2)_ll_list_resize_hint_really_trampoline
[flowgraph] (rpython.rtyper.lltypesystem.rlist:198)_ll_list_resize_hint_really
[flowgraph] (?:1)memo__contains_gcptr_0
[flowgraph] (?:1)memo_itemoffsetof_0
[flowgraph] (?:1)memo__sizeof_none_0
[flowgraph] (rpython.rtyper.rrange:172)ll_rangenext_up
[rtyper] specializing: 100 / 168 blocks   (59%)
[rtyper] -=- specialized 168 blocks -=-
[flowgraph] (rpython.rtyper.rclass:1133)ll_issubclass
[flowgraph] (rpython.rtyper.rclass:1130)ll_type
[rtyper] -=- specialized 4 more blocks -=-
[c5819a98d2a8180] translation-task}
[translation:info] lltype back-end optimisations...
[c5819a98d2be880] {translation-task
starting backendopt_lltype 
[backendopt:removecasts] removed 4 cast_pointers in ll_int__rpy_stringPtr_Signed
[backendopt:removecasts] removed 1 cast_pointers in ll_rangenext_up__rangePtr_Signed
[backendopt:inlining] phase with threshold factor: 32.4
[backendopt:inlining] heuristic: rpython.translator.backendopt.inline.inlining_heuristic
[backendopt:inlining]    0.00         isconstant__v27853___simple_call__function
[backendopt:inlining]    0.00         isconstant__v27855___simple_call__function
[backendopt:inlining]    0.00         isconstant__v27859___simple_call__function
[backendopt:inlining]    0.00         isconstant__v27860___simple_call__function
[backendopt:inlining]    0.00                    ll_getitem_fast__listPtr_Signed
[backendopt:inlining]    0.00 conditional_call__v27854___simple_call__function_star_3
[backendopt:inlining]    0.00                                memo__sizeof_none_0
[backendopt:inlining]    0.00                    memo__ll_prebuilt_empty_array_0
[backendopt:inlining]    0.00 ll_getitem_nonneg__dum_nocheckConst_ll_getitem_fastConst_listPtr_Signed
[backendopt:inlining]    2.00                                  ll_items__listPtr
[backendopt:inlining]    2.00                                 ll_length__listPtr
[backendopt:inlining]    4.00         copy_item__arrayPtr_arrayPtr_Signed_Signed
[backendopt:inlining]    7.00                                  mallocstr__Signed
[backendopt:inlining]    2.00                                    ll_len__listPtr
[backendopt:inlining]    7.50                                  mallocstr__Signed
[backendopt:inlining]    8.00   ll_newrange__Ptr_GcStruct_rangeLlT_Signed_Signed
[backendopt:inlining]    8.00                  ll_newemptylist__GcStruct_listLlT
[backendopt:inlining]    9.00 _ll_list_resize_hint_really_look_inside_iff__listPtr_Signed_Bool
[backendopt:inlining]   11.00 ll_arraycopy__arrayPtr_arrayPtr_Signed_Signed_Signed
[backendopt:inlining]    6.00                    ll_getitem_fast__listPtr_Signed
[backendopt:inlining]    6.00           ll_setitem_fast__listPtr_Signed_GCREFPtr
[backendopt:inlining]   12.00       ll_rangeiter__Ptr_GcStruct_rangeLlT_rangePtr
[backendopt:inlining]   12.50                   ll_rangenext_up__rangePtr_Signed
[backendopt:inlining]   17.00                        ll_append__listPtr_GCREFPtr
[backendopt:inlining]   26.83                           ll_char_mul__Char_Signed
[backendopt:inlining] inlined 33 callsites.
[backendopt:malloc] starting malloc removal
[backendopt:malloc] 2 simple mallocs removed in 'entry_point'
[backendopt:malloc] 1 simple mallocs removed in '_ll_list_resize_ge__listPtr_Signed'
[backendopt:malloc] 1 simple mallocs removed in 'conditional_call__v27854___simple_call__function_star_3'
[backendopt:malloc] removed 4 simple mallocs in total
[backendopt:mergeifblocks] starting to merge if blocks
[c5819a99282ed80] translation-task}
[translation:info] inserting stack checks...
[c5819a992847e00] {translation-task
starting stackcheckinsertion_lltype 
[flowgraph] (rpython.rlib.rstack:42)stack_check
[flowgraph] (rpython.rlib.rstack:67)stack_check_slowpath
[rtyper] -=- specialized 8 more blocks -=-
[translation:info] inserted 0 stack checks.
[c5819a9937def80] translation-task}
[translation:info] Creating database for generating c source...
[c5819a9937f4f80] {translation-task
starting database_c 
[flowgraph] (rpython.translator.exceptiontransform:100)rpyexc_occurred
[flowgraph] (rpython.translator.exceptiontransform:104)rpyexc_fetch_type
[flowgraph] (rpython.translator.exceptiontransform:107)rpyexc_fetch_value
[flowgraph] (rpython.translator.exceptiontransform:110)rpyexc_clear
[flowgraph] (rpython.translator.exceptiontransform:114)rpyexc_raise
[flowgraph] (rpython.translator.exceptiontransform:128)rpyexc_reraise
[flowgraph] (rpython.translator.exceptiontransform:133)rpyexc_fetch_exception
[flowgraph] (rpython.translator.exceptiontransform:138)rpyexc_restore_exception
[flowgraph] (rpython.translator.exceptiontransform:539)rpyexc_get_exception_addr
[flowgraph] (rpython.translator.exceptiontransform:543)rpyexc_get_exc_value_addr
[flowgraph] (rpython.rtyper.rclass:1173)ll_inst_type
[rtyper] specializing: 200 / 205 blocks   (97%)
[rtyper] -=- specialized 25 more blocks -=-
[flowgraph] (rpython.memory.gctransform.transform:447)_ll_malloc_fixedsize
[flowgraph] (rpython.memory.gctransform.transform:454)_ll_malloc_fixedsize_zero
[flowgraph] (rpython.memory.gctransform.transform:470)_ll_malloc_varsize_no_length
[flowgraph] (rpython.memory.gctransform.transform:487)ll_malloc_varsize
[flowgraph] (rpython.memory.gctransform.transform:493)_ll_malloc_varsize_no_length_zero
[c5819a99695f180] translation-task}
builder: rpython-linux-x86-32 build #832
test: translator/sandbox/test/test_sandbox/py/test_hybrid_gc