Skip to content

Commit 6d9f040

Browse files
authored
Stop trace recording only on ENTER to FAKE_CLOSURE (continue on EXIT) (#16455)
1 parent 99aa43a commit 6d9f040

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ext/opcache/jit/zend_jit_vm_helpers.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -960,8 +960,7 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex,
960960
jit_extension =
961961
(zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(op_array);
962962
if (UNEXPECTED(!jit_extension)
963-
|| UNEXPECTED(!(jit_extension->func_info.flags & ZEND_FUNC_JIT_ON_HOT_TRACE))
964-
|| (op_array->fn_flags & ZEND_ACC_FAKE_CLOSURE)) {
963+
|| UNEXPECTED(!(jit_extension->func_info.flags & ZEND_FUNC_JIT_ON_HOT_TRACE))) {
965964
stop = ZEND_JIT_TRACE_STOP_INTERPRETER;
966965
break;
967966
}
@@ -995,6 +994,11 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex,
995994
break;
996995
}
997996

997+
if (EX(func)->op_array.fn_flags & ZEND_ACC_FAKE_CLOSURE) {
998+
stop = ZEND_JIT_TRACE_STOP_INTERPRETER;
999+
break;
1000+
}
1001+
9981002
TRACE_RECORD(ZEND_JIT_TRACE_ENTER,
9991003
EX(return_value) != NULL ? ZEND_JIT_TRACE_RETURN_VALUE_USED : 0,
10001004
op_array);

0 commit comments

Comments
 (0)