From 6dcdd6043a93a1e0011008957929bd1491a47a68 Mon Sep 17 00:00:00 2001 From: Marian Lobur Date: Thu, 9 Apr 2015 09:28:40 +0000 Subject: Add logging of blaze_cpu flag usage. Before we can remove this flag we need to be sure that no one uses it. -- MOS_MIGRATED_REVID=90693216 --- src/main/cpp/blaze.cc | 4 ++++ src/main/cpp/blaze_startup_options.cc | 1 + src/main/cpp/blaze_startup_options.h | 2 ++ src/main/cpp/blaze_startup_options_common.cc | 4 ++++ 4 files changed, 11 insertions(+) (limited to 'src/main/cpp') diff --git a/src/main/cpp/blaze.cc b/src/main/cpp/blaze.cc index 8b4f4e1f44..758f16207b 100644 --- a/src/main/cpp/blaze.cc +++ b/src/main/cpp/blaze.cc @@ -306,6 +306,10 @@ static vector GetArgumentArray() { if (!globals->options.skyframe.empty()) { result.push_back("--skyframe=" + globals->options.skyframe); } + if (globals->options.blaze_cpu) { + result.push_back("--blaze_cpu=true"); + } + if (globals->options.allow_configurable_attributes) { result.push_back("--allow_configurable_attributes"); } diff --git a/src/main/cpp/blaze_startup_options.cc b/src/main/cpp/blaze_startup_options.cc index 21636496c2..0bb1c0860d 100644 --- a/src/main/cpp/blaze_startup_options.cc +++ b/src/main/cpp/blaze_startup_options.cc @@ -50,6 +50,7 @@ BlazeStartupOptions::BlazeStartupOptions(const BlazeStartupOptions &rhs) io_nice_level(rhs.io_nice_level), max_idle_secs(rhs.max_idle_secs), skyframe(rhs.skyframe), + blaze_cpu(rhs.blaze_cpu), watchfs(rhs.watchfs), allow_configurable_attributes(rhs.allow_configurable_attributes), option_sources(rhs.option_sources), diff --git a/src/main/cpp/blaze_startup_options.h b/src/main/cpp/blaze_startup_options.h index 73b0405fb1..f848814c77 100644 --- a/src/main/cpp/blaze_startup_options.h +++ b/src/main/cpp/blaze_startup_options.h @@ -148,6 +148,8 @@ class BlazeStartupOptions { string skyframe; + bool blaze_cpu; + // If true, Blaze will listen to OS-level file change notifications. bool watchfs; diff --git a/src/main/cpp/blaze_startup_options_common.cc b/src/main/cpp/blaze_startup_options_common.cc index 7adf841016..f236b91354 100644 --- a/src/main/cpp/blaze_startup_options_common.cc +++ b/src/main/cpp/blaze_startup_options_common.cc @@ -42,6 +42,7 @@ void BlazeStartupOptions::Init() { host_javabase = ""; batch = false; batch_cpu_scheduling = false; + blaze_cpu = false; allow_configurable_attributes = false; fatal_event_bus_exceptions = false; io_nice_level = -1; @@ -76,6 +77,7 @@ void BlazeStartupOptions::Copy( lhs->io_nice_level = rhs.io_nice_level; lhs->max_idle_secs = rhs.max_idle_secs; lhs->skyframe = rhs.skyframe; + lhs->blaze_cpu = rhs.blaze_cpu; lhs->webstatus_port = rhs.webstatus_port; lhs->watchfs = rhs.watchfs; lhs->allow_configurable_attributes = rhs.allow_configurable_attributes; @@ -130,6 +132,8 @@ blaze_exit_code::ExitCode BlazeStartupOptions::ProcessArg( } option_sources["host_jvm_args"] = rcfile; // NB: This is incorrect } else if ((value = GetUnaryOption(arg, next_arg, "--blaze_cpu")) != NULL) { + blaze_cpu = true; + option_sources["blaze_cpu"] = rcfile; fprintf(stderr, "WARNING: The --blaze_cpu startup option is now ignored " "and will be removed in a future release\n"); } else if ((value = GetUnaryOption(arg, next_arg, "--blazerc")) != NULL) { -- cgit v1.2.3