summaryrefslogtreecommitdiff
path: root/openjdkjvmti/ti_extension.cc
diff options
context:
space:
mode:
author Mythri Alle <mythria@google.com> 2022-08-16 06:40:02 +0000
committer Mythri Alle <mythria@google.com> 2022-09-07 07:33:41 +0000
commit322ef183e602f304e3d093c083490dd2e766b254 (patch)
treec87bb9ae4b08bedd7ba74def6f0b905c9214bedf /openjdkjvmti/ti_extension.cc
parent2127c9272399e4cb6c0e020cc66278227b54995a (diff)
Reland "Update instrumentation support for non-java debuggable runtimes"
This reverts commit 7cc22bb96e4e05cf63661eed7fd3dda5304bdacc. Reason for revert: Relanding after a fix for jit-on-first-use failures. The fix: 1. When shutting down jvmti agent, pause Jit threads and discard all JITed code. 2. Update the jit compiler options when transitioning the runtime debug state. Change-Id: I076098459cc5639f9e87dae620a9297460e729e2
Diffstat (limited to 'openjdkjvmti/ti_extension.cc')
-rw-r--r--openjdkjvmti/ti_extension.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/openjdkjvmti/ti_extension.cc b/openjdkjvmti/ti_extension.cc
index 10ea43a1ee..02dc9f19c8 100644
--- a/openjdkjvmti/ti_extension.cc
+++ b/openjdkjvmti/ti_extension.cc
@@ -398,8 +398,7 @@ jvmtiError ExtensionUtil::GetExtensionFunctions(jvmtiEnv* env,
// These require index-ids and debuggable to function
art::Runtime* runtime = art::Runtime::Current();
- if (runtime->GetJniIdType() == art::JniIdType::kIndices &&
- (runtime->GetInstrumentation()->IsForcedInterpretOnly() || runtime->IsJavaDebuggable())) {
+ if (runtime->GetJniIdType() == art::JniIdType::kIndices && IsFullJvmtiAvailable()) {
// IsStructurallyModifiableClass
error = add_extension(
reinterpret_cast<jvmtiExtensionFunction>(Redefiner::IsStructurallyModifiableClass),
@@ -703,8 +702,7 @@ jvmtiError ExtensionUtil::GetExtensionEvents(jvmtiEnv* env,
return error;
}
art::Runtime* runtime = art::Runtime::Current();
- if (runtime->GetJniIdType() == art::JniIdType::kIndices &&
- (runtime->GetInstrumentation()->IsForcedInterpretOnly() || runtime->IsJavaDebuggable())) {
+ if (runtime->GetJniIdType() == art::JniIdType::kIndices && IsFullJvmtiAvailable()) {
error = add_extension(
ArtJvmtiEvent::kStructuralDexFileLoadHook,
"com.android.art.class.structural_dex_file_load_hook",