File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,6 +102,10 @@ jobs:
102102 export DD_PROFILING_OUTPUT_PPROF=$PWD/profiling/tests/correctness/allocations_1byte/test.pprof
103103 export DD_PROFILING_ALLOCATION_SAMPLING_DISTANCE=1
104104 php -d extension=$PWD/target/profiler-release/libdatadog_php_profiling.so profiling/tests/correctness/allocations.php
105+ mkdir -p profiling/tests/correctness/allocations_1byte_no_zend_alloc/
106+ export DD_PROFILING_OUTPUT_PPROF=$PWD/profiling/tests/correctness/allocations_1byte_no_zend_alloc/test.pprof
107+ export DD_PROFILING_ALLOCATION_SAMPLING_DISTANCE=1
108+ USE_ZEND_ALLOC=0 php -d extension=$PWD/target/profiler-release/libdatadog_php_profiling.so profiling/tests/correctness/allocations.php
105109 unset DD_PROFILING_ALLOCATION_SAMPLING_DISTANCE
106110
107111 - name : Run ZTS tests
@@ -131,6 +135,12 @@ jobs:
131135 expected_json : profiling/tests/correctness/allocations.json
132136 pprof_path : profiling/tests/correctness/allocations_1byte/
133137
138+ - name : Check profiler correctness for allocations with 1 byte sampling distance and `USE_ZEND_ALLOC=0`
139+ uses : Datadog/prof-correctness/analyze@main
140+ with :
141+ expected_json : profiling/tests/correctness/allocations.json
142+ pprof_path : profiling/tests/correctness/allocations_1byte_no_zend_alloc/
143+
134144 - name : Check profiler correctness for time
135145 uses : Datadog/prof-correctness/analyze@main
136146 with :
Original file line number Diff line number Diff line change @@ -400,10 +400,7 @@ fn cfg_php_feature_flags(vernum: u64) {
400400 if vernum >= 80400 {
401401 println ! ( "cargo:rustc-cfg=php_frameless" ) ;
402402 println ! ( "cargo:rustc-cfg=php_opcache_restart_hook" ) ;
403- // Commenting the following line temporary disables the new hooking mechanism for
404- // allocation profiling until we solved the intefereing with
405- // `memory_get_usage()`/`memory_get_peak_usage()`
406- // println!("cargo:rustc-cfg=php_zend_mm_set_custom_handlers_ex");
403+ println ! ( "cargo:rustc-cfg=php_zend_mm_set_custom_handlers_ex" ) ;
407404 }
408405}
409406
You can’t perform that action at this time.
0 commit comments