Skip to content

Commit 6676f5d

Browse files
committed
Delay debug JIT op_array dump until actual JIT-ing
Previously function JIT for the whole script (opcache.jit=1205) dumped all op_arrays before JIT-ing the first functon. This complicated debugging of particular JIT-ed function and leaded to usage of opcache.jit=1204. Now both options should produce similar op_array/disasm interlived output.
1 parent 443eb50 commit 6676f5d

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

ext/opcache/jit/zend_jit.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4561,18 +4561,12 @@ ZEND_EXT_API int zend_jit_script(zend_script *script)
45614561
}
45624562
}
45634563

4564-
if (JIT_G(debug) & ZEND_JIT_DEBUG_SSA) {
4565-
for (i = 0; i < call_graph.op_arrays_count; i++) {
4566-
info = ZEND_FUNC_INFO(call_graph.op_arrays[i]);
4567-
if (info) {
4568-
zend_dump_op_array(call_graph.op_arrays[i], ZEND_DUMP_HIDE_UNREACHABLE|ZEND_DUMP_RC_INFERENCE|ZEND_DUMP_SSA, "JIT", &info->ssa);
4569-
}
4570-
}
4571-
}
4572-
45734564
for (i = 0; i < call_graph.op_arrays_count; i++) {
45744565
info = ZEND_FUNC_INFO(call_graph.op_arrays[i]);
45754566
if (info) {
4567+
if (JIT_G(debug) & ZEND_JIT_DEBUG_SSA) {
4568+
zend_dump_op_array(call_graph.op_arrays[i], ZEND_DUMP_HIDE_UNREACHABLE|ZEND_DUMP_RC_INFERENCE|ZEND_DUMP_SSA, "JIT", &info->ssa);
4569+
}
45764570
if (zend_jit(call_graph.op_arrays[i], &info->ssa, NULL) != SUCCESS) {
45774571
goto jit_failure;
45784572
}

0 commit comments

Comments
 (0)