Add the ParallelEvaluator.eval call to the Profiler
We want to make sure that the profile captures all Skyframe invocations, so
that we can catch cases where we accidentally introduce new ones.
@@ -23,6 +23,8 @@ import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.google.devtools.build.lib.events.Event;
import com.google.devtools.build.lib.events.ExtendedEventHandler;
+import com.google.devtools.build.lib.profiler.Profiler;
+import com.google.devtools.build.lib.profiler.SilentCloseable;
import com.google.devtools.build.skyframe.Differencer.Diff;
import com.google.devtools.build.skyframe.InvalidatingNodeVisitor.DeletingInvalidationState;
import com.google.devtools.build.skyframe.InvalidatingNodeVisitor.DirtyingInvalidationState;
@@ -191,7 +193,10 @@ public final class InMemoryMemoizingEvaluator implements MemoizingEvaluator {
numThreads,
progressReceiver,
graphInconsistencyReceiver);
- EvaluationResult<T> result = evaluator.eval(roots);
+ EvaluationResult<T> result;
+ try (SilentCloseable c = Profiler.instance().profile("ParallelEvaluator.eval")) {
+ result = evaluator.eval(roots);
+ }
return EvaluationResult.<T>builder()
.mergeFrom(result)
.setWalkableGraph(new DelegatingWalkableGraph(graph))
