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()
106 if (JIT_G(debug) & ZEND_JIT_DEBUG_ASM) { in zend_jit_trace_allocate_exit_group()
186 if (JIT_G(current_frame)) { in zend_jit_trace_get_exit_point()
187 op_array = &JIT_G(current_frame)->func->op_array; in zend_jit_trace_get_exit_point()
190 stack = JIT_G(current_frame)->stack; in zend_jit_trace_get_exit_point()
370 return !JIT_G(current_frame) || TRACE_FRAME_IS_UNKNOWN_RETURN(JIT_G(current_frame)); in zend_jit_trace_may_exit()
520 if (JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE in zend_jit_needs_arg_dtor()
521 && JIT_G(current_frame) in zend_jit_needs_arg_dtor()
522 && JIT_G(current_frame)->call in zend_jit_needs_arg_dtor()
523 && JIT_G(current_frame)->call->func) { in zend_jit_needs_arg_dtor()
524 uint32_t type = STACK_TYPE(JIT_G(current_frame)->call->stack, arg_num); in zend_jit_needs_arg_dtor()
570 if (JIT_G(opt_level) >= ZEND_JIT_LEVEL_OPT_FUNC) { in zend_jit_trace_build_ssa()
576 if (JIT_G(opt_level) >= ZEND_JIT_LEVEL_OPT_FUNCS) { in zend_jit_trace_build_ssa()
588 if (JIT_G(debug) & ZEND_JIT_DEBUG_SSA) { in zend_jit_trace_build_ssa()
598 if (JIT_G(opt_level) == ZEND_JIT_LEVEL_INLINE) { in zend_jit_trace_build_ssa()
1221 if (JIT_G(opt_level) < ZEND_JIT_LEVEL_OPT_FUNC) { in zend_jit_trace_build_tssa()
1253 if (JIT_G(opt_level) < ZEND_JIT_LEVEL_OPT_FUNC) { in zend_jit_trace_build_tssa()
1326JIT_G(current_frame) = frame = (zend_jit_trace_stack_frame*)((char*)zend_arena_alloc(&CG(arena), s… in zend_jit_trace_build_tssa()
1365 if (JIT_G(opt_level) < ZEND_JIT_LEVEL_INLINE) { in zend_jit_trace_build_tssa()
1634 frame = JIT_G(current_frame); in zend_jit_trace_build_tssa()
2624 if (UNEXPECTED(JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_TSSA)) { in zend_jit_trace_build_tssa()
2749 frame = JIT_G(current_frame); in zend_jit_trace_allocate_registers()
3324 if (JIT_G(debug) & ZEND_JIT_DEBUG_REG_ALLOC) { in zend_jit_trace_allocate_registers()
3443 if (JIT_G(debug) & ZEND_JIT_DEBUG_REG_ALLOC) { in zend_jit_trace_allocate_registers()
3486 if (JIT_G(hot_return) && !ZEND_OP_TRACE_INFO(next_opline, offset)->trace_flags) { in zend_jit_trace_setup_ret_counter()
3517 if (!JIT_G(current_frame) in zend_jit_may_delay_fetch_this()
3518 || !JIT_G(current_frame)->call in zend_jit_may_delay_fetch_this()
3519 || !JIT_G(current_frame)->call->func in zend_jit_may_delay_fetch_this()
3520 || !TRACE_FRAME_IS_LAST_SEND_BY_VAL(JIT_G(current_frame)->call)) { in zend_jit_may_delay_fetch_this()
4024 JIT_G(current_trace) = trace_buffer; in zend_jit_trace()
4037 if ((JIT_G(opt_flags) & (ZEND_JIT_REG_ALLOC_LOCAL|ZEND_JIT_REG_ALLOC_GLOBAL)) in zend_jit_trace()
4038 && JIT_G(opt_level) >= ZEND_JIT_LEVEL_INLINE) { in zend_jit_trace()
4045 frame = JIT_G(current_frame); in zend_jit_trace()
4087 if (JIT_G(opt_level) >= ZEND_JIT_LEVEL_INLINE) { in zend_jit_trace()
4291 ssa_op = (JIT_G(opt_level) >= ZEND_JIT_LEVEL_INLINE) ? ssa->ops : NULL; in zend_jit_trace()
4346 if (JIT_G(opt_level) >= ZEND_JIT_LEVEL_INLINE) { in zend_jit_trace()
5222 if (!JIT_G(current_frame) in zend_jit_trace()
5223 || !JIT_G(current_frame)->call in zend_jit_trace()
5224 || !JIT_G(current_frame)->call->func) { in zend_jit_trace()
5230 TRACE_FRAME_SET_LAST_SEND_UNKNOWN(JIT_G(current_frame)->call); in zend_jit_trace()
5238 if (JIT_G(current_frame) in zend_jit_trace()
5239 && JIT_G(current_frame)->call) { in zend_jit_trace()
5240 TRACE_FRAME_SET_UNKNOWN_NUM_ARGS(JIT_G(current_frame)->call); in zend_jit_trace()
5446 if (JIT_G(current_frame) in zend_jit_trace()
5447 && TRACE_FRAME_IS_RETURN_VALUE_USED(JIT_G(current_frame))) { in zend_jit_trace()
5528 zend_jit_trace_stack *stack = JIT_G(current_frame)->stack; in zend_jit_trace()
5632 if (!JIT_G(current_frame) in zend_jit_trace()
5633 || !JIT_G(current_frame)->call in zend_jit_trace()
5634 || !JIT_G(current_frame)->call->func in zend_jit_trace()
5635 || !TRACE_FRAME_IS_LAST_SEND_BY_VAL(JIT_G(current_frame)->call)) { in zend_jit_trace()
5777 zend_jit_trace_stack *stack = JIT_G(current_frame)->stack; in zend_jit_trace()
5822 if (!JIT_G(current_frame) in zend_jit_trace()
5823 || !JIT_G(current_frame)->call in zend_jit_trace()
5824 || !JIT_G(current_frame)->call->func in zend_jit_trace()
5825 || !TRACE_FRAME_IS_LAST_SEND_BY_VAL(JIT_G(current_frame)->call)) { in zend_jit_trace()
6191 if (JIT_G(current_frame) in zend_jit_trace()
6192 && JIT_G(current_frame)->call) { in zend_jit_trace()
6193 TRACE_FRAME_SET_UNKNOWN_NUM_ARGS(JIT_G(current_frame)->call); in zend_jit_trace()
6574 JIT_G(current_frame) = call; in zend_jit_trace()
6587 JIT_G(current_frame) = frame; in zend_jit_trace()
6613 JIT_G(current_frame) = frame = call; in zend_jit_trace()
6654 if (JIT_G(opt_level) >= ZEND_JIT_LEVEL_INLINE) { in zend_jit_trace()
6684 JIT_G(current_frame) = frame; in zend_jit_trace()
6739 if (JIT_G(opt_level) >= ZEND_JIT_LEVEL_INLINE) { in zend_jit_trace()
6996 if (ZEND_JIT_EXIT_COUNTERS + t->exit_count >= JIT_G(max_exit_counters)) { in zend_jit_trace()
7045 if (JIT_G(current_frame) in zend_jit_trace()
7046 && JIT_G(current_frame)->prev) { in zend_jit_trace()
7047 frame = JIT_G(current_frame)->prev; in zend_jit_trace()
7085 JIT_G(current_frame) = NULL; in zend_jit_trace()
7086 JIT_G(current_trace) = NULL; in zend_jit_trace()
7160 } else if (ZEND_JIT_TRACE_NUM >= JIT_G(max_root_traces)) { in zend_jit_compile_root_trace()
7184 orig_trigger = JIT_G(trigger); in zend_jit_compile_root_trace()
7185 JIT_G(trigger) = ZEND_JIT_ON_HOT_TRACE; in zend_jit_compile_root_trace()
7189 JIT_G(trigger) = orig_trigger; in zend_jit_compile_root_trace()
7235 ZEND_JIT_EXIT_COUNTERS + t->exit_count >= JIT_G(max_exit_counters)) { in zend_jit_compile_root_trace()
7264 if ((JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_EXIT_INFO) != 0 in zend_jit_compile_root_trace()
7374 const zend_op **cache_opline = JIT_G(bad_root_cache_opline); in zend_jit_trace_is_bad_root()
7375 uint8_t *cache_count = JIT_G(bad_root_cache_count); in zend_jit_trace_is_bad_root()
7376 uint8_t *cache_stop = JIT_G(bad_root_cache_stop); in zend_jit_trace_is_bad_root()
7377 uint32_t cache_slot = JIT_G(bad_root_slot); in zend_jit_trace_is_bad_root()
7382 if (cache_count[i] >= JIT_G(blacklist_root_trace) - 1) { in zend_jit_trace_is_bad_root()
7403 JIT_G(bad_root_slot) = cache_slot; in zend_jit_trace_is_bad_root()
7713 if (JIT_G(tracing)) { in zend_jit_trace_hot_root()
7718 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_START) { in zend_jit_trace_hot_root()
7730 if (ZEND_JIT_TRACE_NUM >= JIT_G(max_root_traces)) { in zend_jit_trace_hot_root()
7736 JIT_G(tracing) = 1; in zend_jit_trace_hot_root()
7739 JIT_G(tracing) = 0; in zend_jit_trace_hot_root()
7751 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_START) { in zend_jit_trace_hot_root()
7770 if (UNEXPECTED(JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_BYTECODE)) { in zend_jit_trace_hot_root()
7775 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_STOP) { in zend_jit_trace_hot_root()
7790 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_COMPILED) { in zend_jit_trace_hot_root()
7800 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_ABORT) { in zend_jit_trace_hot_root()
7807 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_BLACKLIST) { in zend_jit_trace_hot_root()
7820 …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()
7867 uint8_t *counter = JIT_G(exit_counters) + in zend_jit_trace_exit_is_bad()
7870 if (*counter + 1 >= JIT_G(hot_side_exit) + JIT_G(blacklist_side_trace)) { in zend_jit_trace_exit_is_bad()
7879 uint8_t *counter = JIT_G(exit_counters) + in zend_jit_trace_exit_is_hot()
7882 if (*counter + 1 >= JIT_G(hot_side_exit)) { in zend_jit_trace_exit_is_hot()
7903 } else if (ZEND_JIT_TRACE_NUM >= JIT_G(max_root_traces)) { in zend_jit_compile_side_trace()
7905 …} else if (zend_jit_traces[zend_jit_traces[parent_num].root].child_count >= JIT_G(max_side_traces)… in zend_jit_compile_side_trace()
7928 orig_trigger = JIT_G(trigger); in zend_jit_compile_side_trace()
7929 JIT_G(trigger) = ZEND_JIT_ON_HOT_TRACE; in zend_jit_compile_side_trace()
7933 JIT_G(trigger) = orig_trigger; in zend_jit_compile_side_trace()
7985 ZEND_JIT_EXIT_COUNTERS + t->exit_count >= JIT_G(max_exit_counters)) { in zend_jit_compile_side_trace()
8014 if ((JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_EXIT_INFO) != 0 in zend_jit_compile_side_trace()
8039 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_START) { in zend_jit_trace_hot_side()
8050 if (ZEND_JIT_TRACE_NUM >= JIT_G(max_root_traces)) { in zend_jit_trace_hot_side()
8055 if (zend_jit_traces[zend_jit_traces[parent_num].root].child_count >= JIT_G(max_side_traces)) { in zend_jit_trace_hot_side()
8060 if (JIT_G(max_polymorphic_calls) > 0) { in zend_jit_trace_hot_side()
8064 if (zend_jit_traces[parent_num].polymorphism >= JIT_G(max_polymorphic_calls) - 1) { in zend_jit_trace_hot_side()
8075 JIT_G(tracing) = 1; in zend_jit_trace_hot_side()
8077 JIT_G(tracing) = 0; in zend_jit_trace_hot_side()
8085 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_START) { in zend_jit_trace_hot_side()
8104 if (UNEXPECTED(JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_BYTECODE)) { in zend_jit_trace_hot_side()
8109 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_STOP) { in zend_jit_trace_hot_side()
8133 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_COMPILED) { in zend_jit_trace_hot_side()
8143 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_ABORT) { in zend_jit_trace_hot_side()
8151 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_BLACKLIST) { in zend_jit_trace_hot_side()
8162 …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()
8292 if (zend_atomic_bool_load_ex(&EG(vm_interrupt)) || JIT_G(tracing)) { in zend_jit_trace_exit()
8303 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_EXIT) { in zend_jit_trace_exit()
8331 } else if (ZEND_JIT_TRACE_NUM >= JIT_G(max_root_traces)) { in zend_jit_trace_exit()
8372 if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_BLACKLIST) { in zend_jit_trace_exit()
8378 } else if (JIT_G(hot_side_exit) && zend_jit_trace_exit_is_hot(trace_num, exit_num)) { in zend_jit_trace_exit()
8443 if (JIT_G(hot_loop)) { in zend_jit_setup_hot_trace_counters()
8472 if (JIT_G(hot_func)) { in zend_jit_setup_hot_trace_counters()
8499 memset(ZEND_VOIDP(JIT_G(bad_root_cache_opline)), 0, sizeof(JIT_G(bad_root_cache_opline))); in zend_jit_trace_init_caches()
8500 memset(JIT_G(bad_root_cache_count), 0, sizeof(JIT_G(bad_root_cache_count))); in zend_jit_trace_init_caches()
8501 memset(JIT_G(bad_root_cache_stop), 0, sizeof(JIT_G(bad_root_cache_count))); in zend_jit_trace_init_caches()
8502 JIT_G(bad_root_slot) = 0; in zend_jit_trace_init_caches()
8504 if (JIT_G(exit_counters)) { in zend_jit_trace_init_caches()
8505 memset(JIT_G(exit_counters), 0, JIT_G(max_exit_counters)); in zend_jit_trace_init_caches()
8511 JIT_G(tracing) = 0; in zend_jit_trace_reset_caches()
8513 if (!JIT_G(exit_counters)) { in zend_jit_trace_reset_caches()
8514 JIT_G(exit_counters) = calloc(JIT_G(max_exit_counters), 1); in zend_jit_trace_reset_caches()