diff options
author | janakr <janakr@google.com> | 2017-10-10 04:25:12 +0200 |
---|---|---|
committer | Marcel Hlopko <hlopko@google.com> | 2017-10-10 11:23:31 +0200 |
commit | f5c0e96b3f3daa47d0f2bb7e3c1ee45462375a1d (patch) | |
tree | 1c2567a08f4c3aa39fd6d0b3038741cfd31cb343 /src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java | |
parent | 1cde8722b930f1c9cf5346f887a0b293bae49f1f (diff) |
Pull clearing of legacy configured target data up to SkyframeExecutor and rename method to better reflect what it is primarily doing.
PiperOrigin-RevId: 171621356
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java index 406de7850d..6704f9e2b2 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java @@ -629,10 +629,17 @@ public final class SequencedSkyframeExecutor extends SkyframeExecutor { discardAnalysisCache(topLevelTargets, topLevelAspects); } + /** + * In addition to calling the superclass method, deletes all ConfiguredTarget values from the + * Skyframe cache. This is done to save memory (e.g. on a configuration change); since the + * configuration is part of the key, these key/value pairs will be sitting around doing nothing + * until the configuration changes back to the previous value. + * + * <p>The next evaluation will delete all invalid values. + */ @Override - public void dropConfiguredTargets() { - skyframeBuildView.clearInvalidatedConfiguredTargets(); - skyframeBuildView.clearLegacyData(); + public void handleConfiguredTargetChange() { + super.handleConfiguredTargetChange(); memoizingEvaluator.delete( // We delete any value that can hold an action -- all subclasses of ActionLookupValue -- as // well as ActionExecutionValues, since they do not depend on ActionLookupValues. @@ -656,7 +663,7 @@ public final class SequencedSkyframeExecutor extends SkyframeExecutor { * next build should clear the legacy caches. */ private void dropConfiguredTargetsNow(final ExtendedEventHandler eventHandler) { - dropConfiguredTargets(); + handleConfiguredTargetChange(); // Run the invalidator to actually delete the values. try { progressReceiver.ignoreInvalidations = true; |