Change --memory_profile_stable_heap_parameters to accept more than one GC specification
Currently memory_profile_stable_heap_parameters expects 2 ints and runs that
many GCs with pauses between them 2nd param.
This CL doesn't change that, but allows any arbitrary number of pairs to be
provided that will run the same logic for each pair. This allows experimenting
with forcing longer pauses on that thread before doing the quick GCs that allow
for cleaner memory measurement.
PiperOrigin-RevId: 485646588
Change-Id: Iff4f17cdaae409854f99397b4271bb5f87c4c404
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java b/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java
index 356735c..bf962d3 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java
@@ -337,9 +337,11 @@
effectTags = {OptionEffectTag.BAZEL_MONITORING},
converter = MemoryProfileStableHeapParameters.Converter.class,
help =
- "Tune memory profile's computation of stable heap at end of build. Should be two"
- + " integers separated by a comma. First parameter is the number of GCs to perform."
- + " Second parameter is the number of seconds to wait between GCs.")
+ "Tune memory profile's computation of stable heap at end of build. Should be and even"
+ + " number of integers separated by commas. In each pair the first integer is the"
+ + " number of GCs to perform. The second integer in each pair is the number of"
+ + " seconds to wait between GCs. Ex: 2,4,4,0 would 2 GCs with a 4sec pause, followed"
+ + " by 4 GCs with zero second pause")
public MemoryProfileStableHeapParameters memoryProfileStableHeapParameters;
@Option(