summaryrefslogtreecommitdiffstats
path: root/vm
diff options
context:
space:
mode:
Diffstat (limited to 'vm')
-rw-r--r--vm/DalvikVersion.h2
-rw-r--r--vm/Dvm.mk1
-rw-r--r--vm/InlineNative.c23
-rw-r--r--vm/compiler/codegen/arm/CalloutHelper.h1
-rw-r--r--vm/compiler/codegen/x86/CalloutHelper.h1
-rw-r--r--vm/native/InternalNative.c2
-rw-r--r--vm/native/InternalNativePriv.h1
-rw-r--r--vm/native/org_apache_harmony_dalvik_NativeTestTarget.c42
8 files changed, 72 insertions, 1 deletions
diff --git a/vm/DalvikVersion.h b/vm/DalvikVersion.h
index 7282c4028..d3d67dd1b 100644
--- a/vm/DalvikVersion.h
+++ b/vm/DalvikVersion.h
@@ -32,6 +32,6 @@
* way classes load changes, e.g. field ordering or vtable layout. Changing
* this guarantees that the optimized form of the DEX file is regenerated.
*/
-#define DALVIK_VM_BUILD 25
+#define DALVIK_VM_BUILD 24
#endif /*_DALVIK_VERSION*/
diff --git a/vm/Dvm.mk b/vm/Dvm.mk
index c3ce81e53..621dd0279 100644
--- a/vm/Dvm.mk
+++ b/vm/Dvm.mk
@@ -185,6 +185,7 @@ LOCAL_SRC_FILES := \
native/java_lang_reflect_Proxy.c \
native/java_security_AccessController.c \
native/java_util_concurrent_atomic_AtomicLong.c \
+ native/org_apache_harmony_dalvik_NativeTestTarget.c \
native/org_apache_harmony_dalvik_ddmc_DdmServer.c \
native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.c \
native/sun_misc_Unsafe.c \
diff --git a/vm/InlineNative.c b/vm/InlineNative.c
index 54656db92..c426d4d8c 100644
--- a/vm/InlineNative.c
+++ b/vm/InlineNative.c
@@ -98,6 +98,25 @@ extern u4 __memcmp16(const u2* s0, const u2* s1, size_t count);
/*
* ===========================================================================
+ * org.apache.harmony.dalvik.NativeTestTarget
+ * ===========================================================================
+ */
+
+/*
+ * public static void emptyInlineMethod
+ *
+ * This exists only for benchmarks.
+ */
+static bool org_apache_harmony_dalvik_NativeTestTarget_emptyInlineMethod(
+ u4 arg0, u4 arg1, u4 arg2, u4 arg3, JValue* pResult)
+{
+ // do nothing
+ return true;
+}
+
+
+/*
+ * ===========================================================================
* java.lang.String
* ===========================================================================
*/
@@ -684,6 +703,10 @@ static bool javaLangDouble_longBitsToDouble(u4 arg0, u4 arg1, u4 arg2, u4 arg,
* the dispatch code in compiler/codegen/<target>/Codegen.c.
*/
const InlineOperation gDvmInlineOpsTable[] = {
+ { org_apache_harmony_dalvik_NativeTestTarget_emptyInlineMethod,
+ "Lorg/apache/harmony/dalvik/NativeTestTarget;",
+ "emptyInlineMethod", "()V" },
+
{ javaLangString_charAt,
"Ljava/lang/String;", "charAt", "(I)C" },
{ javaLangString_compareTo,
diff --git a/vm/compiler/codegen/arm/CalloutHelper.h b/vm/compiler/codegen/arm/CalloutHelper.h
index d4d1ec966..d6eb421c9 100644
--- a/vm/compiler/codegen/arm/CalloutHelper.h
+++ b/vm/compiler/codegen/arm/CalloutHelper.h
@@ -104,6 +104,7 @@ Object* dvmAllocObject(ClassObject* clazz, int flags); // OP_NEW_INSTANCE
* Functions declared in gDvmInlineOpsTable[] are used for
* OP_EXECUTE_INLINE & OP_EXECUTE_INLINE_RANGE.
*
+ * org_apache_harmony_dalvik_NativeTestTarget_emptyInlineMethod
* javaLangString_charAt
* javaLangString_compareTo
* javaLangString_equals
diff --git a/vm/compiler/codegen/x86/CalloutHelper.h b/vm/compiler/codegen/x86/CalloutHelper.h
index 735740598..3229a267b 100644
--- a/vm/compiler/codegen/x86/CalloutHelper.h
+++ b/vm/compiler/codegen/x86/CalloutHelper.h
@@ -54,6 +54,7 @@ Object* dvmAllocObject(ClassObject* clazz, int flags); // OP_NEW_INSTANCE
* Functions declared in gDvmInlineOpsTable[] are used for
* OP_EXECUTE_INLINE & OP_EXECUTE_INLINE_RANGE.
*
+ * org_apache_harmony_dalvik_NativeTestTarget_emptyInlineMethod
* javaLangString_charAt
* javaLangString_compareTo
* javaLangString_equals
diff --git a/vm/native/InternalNative.c b/vm/native/InternalNative.c
index 536f88adc..9dc61d843 100644
--- a/vm/native/InternalNative.c
+++ b/vm/native/InternalNative.c
@@ -57,6 +57,8 @@ static DalvikNativeClass gDvmNativeMethodSet[] = {
dvm_org_apache_harmony_dalvik_ddmc_DdmServer, 0 },
{ "Lorg/apache/harmony/dalvik/ddmc/DdmVmInternal;",
dvm_org_apache_harmony_dalvik_ddmc_DdmVmInternal, 0 },
+ { "Lorg/apache/harmony/dalvik/NativeTestTarget;",
+ dvm_org_apache_harmony_dalvik_NativeTestTarget, 0 },
{ "Lsun/misc/Unsafe;", dvm_sun_misc_Unsafe, 0 },
{ NULL, NULL, 0 },
};
diff --git a/vm/native/InternalNativePriv.h b/vm/native/InternalNativePriv.h
index b14a3eef2..0e5408133 100644
--- a/vm/native/InternalNativePriv.h
+++ b/vm/native/InternalNativePriv.h
@@ -107,6 +107,7 @@ extern const DalvikNativeMethod dvm_dalvik_system_Zygote[];
extern const DalvikNativeMethod dvm_dalvik_system_VMStack[];
extern const DalvikNativeMethod dvm_org_apache_harmony_dalvik_ddmc_DdmServer[];
extern const DalvikNativeMethod dvm_org_apache_harmony_dalvik_ddmc_DdmVmInternal[];
+extern const DalvikNativeMethod dvm_org_apache_harmony_dalvik_NativeTestTarget[];
extern const DalvikNativeMethod dvm_sun_misc_Unsafe[];
#endif /*_DALVIK_NATIVE_INTERNALNATIVEPRIV*/
diff --git a/vm/native/org_apache_harmony_dalvik_NativeTestTarget.c b/vm/native/org_apache_harmony_dalvik_NativeTestTarget.c
new file mode 100644
index 000000000..ccc946710
--- /dev/null
+++ b/vm/native/org_apache_harmony_dalvik_NativeTestTarget.c
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * org.apache.harmony.dalvik.NativeTestTarget
+ */
+#include "Dalvik.h"
+#include "native/InternalNativePriv.h"
+
+
+/*
+ * public static void emptyInternalStaticMethod()
+ *
+ * For benchmarks, a do-nothing internal method with no arguments.
+ */
+static void Dalvik_org_apache_harmony_dalvik_NativeTestTarget_emptyInternalMethod(
+ const u4* args, JValue* pResult)
+{
+ UNUSED_PARAMETER(args);
+
+ RETURN_VOID();
+}
+
+const DalvikNativeMethod dvm_org_apache_harmony_dalvik_NativeTestTarget[] =
+{
+ { "emptyInternalStaticMethod", "()V",
+ Dalvik_org_apache_harmony_dalvik_NativeTestTarget_emptyInternalMethod },
+ { NULL, NULL, NULL },
+};