fix(json): route the traversal-feedback counters through the hot thread-local cache - #10203
proggeramlug wants to merge 2 commits into
Conversation
…ad-local cache The thread-local policy ratchet allows no raw thread_local! in the runtime; #10150 declared json/traversal_feedback.rs's two counters with one. Both now use crate::perry_thread_local!, with unchanged call sites.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe JSON traversal feedback counters now use ChangesTraversal feedback TLS
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to This is a localized performance-policy change with validation passing and no identified merge-blocking behavior. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
CI on this head compared against The |
(cherry picked from commit 388e83a)
Summary
scripts/check_thread_locals.py(the "Enforce the thread-local policy ratchet" step oftls-budget.yml'sself-test-checkersjob, which runs on every PR) fails on currentmainfor two files. One of them is mine: #10150 declaredjson/traversal_feedback.rs's two per-thread counters with a rawthread_local!, and the policy allows none (every declaration goes throughcrate::perry_thread_local!, which lands the address in the thread's hot cache instead of paying_tlv_get_addr, #7469). This converts both; the syntax and every.with()call site are unchanged.The second failing file,
regex/perex_owner.rs(one raw declaration, from #10166), is not touched here, so the job stays red on this PR for that file alone.Validation
python3 scripts/check_thread_locals.py --self-testpasses;python3 scripts/check_thread_locals.pyno longer listsjson/traversal_feedback.rs(onlyregex/perex_owner.rsremains).python3 scripts/gc_runtime_root_holders.py: OK (the two counters keep their existingnot_a_gc_pointerverdicts).cargo check --release -p perry-runtime: clean.RUST_TEST_THREADS=1 cargo test --release -p perry-runtime traversal_feedback: 3 passed, 0 failed.Summary by CodeRabbit