Fix IsProxyInit check.
This should't return true for Proxy.<clinit>. Also pick one test to also
run with --no-image to get coverage.
Test: test.py
Change-Id: Ie981fdb66b282eba1ad937dc45a4d970bade0772
diff --git a/runtime/instrumentation.cc b/runtime/instrumentation.cc
index a9a8810..46cfb05 100644
--- a/runtime/instrumentation.cc
+++ b/runtime/instrumentation.cc
@@ -223,7 +223,7 @@
return false;
}
- return method->IsConstructor() &&
+ return method->IsConstructor() && !method->IsStatic() &&
method->GetDeclaringClass()->DescriptorEquals("Ljava/lang/reflect/Proxy;");
}
@@ -1086,7 +1086,8 @@
if (CodeNeedsEntryExitStub(new_code, method)) {
DCHECK(method->GetEntryPointFromQuickCompiledCode() == GetQuickInstrumentationEntryPoint() ||
class_linker->IsQuickToInterpreterBridge(method->GetEntryPointFromQuickCompiledCode()))
- << EntryPointString(method->GetEntryPointFromQuickCompiledCode());
+ << EntryPointString(method->GetEntryPointFromQuickCompiledCode())
+ << " " << method->PrettyMethod();
// If the code we want to update the method with still needs entry/exit stub, just skip.
return;
}
diff --git a/test/1903-suspend-self/run b/test/1903-suspend-self/run
index e92b873..97f077b 100755
--- a/test/1903-suspend-self/run
+++ b/test/1903-suspend-self/run
@@ -15,3 +15,13 @@
# limitations under the License.
./default-run "$@" --jvmti
+
+return_status1=$?
+
+#Also do one run with --no-image to have one test coverage with no-image.
+./default-run "$@" --jvmti --no-image
+
+return_status2=$?
+
+# Make sure we don't silently ignore an early failure.
+(exit $return_status1) && (exit $return_status2)