mirror of
https://github.com/php/php-src.git
synced 2025-08-16 22:18:50 +02:00
Add opcache.jit=tracing|function values, make on/yes/true synonym for tracing.
This commit is contained in:
parent
1213907b83
commit
53ef244923
3 changed files with 16 additions and 9 deletions
|
@ -3759,7 +3759,15 @@ ZEND_EXT_API int zend_jit_config(zend_string *jit, int stage)
|
|||
} else if (zend_string_equals_literal_ci(jit, "1")
|
||||
|| zend_string_equals_literal_ci(jit, "on")
|
||||
|| zend_string_equals_literal_ci(jit, "yes")
|
||||
|| zend_string_equals_literal_ci(jit, "true")) {
|
||||
|| zend_string_equals_literal_ci(jit, "true")
|
||||
|| zend_string_equals_literal_ci(jit, "tracing")) {
|
||||
JIT_G(enabled) = 1;
|
||||
JIT_G(on) = 1;
|
||||
JIT_G(opt_level) = ZEND_JIT_LEVEL_OPT_FUNCS;
|
||||
JIT_G(trigger) = ZEND_JIT_ON_HOT_TRACE;
|
||||
JIT_G(opt_flags) = ZEND_JIT_REG_ALLOC_GLOBAL | ZEND_JIT_CPU_AVX;
|
||||
return SUCCESS;
|
||||
} else if (zend_string_equals_literal_ci(jit, "function")) {
|
||||
JIT_G(enabled) = 1;
|
||||
JIT_G(on) = 1;
|
||||
JIT_G(opt_level) = ZEND_JIT_LEVEL_OPT_SCRIPT;
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#define ZEND_JIT_REG_ALLOC_GLOBAL (1<<1) /* global linear scan register allocation */
|
||||
#define ZEND_JIT_CPU_AVX (1<<2) /* use AVX instructions, if available */
|
||||
|
||||
#define ZEND_JIT_DEFAULT_OPTIONS "1254"
|
||||
#define ZEND_JIT_DEFAULT_BUFFER_SIZE "0"
|
||||
|
||||
#define ZEND_JIT_COUNTER_INIT 32531
|
||||
|
|
|
@ -287,7 +287,7 @@ ZEND_INI_BEGIN()
|
|||
STD_PHP_INI_ENTRY("opcache.cache_id" , "" , PHP_INI_SYSTEM, OnUpdateString, accel_directives.cache_id, zend_accel_globals, accel_globals)
|
||||
#endif
|
||||
#ifdef HAVE_JIT
|
||||
STD_PHP_INI_ENTRY("opcache.jit" , ZEND_JIT_DEFAULT_OPTIONS, PHP_INI_ALL, OnUpdateJit, options, zend_jit_globals, jit_globals)
|
||||
STD_PHP_INI_ENTRY("opcache.jit" , "tracing", PHP_INI_ALL, OnUpdateJit, options, zend_jit_globals, jit_globals)
|
||||
STD_PHP_INI_ENTRY("opcache.jit_buffer_size" , ZEND_JIT_DEFAULT_BUFFER_SIZE, PHP_INI_SYSTEM, OnUpdateLong, buffer_size, zend_jit_globals, jit_globals)
|
||||
STD_PHP_INI_ENTRY("opcache.jit_debug" , "0", PHP_INI_ALL, OnUpdateJitDebug, debug, zend_jit_globals, jit_globals)
|
||||
STD_PHP_INI_ENTRY("opcache.jit_bisect_limit" , "0", PHP_INI_ALL, OnUpdateLong, bisect_limit, zend_jit_globals, jit_globals)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue