Debian Codegraph @

rpython/translator/goal/targetgcbench.py

raw symbols SCIP
1 from rpython.translator.goal import gcbench
2 from rpython.memory.test.test_transformed_gc import MyGcHooks, GcHooksStats
3
4 # _____ Define and setup target ___
5
6 GC_HOOKS_STATS = GcHooksStats()
7
8 def entry_point(argv):
9 GC_HOOKS_STATS.reset()
10 ret = gcbench.entry_point(argv)
11 minors = GC_HOOKS_STATS.minors
12 steps = GC_HOOKS_STATS.steps
13 collects = GC_HOOKS_STATS.collects
14 print 'GC hooks statistics'
15 print ' gc-minor: ', minors
16 print ' gc-collect-step: ', steps
17 print ' gc-collect: ', collects
18 return ret
19
20 def get_gchooks():
21 return MyGcHooks(GC_HOOKS_STATS)
22
23 def target(*args):
24 gcbench.ENABLE_THREADS = False # not RPython
25 return entry_point, None