feat(profiler): Support PHP DEBUG builds for the profiler#3908
Conversation
|
Benchmarks [ profiler ]Benchmark execution time: 2026-05-26 13:17:01 Comparing candidate commit fdc38bd in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 29 metrics, 7 unstable metrics. |
The extern "C" alloc/free/realloc handlers delegate to a shared *_impl function to avoid duplicating the body across the cfg(php_debug) / cfg(not(php_debug)) variants. While LTO=fat + codegen-units=1 in release builds would inline these single-call-site wrappers anyway, this makes the perf contract explicit and removes any doubt about an extra call surviving in the allocator hot path. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
12cd3e2 to
e7932ed
Compare
bwoebi
left a comment
There was a problem hiding this comment.
Thank you! I always hated that there were no profiler debug builds!
morrisonlevi
left a comment
There was a problem hiding this comment.
Looks good! Well, looks terrible but that's because I hate the debug API. Really wish it had the same API/ABI and everything was drop-in compatible (so you can have a debug extension on prod PHP and so on). But that's a tangent!
Description
This adds PHP
DEBUGbuild support to the profiler. It is not meant to be shipped as of know, we just need this in order to run ASAN tests for the Profiler in PHP ZTS builds, as the docker images we are using for our tests do only have a ZTS ASAN version that is also DEBUG.This PR's CI already shows, that adding this would have shown us the bug reported as #3896 in our own CI early.
Plan:
mastermasterso we have the fixmasterReviewer checklist