Skip to content
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

Trigger JIT tracing&compilation more often, enable JIT for ASAN #2

Closed
wants to merge 1 commit into from
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,25 @@ jobs:
runTestsParameters: >-
${{ matrix.run_tests_parameters }}
-d zend_extension=opcache.so
-d opcache.enable=1
-d opcache.enable_cli=1
-d opcache.jit_buffer_size=16M
-d opcache.jit_prof_threshold=0.000000001
-d opcache.jit_max_root_traces=10000000
-d opcache.jit_max_side_traces=10000000
-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
- name: Test OpCache
uses: ./.github/actions/test-linux
with:
testArtifacts: ${{ matrix.branch.name }}_${{ matrix.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} OpCache
runTestsParameters: >-
${{ matrix.run_tests_parameters }}
-d zend_extension=opcache.so
-d opcache.enable=1
-d opcache.enable_cli=1
- name: Test Function JIT
# ASAN frequently timeouts. Each test run takes ~90 minutes, we can
Expand All @@ -126,6 +136,7 @@ jobs:
runTestsParameters: >-
${{ matrix.run_tests_parameters }}
-d zend_extension=opcache.so
-d opcache.enable=1
-d opcache.enable_cli=1
-d opcache.jit_buffer_size=16M
-d opcache.jit=1205
Expand Down Expand Up @@ -197,21 +208,32 @@ jobs:
runTestsParameters: >-
${{ matrix.run_tests_parameters }}
-d zend_extension=opcache.so
-d opcache.enable=1
-d opcache.enable_cli=1
-d opcache.jit_buffer_size=16M
-d opcache.jit_prof_threshold=0.000000001
-d opcache.jit_max_root_traces=10000000
-d opcache.jit_max_side_traces=10000000
-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
- name: Test OpCache
uses: ./.github/actions/test-linux
with:
runTestsParameters: >-
${{ matrix.run_tests_parameters }}
-d zend_extension=opcache.so
-d opcache.enable=1
-d opcache.enable_cli=1
- name: Test Function JIT
uses: ./.github/actions/test-linux
with:
runTestsParameters: >-
${{ matrix.run_tests_parameters }}
-d zend_extension=opcache.so
-d opcache.enable=1
-d opcache.enable_cli=1
-d opcache.jit_buffer_size=16M
-d opcache.jit=1205
Expand Down Expand Up @@ -260,15 +282,25 @@ jobs:
testArtifacts: ${{ matrix.branch.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Tracing JIT
runTestsParameters: >-
-d zend_extension=opcache.so
-d opcache.enable=1
-d opcache.enable_cli=1
-d opcache.protect_memory=1
-d opcache.jit_buffer_size=16M
-d opcache.jit_prof_threshold=0.000000001
-d opcache.jit_max_root_traces=10000000
-d opcache.jit_max_side_traces=10000000
-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
- name: Test OpCache
uses: ./.github/actions/test-macos
with:
testArtifacts: ${{ matrix.branch.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} OpCache
runTestsParameters: >-
-d zend_extension=opcache.so
-d opcache.enable=1
-d opcache.enable_cli=1
-d opcache.protect_memory=1
- name: Test Function JIT
Expand All @@ -277,6 +309,7 @@ jobs:
testArtifacts: ${{ matrix.branch.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Function JIT
runTestsParameters: >-
-d zend_extension=opcache.so
-d opcache.enable=1
-d opcache.enable_cli=1
-d opcache.protect_memory=1
-d opcache.jit_buffer_size=16M
Expand Down Expand Up @@ -323,6 +356,7 @@ jobs:
with:
runTestsParameters: >-
-d zend_extension=opcache.so
-d opcache.enable=1
-d opcache.enable_cli=1
- name: Upload Test Coverage to Codecov.io
if: always()
Expand Down Expand Up @@ -372,9 +406,18 @@ jobs:
- name: Enable Opcache and JIT
run: |
echo zend_extension=opcache.so > /etc/php.d/opcache.ini
echo opcache.enable=1 >> /etc/php.d/opcache.ini
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_prof_threshold=0.000000001 >> /etc/php.d/opcache.ini
echo opcache.jit_max_root_traces=10000000 >> /etc/php.d/opcache.ini
echo opcache.jit_max_side_traces=10000000 >> /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
- name: Test AMPHP
if: matrix.branch.ref != 'PHP-8.0'
run: |
Expand Down Expand Up @@ -545,20 +588,23 @@ jobs:
with:
runTestsParameters: >-
-d zend_extension=opcache.so
-d opcache.enable=1
-d opcache.enable_cli=1
--file-cache-prime
- name: Test File Cache (prime shm, use shm)
uses: ./.github/actions/test-linux
with:
runTestsParameters: >-
-d zend_extension=opcache.so
-d opcache.enable=1
-d opcache.enable_cli=1
--file-cache-use
- name: Test File Cache (prime shm, use file)
uses: ./.github/actions/test-linux
with:
runTestsParameters: >-
-d zend_extension=opcache.so
-d opcache.enable=1
-d opcache.enable_cli=1
--file-cache-use
-d opcache.file_cache_only=1
Expand All @@ -567,6 +613,7 @@ jobs:
with:
runTestsParameters: >-
-d zend_extension=opcache.so
-d opcache.enable=1
-d opcache.enable_cli=1
--file-cache-prime
-d opcache.file_cache_only=1
Expand All @@ -575,6 +622,7 @@ jobs:
with:
runTestsParameters: >-
-d zend_extension=opcache.so
-d opcache.enable=1
-d opcache.enable_cli=1
--file-cache-use
-d opcache.file_cache_only=1
Expand Down Expand Up @@ -675,6 +723,7 @@ jobs:
runTestsParameters: >-
--msan
-d zend_extension=opcache.so
-d opcache.enable=1
-d opcache.enable_cli=1
- name: Verify generated files are up to date
uses: ./.github/actions/verify-generated-files
Expand Down
22 changes: 20 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
configurationParameters: >-
--${{ matrix.debug && 'enable' || 'disable' }}-debug
--${{ matrix.zts && 'enable' || 'disable' }}-zts
${{ matrix.asan && 'CFLAGS="-fsanitize=undefined,address -DZEND_TRACK_ARENA_ALLOC" LDFLAGS="-fsanitize=undefined,address" CC=clang CXX=clang++ --disable-opcache-jit' || '' }}
${{ matrix.asan && 'CFLAGS="-fsanitize=undefined,address -DZEND_TRACK_ARENA_ALLOC" LDFLAGS="-fsanitize=undefined,address" CC=clang CXX=clang++' || '' }}
skipSlow: ${{ matrix.asan }}
- name: make
run: make -j$(/usr/bin/nproc) >/dev/null
Expand All @@ -128,8 +128,17 @@ jobs:
testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || '' }}_${{ matrix.asan && 'OpCache' || 'Tracing JIT' }}
runTestsParameters: >-
-d zend_extension=opcache.so
-d opcache.enable=1
-d opcache.enable_cli=1
${{ !matrix.asan && '-d opcache.jit_buffer_size=16M' || '' }}
-d opcache.jit_buffer_size=16M
-d opcache.jit_prof_threshold=0.000000001
-d opcache.jit_max_root_traces=10000000
-d opcache.jit_max_side_traces=10000000
-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
${{ matrix.asan && '--asan -x' || '' }}
- name: Verify generated files are up to date
if: ${{ !matrix.asan }}
Expand Down Expand Up @@ -162,9 +171,18 @@ jobs:
testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Tracing JIT
runTestsParameters: >-
-d zend_extension=opcache.so
-d opcache.enable=1
-d opcache.enable_cli=1
-d opcache.protect_memory=1
-d opcache.jit_buffer_size=16M
-d opcache.jit_prof_threshold=0.000000001
-d opcache.jit_max_root_traces=10000000
-d opcache.jit_max_side_traces=10000000
-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
- name: Verify generated files are up to date
uses: ./.github/actions/verify-generated-files
WINDOWS:
Expand Down