From 52859b454b4426e98d3106c95e5b16e56b5cd437 Mon Sep 17 00:00:00 2001 From: janakr Date: Sun, 1 Apr 2018 19:12:26 -0700 Subject: Change profiling to only accept strings for its "description" argument. Profiling can hold onto objects for the duration of the build, and some of those objects may be temporary that should not be persisted. In particular, UnixGlob and its inner classes should not outlive loading and analysis. For the most part, care was taken in this CL to only use strings that required no additional construction, mainly to minimize garbage (retaining references to newly created strings is not as great a concern since only the strings corresponding to the slowest K tasks are retained, for some relatively small values of K). Action descriptions for actually executing actions are eagerly expanded because that work is minimal compared to the work of actually executing an action. PiperOrigin-RevId: 191251488 --- .../devtools/build/skyframe/AbstractExceptionalParallelEvaluator.java | 2 +- .../com/google/devtools/build/skyframe/AbstractParallelEvaluator.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/com/google/devtools/build/skyframe') 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 b13c685b78..9526c855d9 100644 --- a/src/main/java/com/google/devtools/build/skyframe/AbstractExceptionalParallelEvaluator.java +++ b/src/main/java/com/google/devtools/build/skyframe/AbstractExceptionalParallelEvaluator.java @@ -206,7 +206,7 @@ public abstract class AbstractExceptionalParallelEvaluator } } - Profiler.instance().startTask(ProfilerTask.SKYFRAME_EVAL, skyKeySet); + Profiler.instance().startTask(ProfilerTask.SKYFRAME_EVAL, "Parallel Evaluator evaluation"); try { return doMutatingEvaluation(skyKeySet); } finally { diff --git a/src/main/java/com/google/devtools/build/skyframe/AbstractParallelEvaluator.java b/src/main/java/com/google/devtools/build/skyframe/AbstractParallelEvaluator.java index 92ad4d674e..1391d00e1b 100644 --- a/src/main/java/com/google/devtools/build/skyframe/AbstractParallelEvaluator.java +++ b/src/main/java/com/google/devtools/build/skyframe/AbstractParallelEvaluator.java @@ -354,7 +354,7 @@ public abstract class AbstractParallelEvaluator { startTime, Duration.ofNanos(elapsedTimeNanos), ProfilerTask.SKYFUNCTION, - skyKey); + skyKey.functionName().getName()); } } } catch (final SkyFunctionException builderException) { -- cgit v1.2.3