Simplify profiler sampling overhead attribution with a placeholder stack#5870
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c453716ae9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 41bcd1f | Docs | Datadog PR Page | Give us feedback! |
c453716 to
0c44197
Compare
BenchmarksBenchmark execution time: 2026-06-09 13:49:59 Comparing candidate commit 41bcd1f in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 44 metrics, 1 unstable metrics.
|
34c258e to
27d77fa
Compare
ivoanjo
left a comment
There was a problem hiding this comment.
This is looking really good! Left a few notes :)
27d77fa to
c189b9e
Compare
Replace the confusing profiler_overhead_stack_thread parameter (which borrowed a real stack from the worker's owner thread) with a synthetic "Datadog::Profiling::Collectors::Stack" placeholder frame, matching the pattern used by GC and other placeholder stacks. This removes the stack_from_thread parameter and passes only one thread through the entire sampling call chain. Co-Authored-By: Claude Opus 4.6 <[email protected]>
c189b9e to
41bcd1f
Compare
Typing analysisNote: Ignored files are excluded from the next sections. Untyped methodsThis PR introduces 2 partially typed methods, and clears 2 partially typed methods. Partially typed methods (+2-2)❌ Introduced:If you believe a method or an attribute is rightfully untyped or partially typed, you can add |
Replace the confusing profiler_overhead_stack_thread parameter (which borrowed a real stack from the worker's owner thread) with a synthetic "Datadog::Profiling::Collectors::Stack" synthesized frame, matching the pattern used by GC and other synthesized stacks. This removes the stack_from_thread parameter and passes only one thread through the entire sampling call chain.
What does this PR do?
^
Motivation:
Simplicity
Change log entry
None
Additional Notes:
How to test the change?