Extensions to check JNI.
Ensure critical lock isn't held when returning from a down-call.
Log a warning if the critical lock is held for a significant period of
time.
Refactor JNIEnvExt to be a class rather than a struct.
Test: mma test-art-host
Change-Id: I4d149cb04d3a7308a22b92b196e51e2f1ae17ede
diff --git a/openjdkjvmti/ti_class.cc b/openjdkjvmti/ti_class.cc
index e69c78b..60ab0a5 100644
--- a/openjdkjvmti/ti_class.cc
+++ b/openjdkjvmti/ti_class.cc
@@ -490,7 +490,7 @@
// Fix up the local table with a root visitor.
RootUpdater local_update(local->input_, local->output_);
- t->GetJniEnv()->locals.VisitRoots(
+ t->GetJniEnv()->VisitJniLocalRoots(
&local_update, art::RootInfo(art::kRootJNILocal, t->GetThreadId()));
}
diff --git a/openjdkjvmti/ti_stack.cc b/openjdkjvmti/ti_stack.cc
index b43eaa0..8ee150e 100644
--- a/openjdkjvmti/ti_stack.cc
+++ b/openjdkjvmti/ti_stack.cc
@@ -891,7 +891,7 @@
visitor.WalkStack(/* include_transitions */ false);
// Find any other monitors, including ones acquired in native code.
art::RootInfo root_info(art::kRootVMInternal);
- target->GetJniEnv()->monitors.VisitRoots(&visitor, root_info);
+ target->GetJniEnv()->VisitMonitorRoots(&visitor, root_info);
err_ = handle_results_(soa_, visitor);
}