From fc58af45e342ba9e18bbdf597f205a58ec731658 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Thu, 16 Apr 2015 18:00:39 -0700 Subject: Add AbstractMethod, Constructor, Method Moves functionality to ART from libcore. Precursor to moving ArtMethods to native. Mostly performance improvements. N5 perf before (irrelevant results removed): Class_getConstructor 962.87 =========== Class_getDeclaredMethod 2394.37 ============================ Class_getMethod 2509.20 ============================== Class_newInstance 1999.81 ======================= Method_invokeI 1439.02 ================= Method_invokePreBoxedI 1415.82 ================ Method_invokeStaticI 1456.24 ================= Method_invokeStaticPreBoxedI 1427.32 ================= Method_invokeStaticV 814.47 ========= Method_invokeV 816.56 ========= After: benchmark ns linear runtime Class_getConstructor 1302.04 ================ Class_getDeclaredMethod 1459.01 ================== Class_getMethod 1560.40 =================== Class_newInstance 2029.94 ========================= Method_invokeI 1312.89 ================ Method_invokePreBoxedI 1255.01 =============== Method_invokeStaticI 1289.13 =============== Method_invokeStaticPreBoxedI 1196.52 ============== Method_invokeStaticV 790.82 ========= Method_invokeV 791.73 ========= Performance improvements are more than just fixing regressions introduced in: http://android-review.googlesource.com/#/c/146069/ Bug: 19264997 Change-Id: Ife79c469fdb09f30e3aefcfc3e0ce5ed32303fce --- dalvikvm/dalvikvm.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'dalvikvm') diff --git a/dalvikvm/dalvikvm.cc b/dalvikvm/dalvikvm.cc index 7839aa8..fd03002 100644 --- a/dalvikvm/dalvikvm.cc +++ b/dalvikvm/dalvikvm.cc @@ -50,6 +50,7 @@ static bool IsMethodPublic(JNIEnv* env, jclass c, jmethodID method_id) { int modifiers = env->CallIntMethod(reflected.get(), mid); static const int PUBLIC = 0x0001; // java.lang.reflect.Modifiers.PUBLIC if ((modifiers & PUBLIC) == 0) { + fprintf(stderr, "Modifiers mismatch\n"); return false; } return true; -- cgit v1.1