diff --git a/.cirrus.yml b/.cirrus.yml index c1b17f3eb4260..c9d6342b50f8a 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -204,7 +204,7 @@ arm_task: sapi/cli/php run-tests.php -d zend_extension=opcache.so -d opcache.enable_cli=1 - -d opcache.jit_buffer_size=16M + -d opcache.jit_buffer_size=64M -d opcache.jit=function -P -q -x -j2 -g FAIL,BORK,LEAK,XLEAK @@ -217,7 +217,14 @@ arm_task: sapi/cli/php run-tests.php -d zend_extension=opcache.so -d opcache.enable_cli=1 - -d opcache.jit_buffer_size=16M + -d opcache.jit_buffer_size=64M + -d opcache.jit_max_root_traces=1000000 + -d opcache.jit_max_side_traces=1000000 + -d opcache.jit_max_exit_counters=1000000 + -d opcache.jit_hot_loop=1 + -d opcache.jit_hot_func=1 + -d opcache.jit_hot_return=1 + -d opcache.jit_hot_side_exit=1 -d opcache.jit=tracing -P -q -x -j2 -g FAIL,BORK,LEAK,XLEAK diff --git a/.github/actions/test-linux/action.yml b/.github/actions/test-linux/action.yml index 7657ff8c85ad2..968d04a0c3452 100644 --- a/.github/actions/test-linux/action.yml +++ b/.github/actions/test-linux/action.yml @@ -6,6 +6,9 @@ inputs: runTestsParameters: default: '' required: false + jitType: + default: 'disable' + required: false runs: using: composite steps: @@ -38,6 +41,16 @@ runs: export TEST_PHP_JUNIT=junit.out.xml export STACK_LIMIT_DEFAULTS_CHECK=1 sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \ + -d opcache.jit=${{ inputs.jitType }} \ + -d opcache.protect_memory=1 \ + -d opcache.jit_buffer_size=64M \ + -d opcache.jit_max_root_traces=1000000 \ + -d opcache.jit_max_side_traces=1000000 \ + -d opcache.jit_max_exit_counters=1000000 \ + -d opcache.jit_hot_loop=1 \ + -d opcache.jit_hot_func=1 \ + -d opcache.jit_hot_return=1 \ + -d opcache.jit_hot_side_exit=1 \ -j$(/usr/bin/nproc) \ -g FAIL,BORK,LEAK,XLEAK \ --no-progress \ diff --git a/.github/actions/test-macos/action.yml b/.github/actions/test-macos/action.yml index 8284b8905ef74..9ca91e77831bd 100644 --- a/.github/actions/test-macos/action.yml +++ b/.github/actions/test-macos/action.yml @@ -17,6 +17,15 @@ runs: export TEST_PHP_JUNIT=junit.out.xml export STACK_LIMIT_DEFAULTS_CHECK=1 sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \ + -d opcache.protect_memory=1 \ + -d opcache.jit_buffer_size=64M \ + -d opcache.jit_max_root_traces=1000000 \ + -d opcache.jit_max_side_traces=1000000 \ + -d opcache.jit_max_exit_counters=1000000 \ + -d opcache.jit_hot_loop=1 \ + -d opcache.jit_hot_func=1 \ + -d opcache.jit_hot_return=1 \ + -d opcache.jit_hot_side_exit=1 \ -j$(sysctl -n hw.ncpu) \ -g FAIL,BORK,LEAK,XLEAK \ --no-progress \ diff --git a/.github/scripts/windows/test_task.bat b/.github/scripts/windows/test_task.bat index c65c33c938e45..6cd4134a12a80 100644 --- a/.github/scripts/windows/test_task.bat +++ b/.github/scripts/windows/test_task.bat @@ -86,7 +86,7 @@ set OPENSSL_CONF= rem set SSLEAY_CONF= rem prepare for OPcache -if "%OPCACHE%" equ "1" set OPCACHE_OPTS=-d opcache.enable=1 -d opcache.enable_cli=1 -d opcache.protect_memory=1 -d opcache.jit_buffer_size=16M +if "%OPCACHE%" equ "1" set OPCACHE_OPTS=-d opcache.enable=1 -d opcache.enable_cli=1 -d opcache.protect_memory=1 -d opcache.jit_buffer_size=64M -d opcache.jit_max_root_traces=1000000 -d opcache.jit_max_side_traces=1000000 -d opcache.jit_max_exit_counters=1000000 -d opcache.jit_hot_loop=1 -d opcache.jit_hot_func=1 -d opcache.jit_hot_return=1 -d opcache.jit_hot_side_exit=1 -d opcache.jit=tracing rem work-around for failing to dl(mysqli) with OPcache (https://github.com/php/php-src/issues/8508) if "%OPCACHE%" equ "1" set OPCACHE_OPTS=%OPCACHE_OPTS% -d extension=mysqli diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 4b69154d150bf..518543f060a02 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -103,11 +103,11 @@ jobs: uses: ./.github/actions/test-linux with: testArtifacts: ${{ matrix.branch.name }}_${{ matrix.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Tracing JIT + jitType: tracing runTestsParameters: >- ${{ matrix.run_tests_parameters }} -d zend_extension=opcache.so -d opcache.enable_cli=1 - -d opcache.jit_buffer_size=16M - name: Test OpCache uses: ./.github/actions/test-linux with: @@ -123,12 +123,11 @@ jobs: uses: ./.github/actions/test-linux with: testArtifacts: ${{ matrix.branch.name }}_${{ matrix.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Function JIT + jitType: function runTestsParameters: >- ${{ matrix.run_tests_parameters }} -d zend_extension=opcache.so -d opcache.enable_cli=1 - -d opcache.jit_buffer_size=16M - -d opcache.jit=1205 - name: Verify generated files are up to date uses: ./.github/actions/verify-generated-files - name: Notify Slack @@ -194,11 +193,11 @@ jobs: - name: Test Tracing JIT uses: ./.github/actions/test-linux with: + jitType: tracing runTestsParameters: >- ${{ matrix.run_tests_parameters }} -d zend_extension=opcache.so -d opcache.enable_cli=1 - -d opcache.jit_buffer_size=16M - name: Test OpCache uses: ./.github/actions/test-linux with: @@ -209,12 +208,11 @@ jobs: - name: Test Function JIT uses: ./.github/actions/test-linux with: + jitType: function runTestsParameters: >- ${{ matrix.run_tests_parameters }} -d zend_extension=opcache.so -d opcache.enable_cli=1 - -d opcache.jit_buffer_size=16M - -d opcache.jit=1205 - name: Notify Slack if: failure() uses: ./.github/actions/notify-slack @@ -258,11 +256,10 @@ jobs: uses: ./.github/actions/test-macos with: testArtifacts: ${{ matrix.branch.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Tracing JIT + jitType: tracing runTestsParameters: >- -d zend_extension=opcache.so -d opcache.enable_cli=1 - -d opcache.protect_memory=1 - -d opcache.jit_buffer_size=16M - name: Test OpCache uses: ./.github/actions/test-macos with: @@ -270,17 +267,14 @@ jobs: runTestsParameters: >- -d zend_extension=opcache.so -d opcache.enable_cli=1 - -d opcache.protect_memory=1 - name: Test Function JIT uses: ./.github/actions/test-macos with: testArtifacts: ${{ matrix.branch.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Function JIT + jitType: function runTestsParameters: >- -d zend_extension=opcache.so -d opcache.enable_cli=1 - -d opcache.protect_memory=1 - -d opcache.jit_buffer_size=16M - -d opcache.jit=1205 - name: Verify generated files are up to date uses: ./.github/actions/verify-generated-files - name: Notify Slack @@ -321,6 +315,7 @@ jobs: - name: Test OpCache uses: ./.github/actions/test-linux with: + jitType: tracing runTestsParameters: >- -d zend_extension=opcache.so -d opcache.enable_cli=1 @@ -375,6 +370,15 @@ jobs: echo opcache.enable_cli=1 >> /etc/php.d/opcache.ini echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini echo opcache.jit_buffer_size=1G >> /etc/php.d/opcache.ini + echo opcache.jit_max_root_traces=1000000 >> /etc/php.d/opcache.ini + echo opcache.jit_max_side_traces=1000000 >> /etc/php.d/opcache.ini + echo opcache.jit_max_exit_counters=1000000 >> /etc/php.d/opcache.ini + echo opcache.jit_hot_loop=1 >> /etc/php.d/opcache.ini + echo opcache.jit_hot_func=1 >> /etc/php.d/opcache.ini + echo opcache.jit_hot_return=1 >> /etc/php.d/opcache.ini + echo opcache.jit_hot_side_exit=1 >> /etc/php.d/opcache.ini + echo memory_limit=-1 >> /etc/php.d/opcache.ini + php -v - name: Test AMPHP if: matrix.branch.ref != 'PHP-8.0' run: | diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 51751c1fc52d8..8db13e0370902 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -126,10 +126,10 @@ jobs: uses: ./.github/actions/test-linux with: testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || '' }}_${{ matrix.asan && 'OpCache' || 'Tracing JIT' }} + jitType: ${{ matrix.asan && 'disable' || 'tracing' }} runTestsParameters: >- -d zend_extension=opcache.so -d opcache.enable_cli=1 - ${{ !matrix.asan && '-d opcache.jit_buffer_size=16M' || '' }} ${{ matrix.asan && '--asan -x' || '' }} - name: Verify generated files are up to date if: ${{ !matrix.asan }} @@ -160,11 +160,10 @@ jobs: uses: ./.github/actions/test-macos with: testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Tracing JIT + jitType: tracing runTestsParameters: >- -d zend_extension=opcache.so -d opcache.enable_cli=1 - -d opcache.protect_memory=1 - -d opcache.jit_buffer_size=16M - name: Verify generated files are up to date uses: ./.github/actions/verify-generated-files WINDOWS: diff --git a/.travis.yml b/.travis.yml index cd861303fc3a2..2d7a82f7d88af 100644 --- a/.travis.yml +++ b/.travis.yml @@ -85,7 +85,7 @@ before_script: # Run PHPs run-tests.php script: - - travis_wait ./travis/test.sh -d opcache.jit_buffer_size=16M -d opcache.jit=tracing + - travis_wait 60 ./travis/test.sh -d opcache.jit=tracing -d opcache.jit_buffer_size=64M -d opcache.jit_max_root_traces=1000000 -d opcache.jit_max_side_traces=1000000 -d opcache.jit_max_exit_counters=1000000 -d opcache.jit_hot_loop=1 -d opcache.jit_hot_func=1 -d opcache.jit_hot_return=1 -d opcache.jit_hot_side_exit=1 - sapi/cli/php -d extension_dir=`pwd`/modules -r 'dl("zend_test");' after_success: