Lines Matching refs:trace_buffer
585 static void zend_jit_dump_trace(zend_jit_trace_rec *trace_buffer, zend_ssa *tssa);
644 static int zend_jit_trace_add_phis(zend_jit_trace_rec *trace_buffer, uint32_t ssa_vars_count, zend_… in zend_jit_trace_add_phis() argument
656 op_array = trace_buffer->op_array; in zend_jit_trace_add_phis()
661 p = trace_buffer + ZEND_JIT_TRACE_START_REC_SIZE; in zend_jit_trace_add_phis()
694 if (trace_buffer->start == ZEND_JIT_TRACE_START_ENTER) { in zend_jit_trace_add_phis()
729 static int zend_jit_trace_add_call_phis(zend_jit_trace_rec *trace_buffer, uint32_t ssa_vars_count, … in zend_jit_trace_add_call_phis() argument
732 const zend_op_array *op_array = trace_buffer->op_array; in zend_jit_trace_add_call_phis()
733 const zend_op *opline = trace_buffer[1].opline; in zend_jit_trace_add_call_phis()
762 static int zend_jit_trace_add_ret_phis(zend_jit_trace_rec *trace_buffer, uint32_t ssa_vars_count, z… in zend_jit_trace_add_ret_phis() argument
764 const zend_op *opline = trace_buffer[1].opline - 1; in zend_jit_trace_add_ret_phis()
1333 static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uint32_t parent_trace,… in zend_jit_trace_build_tssa() argument
1358 op_array = trace_buffer->op_array; in zend_jit_trace_build_tssa()
1361 p = trace_buffer + ZEND_JIT_TRACE_START_REC_SIZE; in zend_jit_trace_build_tssa()
1416 num_args = find_trampoline_num_args(trace_buffer + ZEND_JIT_TRACE_START_REC_SIZE, p); in zend_jit_trace_build_tssa()
1492 if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP in zend_jit_trace_build_tssa()
1493 || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_CALL in zend_jit_trace_build_tssa()
1494 || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_RET) { in zend_jit_trace_build_tssa()
1534 op_array = trace_buffer->op_array; in zend_jit_trace_build_tssa()
1535 if (trace_buffer->start == ZEND_JIT_TRACE_START_ENTER) { in zend_jit_trace_build_tssa()
1545 if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) { in zend_jit_trace_build_tssa()
1548 ssa_vars_count = zend_jit_trace_add_phis(trace_buffer, ssa_vars_count, tssa, stack); in zend_jit_trace_build_tssa()
1549 } else if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_CALL) { in zend_jit_trace_build_tssa()
1550 ssa_vars_count = zend_jit_trace_add_call_phis(trace_buffer, ssa_vars_count, tssa, stack); in zend_jit_trace_build_tssa()
1551 } else if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_RET) { in zend_jit_trace_build_tssa()
1552 ssa_vars_count = zend_jit_trace_add_ret_phis(trace_buffer, ssa_vars_count, tssa, stack); in zend_jit_trace_build_tssa()
1555 p = trace_buffer + ZEND_JIT_TRACE_START_REC_SIZE; in zend_jit_trace_build_tssa()
1606 op_array = trace_buffer->op_array; in zend_jit_trace_build_tssa()
1609 if (trace_buffer->start == ZEND_JIT_TRACE_START_ENTER) { in zend_jit_trace_build_tssa()
1630 if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP in zend_jit_trace_build_tssa()
1631 || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_CALL in zend_jit_trace_build_tssa()
1632 || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_RET) { in zend_jit_trace_build_tssa()
1680 op_array = trace_buffer->op_array; in zend_jit_trace_build_tssa()
1681 opline = trace_buffer[1].opline; in zend_jit_trace_build_tssa()
1688 if (trace_buffer->start == ZEND_JIT_TRACE_START_ENTER) { in zend_jit_trace_build_tssa()
1702 if (op_array->arg_info && i < trace_buffer[1].opline - op_array->opcodes) { in zend_jit_trace_build_tssa()
1778 if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP in zend_jit_trace_build_tssa()
1779 || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_CALL in zend_jit_trace_build_tssa()
1780 || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_RET) { in zend_jit_trace_build_tssa()
1801 if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) { in zend_jit_trace_build_tssa()
1807 p = trace_buffer + ZEND_JIT_TRACE_START_REC_SIZE; in zend_jit_trace_build_tssa()
2681 if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP in zend_jit_trace_build_tssa()
2682 || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_CALL in zend_jit_trace_build_tssa()
2683 || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_RET) { in zend_jit_trace_build_tssa()
2687 op_array = trace_buffer->op_array; in zend_jit_trace_build_tssa()
2778 trace_buffer->op_array->scope ? ZSTR_VAL(trace_buffer->op_array->scope->name) : "", in zend_jit_trace_build_tssa()
2779 trace_buffer->op_array->scope ? "::" : "", in zend_jit_trace_build_tssa()
2780 trace_buffer->op_array->function_name ? in zend_jit_trace_build_tssa()
2781 ZSTR_VAL(trace_buffer->op_array->function_name) : "$main", in zend_jit_trace_build_tssa()
2782 ZSTR_VAL(trace_buffer->op_array->filename), in zend_jit_trace_build_tssa()
2783 trace_buffer[1].opline->lineno); in zend_jit_trace_build_tssa()
2787 zend_jit_trace_star_desc(trace_buffer->start), in zend_jit_trace_build_tssa()
2788 trace_buffer->op_array->scope ? ZSTR_VAL(trace_buffer->op_array->scope->name) : "", in zend_jit_trace_build_tssa()
2789 trace_buffer->op_array->scope ? "::" : "", in zend_jit_trace_build_tssa()
2790 trace_buffer->op_array->function_name ? in zend_jit_trace_build_tssa()
2791 ZSTR_VAL(trace_buffer->op_array->function_name) : "$main", in zend_jit_trace_build_tssa()
2792 ZSTR_VAL(trace_buffer->op_array->filename), in zend_jit_trace_build_tssa()
2793 trace_buffer[1].opline->lineno); in zend_jit_trace_build_tssa()
2795 zend_jit_dump_trace(trace_buffer, tssa); in zend_jit_trace_build_tssa()
2796 if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LINK) { in zend_jit_trace_build_tssa()
2797 uint32_t idx = trace_buffer[1].last; in zend_jit_trace_build_tssa()
2798 uint32_t link_to = zend_jit_find_trace(trace_buffer[idx].opline->handler); in zend_jit_trace_build_tssa()
2805 zend_jit_trace_stop_description[trace_buffer->stop]); in zend_jit_trace_build_tssa()
2853 static zend_jit_reg_var* zend_jit_trace_allocate_registers(zend_jit_trace_rec *trace_buffer, zend_s… in zend_jit_trace_allocate_registers() argument
2877 op_array = trace_buffer->op_array; in zend_jit_trace_allocate_registers()
2890 if (trace_buffer->start != ZEND_JIT_TRACE_START_ENTER) { in zend_jit_trace_allocate_registers()
2917 if (trace_buffer->start == ZEND_JIT_TRACE_START_ENTER) { in zend_jit_trace_allocate_registers()
2925 if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP in zend_jit_trace_allocate_registers()
2926 || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_CALL in zend_jit_trace_allocate_registers()
2927 || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_RET) { in zend_jit_trace_allocate_registers()
2943 p = trace_buffer + ZEND_JIT_TRACE_START_REC_SIZE; in zend_jit_trace_allocate_registers()
3250 if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP in zend_jit_trace_allocate_registers()
3251 || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_CALL in zend_jit_trace_allocate_registers()
3252 || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_RET) { in zend_jit_trace_allocate_registers()
3264 if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) { in zend_jit_trace_allocate_registers()
3293 if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP in zend_jit_trace_allocate_registers()
3294 || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_CALL in zend_jit_trace_allocate_registers()
3295 || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_RET) { in zend_jit_trace_allocate_registers()
4084 static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t parent_trace, uint32_t… in zend_jit_trace() argument
4125 JIT_G(current_trace) = trace_buffer; in zend_jit_trace()
4129 …ssa = zend_jit_trace_build_tssa(trace_buffer, parent_trace, exit_num, script, op_arrays, &num_op_a… in zend_jit_trace()
4137 op_array = trace_buffer->op_array; in zend_jit_trace()
4138 opline = trace_buffer[1].opline; in zend_jit_trace()
4147 ctx.ra = ra = zend_jit_trace_allocate_registers(trace_buffer, ssa, parent_trace, exit_num); in zend_jit_trace()
4150 p = trace_buffer; in zend_jit_trace()
4204 if (trace_buffer->start != ZEND_JIT_TRACE_START_ENTER) { in zend_jit_trace()
4233 && (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP in zend_jit_trace()
4234 || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_CALL in zend_jit_trace()
4235 || (trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_RET in zend_jit_trace()
4247 } else if (trace_buffer->start == ZEND_JIT_TRACE_START_ENTER in zend_jit_trace()
4256 && (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP in zend_jit_trace()
4257 || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_CALL in zend_jit_trace()
4258 || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_RET) in zend_jit_trace()
4284 && trace_buffer->stop != ZEND_JIT_TRACE_STOP_RECURSIVE_CALL in zend_jit_trace()
4285 && trace_buffer->stop != ZEND_JIT_TRACE_STOP_RECURSIVE_RET) { in zend_jit_trace()
4303 if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP) { in zend_jit_trace()
4316 if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP in zend_jit_trace()
4317 || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_CALL in zend_jit_trace()
4318 || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_RET) { in zend_jit_trace()
7214 if (trace_buffer->stop != ZEND_JIT_TRACE_STOP_RECURSIVE_RET) { in zend_jit_trace()
7219 … uint32_t exit_point = zend_jit_trace_get_exit_point(trace_buffer[1].opline, ZEND_JIT_EXIT_TO_VM); in zend_jit_trace()
7320 rec_op_array = op_array = trace_buffer->op_array; in zend_jit_trace()
7323 p = trace_buffer + ZEND_JIT_TRACE_START_REC_SIZE; in zend_jit_trace()
7475 static zend_jit_trace_stop zend_jit_compile_root_trace(zend_jit_trace_rec *trace_buffer, const zend… in zend_jit_compile_root_trace() argument
7508 t->op_array = trace_buffer[0].op_array; in zend_jit_compile_root_trace()
7514 t->opline = trace_buffer[1].opline; in zend_jit_compile_root_trace()
7523 handler = zend_jit_trace(trace_buffer, 0, 0); in zend_jit_compile_root_trace()
7790 static void zend_jit_dump_trace(zend_jit_trace_rec *trace_buffer, zend_ssa *tssa) in zend_jit_dump_trace() argument
7792 zend_jit_trace_rec *p = trace_buffer; in zend_jit_dump_trace()
7795 uint32_t level = 1 + trace_buffer[0].level; in zend_jit_dump_trace()
7805 if (trace_buffer->start == ZEND_JIT_TRACE_START_ENTER) { in zend_jit_dump_trace()
7817 if (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP in zend_jit_dump_trace()
7818 || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_CALL in zend_jit_dump_trace()
7819 || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_RET) { in zend_jit_dump_trace()
8101 zend_jit_trace_rec trace_buffer[ZEND_JIT_TRACE_MAX_LENGTH]; in zend_jit_trace_hot_root() local
8145 stop = zend_jit_trace_execute(execute_data, opline, trace_buffer, in zend_jit_trace_hot_root()
8154 if (UNEXPECTED(trace_buffer[1].opline != orig_opline)) { in zend_jit_trace_hot_root()
8155 orig_opline = trace_buffer[1].opline; in zend_jit_trace_hot_root()
8156 op_array = (zend_op_array*)trace_buffer[0].op_array; in zend_jit_trace_hot_root()
8160 const zend_op_array *op_array = trace_buffer[0].op_array; in zend_jit_trace_hot_root()
8161 const zend_op *opline = trace_buffer[1].opline; in zend_jit_trace_hot_root()
8179 zend_jit_dump_trace(trace_buffer, NULL); in zend_jit_trace_hot_root()
8185 uint32_t idx = trace_buffer[1].last; in zend_jit_trace_hot_root()
8186 uint32_t link_to = zend_jit_find_trace(trace_buffer[idx].opline->handler); in zend_jit_trace_hot_root()
8196 stop = zend_jit_compile_root_trace(trace_buffer, orig_opline, offset); in zend_jit_trace_hot_root()
8297 static zend_jit_trace_stop zend_jit_compile_side_trace(zend_jit_trace_rec *trace_buffer, uint32_t p… in zend_jit_compile_side_trace() argument
8341 handler = zend_jit_trace(trace_buffer, parent_num, exit_num); in zend_jit_compile_side_trace()
8467 zend_jit_trace_rec trace_buffer[ZEND_JIT_TRACE_MAX_LENGTH]; in zend_jit_trace_hot_side() local
8539 …stop = zend_jit_trace_execute(execute_data, EX(opline), trace_buffer, ZEND_JIT_TRACE_START_SIDE, i… in zend_jit_trace_hot_side()
8547 if (UNEXPECTED(trace_buffer->start != ZEND_JIT_TRACE_START_SIDE)) { in zend_jit_trace_hot_side()
8549 const zend_op_array *op_array = trace_buffer[0].op_array; in zend_jit_trace_hot_side()
8550 const zend_op *opline = trace_buffer[1].opline; in zend_jit_trace_hot_side()
8568 zend_jit_dump_trace(trace_buffer, NULL); in zend_jit_trace_hot_side()
8574 uint32_t idx = trace_buffer[1].last; in zend_jit_trace_hot_side()
8575 uint32_t link_to = zend_jit_find_trace(trace_buffer[idx].opline->handler);; in zend_jit_trace_hot_side()
8585 if (EXPECTED(trace_buffer->start == ZEND_JIT_TRACE_START_SIDE)) { in zend_jit_trace_hot_side()
8586 stop = zend_jit_compile_side_trace(trace_buffer, parent_num, exit_num, polymorphism); in zend_jit_trace_hot_side()
8588 const zend_op_array *op_array = trace_buffer[0].op_array; in zend_jit_trace_hot_side()
8591 const zend_op *opline = trace_buffer[1].opline; in zend_jit_trace_hot_side()
8593 stop = zend_jit_compile_root_trace(trace_buffer, opline, jit_extension->offset); in zend_jit_trace_hot_side()