perf(profiling): scale Echion frame cache with frame limit - #20351
Draft
taegyunkim wants to merge 1 commit into
Draft
taegyunkim wants to merge 1 commit into
taegyunkim wants to merge 1 commit into
Conversation
Codeowners resolved asResolved from the full PR diff against |
Circular import analysis
|
Dependency direction analysis
|
Contributor
|
✅ All CI checks and tests passed. 🎉 All green!🧪 All tests passed 🔗 Commit SHA: 028a1e4 | Docs | View more details | Give us feedback! |
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
Scale Echion's retained frame cache to four times the configured maximum frame count, bounded between 256 and 1024 entries. Cache capacity can now be adjusted while the sampler is stopped, and shrinking immediately evicts least-recently-used entries.
JIRA: PROF-14213
Testing
scripts/run-tests --venv 13bd2ac -- tests/profiling/collector/test_stack.py -k 'test_collect_truncate or test_native_frame_limit_scales_cache or test_set_max_frames_after_fork_restart or test_asyncio_discovery_ignores_plain_stack_limit or test_collect_gevent_thread_task'(Python 3.10 with gevent): 5 passed, 440 deselected.scripts/lint checks: passed.scripts/check-releasenotes: passed.scripts/run-benchmarks --list ...: no benchmark suites match these files, so no benchmark was run.Risks
The smaller cache can increase frame-cache churn for shallow frame limits. The 256-entry floor bounds that risk, while the existing 1024-entry capacity remains the ceiling for larger limits.
Additional Notes
This is an independent prerequisite for #19085 and intentionally excludes task stack budgeting, stack-discovery refactors, omission markers, and gevent budgeting.