Skip to content

[RFC] Change default method of disabling JIT #12678

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -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
========================================
Expand Down
3 changes: 2 additions & 1 deletion benchmark/benchmark.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]);
Expand Down
2 changes: 1 addition & 1 deletion ext/opcache/jit/zend_jit.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/bug81272.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ opcache
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.jit_buffer_size=64M
opcache.jit=function
--FILE--
<?php
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/add_001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ADD: 001
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/add_002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ADD: 002
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/add_003.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ADD: 003
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/add_004.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ADD: 004
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/add_005.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ADD: 005
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/add_006.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ADD: 006
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/add_007.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ADD: 007 Addition with immediate values
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
opcache.protect_memory=1
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/add_008.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ADD: 008 Addition with reference IS_VAR
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
opcache.protect_memory=1
opcache.jit=tracing
--EXTENSIONS--
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/add_009.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ADD: 009 two array references
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
--FILE--
<?php
$a = [];
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/add_010.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ADD: 010 overflow handling
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
--SKIPIF--
<?php if (PHP_INT_SIZE != 8) die("skip: 64-bit only"); ?>
--FILE--
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/add_011.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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--
<?php if (PHP_INT_SIZE != 8) die("skip: 64-bit only"); ?>
--FILE--
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/add_012.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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--
<?php if (PHP_INT_SIZE != 8) die("skip: 64-bit only"); ?>
--FILE--
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/add_013.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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--
<?php
function y(){
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/add_014.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ADD: 014 incorrect guard elimination
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
--FILE--
<?php
function test() {
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/and_001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT BW_AND: 001 (empty string)
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
--FILE--
<?php
$a = [];
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/and_002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT BW_AND: 002 (memory leak)
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
--FILE--
<?php
function t($a) {
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/array_elem_002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Occupied next element
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
--FILE--
<?php
$float = 100000000000000000000000000000000000000;
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 001
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 002
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=1
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_003.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 003
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_004.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 004
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_005.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 005
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_006.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 006
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_007.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 007
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_008.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 008
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_009.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 009
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_010.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 010
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_011.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 011
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_012.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 012
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_013.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 013
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_014.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 014
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_015.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 015
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_016.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 016
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_017.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 017
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_018.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 018
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_019.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 019
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_020.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 020
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_021.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 021
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_022.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 022
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_023.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 023
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_024.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 024
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_025.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 025
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_026.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 026
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
1 change: 0 additions & 1 deletion ext/opcache/tests/jit/assign_027.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ JIT ASSIGN: 027
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
;opcache.jit_debug=257
--EXTENSIONS--
opcache
Expand Down
Loading