summaryrefslogtreecommitdiff
path: root/runtime/runtime.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/runtime.cc')
-rw-r--r--runtime/runtime.cc15
1 files changed, 5 insertions, 10 deletions
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index f53a216f11..c94ea2feb2 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -286,7 +286,7 @@ Runtime::Runtime()
is_native_debuggable_(false),
async_exceptions_thrown_(false),
non_standard_exits_enabled_(false),
- runtime_debug_state_(RuntimeDebugState::kNonJavaDebuggable),
+ is_java_debuggable_(false),
monitor_timeout_enable_(false),
monitor_timeout_ns_(0),
zygote_max_failed_boots_(0),
@@ -1541,7 +1541,7 @@ bool Runtime::Init(RuntimeArgumentMap&& runtime_options_in) {
compiler_options_ = runtime_options.ReleaseOrDefault(Opt::CompilerOptions);
for (const std::string& option : Runtime::Current()->GetCompilerOptions()) {
if (option == "--debuggable") {
- SetRuntimeDebugState(RuntimeDebugState::kJavaDebuggableAtInit);
+ SetJavaDebuggable(true);
break;
}
}
@@ -3224,14 +3224,9 @@ class UpdateEntryPointsClassVisitor : public ClassVisitor {
instrumentation::Instrumentation* const instrumentation_;
};
-void Runtime::SetRuntimeDebugState(RuntimeDebugState state) {
- if (state == RuntimeDebugState::kJavaDebuggableAtInit) {
- DCHECK(!IsStarted());
- } else {
- // We never change the state if we started as a debuggable runtime.
- DCHECK(runtime_debug_state_ != RuntimeDebugState::kJavaDebuggableAtInit);
- }
- runtime_debug_state_ = state;
+void Runtime::SetJavaDebuggable(bool value) {
+ is_java_debuggable_ = value;
+ // Do not call DeoptimizeBootImage just yet, the runtime may still be starting up.
}
void Runtime::DeoptimizeBootImage() {