From 905291b7f69f316d4af885d51768dadf7accd9c9 Mon Sep 17 00:00:00 2001 From: janakr Date: Tue, 15 May 2018 09:43:34 -0700 Subject: Add option --experimental_discard_actions_after_execution in order to turn it off after a release. Discarding actions hasn't been shown to have a significant positive effect on heap memory usage, after careful research by mschaller@. It's holding back other projects (threading Fileset metadata through) and adding complexity, so it's time to kill it. Out of an abundance of caution, I'll keep actions in memory via a flag flip, then, if it sticks, I'll change the default, and then I'll unwire everything. PiperOrigin-RevId: 196682768 --- .../devtools/build/lib/buildtool/BuildRequestOptions.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/main/java/com/google/devtools/build/lib/buildtool') diff --git a/src/main/java/com/google/devtools/build/lib/buildtool/BuildRequestOptions.java b/src/main/java/com/google/devtools/build/lib/buildtool/BuildRequestOptions.java index 42cbc43ed3..cd4e86ddad 100644 --- a/src/main/java/com/google/devtools/build/lib/buildtool/BuildRequestOptions.java +++ b/src/main/java/com/google/devtools/build/lib/buildtool/BuildRequestOptions.java @@ -403,6 +403,18 @@ public class BuildRequestOptions extends OptionsBase { ) public boolean keepStateAfterBuild; + @Option( + name = "discard_actions_after_execution", + defaultValue = "true", + documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, + metadataTags = OptionMetadataTag.INCOMPATIBLE_CHANGE, + effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE}, + help = + "If true, Blaze will clear actions from memory after it executes them. Has no effect " + + "unless --notrack_incremental_state is also specified. Do not use unless instructed" + + " by the Blaze team.") + public boolean discardActionsAfterExecution; + /** Converter for jobs: [0, MAX_JOBS] or "auto". */ public static class JobsConverter extends RangeConverter { /** -- cgit v1.2.3