feat(profiling): support generator unwinding#3807
Merged
morrisonlevi merged 7 commits intomasterfrom Apr 22, 2026
Merged
Conversation
Covers the yield-from placeholder-frame path: the PHP script chains main -> middle -> leaf via `yield from`, and the JSON asserts that allocations inside `leaf` report the full delegating chain. Without resolving the placeholder frame, `middle` would be missing from the stack. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…er_frame `cargo test` links the profiler as a regular binary, so the Zend symbol cannot be resolved the way it is for the cdylib (lazy, at PHP load time). Add a passthrough stub under CFG_STACK_WALKING_TESTS and swap the import in stack_walking.rs the same way ddog_php_prof_function_run_time_cache is handled. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: f2234b0 | Docs | Datadog PR Page | Give us feedback! |
…laceholder_frame" This reverts commit ea7bb074999dbcde5a8f78d3c673383818641719.
This reverts commit 944a3cb8104f8c6faec54be4b8d12277b6c45dcd.
Benchmarks [ profiler ]Benchmark execution time: 2026-04-20 23:29:07 Comparing candidate commit f2234b0 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 29 metrics, 7 unstable metrics. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This adds support for generator unwinding in stack traces by calling
zend_generator_check_placeholder_frame.Note that there are some revert commits in the commit history. This is so you can see that prof-correctness tests fail without the implementation, and they pass now after re-applying the commits.
Reviewer checklist