RELNOTES[INC]: The deprecated startup options --experimental_oom_more_eagerly(_threshold) are removed.
PiperOrigin-RevId: 303862048
diff --git a/src/main/cpp/blaze.cc b/src/main/cpp/blaze.cc
index 4b0b5fb..a934d4d 100644
--- a/src/main/cpp/blaze.cc
+++ b/src/main/cpp/blaze.cc
@@ -488,14 +488,6 @@
} else {
result.push_back("--noidle_server_tasks");
}
- if (startup_options.oom_more_eagerly) {
- result.push_back("--experimental_oom_more_eagerly");
- } else {
- result.push_back("--noexperimental_oom_more_eagerly");
- }
- result.push_back("--experimental_oom_more_eagerly_threshold=" +
- blaze_util::ToString(
- startup_options.oom_more_eagerly_threshold));
if (startup_options.write_command_log) {
result.push_back("--write_command_log");
diff --git a/src/main/cpp/startup_options.cc b/src/main/cpp/startup_options.cc
index 6bd300d..eb12211d 100644
--- a/src/main/cpp/startup_options.cc
+++ b/src/main/cpp/startup_options.cc
@@ -132,8 +132,6 @@
RegisterNullaryStartupFlag("deep_execroot", &deep_execroot);
RegisterNullaryStartupFlag("expand_configs_in_place",
&expand_configs_in_place);
- RegisterNullaryStartupFlag("experimental_oom_more_eagerly",
- &oom_more_eagerly);
RegisterNullaryStartupFlag("fatal_event_bus_exceptions",
&fatal_event_bus_exceptions);
RegisterNullaryStartupFlag("host_jvm_debug", &host_jvm_debug);
@@ -149,7 +147,6 @@
RegisterUnaryStartupFlag("command_port");
RegisterUnaryStartupFlag("connect_timeout_secs");
RegisterUnaryStartupFlag("digest_function");
- RegisterUnaryStartupFlag("experimental_oom_more_eagerly_threshold");
RegisterUnaryStartupFlag("server_javabase");
RegisterUnaryStartupFlag("host_jvm_args");
RegisterUnaryStartupFlag("host_jvm_profile");
@@ -339,19 +336,6 @@
return blaze_exit_code::BAD_ARGV;
}
option_sources["macos_qos_class"] = rcfile;
- } else if ((value = GetUnaryOption(
- arg, next_arg,
- "--experimental_oom_more_eagerly_threshold")) != NULL) {
- if (!blaze_util::safe_strto32(value, &oom_more_eagerly_threshold) ||
- oom_more_eagerly_threshold < 0) {
- blaze_util::StringPrintf(error,
- "Invalid argument to "
- "--experimental_oom_more_eagerly_threshold: "
- "'%s'.",
- value);
- return blaze_exit_code::BAD_ARGV;
- }
- option_sources["experimental_oom_more_eagerly_threshold"] = rcfile;
} else if ((value = GetUnaryOption(arg, next_arg,
"--connect_timeout_secs")) != NULL) {
if (!blaze_util::safe_strto32(value, &connect_timeout_secs) ||
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java
index 3afc697..ed4d327 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java
@@ -418,13 +418,6 @@
env.getEventBus().register(handler);
int oomMoreEagerlyThreshold = commonOptions.oomMoreEagerlyThreshold;
- if (oomMoreEagerlyThreshold == 100) {
- oomMoreEagerlyThreshold =
- runtime
- .getStartupOptionsProvider()
- .getOptions(BlazeServerStartupOptions.class)
- .oomMoreEagerlyThreshold;
- }
runtime.getRetainedHeapLimiter().updateThreshold(oomMoreEagerlyThreshold);
// We register an ANSI-allowing handler associated with {@code handler} so that ANSI control
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java
index b8c65e9..f5451e1 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java
@@ -239,30 +239,6 @@
public boolean deepExecRoot;
@Option(
- name = "experimental_oom_more_eagerly",
- defaultValue = "false", // NOTE: only for documentation, value is always passed by the client.
- documentationCategory = OptionDocumentationCategory.BAZEL_CLIENT_OPTIONS,
- effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE, OptionEffectTag.EAGERNESS_TO_EXIT},
- help =
- "If set, attempt to detect Java heap OOM conditions and exit before thrashing. Only "
- + "honored when --batch is also passed. In some cases, builds that previously "
- + "succeeded may OOM if they were close to OOMing before. Deprecated: "
- + "Use the command argument --experimental_oom_more_eagerly_threshold instead."
- )
- public boolean oomMoreEagerly;
-
- @Option(
- name = "experimental_oom_more_eagerly_threshold",
- defaultValue = "100", // NOTE: only for documentation, value is always passed by the client.
- documentationCategory = OptionDocumentationCategory.BAZEL_CLIENT_OPTIONS,
- effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE, OptionEffectTag.EAGERNESS_TO_EXIT},
- help =
- "If this flag is set, Bazel will OOM if, after two full GC's, more than this percentage "
- + "of the (old gen) heap is still occupied. Deprecated: Use the command argument "
- + "--experimental_oom_more_eagerly_threshold instead.")
- public int oomMoreEagerlyThreshold;
-
- @Option(
name = "block_for_lock",
defaultValue = "true", // NOTE: only for documentation, value never passed to the server.
documentationCategory = OptionDocumentationCategory.BAZEL_CLIENT_OPTIONS,
diff --git a/src/test/cpp/bazel_startup_options_test.cc b/src/test/cpp/bazel_startup_options_test.cc
index 5fc432a..8bdb584 100644
--- a/src/test/cpp/bazel_startup_options_test.cc
+++ b/src/test/cpp/bazel_startup_options_test.cc
@@ -98,7 +98,6 @@
ExpectValidNullaryOption(options, "block_for_lock");
ExpectValidNullaryOption(options, "client_debug");
ExpectValidNullaryOption(options, "deep_execroot");
- ExpectValidNullaryOption(options, "experimental_oom_more_eagerly");
ExpectValidNullaryOption(options, "fatal_event_bus_exceptions");
ExpectValidNullaryOption(options, "home_rc");
ExpectValidNullaryOption(options, "host_jvm_debug");
@@ -114,7 +113,6 @@
ExpectIsUnaryOption(options, "command_port");
ExpectIsUnaryOption(options, "connect_timeout_secs");
ExpectIsUnaryOption(options, "digest_function");
- ExpectIsUnaryOption(options, "experimental_oom_more_eagerly_threshold");
ExpectIsUnaryOption(options, "host_jvm_args");
ExpectIsUnaryOption(options, "host_jvm_profile");
ExpectIsUnaryOption(options, "install_base");