diff options
author | mschaller <mschaller@google.com> | 2018-06-29 10:55:24 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-29 10:56:36 -0700 |
commit | 1ac0ea3d154e119326193b7dd97c344ffe6b389e (patch) | |
tree | 45285b6da0118aadf4b92ad464729ce9e9fb7145 /src/main/java/com/google/devtools/build/skyframe/AbstractExceptionalParallelEvaluator.java | |
parent | f6dce2e24bc9c8df25999dcda0ccd9a15ac770d7 (diff) |
Reuse previously stored SkyValues during event/post collection
If a SkyFunction read a value (or its absence) from the graph during its
evaluation, that value will be used to compute the event and post
metadata for that evaluation.
This CL modifies the assertion strategy for this code. Previously,
registered deps which were not done would have gone undetected, and
their events/posts skipped.
This CL also makes a few minor changes that make SkyFunctionEnvironment
more consistent:
- Deps not already in previouslyRequestedDepsValues are added to
newlyRequestedDeps regardless of whether evaluation was in
error bubbling or whether the dep was done.
- Previously requested deps of an inflight node are prefetched (by
passing them to SkyFunctionEnvironment's ctor) during error bubbling in
the same way as they are during normal eval or cycle checking.
- Minor signature and documentation adjustments.
RELNOTES: None.
PiperOrigin-RevId: 202672709
Diffstat (limited to 'src/main/java/com/google/devtools/build/skyframe/AbstractExceptionalParallelEvaluator.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/skyframe/AbstractExceptionalParallelEvaluator.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/skyframe/AbstractExceptionalParallelEvaluator.java b/src/main/java/com/google/devtools/build/skyframe/AbstractExceptionalParallelEvaluator.java index 20bf5d5879..a82d1158df 100644 --- a/src/main/java/com/google/devtools/build/skyframe/AbstractExceptionalParallelEvaluator.java +++ b/src/main/java/com/google/devtools/build/skyframe/AbstractExceptionalParallelEvaluator.java @@ -23,7 +23,6 @@ import com.google.devtools.build.lib.events.ExtendedEventHandler; import com.google.devtools.build.lib.profiler.Profiler; import com.google.devtools.build.lib.profiler.ProfilerTask; import com.google.devtools.build.lib.profiler.SilentCloseable; -import com.google.devtools.build.lib.util.GroupedList; import com.google.devtools.build.skyframe.EvaluationProgressReceiver.EvaluationState; import com.google.devtools.build.skyframe.EvaluationProgressReceiver.EvaluationSuccessState; import com.google.devtools.build.skyframe.MemoizingEvaluator.EmittedEventState; @@ -478,7 +477,7 @@ public abstract class AbstractExceptionalParallelEvaluator<E extends Exception> SkyFunctionEnvironment env = new SkyFunctionEnvironment( parent, - new GroupedList<SkyKey>(), + parentEntry.getTemporaryDirectDeps(), bubbleErrorInfo, ImmutableSet.<SkyKey>of(), evaluatorContext); @@ -504,8 +503,8 @@ public abstract class AbstractExceptionalParallelEvaluator<E extends Exception> errorKey, ValueWithMetadata.error( ErrorInfo.fromChildErrors(errorKey, ImmutableSet.of(error)), - env.buildEvents(parentEntry, /*missingChildren=*/ true), - env.buildPosts(parentEntry))); + env.buildEvents(parentEntry, /*expectDoneDeps=*/ false), + env.buildPosts(parentEntry, /*expectDoneDeps=*/ false))); continue; } } finally { @@ -517,8 +516,8 @@ public abstract class AbstractExceptionalParallelEvaluator<E extends Exception> errorKey, ValueWithMetadata.error( ErrorInfo.fromChildErrors(errorKey, ImmutableSet.of(error)), - env.buildEvents(parentEntry, /*missingChildren=*/ true), - env.buildPosts(parentEntry))); + env.buildEvents(parentEntry, /*expectDoneDeps=*/ false), + env.buildPosts(parentEntry, /*expectDoneDeps=*/ false))); } // Reset the interrupt bit if there was an interrupt from outside this evaluator interrupt. |