Skip to content

Commit 394560d

Browse files
cleanup disable due to JIT code
1 parent f3000ad commit 394560d

File tree

1 file changed

+7
-20
lines changed

1 file changed

+7
-20
lines changed

profiling/src/allocation/allocation_ge84.rs

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,11 @@ macro_rules! tls_zend_mm_state_set {
130130
}
131131

132132
const NEEDS_RUN_TIME_CHECK_FOR_ENABLED_JIT: bool =
133-
zend::PHP_VERSION_ID >= 80000 && zend::PHP_VERSION_ID < 80300 || zend::PHP_VERSION_ID >= 80400;
133+
zend::PHP_VERSION_ID >= 80400 && zend::PHP_VERSION_ID < 80500;
134134

135135
fn alloc_prof_needs_disabled_for_jit(version: u32) -> bool {
136136
// see https://github.com/php/php-src/pull/11380
137-
(80000..80121).contains(&version)
138-
|| (80200..80208).contains(&version)
139-
|| (80400..80407).contains(&version)
137+
(80400..80407).contains(&version)
140138
}
141139

142140
lazy_static! {
@@ -152,11 +150,7 @@ pub fn first_rinit_should_disable_due_to_jit() -> bool {
152150
&& alloc_prof_needs_disabled_for_jit(crate::RUNTIME_PHP_VERSION_ID.load(Relaxed))
153151
&& *JIT_ENABLED
154152
{
155-
if zend::PHP_VERSION_ID >= 80400 {
156-
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");
157-
} else {
158-
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.1.21 or 8.2.8. See https://github.com/DataDog/dd-trace-php/pull/2088");
159-
}
153+
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");
160154
true
161155
} else {
162156
false
@@ -479,18 +473,11 @@ mod tests {
479473
#[test]
480474
fn check_versions_that_allocation_profiling_needs_disabled_with_active_jit() {
481475
// versions that need disabled allocation profiling with active jit
482-
assert!(alloc_prof_needs_disabled_for_jit(80000));
483-
assert!(alloc_prof_needs_disabled_for_jit(80100));
484-
assert!(alloc_prof_needs_disabled_for_jit(80120));
485-
assert!(alloc_prof_needs_disabled_for_jit(80200));
486-
assert!(alloc_prof_needs_disabled_for_jit(80207));
476+
assert!(alloc_prof_needs_disabled_for_jit(80400));
477+
assert!(alloc_prof_needs_disabled_for_jit(80406));
487478

488479
// versions that DO NOT need disabled allocation profiling with active jit
489-
assert!(!alloc_prof_needs_disabled_for_jit(70421));
490-
assert!(!alloc_prof_needs_disabled_for_jit(80121));
491-
assert!(!alloc_prof_needs_disabled_for_jit(80122));
492-
assert!(!alloc_prof_needs_disabled_for_jit(80208));
493-
assert!(!alloc_prof_needs_disabled_for_jit(80209));
494-
assert!(!alloc_prof_needs_disabled_for_jit(80300));
480+
assert!(!alloc_prof_needs_disabled_for_jit(80407));
481+
assert!(!alloc_prof_needs_disabled_for_jit(80501));
495482
}
496483
}

0 commit comments

Comments
 (0)