jni: Switch to @FastNative for all JNI functions. Deprecate !bang JNI.
Switches all (248) methods that previously used !bang JNI in art/libcore
to all use @FastNative.
Also deprecate !bang JNI since nothing in Android seems to (or should
be) using it anymore.
This measures to be a 3% startup time improvement in system_server.
Test: make test-art-host
Bug: 34955272
Change-Id: I0881f401c7660c79f275235362777bfa58241deb
diff --git a/runtime/native/java_lang_System.cc b/runtime/native/java_lang_System.cc
index 7f8da80..d7c9cd0 100644
--- a/runtime/native/java_lang_System.cc
+++ b/runtime/native/java_lang_System.cc
@@ -237,16 +237,16 @@
}
static JNINativeMethod gMethods[] = {
- NATIVE_METHOD(System, arraycopy, "!(Ljava/lang/Object;ILjava/lang/Object;II)V"),
- NATIVE_METHOD(System, arraycopyCharUnchecked, "!([CI[CII)V"),
- NATIVE_METHOD(System, arraycopyByteUnchecked, "!([BI[BII)V"),
- NATIVE_METHOD(System, arraycopyShortUnchecked, "!([SI[SII)V"),
- NATIVE_METHOD(System, arraycopyIntUnchecked, "!([II[III)V"),
- NATIVE_METHOD(System, arraycopyLongUnchecked, "!([JI[JII)V"),
- NATIVE_METHOD(System, arraycopyFloatUnchecked, "!([FI[FII)V"),
- NATIVE_METHOD(System, arraycopyDoubleUnchecked, "!([DI[DII)V"),
- NATIVE_METHOD(System, arraycopyBooleanUnchecked, "!([ZI[ZII)V"),
- NATIVE_METHOD(System, identityHashCode, "!(Ljava/lang/Object;)I"),
+ FAST_NATIVE_METHOD(System, arraycopy, "(Ljava/lang/Object;ILjava/lang/Object;II)V"),
+ FAST_NATIVE_METHOD(System, arraycopyCharUnchecked, "([CI[CII)V"),
+ FAST_NATIVE_METHOD(System, arraycopyByteUnchecked, "([BI[BII)V"),
+ FAST_NATIVE_METHOD(System, arraycopyShortUnchecked, "([SI[SII)V"),
+ FAST_NATIVE_METHOD(System, arraycopyIntUnchecked, "([II[III)V"),
+ FAST_NATIVE_METHOD(System, arraycopyLongUnchecked, "([JI[JII)V"),
+ FAST_NATIVE_METHOD(System, arraycopyFloatUnchecked, "([FI[FII)V"),
+ FAST_NATIVE_METHOD(System, arraycopyDoubleUnchecked, "([DI[DII)V"),
+ FAST_NATIVE_METHOD(System, arraycopyBooleanUnchecked, "([ZI[ZII)V"),
+ FAST_NATIVE_METHOD(System, identityHashCode, "(Ljava/lang/Object;)I"),
};
void register_java_lang_System(JNIEnv* env) {