Cover checking outputs in the profile.
Also extend the profile span of checking action cache hits to include all of
the work and not only the actual cache lookup.
@@ -609,9 +609,7 @@ public final class SkyframeActionExecutor {
artifactExpander,
remoteDefaultProperties,
loadCachedOutputMetadata);
- } catch (UserExecException e) {
- throw ActionExecutionException.fromExecException(e, action);
- }
+
if (token == null) {
boolean eventPosted = false;
// Notify BlazeRuntimeStatistics about the action middleman 'execution'.
@@ -666,6 +664,9 @@ public final class SkyframeActionExecutor {
eventHandler.post(new CachedActionEvent(action, actionStartTime));
}
}
+ } catch (UserExecException e) {
+ throw ActionExecutionException.fromExecException(e, action);
+ }
return token;
}
@@ -1437,6 +1438,7 @@ public final class SkyframeActionExecutor {
@Nullable ImmutableList<FilesetOutputSymlink> filesetOutputSymlinksForMetrics,
boolean isActionCacheHitForMetrics) {
boolean success = true;
+ try (SilentCloseable c = profiler.profile(ProfilerTask.INFO, "checkOutputs")) {
for (Artifact output : action.getOutputs()) {
// getMetadata has the side effect of adding the artifact to the cache if it's not there
// already (e.g., due to a previous call to MetadataHandler.injectDigest), therefore we only
@@ -1460,10 +1462,13 @@ public final class SkyframeActionExecutor {
reporter.handle(
Event.error(
action.getOwner().getLocation(),
- String.format("declared output '%s' is not a symlink", output.prettyPrint())));
+ String.format(
+ "declared output '%s' is not a symlink", output.prettyPrint())));
} else {
// Are all other exceptions caught due to missing files?
- reportMissingOutputFile(action, output, reporter, output.getPath().isSymbolicLink(), e);
+ reportMissingOutputFile(
+ action, output, reporter, output.getPath().isSymbolicLink(), e);
+ }
}
}
}
