Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions profiling/src/allocation/allocation_ge84.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ lazy_static! {
}

pub fn first_rinit_should_disable_due_to_jit() -> bool {
if *JIT_ENABLED && zend::PHP_VERSION_ID >= 80400 {
error!("Memory allocation profiling will be disabled as long as JIT is active. To enable allocation profiling disable JIT. See https://github.com/DataDog/dd-trace-php/pull/3199");
if *JIT_ENABLED && zend::PHP_VERSION_ID >= 80400 && zend::PHP_VERSION_ID < 80407 {
error!("Memory allocation profiling will be disabled as long as JIT is active. To enable allocation profiling disable JIT or upgrade PHP to at least version 8.4.7. See https://github.com/DataDog/dd-trace-php/pull/3199");
true
} else {
false
Expand Down
4 changes: 3 additions & 1 deletion profiling/tests/phpt/jit_03.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ we make sure to disable allocation profiling when we detect the JIT is enabled.
<?php
if (PHP_VERSION_ID < 80400)
echo "skip: PHP Version < 8.4 are not affected", PHP_EOL;
if (PHP_VERSION_ID >= 80407)
echo "skip: fixed since PHP version 8.4.7", PHP_EOL;
if (!extension_loaded('datadog-profiling'))
echo "skip: test requires datadog-profiling", PHP_EOL;
if (php_uname("s") === "Darwin")
Expand All @@ -27,5 +29,5 @@ opcache.jit_buffer_size=4M
echo "Done.", PHP_EOL;
?>
--EXPECTF--
%aMemory allocation profiling will be disabled as long as JIT is active. To enable allocation profiling disable JIT. See https://github.com/DataDog/dd-trace-php/pull/3199
%aMemory allocation profiling will be disabled as long as JIT is active. To enable allocation profiling disable JIT or upgrade PHP to at least version 8.4.7. See https://github.com/DataDog/dd-trace-php/pull/3199
%ADone.%a
Loading