refactor(profiling): clarify stack discovery limits - #20352
Draft
taegyunkim wants to merge 1 commit into
Draft
taegyunkim wants to merge 1 commit into
taegyunkim wants to merge 1 commit into
Conversation
Contributor
|
Codeowners resolved asResolved from the full PR diff against |
Circular import analysis
|
Dependency direction analysis
|
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
PROF-14213
Clarifies the existing native stack safety limit by renaming
MAX_TASK_FRAMEStoMAX_STACK_DISCOVERY_DEPTHeverywhere it is used, while retaining the value 2048 and the current behavior.Extracts
ThreadInfo::is_asyncio_boundary_framefromfind_upper_python_stack_size. The latter still scans the full discovered Python stack, preserves its return semantics, and retains the existing asyncio/uvloop boundary-frame caches.This deliberately does not introduce the bounded task frame budget from #19085.
Testing
scripts/lint cformat: passed.scripts/lint checks: passed (existing repository-wide AST-grep warnings were reported).scripts/run-testswith the Python 3.13 profiling environment: 408 passed, 35 skipped, 2 xfailed.scripts/run-testswith the Python 3.13 uvloop profiling environment: 411 passed, 32 skipped, 2 xfailed.StackUnwind.ProbeBudgetExhaustionRemainsUnknown.scripts/run-benchmarks --list <changed files>: no matching benchmark suites.Risks
Low. This is an internal naming and extraction refactor. The safety-limit value, all call sites, full-stack boundary scan, boundary caching, and stitching behavior are unchanged.
Additional Notes
This is prerequisite 1 for #19085.
No release note is needed because the change is internal and behavior-preserving; the PR uses the
changelog/no-changeloglabel.