diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java index 8f44d5d1d7..5fc379eb7e 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java @@ -176,6 +176,8 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { // [skyframe-loading] private final Cache<PackageIdentifier, Package.LegacyBuilder> packageFunctionCache = newPkgFunctionCache(); + private final Cache<PackageIdentifier, Preprocessor.Result> preprocessCache = + newPreprocessCache(); private final AtomicInteger numPackagesLoaded = new AtomicInteger(0); @@ -323,7 +325,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { map.put(SkyFunctions.RECURSIVE_PKG, new RecursivePkgFunction()); map.put(SkyFunctions.PACKAGE, new PackageFunction( reporter, pkgFactory, packageManager, showLoadingProgress, packageFunctionCache, - numPackagesLoaded)); + preprocessCache, numPackagesLoaded)); map.put(SkyFunctions.TARGET_MARKER, new TargetMarkerFunction()); map.put(SkyFunctions.TRANSITIVE_TARGET, new TransitiveTargetFunction(ruleClassProvider)); map.put(SkyFunctions.TRANSITIVE_TRAVERSAL, new TransitiveTraversalFunction()); @@ -592,6 +594,10 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { return CacheBuilder.newBuilder().build(); } + protected Cache<PackageIdentifier, Preprocessor.Result> newPreprocessCache() { + return CacheBuilder.newBuilder().build(); + } + /** * Injects the build info factory map that will be used when constructing build info * actions/artifacts. Unchanged across the life of the Blaze server, although it must be injected @@ -845,6 +851,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { // If the PackageFunction was interrupted, there may be stale entries here. packageFunctionCache.invalidateAll(); + preprocessCache.invalidateAll(); numPackagesLoaded.set(0); // Reset the stateful SkyframeCycleReporter, which contains cycles from last run. |