aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java
diff options
context:
space:
mode:
authorGravatar shahan <shahan@google.com>2018-05-15 15:09:46 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-05-15 15:11:38 -0700
commit0015d18f57e3f94905b58967b9dd6a1e8b364596 (patch)
tree0603a29e7244eb1780752b04fd3ce0ce5306ca23 /src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java
parent374cae61b81e380f0e0c6f2ed84a8fbae4da1d7f (diff)
Optimizes performance of ActionFS staging and eliminates ActionFS updates.
Extracts a class, InputArtifactData to hold the input data instead of using a raw map. This provides the flexibility needed to support both ActionFS and existing code so ActionFS does not need to rekey the input data. Uses the smaller, getDeclaredIncludeSrcs instead of getAllowedDerivedInputs when possible for staging optional inputs in ActionFS. PiperOrigin-RevId: 196736703
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java
index 37683f3d8b..db6452ff61 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java
@@ -81,6 +81,7 @@ import com.google.devtools.build.lib.util.io.OutErr;
import com.google.devtools.build.lib.vfs.FileSystem;
import com.google.devtools.build.lib.vfs.Path;
import com.google.devtools.build.lib.vfs.PathFragment;
+import com.google.devtools.build.lib.vfs.Root;
import com.google.devtools.build.lib.vfs.Symlinks;
import com.google.devtools.build.skyframe.SkyFunction.Environment;
import com.google.protobuf.ByteString;
@@ -104,6 +105,7 @@ import java.util.concurrent.FutureTask;
import java.util.concurrent.atomic.AtomicReference;
import java.util.concurrent.locks.Lock;
import java.util.function.BooleanSupplier;
+import java.util.function.Supplier;
import java.util.logging.Logger;
import javax.annotation.Nullable;
@@ -157,14 +159,17 @@ public final class SkyframeActionExecutor {
private final AtomicReference<ActionExecutionStatusReporter> statusReporterRef;
private OutputService outputService;
+ private final Supplier<ImmutableList<Root>> sourceRootSupplier;
private final BooleanSupplier usesActionFileSystem;
SkyframeActionExecutor(
ActionKeyContext actionKeyContext,
AtomicReference<ActionExecutionStatusReporter> statusReporterRef,
+ Supplier<ImmutableList<Root>> sourceRootSupplier,
BooleanSupplier usesActionFileSystem) {
this.actionKeyContext = actionKeyContext;
this.statusReporterRef = statusReporterRef;
+ this.sourceRootSupplier = sourceRootSupplier;
this.usesActionFileSystem = usesActionFileSystem;
}
@@ -359,6 +364,14 @@ public final class SkyframeActionExecutor {
this.clientEnv = clientEnv;
}
+ public Path getExecRoot() {
+ return executorEngine.getExecRoot();
+ }
+
+ public ImmutableList<Root> getSourceRoots() {
+ return sourceRootSupplier.get();
+ }
+
public boolean usesActionFileSystem() {
return usesActionFileSystem.getAsBoolean();
}