@@ -227,16 +227,29 @@ static ZEND_INI_MH(OnUpdateCounter)
227
227
return FAILURE ;
228
228
}
229
229
230
- static ZEND_INI_MH (OnUpdateUnrollR )
230
+ static ZEND_INI_MH (OnUpdateUnrollC )
231
231
{
232
232
zend_long val = zend_atol (ZSTR_VAL (new_value ), ZSTR_LEN (new_value ));
233
- if (val > 0 && val < ZEND_JIT_TRACE_MAX_CALL_DEPTH && val < ZEND_JIT_TRACE_MAX_RET_DEPTH ) {
233
+ if (val > 0 && val < ZEND_JIT_TRACE_MAX_CALL_DEPTH ) {
234
234
zend_long * p = (zend_long * ) ZEND_INI_GET_ADDR ();
235
235
* p = val ;
236
236
return SUCCESS ;
237
237
}
238
238
zend_error (E_WARNING , "Invalid \"%s\" setting. Should be between 1 and %d" , ZSTR_VAL (entry -> name ),
239
- MIN (ZEND_JIT_TRACE_MAX_CALL_DEPTH , ZEND_JIT_TRACE_MAX_CALL_DEPTH ));
239
+ ZEND_JIT_TRACE_MAX_CALL_DEPTH );
240
+ return FAILURE ;
241
+ }
242
+
243
+ static ZEND_INI_MH (OnUpdateUnrollR )
244
+ {
245
+ zend_long val = zend_atol (ZSTR_VAL (new_value ), ZSTR_LEN (new_value ));
246
+ if (val >= 0 && val < ZEND_JIT_TRACE_MAX_RET_DEPTH ) {
247
+ zend_long * p = (zend_long * ) ZEND_INI_GET_ADDR ();
248
+ * p = val ;
249
+ return SUCCESS ;
250
+ }
251
+ zend_error (E_WARNING , "Invalid \"%s\" setting. Should be between 0 and %d" , ZSTR_VAL (entry -> name ),
252
+ ZEND_JIT_TRACE_MAX_RET_DEPTH );
240
253
return FAILURE ;
241
254
}
242
255
@@ -312,21 +325,22 @@ ZEND_INI_BEGIN()
312
325
STD_PHP_INI_ENTRY ("opcache.cache_id" , "" , PHP_INI_SYSTEM , OnUpdateString , accel_directives .cache_id , zend_accel_globals , accel_globals )
313
326
#endif
314
327
#ifdef HAVE_JIT
315
- STD_PHP_INI_ENTRY ("opcache.jit" , ZEND_JIT_DEFAULT_OPTIONS , PHP_INI_ALL , OnUpdateJit , options , zend_jit_globals , jit_globals )
316
- STD_PHP_INI_ENTRY ("opcache.jit_buffer_size" , ZEND_JIT_DEFAULT_BUFFER_SIZE , PHP_INI_SYSTEM , OnUpdateLong , buffer_size , zend_jit_globals , jit_globals )
317
- STD_PHP_INI_ENTRY ("opcache.jit_debug" , "0" , PHP_INI_ALL , OnUpdateJitDebug , debug , zend_jit_globals , jit_globals )
318
- STD_PHP_INI_ENTRY ("opcache.jit_bisect_limit" , "0" , PHP_INI_ALL , OnUpdateLong , bisect_limit , zend_jit_globals , jit_globals )
319
- STD_PHP_INI_ENTRY ("opcache.jit_prof_threshold" , "0.005" , PHP_INI_ALL , OnUpdateReal , prof_threshold , zend_jit_globals , jit_globals )
320
- STD_PHP_INI_ENTRY ("opcache.jit_max_root_traces" , "1024" , PHP_INI_SYSTEM , OnUpdateLong , max_root_traces , zend_jit_globals , jit_globals )
321
- STD_PHP_INI_ENTRY ("opcache.jit_max_side_traces" , "128" , PHP_INI_SYSTEM , OnUpdateLong , max_side_traces , zend_jit_globals , jit_globals )
322
- STD_PHP_INI_ENTRY ("opcache.jit_hot_loop" , "64" , PHP_INI_SYSTEM , OnUpdateCounter , hot_loop , zend_jit_globals , jit_globals )
323
- STD_PHP_INI_ENTRY ("opcache.jit_hot_func" , "127" , PHP_INI_SYSTEM , OnUpdateCounter , hot_func , zend_jit_globals , jit_globals )
324
- STD_PHP_INI_ENTRY ("opcache.jit_hot_return" , "8" , PHP_INI_SYSTEM , OnUpdateCounter , hot_return , zend_jit_globals , jit_globals )
325
- STD_PHP_INI_ENTRY ("opcache.jit_hot_side_exit" , "8" , PHP_INI_ALL , OnUpdateCounter , hot_side_exit , zend_jit_globals , jit_globals )
326
- STD_PHP_INI_ENTRY ("opcache.jit_blacklist_root_trace" , "16" , PHP_INI_ALL , OnUpdateCounter , blacklist_root_trace , zend_jit_globals , jit_globals )
327
- STD_PHP_INI_ENTRY ("opcache.jit_blacklist_side_trace" , "8" , PHP_INI_ALL , OnUpdateCounter , blacklist_side_trace , zend_jit_globals , jit_globals )
328
- STD_PHP_INI_ENTRY ("opcache.jit_max_recursion_unroll" , "2" , PHP_INI_ALL , OnUpdateUnrollR , max_recursion_unroll , zend_jit_globals , jit_globals )
329
- STD_PHP_INI_ENTRY ("opcache.jit_max_loops_unroll" , "8" , PHP_INI_ALL , OnUpdateUnrollL , max_loops_unroll , zend_jit_globals , jit_globals )
328
+ STD_PHP_INI_ENTRY ("opcache.jit" , ZEND_JIT_DEFAULT_OPTIONS , PHP_INI_ALL , OnUpdateJit , options , zend_jit_globals , jit_globals )
329
+ STD_PHP_INI_ENTRY ("opcache.jit_buffer_size" , ZEND_JIT_DEFAULT_BUFFER_SIZE , PHP_INI_SYSTEM , OnUpdateLong , buffer_size , zend_jit_globals , jit_globals )
330
+ STD_PHP_INI_ENTRY ("opcache.jit_debug" , "0" , PHP_INI_ALL , OnUpdateJitDebug , debug , zend_jit_globals , jit_globals )
331
+ STD_PHP_INI_ENTRY ("opcache.jit_bisect_limit" , "0" , PHP_INI_ALL , OnUpdateLong , bisect_limit , zend_jit_globals , jit_globals )
332
+ STD_PHP_INI_ENTRY ("opcache.jit_prof_threshold" , "0.005" , PHP_INI_ALL , OnUpdateReal , prof_threshold , zend_jit_globals , jit_globals )
333
+ STD_PHP_INI_ENTRY ("opcache.jit_max_root_traces" , "1024" , PHP_INI_SYSTEM , OnUpdateLong , max_root_traces , zend_jit_globals , jit_globals )
334
+ STD_PHP_INI_ENTRY ("opcache.jit_max_side_traces" , "128" , PHP_INI_SYSTEM , OnUpdateLong , max_side_traces , zend_jit_globals , jit_globals )
335
+ STD_PHP_INI_ENTRY ("opcache.jit_hot_loop" , "64" , PHP_INI_SYSTEM , OnUpdateCounter , hot_loop , zend_jit_globals , jit_globals )
336
+ STD_PHP_INI_ENTRY ("opcache.jit_hot_func" , "127" , PHP_INI_SYSTEM , OnUpdateCounter , hot_func , zend_jit_globals , jit_globals )
337
+ STD_PHP_INI_ENTRY ("opcache.jit_hot_return" , "8" , PHP_INI_SYSTEM , OnUpdateCounter , hot_return , zend_jit_globals , jit_globals )
338
+ STD_PHP_INI_ENTRY ("opcache.jit_hot_side_exit" , "8" , PHP_INI_ALL , OnUpdateCounter , hot_side_exit , zend_jit_globals , jit_globals )
339
+ STD_PHP_INI_ENTRY ("opcache.jit_blacklist_root_trace" , "16" , PHP_INI_ALL , OnUpdateCounter , blacklist_root_trace , zend_jit_globals , jit_globals )
340
+ STD_PHP_INI_ENTRY ("opcache.jit_blacklist_side_trace" , "8" , PHP_INI_ALL , OnUpdateCounter , blacklist_side_trace , zend_jit_globals , jit_globals )
341
+ STD_PHP_INI_ENTRY ("opcache.jit_max_loops_unroll" , "8" , PHP_INI_ALL , OnUpdateUnrollL , max_loops_unroll , zend_jit_globals , jit_globals )
342
+ STD_PHP_INI_ENTRY ("opcache.jit_max_recursive_calls" , "2" , PHP_INI_ALL , OnUpdateUnrollC , max_recursive_calls , zend_jit_globals , jit_globals )
343
+ STD_PHP_INI_ENTRY ("opcache.jit_max_recursive_returns" , "2" , PHP_INI_ALL , OnUpdateUnrollR , max_recursive_returns , zend_jit_globals , jit_globals )
330
344
#endif
331
345
ZEND_INI_END ()
332
346
@@ -810,7 +824,8 @@ ZEND_FUNCTION(opcache_get_configuration)
810
824
add_assoc_long (& directives , "opcache.jit_hot_return" , JIT_G (hot_return ));
811
825
add_assoc_long (& directives , "opcache.jit_hot_side_exit" , JIT_G (hot_side_exit ));
812
826
add_assoc_long (& directives , "opcache.jit_max_loops_unroll" , JIT_G (max_loops_unroll ));
813
- add_assoc_long (& directives , "opcache.jit_max_recursion_unroll" , JIT_G (max_recursion_unroll ));
827
+ add_assoc_long (& directives , "opcache.jit_max_recursive_calls" , JIT_G (max_recursive_calls ));
828
+ add_assoc_long (& directives , "opcache.jit_max_recursive_returns" , JIT_G (max_recursive_returns ));
814
829
add_assoc_long (& directives , "opcache.jit_max_root_traces" , JIT_G (max_root_traces ));
815
830
add_assoc_long (& directives , "opcache.jit_max_side_traces" , JIT_G (max_side_traces ));
816
831
add_assoc_long (& directives , "opcache.jit_prof_threshold" , JIT_G (prof_threshold ));
0 commit comments