Skip to content
Draft
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
10 changes: 10 additions & 0 deletions .github/workflows/prof_correctness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ jobs:
export DD_PROFILING_OUTPUT_PPROF=$PWD/profiling/tests/correctness/allocations_1byte/test.pprof
export DD_PROFILING_ALLOCATION_SAMPLING_DISTANCE=1
php -d extension=$PWD/target/profiler-release/libdatadog_php_profiling.so profiling/tests/correctness/allocations.php
mkdir -p profiling/tests/correctness/allocations_1byte_no_zend_alloc/
export DD_PROFILING_OUTPUT_PPROF=$PWD/profiling/tests/correctness/allocations_1byte_no_zend_alloc/test.pprof
export DD_PROFILING_ALLOCATION_SAMPLING_DISTANCE=1
USE_ZEND_ALLOC=0 php -d extension=$PWD/target/profiler-release/libdatadog_php_profiling.so profiling/tests/correctness/allocations.php
unset DD_PROFILING_ALLOCATION_SAMPLING_DISTANCE

- name: Run ZTS tests
Expand Down Expand Up @@ -131,6 +135,12 @@ jobs:
expected_json: profiling/tests/correctness/allocations.json
pprof_path: profiling/tests/correctness/allocations_1byte/

- name: Check profiler correctness for allocations with 1 byte sampling distance and `USE_ZEND_ALLOC=0`
uses: Datadog/prof-correctness/analyze@main
with:
expected_json: profiling/tests/correctness/allocations.json
pprof_path: profiling/tests/correctness/allocations_1byte_no_zend_alloc/

- name: Check profiler correctness for time
uses: Datadog/prof-correctness/analyze@main
with:
Expand Down
5 changes: 1 addition & 4 deletions profiling/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,10 +400,7 @@ fn cfg_php_feature_flags(vernum: u64) {
if vernum >= 80400 {
println!("cargo:rustc-cfg=php_frameless");
println!("cargo:rustc-cfg=php_opcache_restart_hook");
// Commenting the following line temporary disables the new hooking mechanism for
// allocation profiling until we solved the intefereing with
// `memory_get_usage()`/`memory_get_peak_usage()`
// println!("cargo:rustc-cfg=php_zend_mm_set_custom_handlers_ex");
println!("cargo:rustc-cfg=php_zend_mm_set_custom_handlers_ex");
}
}

Expand Down
Loading
Loading