예제 #1
0
 def main(b):
     jit_hooks.stats_set_debug(None, b)
     loop(30)
     l = jit_hooks.stats_get_loop_run_times(None)
     if b:
         assert len(l) == 4
         # completely specific test that would fail each time
         # we change anything major. for now it's 4
         # (loop, bridge, 2 entry points)
         assert l[0].type == 'e'
         assert l[0].number == 0
         assert l[0].counter == 4
         assert l[1].type == 'l'
         assert l[1].counter == 4
         assert l[2].type == 'l'
         assert l[2].counter == 23
         assert l[3].type == 'b'
         assert l[3].number == 4
         assert l[3].counter == 11
     else:
         assert len(l) == 0
예제 #2
0
 def main(b):
     jit_hooks.stats_set_debug(None, b)
     loop(30)
     l = jit_hooks.stats_get_loop_run_times(None)
     if b:
         assert len(l) == 4
         # completely specific test that would fail each time
         # we change anything major. for now it's 4
         # (loop, bridge, 2 entry points)
         assert l[0].type == 'e'
         assert l[0].number == 0
         assert l[0].counter == 4
         assert l[1].type == 'l'
         assert l[1].counter == 4
         assert l[2].type == 'l'
         assert l[2].counter == 23
         assert l[3].type == 'b'
         assert l[3].number == 4
         assert l[3].counter == 11
     else:
         assert len(l) == 0
예제 #3
0
 def main():
     jit_hooks.stats_set_debug(None, True)
     f()
     ll_times = jit_hooks.stats_get_loop_run_times(None)
     return len(ll_times)
예제 #4
0
 def main():
     jit_hooks.stats_set_debug(None, True)
     f()
     ll_times = jit_hooks.stats_get_loop_run_times(None)
     return len(ll_times)
예제 #5
0
def disable_debug(space):
    """ Disable the jit debugging. This means some very small loops will be
    marginally faster and the counters will stop working.
    """
    jit_hooks.stats_set_debug(None, False)
예제 #6
0
def enable_debug(space):
    """ Set the jit debugging - completely necessary for some stats to work,
    most notably assembler counters.
    """
    jit_hooks.stats_set_debug(None, True)
예제 #7
0
def disable_debug(space):
    """ Disable the jit debugging. This means some very small loops will be
    marginally faster and the counters will stop working.
    """
    jit_hooks.stats_set_debug(None, False)
예제 #8
0
def enable_debug(space):
    """ Set the jit debugging - completely necessary for some stats to work,
    most notably assembler counters.
    """
    jit_hooks.stats_set_debug(None, True)
예제 #9
0
 def main():
     jit_hooks.stats_set_debug(None, True)
     f()
     jl.stats_flush_trace_counts(None)
     return 0