Skip to content

[parallel-queries] DepGraph::previous_work_products could be made immutable to avoid shared mutable state #50501

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
michaelwoerister opened this issue May 7, 2018 · 0 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. WG-compiler-performance Working group: Compiler Performance

Comments

@michaelwoerister
Copy link
Member

DepGraph::previous_work_products is a field in the dep-graph that contains the list of object files cached during the previous compilation session. In theory, this information is available already at the time when we load the previous dep-graph and thus the field could be made immutable (i.e. not use an RwLock) and be initialized at DepGraph construction time.

Refactoring this would need the following steps:

cc @rust-lang/wg-compiler-performance

@michaelwoerister michaelwoerister added C-enhancement Category: An issue proposing an enhancement or a PR with one. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. WG-compiler-performance Working group: Compiler Performance A-parallel-queries labels May 7, 2018
wesleywiser added a commit to wesleywiser/rust that referenced this issue May 8, 2018
alexcrichton added a commit to alexcrichton/rust that referenced this issue May 10, 2018
…ducts, r=michaelwoerister

Make DepGraph::previous_work_products immutable

Fixes rust-lang#50501

r? @michaelwoerister
alexcrichton added a commit to alexcrichton/rust that referenced this issue May 10, 2018
…ducts, r=michaelwoerister

Make DepGraph::previous_work_products immutable

Fixes rust-lang#50501

r? @michaelwoerister
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. WG-compiler-performance Working group: Compiler Performance
Projects
None yet
Development

No branches or pull requests

1 participant