@@ -47,13 +47,16 @@ jobs:
4747
4848 - name : Build profiler
4949 run : |
50- echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" | sudo tee -a /etc/apt/sources.list
51- echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" | sudo tee -a /etc/apt/sources.list
52- curl https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
53- curl https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
54- sudo apt remove -y clang-*
50+ codename="$(lsb_release -cs)"
51+ curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/llvm-archive-keyring.gpg
52+ echo "deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/${codename}/ llvm-toolchain-${codename}-19 main" | sudo tee /etc/apt/sources.list.d/llvm.list
5553 sudo apt-get update
56- sudo apt install -y clang-17
54+ sudo apt-get install -y clang-19 lld-19
55+ sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-19 100
56+ sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-19 100
57+ sudo update-alternatives --install /usr/bin/ld.lld ld.lld /usr/bin/ld.lld-19 100
58+ clang --version
59+ ld.lld --version
5760 cd profiling
5861 version_number=$(awk -F' = ' '$1 == "channel" { gsub(/"/, "", $2); print $2 }' rust-toolchain.toml)
5962 curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal -y --default-toolchain "$version_number"
7780 export DD_PROFILING_EXCEPTION_MESSAGE_ENABLED=1
7881 php -v
7982 php -d extension=target/profiler-release/libdatadog_php_profiling.so --ri datadog-profiling
80- for test_case in "allocations" "time" "strange_frames" "timeline" "exceptions"; do
83+ for test_case in "allocations" "time" "strange_frames" "timeline" "exceptions" "io" "allocation_time_combined" ; do
8184 mkdir -p profiling/tests/correctness/"$test_case"/
8285 export DD_PROFILING_OUTPUT_PPROF=$PWD/profiling/tests/correctness/"$test_case"/test.pprof
8386 php -d extension="${PWD}/target/profiler-release/libdatadog_php_profiling.so" "profiling/tests/correctness/${test_case}.php"
9598 export DD_PROFILING_EXCEPTION_MESSAGE_ENABLED=1
9699 php -v
97100 php -d extension=target/profiler-release/libdatadog_php_profiling.so --ri datadog-profiling
98- for test_case in "allocations" "time" "strange_frames" "timeline" "exceptions"; do
101+ for test_case in "allocations" "time" "strange_frames" "timeline" "exceptions" "io" "allocation_time_combined" ; do
99102 mkdir -p profiling/tests/correctness/"$test_case"/
100103 export DD_PROFILING_OUTPUT_PPROF=$PWD/profiling/tests/correctness/"$test_case"/test.pprof
101104 php -d extension=$PWD/target/profiler-release/libdatadog_php_profiling.so profiling/tests/correctness/"$test_case".php
@@ -110,26 +113,6 @@ jobs:
110113 USE_ZEND_ALLOC=0 php -d extension=$PWD/target/profiler-release/libdatadog_php_profiling.so profiling/tests/correctness/allocations.php
111114 unset DD_PROFILING_ALLOCATION_SAMPLING_DISTANCE
112115
113- - name : Run allocation_time_combined test (PHP 8.4+)
114- if : fromJSON(matrix.php-version) >= 8.4
115- run : |
116- export DD_PROFILING_LOG_LEVEL=trace
117- export DD_PROFILING_EXPERIMENTAL_FEATURES_ENABLED=1
118- export DD_PROFILING_EXPERIMENTAL_EXCEPTION_SAMPLING_DISTANCE=1
119- export DD_PROFILING_EXCEPTION_MESSAGE_ENABLED=1
120- php -v
121- php -d extension=target/profiler-release/libdatadog_php_profiling.so --ri datadog-profiling
122- mkdir -p profiling/tests/correctness/allocation_time_combined/
123- export DD_PROFILING_OUTPUT_PPROF=$PWD/profiling/tests/correctness/allocation_time_combined/test.pprof
124- export DD_PROFILING_ALLOCATION_ENABLED=yes
125- export DD_PROFILING_ALLOCATION_SAMPLING_DISTANCE=1
126- export DD_PROFILING_WALL_TIME_ENABLED=yes
127- export DD_PROFILING_EXPERIMENTAL_CPU_TIME_ENABLED=no
128- export DD_PROFILING_ENDPOINT_COLLECTION_ENABLED=no
129- export EXECUTION_TIME=5
130- php -d extension=$PWD/target/profiler-release/libdatadog_php_profiling.so profiling/tests/correctness/allocation_time_combined.php
131- unset DD_PROFILING_ALLOCATION_ENABLED DD_PROFILING_ALLOCATION_SAMPLING_DISTANCE DD_PROFILING_WALL_TIME_ENABLED DD_PROFILING_EXPERIMENTAL_CPU_TIME_ENABLED DD_PROFILING_ENDPOINT_COLLECTION_ENABLED EXECUTION_TIME
132-
133116 - name : Run ZTS tests
134117 if : matrix.phpts == 'zts'
135118 run : |
@@ -182,12 +165,17 @@ jobs:
182165 pprof_path : profiling/tests/correctness/timeline/
183166
184167 - name : Check profiler correctness for allocation_time_combined
185- if : fromJSON(matrix.php-version) >= 8.4
186168 uses : Datadog/prof-correctness/analyze@main
187169 with :
188170 expected_json : profiling/tests/correctness/allocation_time_combined.json
189171 pprof_path : profiling/tests/correctness/allocation_time_combined/
190172
173+ - name : Check profiler correctness for IO
174+ uses : Datadog/prof-correctness/analyze@main
175+ with :
176+ expected_json : profiling/tests/correctness/io.json
177+ pprof_path : profiling/tests/correctness/io/
178+
191179 - name : Check profiler correctness for exceptions ZTS
192180 if : matrix.phpts == 'zts'
193181 uses : Datadog/prof-correctness/analyze@main
0 commit comments