diff options
Diffstat (limited to 'runtime/runtime.cc')
-rw-r--r-- | runtime/runtime.cc | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/runtime/runtime.cc b/runtime/runtime.cc index d12a976be8..b8775b874f 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -93,11 +93,11 @@ #include "instrumentation.h" #include "intern_table.h" #include "interpreter/interpreter.h" -#include "java_vm_ext.h" #include "jit/jit.h" #include "jit/jit_code_cache.h" #include "jit/profile_saver.h" -#include "jni_internal.h" +#include "jni/java_vm_ext.h" +#include "jni/jni_internal.h" #include "linear_alloc.h" #include "memory_representation.h" #include "mirror/array.h" @@ -232,7 +232,6 @@ Runtime::Runtime() intern_table_(nullptr), class_linker_(nullptr), signal_catcher_(nullptr), - use_tombstoned_traces_(false), java_vm_(nullptr), fault_message_lock_("Fault message lock"), fault_message_(""), @@ -274,6 +273,7 @@ Runtime::Runtime() pending_hidden_api_warning_(false), dedupe_hidden_api_warnings_(true), always_set_hidden_api_warning_flag_(false), + hidden_api_access_event_log_rate_(0), dump_native_stack_on_sig_quit_(true), pruned_dalvik_cache_(false), // Initially assume we perceive jank in case the process state is never updated. @@ -861,7 +861,11 @@ void Runtime::EndThreadBirth() REQUIRES(Locks::runtime_shutdown_lock_) { } void Runtime::InitNonZygoteOrPostFork( - JNIEnv* env, bool is_system_server, NativeBridgeAction action, const char* isa) { + JNIEnv* env, + bool is_system_server, + NativeBridgeAction action, + const char* isa, + bool profile_system_server) { is_zygote_ = false; if (is_native_bridge_loaded_) { @@ -884,8 +888,15 @@ void Runtime::InitNonZygoteOrPostFork( heap_->ResetGcPerformanceInfo(); // We may want to collect profiling samples for system server, but we never want to JIT there. - if ((!is_system_server || !jit_options_->UseJitCompilation()) && - !safe_mode_ && + if (is_system_server) { + jit_options_->SetUseJitCompilation(false); + jit_options_->SetSaveProfilingInfo(profile_system_server); + if (profile_system_server) { + jit_options_->SetWaitForJitNotificationsToSaveProfile(false); + VLOG(profiler) << "Enabling system server profiles"; + } + } + if (!safe_mode_ && (jit_options_->UseJitCompilation() || jit_options_->GetSaveProfilingInfo()) && jit_ == nullptr) { // Note that when running ART standalone (not zygote, nor zygote fork), @@ -904,7 +915,7 @@ void Runtime::InitNonZygoteOrPostFork( void Runtime::StartSignalCatcher() { if (!is_zygote_) { - signal_catcher_ = new SignalCatcher(stack_trace_file_, use_tombstoned_traces_); + signal_catcher_ = new SignalCatcher(); } } @@ -1152,12 +1163,6 @@ bool Runtime::Init(RuntimeArgumentMap&& runtime_options_in) { abort_ = runtime_options.GetOrDefault(Opt::HookAbort); default_stack_size_ = runtime_options.GetOrDefault(Opt::StackSize); - use_tombstoned_traces_ = runtime_options.GetOrDefault(Opt::UseTombstonedTraces); -#if !defined(ART_TARGET_ANDROID) - CHECK(!use_tombstoned_traces_) - << "-Xusetombstonedtraces is only supported in an Android environment"; -#endif - stack_trace_file_ = runtime_options.ReleaseOrDefault(Opt::StackTraceFile); compiler_executable_ = runtime_options.ReleaseOrDefault(Opt::Compiler); compiler_options_ = runtime_options.ReleaseOrDefault(Opt::CompilerOptions); |