summaryrefslogtreecommitdiff
path: root/runtime/runtime.cc
diff options
context:
space:
mode:
author Mythri Alle <mythria@google.com> 2022-07-13 07:17:56 +0000
committer Mythri Alle <mythria@google.com> 2022-07-13 09:25:08 +0000
commit26aef1213dbdd7ab03688d898cf802c8c8d7e610 (patch)
tree62c107594123219d845a6730b4781706682ed7b0 /runtime/runtime.cc
parent4ec05bb85ba1107c8295a295eec7e70bace0d047 (diff)
Revert "Introduce a flag to check if JITed code has instrumentation support"
This reverts commit fc067a360d14db5f84fd4b58e0dee6cb04ee759b. Reason for revert: test failures on jit-on-first-use: https://android-build.googleplex.com/builds/submitted/8821659/art-jit-on-first-use/latest/view/logs/build_error.log Change-Id: Ie9bc243baac777ecc4f47cc961494ca6ab3ef4c6
Diffstat (limited to 'runtime/runtime.cc')
-rw-r--r--runtime/runtime.cc13
1 files changed, 3 insertions, 10 deletions
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 3645695bce..72fa118f5b 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -3068,13 +3068,12 @@ bool Runtime::IsVerificationSoftFail() const {
return verify_ == verifier::VerifyMode::kSoftFail;
}
-bool Runtime::IsAsyncDeoptimizeable(ArtMethod* method, uintptr_t code) const {
+bool Runtime::IsAsyncDeoptimizeable(uintptr_t code) const {
if (OatQuickMethodHeader::NterpMethodHeader != nullptr) {
if (OatQuickMethodHeader::NterpMethodHeader->Contains(code)) {
return true;
}
}
-
// We only support async deopt (ie the compiled code is not explicitly asking for
// deopt, but something else like the debugger) in debuggable JIT code.
// We could look at the oat file where `code` is being defined,
@@ -3082,14 +3081,8 @@ bool Runtime::IsAsyncDeoptimizeable(ArtMethod* method, uintptr_t code) const {
// only rely on the JIT for debuggable apps.
// The JIT-zygote is not debuggable so we need to be sure to exclude code from the non-private
// region as well.
- if (GetJit() != nullptr &&
- GetJit()->GetCodeCache()->PrivateRegionContainsPc(reinterpret_cast<const void*>(code))) {
- // If the code is JITed code then check if it was compiled as debuggable.
- const OatQuickMethodHeader* header = method->GetOatQuickMethodHeader(code);
- return CodeInfo::IsDebuggable(header->GetOptimizedCodeInfoPtr());
- }
-
- return false;
+ return IsJavaDebuggable() && GetJit() != nullptr &&
+ GetJit()->GetCodeCache()->PrivateRegionContainsPc(reinterpret_cast<const void*>(code));
}
LinearAlloc* Runtime::CreateLinearAlloc() {