Lines Matching refs:JIT_G
52 …zend_jit_traces = (zend_jit_trace_info*)zend_shared_alloc(sizeof(zend_jit_trace_info) * JIT_G(max_… in zend_jit_trace_startup()
81 JIT_G(exit_counters) = calloc(JIT_G(max_exit_counters), 1); in zend_jit_trace_startup()
82 if (JIT_G(exit_counters) == NULL) { in zend_jit_trace_startup()
146 if (JIT_G(current_frame)) { in zend_jit_trace_get_exit_point()
147 op_array = &JIT_G(current_frame)->func->op_array; in zend_jit_trace_get_exit_point()
150 stack = JIT_G(current_frame)->stack; in zend_jit_trace_get_exit_point()
336 return !JIT_G(current_frame) || TRACE_FRAME_IS_UNKNOWN_RETURN(JIT_G(current_frame)); in zend_jit_trace_may_exit()
486 if (JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE in zend_jit_needs_arg_dtor()
487 && JIT_G(current_frame) in zend_jit_needs_arg_dtor()
488 && JIT_G(current_frame)->call in zend_jit_needs_arg_dtor()
489 && JIT_G(current_frame)->call->func) { in zend_jit_needs_arg_dtor()
490 uint32_t type = STACK_TYPE(JIT_G(current_frame)->call->stack, arg_num); in zend_jit_needs_arg_dtor()
536 if (JIT_G(opt_level) >= ZEND_JIT_LEVEL_OPT_FUNC) { in zend_jit_trace_build_ssa()
542 if (JIT_G(opt_level) >= ZEND_JIT_LEVEL_OPT_FUNCS) { in zend_jit_trace_build_ssa()
554 if (JIT_G(debug) & ZEND_JIT_DEBUG_SSA) { in zend_jit_trace_build_ssa()
564 if (JIT_G(opt_level) == ZEND_JIT_LEVEL_INLINE) { in zend_jit_trace_build_ssa()
1372 if (JIT_G(opt_level) < ZEND_JIT_LEVEL_OPT_FUNC) { in zend_jit_trace_build_tssa()
1405 if (JIT_G(opt_level) < ZEND_JIT_LEVEL_OPT_FUNC) { in zend_jit_trace_build_tssa()
1483 …JIT_G(current_frame) = frame = (zend_jit_trace_stack_frame*)((char*)zend_arena_alloc(&CG(arena), s… in zend_jit_trace_build_tssa()
1524 if (JIT_G(opt_level) < ZEND_JIT_LEVEL_INLINE) { in zend_jit_trace_build_tssa()
1794 frame = JIT_G(current_frame); in zend_jit_trace_build_tssa()
2772 if (UNEXPECTED(JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_TSSA)) { in zend_jit_trace_build_tssa()
2881 frame = JIT_G(current_frame); in zend_jit_trace_allocate_registers()
3353 if (JIT_G(debug) & ZEND_JIT_DEBUG_REG_ALLOC) { in zend_jit_trace_allocate_registers()
3414 if (JIT_G(hot_return) && !ZEND_OP_TRACE_INFO(next_opline, offset)->trace_flags) { in zend_jit_trace_setup_ret_counter()
3445 if (!JIT_G(current_frame) in zend_jit_may_delay_fetch_this()
3446 || !JIT_G(current_frame)->call in zend_jit_may_delay_fetch_this()
3447 || !JIT_G(current_frame)->call->func in zend_jit_may_delay_fetch_this()
3448 || !TRACE_FRAME_IS_LAST_SEND_BY_VAL(JIT_G(current_frame)->call)) { in zend_jit_may_delay_fetch_this()
4125 JIT_G(current_trace) = trace_buffer; in zend_jit_trace()
4145 if ((JIT_G(opt_flags) & (ZEND_JIT_REG_ALLOC_LOCAL|ZEND_JIT_REG_ALLOC_GLOBAL)) in zend_jit_trace()
4146 && JIT_G(opt_level) >= ZEND_JIT_LEVEL_INLINE) { in zend_jit_trace()
4153 frame = JIT_G(current_frame); in zend_jit_trace()
4180 if (JIT_G(opt_level) >= ZEND_JIT_LEVEL_INLINE) { in zend_jit_trace()
4382 ssa_op = (JIT_G(opt_level) >= ZEND_JIT_LEVEL_INLINE) ? ssa->ops : NULL; in zend_jit_trace()
4438 if (JIT_G(opt_level) >= ZEND_JIT_LEVEL_INLINE) { in zend_jit_trace()
5375 if (!JIT_G(current_frame) in zend_jit_trace()
5376 || !JIT_G(current_frame)->call in zend_jit_trace()
5377 || !JIT_G(current_frame)->call->func) { in zend_jit_trace()
5383 TRACE_FRAME_SET_LAST_SEND_UNKNOWN(JIT_G(current_frame)->call); in zend_jit_trace()
5391 if (JIT_G(current_frame) in zend_jit_trace()
5392 && JIT_G(current_frame)->call) { in zend_jit_trace()
5393 TRACE_FRAME_SET_UNKNOWN_NUM_ARGS(JIT_G(current_frame)->call); in zend_jit_trace()
5602 if (JIT_G(current_frame) in zend_jit_trace()
5603 && TRACE_FRAME_IS_RETURN_VALUE_USED(JIT_G(current_frame))) { in zend_jit_trace()
5814 if (!JIT_G(current_frame) in zend_jit_trace()
5815 || !JIT_G(current_frame)->call in zend_jit_trace()
5816 || !JIT_G(current_frame)->call->func in zend_jit_trace()
5817 || !TRACE_FRAME_IS_LAST_SEND_BY_VAL(JIT_G(current_frame)->call)) { in zend_jit_trace()
6016 if (!JIT_G(current_frame) in zend_jit_trace()
6017 || !JIT_G(current_frame)->call in zend_jit_trace()
6018 || !JIT_G(current_frame)->call->func in zend_jit_trace()
6019 || !TRACE_FRAME_IS_LAST_SEND_BY_VAL(JIT_G(current_frame)->call)) { in zend_jit_trace()
6111 if (!JIT_G(current_frame) in zend_jit_trace()
6112 || !JIT_G(current_frame)->call in zend_jit_trace()
6113 || !TRACE_FRAME_IS_LAST_SEND_BY_VAL(JIT_G(current_frame)->call)) { in zend_jit_trace()
6432 if (JIT_G(current_frame) in zend_jit_trace()
6433 && JIT_G(current_frame)->call) { in zend_jit_trace()
6434 TRACE_FRAME_SET_UNKNOWN_NUM_ARGS(JIT_G(current_frame)->call); in zend_jit_trace()
6882 JIT_G(current_frame) = call; in zend_jit_trace()
6895 JIT_G(current_frame) = frame; in zend_jit_trace()
6922 JIT_G(current_frame) = frame = call; in zend_jit_trace()
6964 if (JIT_G(opt_level) >= ZEND_JIT_LEVEL_INLINE) { in zend_jit_trace()
6994 JIT_G(current_frame) = frame; in zend_jit_trace()
7049 if (JIT_G(opt_level) >= ZEND_JIT_LEVEL_INLINE) { in zend_jit_trace()
7310 if (ZEND_JIT_EXIT_COUNTERS + t->exit_count >= JIT_G(max_exit_counters)) { in zend_jit_trace()
7352 if (JIT_G(current_frame) in zend_jit_trace()
7353 && JIT_G(current_frame)->prev) { in zend_jit_trace()
7354 frame = JIT_G(current_frame)->prev; in zend_jit_trace()
7392 JIT_G(current_frame) = NULL; in zend_jit_trace()
7393 JIT_G(current_trace) = NULL; in zend_jit_trace()
7489 } else if (ZEND_JIT_TRACE_NUM >= JIT_G(max_root_traces)) { in zend_jit_compile_root_trace()
7520 orig_trigger = JIT_G(trigger); in zend_jit_compile_root_trace()
7521 JIT_G(trigger) = ZEND_JIT_ON_HOT_TRACE; in zend_jit_compile_root_trace()
7525 JIT_G(trigger) = orig_trigger; in zend_jit_compile_root_trace()
7592 ZEND_JIT_EXIT_COUNTERS + t->exit_count >= JIT_G(max_exit_counters)) { in zend_jit_compile_root_trace()
7629 if ((JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_EXIT_INFO) != 0 in zend_jit_compile_root_trace()
7757 const zend_op **cache_opline = JIT_G(bad_root_cache_opline); in zend_jit_trace_is_bad_root()
7758 uint8_t *cache_count = JIT_G(bad_root_cache_count); in zend_jit_trace_is_bad_root()
7759 uint8_t *cache_stop = JIT_G(bad_root_cache_stop); in zend_jit_trace_is_bad_root()
7760 uint32_t cache_slot = JIT_G(bad_root_slot); in zend_jit_trace_is_bad_root()
7765 if (cache_count[i] >= JIT_G(blacklist_root_trace) - 1) { in zend_jit_trace_is_bad_root()
7786 JIT_G(bad_root_slot) = cache_slot; in zend_jit_trace_is_bad_root()
8121 if (JIT_G(tracing)) { in zend_jit_trace_hot_root()
8126 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_START) { in zend_jit_trace_hot_root()
8138 if (ZEND_JIT_TRACE_NUM >= JIT_G(max_root_traces)) { in zend_jit_trace_hot_root()
8144 JIT_G(tracing) = 1; in zend_jit_trace_hot_root()
8147 JIT_G(tracing) = 0; in zend_jit_trace_hot_root()
8159 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_START) { in zend_jit_trace_hot_root()
8178 if (UNEXPECTED(JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_BYTECODE)) { in zend_jit_trace_hot_root()
8183 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_STOP) { in zend_jit_trace_hot_root()
8198 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_COMPILED) { in zend_jit_trace_hot_root()
8208 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_ABORT) { in zend_jit_trace_hot_root()
8215 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_BLACKLIST) { in zend_jit_trace_hot_root()
8228 …if (JIT_G(debug) & (ZEND_JIT_DEBUG_TRACE_STOP|ZEND_JIT_DEBUG_TRACE_ABORT|ZEND_JIT_DEBUG_TRACE_COMP… in zend_jit_trace_hot_root()
8275 uint8_t *counter = JIT_G(exit_counters) + in zend_jit_trace_exit_is_bad()
8278 if (*counter + 1 >= JIT_G(hot_side_exit) + JIT_G(blacklist_side_trace)) { in zend_jit_trace_exit_is_bad()
8287 uint8_t *counter = JIT_G(exit_counters) + in zend_jit_trace_exit_is_hot()
8290 if (*counter + 1 >= JIT_G(hot_side_exit)) { in zend_jit_trace_exit_is_hot()
8311 } else if (ZEND_JIT_TRACE_NUM >= JIT_G(max_root_traces)) { in zend_jit_compile_side_trace()
8313 …} else if (zend_jit_traces[zend_jit_traces[parent_num].root].child_count >= JIT_G(max_side_traces)… in zend_jit_compile_side_trace()
8338 orig_trigger = JIT_G(trigger); in zend_jit_compile_side_trace()
8339 JIT_G(trigger) = ZEND_JIT_ON_HOT_TRACE; in zend_jit_compile_side_trace()
8343 JIT_G(trigger) = orig_trigger; in zend_jit_compile_side_trace()
8416 ZEND_JIT_EXIT_COUNTERS + t->exit_count >= JIT_G(max_exit_counters)) { in zend_jit_compile_side_trace()
8453 if ((JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_EXIT_INFO) != 0 in zend_jit_compile_side_trace()
8480 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_START) { in zend_jit_trace_hot_side()
8491 if (ZEND_JIT_TRACE_NUM >= JIT_G(max_root_traces)) { in zend_jit_trace_hot_side()
8497 if (zend_jit_traces[root].child_count >= JIT_G(max_side_traces)) { in zend_jit_trace_hot_side()
8502 if (JIT_G(max_polymorphic_calls) > 0) { in zend_jit_trace_hot_side()
8506 if (zend_jit_traces[parent_num].polymorphism >= JIT_G(max_polymorphic_calls) - 1) { in zend_jit_trace_hot_side()
8538 JIT_G(tracing) = 1; in zend_jit_trace_hot_side()
8540 JIT_G(tracing) = 0; in zend_jit_trace_hot_side()
8548 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_START) { in zend_jit_trace_hot_side()
8567 if (UNEXPECTED(JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_BYTECODE)) { in zend_jit_trace_hot_side()
8572 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_STOP) { in zend_jit_trace_hot_side()
8596 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_COMPILED) { in zend_jit_trace_hot_side()
8606 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_ABORT) { in zend_jit_trace_hot_side()
8614 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_BLACKLIST) { in zend_jit_trace_hot_side()
8625 …if (JIT_G(debug) & (ZEND_JIT_DEBUG_TRACE_STOP|ZEND_JIT_DEBUG_TRACE_ABORT|ZEND_JIT_DEBUG_TRACE_COMP… in zend_jit_trace_hot_side()
8768 if (zend_atomic_bool_load_ex(&EG(vm_interrupt)) || JIT_G(tracing)) { in zend_jit_trace_exit()
8779 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_EXIT) { in zend_jit_trace_exit()
8807 } else if (ZEND_JIT_TRACE_NUM >= JIT_G(max_root_traces)) { in zend_jit_trace_exit()
8848 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_BLACKLIST) { in zend_jit_trace_exit()
8854 } else if (JIT_G(hot_side_exit) && zend_jit_trace_exit_is_hot(trace_num, exit_num)) { in zend_jit_trace_exit()
8919 if (JIT_G(hot_loop)) { in zend_jit_setup_hot_trace_counters()
8948 if (JIT_G(hot_func)) { in zend_jit_setup_hot_trace_counters()
8975 memset(ZEND_VOIDP(JIT_G(bad_root_cache_opline)), 0, sizeof(JIT_G(bad_root_cache_opline))); in zend_jit_trace_init_caches()
8976 memset(JIT_G(bad_root_cache_count), 0, sizeof(JIT_G(bad_root_cache_count))); in zend_jit_trace_init_caches()
8977 memset(JIT_G(bad_root_cache_stop), 0, sizeof(JIT_G(bad_root_cache_count))); in zend_jit_trace_init_caches()
8978 JIT_G(bad_root_slot) = 0; in zend_jit_trace_init_caches()
8980 if (JIT_G(exit_counters)) { in zend_jit_trace_init_caches()
8981 memset(JIT_G(exit_counters), 0, JIT_G(max_exit_counters)); in zend_jit_trace_init_caches()
8987 JIT_G(tracing) = 0; in zend_jit_trace_reset_caches()
8989 if (!JIT_G(exit_counters)) { in zend_jit_trace_reset_caches()
8990 JIT_G(exit_counters) = calloc(JIT_G(max_exit_counters), 1); in zend_jit_trace_reset_caches()