Skip to content

fix(prof): disable allocation profiling when JIT is enabled on PHP 8.4 #3199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 9, 2025

Conversation

realFlowControl
Copy link
Member

@realFlowControl realFlowControl commented Apr 9, 2025

Description

A customer reached out in #3197 with a crash while collecting a stack frame for an allocation that is done while hot function is compiled. This code seems to be there since the new JIT in PHP 8.4. So for now we are disabling allocation profiling when an active JIT is detected in PHP 8.4.

Update

The upstream fix was released with PHP 8.4.7

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

@github-actions github-actions bot added profiling Relates to the Continuous Profiler tracing labels Apr 9, 2025
@codecov-commenter
Copy link

codecov-commenter commented Apr 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.92%. Comparing base (7ab1806) to head (9f65c84).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #3199   +/-   ##
=========================================
  Coverage     78.92%   78.92%           
  Complexity     2927     2927           
=========================================
  Files           114      114           
  Lines         11582    11582           
=========================================
  Hits           9141     9141           
  Misses         2441     2441           
Flag Coverage Δ
tracer-php 78.92% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7ab1806...9f65c84. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pr-commenter
Copy link

pr-commenter bot commented Apr 9, 2025

Benchmarks [ profiler ]

Benchmark execution time: 2025-04-09 15:24:42

Comparing candidate commit 9f65c84 in PR branch florian/disable-on-jit-with-php-84 with baseline commit 7ab1806 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 28 metrics, 8 unstable metrics.

@realFlowControl realFlowControl force-pushed the florian/disable-on-jit-with-php-84 branch from aa1736b to 4dfd79e Compare April 9, 2025 15:04
@realFlowControl realFlowControl force-pushed the florian/disable-on-jit-with-php-84 branch from 4dfd79e to 9f65c84 Compare April 9, 2025 15:13
@realFlowControl realFlowControl marked this pull request as ready for review April 9, 2025 15:30
@realFlowControl realFlowControl requested a review from a team as a code owner April 9, 2025 15:30
Copy link
Collaborator

@morrisonlevi morrisonlevi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sad, but apparently necessary 😔

@morrisonlevi morrisonlevi changed the title fix(prof) disable allocation profiling when JIT is enabled on PHP 8.4 fix(prof): disable allocation profiling when JIT is enabled on PHP 8.4 Apr 9, 2025
@realFlowControl realFlowControl merged commit 55ae43a into master Apr 9, 2025
735 of 740 checks passed
@realFlowControl realFlowControl deleted the florian/disable-on-jit-with-php-84 branch April 9, 2025 18:20
@github-actions github-actions bot added this to the 1.9.0 milestone Apr 9, 2025
bwoebi pushed a commit that referenced this pull request Apr 10, 2025
#3199)

* Disable allocation profiling when JIT is enabled on PHP 8.4

* update link

* add test and update link
@bwoebi bwoebi modified the milestones: 1.9.0, 1.8.3 May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
profiling Relates to the Continuous Profiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants