Add option to identify primary zygote.
This will be used to customize when to start pre-jitting in
jitzygote mode.
Test: boots
Bug: 119800099
Change-Id: I1b5c1c454455d336f22e3328deead4ced1742239
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index d8c68e6..93ba622 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -229,6 +229,7 @@
instruction_set_(InstructionSet::kNone),
compiler_callbacks_(nullptr),
is_zygote_(false),
+ is_primary_zygote_(false),
is_system_server_(false),
must_relocate_(false),
is_concurrent_gc_enabled_(true),
@@ -963,6 +964,7 @@
const char* isa,
bool profile_system_server) {
is_zygote_ = false;
+ is_primary_zygote_ = false;
if (is_native_bridge_loaded_) {
switch (action) {
@@ -1218,6 +1220,7 @@
compiler_callbacks_ = runtime_options.GetOrDefault(Opt::CompilerCallbacksPtr);
must_relocate_ = runtime_options.GetOrDefault(Opt::Relocate);
is_zygote_ = runtime_options.Exists(Opt::Zygote);
+ is_primary_zygote_ = runtime_options.Exists(Opt::PrimaryZygote);
is_explicit_gc_disabled_ = runtime_options.Exists(Opt::DisableExplicitGC);
image_dex2oat_enabled_ = runtime_options.GetOrDefault(Opt::ImageDex2Oat);
dump_native_stack_on_sig_quit_ = runtime_options.GetOrDefault(Opt::DumpNativeStackOnSigQuit);