summaryrefslogtreecommitdiff
path: root/openjdkjvmti/ti_extension.cc
diff options
context:
space:
mode:
author Mythri Alle <mythria@google.com> 2022-09-14 12:13:07 +0000
committer Mythri Alle <mythria@google.com> 2022-09-14 14:12:25 +0000
commit778800e334a3fd0f29dbeabad114032bc849a9d1 (patch)
treeeac15b1b49651822aae3bc3c3044735131324282 /openjdkjvmti/ti_extension.cc
parentf8537907783fdbba9a880b3261c2601bbad5fddb (diff)
Revert "Reland "Update instrumentation support for non-java debuggable runtimes""
This reverts commit 322ef183e602f304e3d093c083490dd2e766b254. Reason for revert: Failures on art-tracing: https://android-build.googleplex.com/builds/submitted/9062353/art-tracing/latest/view/logs/build_error.log Change-Id: I59f39e2833b63be15e7507a53ddb5ff6a30d55f3
Diffstat (limited to 'openjdkjvmti/ti_extension.cc')
-rw-r--r--openjdkjvmti/ti_extension.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/openjdkjvmti/ti_extension.cc b/openjdkjvmti/ti_extension.cc
index 02dc9f19c8..10ea43a1ee 100644
--- a/openjdkjvmti/ti_extension.cc
+++ b/openjdkjvmti/ti_extension.cc
@@ -398,7 +398,8 @@ 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 && IsFullJvmtiAvailable()) {
+ if (runtime->GetJniIdType() == art::JniIdType::kIndices &&
+ (runtime->GetInstrumentation()->IsForcedInterpretOnly() || runtime->IsJavaDebuggable())) {
// IsStructurallyModifiableClass
error = add_extension(
reinterpret_cast<jvmtiExtensionFunction>(Redefiner::IsStructurallyModifiableClass),
@@ -702,7 +703,8 @@ jvmtiError ExtensionUtil::GetExtensionEvents(jvmtiEnv* env,
return error;
}
art::Runtime* runtime = art::Runtime::Current();
- if (runtime->GetJniIdType() == art::JniIdType::kIndices && IsFullJvmtiAvailable()) {
+ if (runtime->GetJniIdType() == art::JniIdType::kIndices &&
+ (runtime->GetInstrumentation()->IsForcedInterpretOnly() || runtime->IsJavaDebuggable())) {
error = add_extension(
ArtJvmtiEvent::kStructuralDexFileLoadHook,
"com.android.art.class.structural_dex_file_load_hook",