-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a futures-based include scanner implementation
Enable with --experimental_async_include_scanner This allows integrating with the async spawn execution API in SpawnRunner, reducing the need for a large thread pool. Also, in the legacy implementation, if multiple threads called computeIfAbsent on the same key, then all except one block. This could lead to all threads in the thread pool being blocked, which in turn (due to caller-runs policy) can cause Skyframe evaluator threads to be blocked. However, note that Skyframe threads are still blocked in CppCompileAction.findUsedHeaders even after this change. I have a follow-up change to support an action input discovery API based on continuations. Note that this does not change the include scanner to use continuations. We use continuations elsewhere because we need access to the skyframe function environment, which requires that such code runs in the skyframe thread pool. The include scanner does _not_ need the skyframe function environment, so we can run it in a non-skyframe thread pool. However, we may change this in the future, e.g., to cache include scan results in Skyframe. There was a previous attempt to reimplement include scanning in Skyframe, but that was dropped due to performance overhead. Progress on #6394. PiperOrigin-RevId: 246793955
- Loading branch information
1 parent
c2001a4
commit 63928e4
Showing
8 changed files
with
788 additions
and
58 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.