Skip to content

Commit c327728

Browse files
author
wxue1
committed
Stop side exit tracing when reach max_root_trace.
When max_root_trace is reached, JIT in tracing mode will not compile any new code for side trace, but side exit tracing is still going on. We stop it directly instead of lazy blacklisting. Signed-off-by: Wang, Xue xue1.wang@intel.com
1 parent 964f494 commit c327728

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ext/opcache/jit/zend_jit_trace.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7744,6 +7744,15 @@ int ZEND_FASTCALL zend_jit_trace_hot_side(zend_execute_data *execute_data, uint3
77447744

77457745
if (ZEND_JIT_TRACE_NUM >= JIT_G(max_root_traces)) {
77467746
stop = ZEND_JIT_TRACE_STOP_TOO_MANY_TRACES;
7747+
// visit all JITTed compiled code, replace side exit to vm handler
7748+
for (uint32_t i = 1; i < ZEND_JIT_TRACE_NUM; i++) {
7749+
for (uint32_t j = 0; j < zend_jit_traces[i].exit_count; j++) {
7750+
zend_jit_blacklist_trace_exit(i, j);
7751+
}
7752+
}
7753+
if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_BLACKLIST) {
7754+
fprintf(stderr, "---- All side exits blacklisted");
7755+
}
77477756
goto abort;
77487757
}
77497758

0 commit comments

Comments
 (0)