diff --git a/UPGRADING b/UPGRADING index cc278ac22e92f..cacfca84f2025 100644 --- a/UPGRADING +++ b/UPGRADING @@ -111,6 +111,16 @@ PHP 8.4 UPGRADE NOTES contain null bytes. This never actually worked correctly in the first place, which is why it throws an exception nowadays. +- Opcache: + . The JIT config defaults changed from opcache.jit=tracing and + opcache.jit_buffer_size=0 to opcache.jit=disable and + opcache.jit_buffer_size=64M, respectively. This does not affect the default + behavior, the JIT is still disabled by default. However, it is now disabled + through the opcache.jit setting, rather than opcache.jit_buffer_size. This + may affect users who previously enabled JIT through opcache.jit_buffer_size + exclusively, without also specifying a JIT mode using opcache.jit. To enable + JIT, set the opcache.jit config value accordingly. + ======================================== 2. New Features ======================================== diff --git a/benchmark/benchmark.php b/benchmark/benchmark.php index a0c01ca766233..ec39e9f3310e5 100644 --- a/benchmark/benchmark.php +++ b/benchmark/benchmark.php @@ -118,7 +118,8 @@ function runValgrindPhpCgiCommand( '-T' . ($warmup ? $warmup . ',' : '') . $repeat, '-d max_execution_time=0', '-d opcache.enable=1', - '-d opcache.jit_buffer_size=' . ($jit ? '128M' : '0'), + '-d opcache.jit=' . ($jit ? 'tracing' : 'disable'), + '-d opcache.jit_buffer_size=128M', '-d opcache.validate_timestamps=0', ...$args, ]); diff --git a/ext/opcache/jit/zend_jit.h b/ext/opcache/jit/zend_jit.h index 06e91bb63c982..074bf67cf25a2 100644 --- a/ext/opcache/jit/zend_jit.h +++ b/ext/opcache/jit/zend_jit.h @@ -47,7 +47,7 @@ #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_BUFFER_SIZE "0" +#define ZEND_JIT_DEFAULT_BUFFER_SIZE "64M" #define ZEND_JIT_COUNTER_INIT 32531 diff --git a/ext/opcache/tests/bug81272.phpt b/ext/opcache/tests/bug81272.phpt index 7e31002975763..7878f46d2ceee 100644 --- a/ext/opcache/tests/bug81272.phpt +++ b/ext/opcache/tests/bug81272.phpt @@ -5,7 +5,6 @@ opcache --INI-- opcache.enable=1 opcache.enable_cli=1 -opcache.jit_buffer_size=64M opcache.jit=function --FILE-- --FILE-- diff --git a/ext/opcache/tests/jit/add_011.phpt b/ext/opcache/tests/jit/add_011.phpt index 0a8d15fbb916a..28c598c5540a0 100644 --- a/ext/opcache/tests/jit/add_011.phpt +++ b/ext/opcache/tests/jit/add_011.phpt @@ -4,7 +4,6 @@ JIT ADD: 011 overflow handling opcache.enable=1 opcache.enable_cli=1 opcache.file_update_protection=0 -opcache.jit_buffer_size=64M --SKIPIF-- --FILE-- diff --git a/ext/opcache/tests/jit/add_012.phpt b/ext/opcache/tests/jit/add_012.phpt index e891a5e1d36a3..707b795f5e03d 100644 --- a/ext/opcache/tests/jit/add_012.phpt +++ b/ext/opcache/tests/jit/add_012.phpt @@ -4,7 +4,6 @@ JIT ADD: 012 register allocation for 64-bit constant opcache.enable=1 opcache.enable_cli=1 opcache.file_update_protection=0 -opcache.jit_buffer_size=64M --SKIPIF-- --FILE-- diff --git a/ext/opcache/tests/jit/add_013.phpt b/ext/opcache/tests/jit/add_013.phpt index 7ec0a794c1470..9bac9ad51036d 100644 --- a/ext/opcache/tests/jit/add_013.phpt +++ b/ext/opcache/tests/jit/add_013.phpt @@ -4,7 +4,6 @@ JIT ADD: 013 register allocation (incorrect hinting) opcache.enable=1 opcache.enable_cli=1 opcache.file_update_protection=0 -opcache.jit_buffer_size=64M --FILE-- 0]; diff --git a/ext/opcache/tests/jit/assign_op_006.phpt b/ext/opcache/tests/jit/assign_op_006.phpt index 9f870b4505b79..5feeafacd9efe 100644 --- a/ext/opcache/tests/jit/assign_op_006.phpt +++ b/ext/opcache/tests/jit/assign_op_006.phpt @@ -4,7 +4,6 @@ JIT ASSIGN_OP: 006 concationation with itself opcache.enable=1 opcache.enable_cli=1 opcache.file_update_protection=0 -opcache.jit_buffer_size=64M --FILE-- diff --git a/ext/opcache/tests/jit/bug81225_2.phpt b/ext/opcache/tests/jit/bug81225_2.phpt index b3411e53b9c15..d1a852f3eefb6 100644 --- a/ext/opcache/tests/jit/bug81225_2.phpt +++ b/ext/opcache/tests/jit/bug81225_2.phpt @@ -5,7 +5,6 @@ opcache --INI-- opcache.enable=1 opcache.enable_cli=1 -opcache.jit_buffer_size=64M opcache.jit=function --SKIPIF-- diff --git a/ext/opcache/tests/jit/bug81226.phpt b/ext/opcache/tests/jit/bug81226.phpt index dfa9f31875941..3a018129cd97b 100644 --- a/ext/opcache/tests/jit/bug81226.phpt +++ b/ext/opcache/tests/jit/bug81226.phpt @@ -5,7 +5,6 @@ opcache --INI-- opcache.enable=1 opcache.enable_cli=1 -opcache.jit_buffer_size=64M opcache.jit=tracing --SKIPIF-- diff --git a/ext/opcache/tests/jit/bug81249.phpt b/ext/opcache/tests/jit/bug81249.phpt index 5a188d5806ab0..8f42d68cce305 100644 --- a/ext/opcache/tests/jit/bug81249.phpt +++ b/ext/opcache/tests/jit/bug81249.phpt @@ -5,7 +5,6 @@ opcache --INI-- opcache.enable=1 opcache.enable_cli=1 -opcache.jit_buffer_size=64M opcache.jit=tracing --SKIPIF-- diff --git a/ext/opcache/tests/jit/bug81255.phpt b/ext/opcache/tests/jit/bug81255.phpt index 3fa12183d0ad4..a11652ed90041 100644 --- a/ext/opcache/tests/jit/bug81255.phpt +++ b/ext/opcache/tests/jit/bug81255.phpt @@ -5,7 +5,6 @@ opcache --INI-- opcache.enable=1 opcache.enable_cli=1 -opcache.jit_buffer_size=64M opcache.jit=function --FILE-- 4)[-1]; diff --git a/ext/opcache/tests/jit/fetch_dim_r_016.phpt b/ext/opcache/tests/jit/fetch_dim_r_016.phpt index eb3e6eab36a8f..2db8a32a95821 100644 --- a/ext/opcache/tests/jit/fetch_dim_r_016.phpt +++ b/ext/opcache/tests/jit/fetch_dim_r_016.phpt @@ -4,7 +4,6 @@ JIT FETCH_DIM_R: 016 opcache.enable=1 opcache.enable_cli=1 opcache.file_update_protection=0 -opcache.jit_buffer_size=1M --FILE-- diff --git a/ext/opcache/tests/jit/inc_obj_001.phpt b/ext/opcache/tests/jit/inc_obj_001.phpt index 9378721e5fe22..7e5562d02a838 100644 --- a/ext/opcache/tests/jit/inc_obj_001.phpt +++ b/ext/opcache/tests/jit/inc_obj_001.phpt @@ -4,7 +4,6 @@ PRE_INC_OBJ: 001 opcache.enable=1 opcache.enable_cli=1 opcache.file_update_protection=0 -opcache.jit_buffer_size=64M opcache.protect_memory=1 --FILE-- diff --git a/ext/opcache/tests/jit/mul_009.phpt b/ext/opcache/tests/jit/mul_009.phpt index 840473fe736e8..a6016bd535e7a 100644 --- a/ext/opcache/tests/jit/mul_009.phpt +++ b/ext/opcache/tests/jit/mul_009.phpt @@ -4,7 +4,6 @@ JIT MUL: 009 memory leak opcache.enable=1 opcache.enable_cli=1 opcache.file_update_protection=0 -opcache.jit_buffer_size=64M opcache.protect_memory=1 --FILE--