From 778800e334a3fd0f29dbeabad114032bc849a9d1 Mon Sep 17 00:00:00 2001 From: Mythri Alle Date: Wed, 14 Sep 2022 12:13:07 +0000 Subject: 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 --- openjdkjvmti/ti_extension.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'openjdkjvmti/ti_extension.cc') 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(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", -- cgit v1.2.3-59-g8ed1b