Repository navigation
refactor(profiling): build all_task_origins outside task_link_map lock - #20764
gh-worker-dd-mergequeue-cf854d[bot] merged 6 commits into
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codeowners resolved asResolved from the full PR diff against No remaining files require a CODEOWNERS review. |
Circular import analysis
|
Dependency direction analysis
|
|
✅ All CI checks and tests passed. 🎉 All green!🧪 All tests passed 🔗 Commit SHA: 9a2ff9f | Docs | View more details | Give us feedback! |
3dcb04a to
b1dc119
Compare
62f795b to
c17e89c
Compare
763f03f to
e872e08
Compare
c17e89c to
b2b8c21
Compare
|
@gyuheon0h LGTM, but can you add some tests that pass on both main and branch? |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 741d7275e9
ℹ️ 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".
741d727 to
3f63fe2
Compare
3f63fe2 to
1fc6e7a
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ff3d8428ce
ℹ️ 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".
e872e08 to
f8394e8
Compare
ff3d842 to
848d248
Compare
The all_task_origins set was built from all_tasks, then cleared and identically rebuilt for the weak_task_link_map cleanup. Since all_tasks is immutable within the locked scope, the second construction produces the same set. Remove the clear+rebuild to eliminate O(N) redundant work per sample cycle.
all_task_origins is derived entirely from all_tasks, which is a local vector no other thread touches. Move its construction before the lock_guard to reduce the time task_link_map_lock_ is held, unblocking Python threads calling link_tasks/weak_link_tasks during task creation. Also adds .reserve() to avoid rehash chains during set construction.
f8394e8 to
b948e25
Compare
848d248 to
9a2ff9f
Compare
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
1 similar comment
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
/code blockers |
|
View all feedbacks in Devflow UI.
Checking merge blockers for #20764...
No merge blockers detected. |
72230a0
into
main

PROF-16175
Description
all_task_originsset construction before thetask_link_map_lock_ guard.all_tasksis a local vector that no other thread touches, so no lock is needed to make the set from it..reserve(all_tasks.size())so we dont rehash chains during constructionTesting
Risks
Additional Notes