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 --- src/main/java/com/google/devtools/build/lib/actions/Action.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/main/java/com/google/devtools/build/lib/actions/Action.java') diff --git a/src/main/java/com/google/devtools/build/lib/actions/Action.java b/src/main/java/com/google/devtools/build/lib/actions/Action.java index 0111313e4f..72c881c4ef 100644 --- a/src/main/java/com/google/devtools/build/lib/actions/Action.java +++ b/src/main/java/com/google/devtools/build/lib/actions/Action.java @@ -16,7 +16,6 @@ package com.google.devtools.build.lib.actions; import com.google.devtools.build.lib.actions.extra.ExtraActionInfo; import com.google.devtools.build.lib.concurrent.ThreadSafety.ConditionallyThreadCompatible; -import com.google.devtools.build.lib.profiler.Describable; import com.google.devtools.build.lib.vfs.FileSystem; import com.google.devtools.build.lib.vfs.Path; import com.google.devtools.build.skyframe.SkyFunction; @@ -76,7 +75,7 @@ import javax.annotation.Nullable; * known set of fields is covered, not that all fields are covered), so carefully check all changes * to action subclasses. */ -public interface Action extends ActionExecutionMetadata, Describable { +public interface Action extends ActionExecutionMetadata { /** * Prepares for executing this action; called by the Builder prior to executing the Action itself. * This method should prepare the file system, so that the execution of the Action can write the -- cgit v1.2.3