diff options
Diffstat (limited to 'openjdkjvmti/deopt_manager.cc')
-rw-r--r-- | openjdkjvmti/deopt_manager.cc | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/openjdkjvmti/deopt_manager.cc b/openjdkjvmti/deopt_manager.cc index 396459619f..a15e6678f1 100644 --- a/openjdkjvmti/deopt_manager.cc +++ b/openjdkjvmti/deopt_manager.cc @@ -67,22 +67,10 @@ namespace openjdkjvmti { // has we only care about methods with active breakpoints on them. In the future we should probably // rewrite all of this to instead do this at the ShadowFrame or thread granularity. bool JvmtiMethodInspectionCallback::IsMethodBeingInspected(art::ArtMethod* method) { - // Non-java-debuggable runtimes we need to assume that any method might not be debuggable and - // therefore potentially being inspected (due to inlines). If we are debuggable we rely hard on - // inlining not being done since we don't keep track of which methods get inlined where and simply - // look to see if the method is breakpointed. - return !art::Runtime::Current()->IsJavaDebuggable() || - manager_->HaveLocalsChanged() || - manager_->MethodHasBreakpoints(method); -} - -bool JvmtiMethodInspectionCallback::IsMethodSafeToJit(art::ArtMethod* method) { - return !manager_->MethodHasBreakpoints(method); -} - -bool JvmtiMethodInspectionCallback::MethodNeedsDebugVersion( - art::ArtMethod* method ATTRIBUTE_UNUSED) { - return true; + // In non-java-debuggable runtimes the breakpoint check would miss if we have breakpoints on + // methods that are inlined. Since these features are best effort in non-java-debuggable + // runtimes it is OK to be less precise. For debuggable runtimes, inlining is disabled. + return manager_->HaveLocalsChanged() || manager_->MethodHasBreakpoints(method); } DeoptManager::DeoptManager() |