refactor(profiling): split stack sampler helpers - #18975
Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 4 commits intoJul 13, 2026
Merged
refactor(profiling): split stack sampler helpers#18975gh-worker-dd-mergequeue-cf854d[bot] merged 4 commits into
gh-worker-dd-mergequeue-cf854d[bot] merged 4 commits into
Conversation
Contributor
🎉 All green!🧪 All tests passed 🔗 Commit SHA: 584be28 | Docs | Datadog PR Page | Give us feedback! |
Codeowners resolved as |
Circular import analysis
|
Extract the task/greenlet/normal-stack rendering block out of ThreadInfo::sample into a render_unwound_stacks() free function so the rendering path can be reused by additional callers. Pure refactor: same render order, renderer, and container clears; no behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
taegyunkim
force-pushed
the
taegyunkim/prof-14213-stack-sampler-refactor
branch
from
July 9, 2026 22:12
9866b28 to
8ac5dd7
Compare
taegyunkim
marked this pull request as ready for review
July 10, 2026 15:54
Extract the task/greenlet/normal-stack rendering block out of ThreadInfo::sample into a private ThreadInfo::render_unwound_stacks() method so the rendering path can be reused by additional callers, consistent with the existing unwind_tasks/unwind_greenlets helpers. Pure refactor: same render order, renderer, and container clears; no behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…//github.com/DataDog/dd-trace-py into taegyunkim/prof-14213-stack-sampler-refactor # Conflicts: # ddtrace/internal/datadog/profiling/stack/src/echion/threads.cc
KowalskiThomas
approved these changes
Jul 12, 2026
KowalskiThomas
left a comment
Collaborator
There was a problem hiding this comment.
Code changes LGTM
Contributor
Author
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
gh-worker-dd-mergequeue-cf854d
Bot
deleted the
taegyunkim/prof-14213-stack-sampler-refactor
branch
July 13, 2026 17:45
vlad-scherbich
pushed a commit
that referenced
this pull request
Jul 15, 2026
## Description Pure refactor of existing stack sampler internals, with no intended behavior or internal contract changes, in preparation for timer_create based cpu time profiling in #18724 Specifically: - Extracts the existing task/greenlet/thread-stack rendering branch in `ThreadInfo::sample()` into a local `render_unwound_stacks()` helper. - Extracts duplicate one-time thread registration failure logging in `Sampler::register_thread()` into a local helper. This does not introduce CPU timer profiling, new configuration, new native bindings, or changes to thread registration semantics. ## Testing - `scripts/lint cformat` Attempted a targeted profiling test run from the worktree, but the test runner failed during riot venv setup before executing tests due the worktree using `/home/bits/project/.riot`, which was not writable/available in that context. ## Risks Low. This is intended to be behavior-preserving refactoring only. ## Additional Notes No changelog needed, internal refactor only. Co-authored-by: taegyun.kim <taegyun.kim@datadoghq.com>
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
Pure refactor of existing stack sampler internals, with no intended behavior or internal contract changes, in preparation for timer_create based cpu time profiling in #18724
Specifically:
ThreadInfo::sample()into a localrender_unwound_stacks()helper.Sampler::register_thread()into a local helper.This does not introduce CPU timer profiling, new configuration, new native bindings, or changes to thread registration semantics.
Testing
scripts/lint cformatAttempted a targeted profiling test run from the worktree, but the test runner failed during riot venv setup before executing tests due the worktree using
/home/bits/project/.riot, which was not writable/available in that context.Risks
Low. This is intended to be behavior-preserving refactoring only.
Additional Notes
No changelog needed, internal refactor only.
PROF-14213