Allow late lookup for @CriticalNative methods.
Test: Add and enable tests in 178-app-image-native-method
Test: Add and enable tests in jni_compiler_test
Test: Manually step through the new stub in GDB and check
that backtrace works at various points.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: aosp_taimen-userdebug boots.
Test: run-gtests.sh
Test: testrunner.py --target --optimizing
Bug: 112189621
Change-Id: If094e5062acbb99eefa88f2afb4815f93730cb82
diff --git a/test/178-app-image-native-method/native_methods.cc b/test/178-app-image-native-method/native_methods.cc
index 5c4fb3e..794a78a 100644
--- a/test/178-app-image-native-method/native_methods.cc
+++ b/test/178-app-image-native-method/native_methods.cc
@@ -38,6 +38,10 @@
(i8 == 81) && (l8 == 82) && (f8 == 83.0) && (d8 == 84.0);
}
+extern "C" JNIEXPORT jint JNICALL Java_Test_nativeMethodVoid(JNIEnv*, jclass) {
+ return 42;
+}
+
extern "C" JNIEXPORT jint JNICALL Java_Test_nativeMethod(JNIEnv*, jclass, jint i) {
return i;
}
@@ -64,6 +68,10 @@
return ok ? 42 : -1;
}
+extern "C" JNIEXPORT jint JNICALL Java_TestFast_nativeMethodVoid(JNIEnv*, jclass) {
+ return 42;
+}
+
extern "C" JNIEXPORT jint JNICALL Java_TestFast_nativeMethod(JNIEnv*, jclass, jint i) {
return i;
}
@@ -90,6 +98,10 @@
return ok ? 42 : -1;
}
+extern "C" JNIEXPORT jint JNICALL Java_TestCritical_nativeMethodVoid() {
+ return 42;
+}
+
extern "C" JNIEXPORT jint JNICALL Java_TestCritical_nativeMethod(jint i) {
return i;
}