Benchmark of Dalvik VM on Beagleboard/armv7

361 views
Skip to first unread message

Jim Huang

unread,
Nov 14, 2009, 12:32:42 AM11/14/09
to 0xlab...@googlegroups.com
Hello list,

Android eclair snapshot now goes public[1], and it includes ARMv7 and
Just-In-Time compiler support. I took some experiments on Beagleboard
(TI OMAP353x/ARMv7) at 500 HMHz. Here are my score results by
CaffeineMarkEmbedded:

Donut original
--------------------
Sieve score = 950 (98)
Loop score = 775 (2017)
Logic score = 1104 (0)
String score = 1898 (708)
Float score = 772 (185)
Method score = 1032 (166650)
Overall score = 1034

Donut + 0xlab hacks
------------------------------
Sieve score = 951 (98)
Loop score = 775 (2017)
Logic score = 1105 (0)
String score = 2042 (708)
Float score = 828 (185)
Method score = 1032 (166650)
Overall score = 1060

Eclair + armv7
--------------------
Sieve score = 956 (98)
Loop score = 783 (2017)
Logic score = 1099 (0)
String score = 2019 (708)
Float score = 819 (185)
Method score = 1103 (166650)
Overall score = 1069

Eclair + armv7 + JIT
------------------------------
Sieve score = 2345 (98)
Loop score = 3629 (2017)
Logic score = 5618 (0)
String score = 4328 (708)
Float score = 1495 (185)
Method score = 1954 (166650)
Overall score = 2907

So, it brings 1.74x performance improvement with Eclair's Dalvik VM +
ARMv7 + JIT compiler.

Sincerely,
Jim Huang (jserv)
http://0xlab.org/

[1] http://android.git.kernel.org/

Jim Huang

unread,
Nov 15, 2009, 9:17:03 AM11/15/09
to 0xlab...@googlegroups.com
2009/11/14 Jim Huang <js...@0xlab.org>:
> Android eclair snapshot now goes public[1], and it includes ARMv7 and
> Just-In-Time compiler support.  I took some experiments on Beagleboard
> (TI OMAP353x/ARMv7) at 500 HMHz.  Here are my score results by
> CaffeineMarkEmbedded:
>

NOTE: the results were measured in Donut based environment. That is,
there are some changes for Eclair backport to Donut without replacing
the libcutils and bionic, which were modified a lot in Eclair.

If you would like to introduce Eclair's Dalvik VM in Donut based
products (especially for 3rd-party components compatibility), feel
free to apply the attached patches and rebuild Android.

Here are the instructions:
# cd android-donut
# mv dalvik dalvik-orig
# . build/envsetup.sh
# git clone git://android.git.kernel.org/platform/dalvik.git
# cd dalvik
# git apply dalvik-eclair-backport.patch
# mm
# cd ../frameworks/base
# git apply frameworks-base-eclair-backport.patch
# mm -B
# cd ../../
(Do copy out~system to your target.)

ARMv7 and JIT compiler were enabled by these patches.

Thanks,
dalvik-eclair-backport.patch
frameworks-base-eclair-backport.patch

Jim Huang

unread,
Nov 16, 2009, 9:21:32 PM11/16/09
to 0xlab...@googlegroups.com
Reference results of the comparisons donut-dalvik and eclair-dalvik (armv7+jit):

http://code.google.com/p/rowboat/wiki/Benchmarks

Donut
--------
CPU: Dhrystones: 40716.0 stones/sec
CPU: Whetstones(10): 26806.0 KWIPS
CPU: Himeno: 3.2980000972747803
CPU: Spectral Normalization: 1934.0 msec

Eclair
--------
CPU: Dhrystones: 58295.0 stones/sec
CPU: Whetstones(10): 46722.0 KWIPS
CPU: Himeno: 2.1910001039505005
CPU: Spectral Normalization: 1248.0 msec

Regards,

David Wang

unread,
Nov 20, 2009, 10:19:19 PM11/20/09
to 0xlab-devel
Hi Jim,

I'm trying to get eclair dalvik vm working on my donut branch with the
htc magic. I've gotten everything to build but when I enable JIT I
get the following errors. Any help would be appreciated.

build/core/copy_headers.mk:15: warning: overriding commands for target
`out/target/product/sapphire-open/obj/include/libpv/
getactualaacconfig.h'
build/core/copy_headers.mk:15: warning: ignoring old commands for
target `out/target/product/sapphire-open/obj/include/libpv/
getactualaacconfig.h'
No private recovery resources for TARGET_DEVICE sapphire-open
Checking API: checkapi-last
(unknown): error 13: Class java.util.concurrent.TimeUnit changed final
qualifier
(unknown): error 18: Class
java.util.concurrent.locks.AbstractQueuedSynchronizer superclass
changed from java.lang.Object to
java.util.concurrent.locks.AbstractOwnableSynchronizer

******************************
You have tried to change the API from what has been previously
released in
an SDK. Please fix the errors listed above.
******************************


make: *** [out/target/common/obj/PACKAGING/checkapi-last-timestamp]
Error 38


Thanks,
Dave

David Wang

unread,
Nov 20, 2009, 10:34:13 PM11/20/09
to 0xlab-devel
I fixed the API error by running, make update-api, but I'm getting
undefined reference to errors:

make: *** [out/target/common/obj/PACKAGING/checkapi-last-timestamp]
Error 38
make: *** Waiting for unfinished jobs....
out/target/product/sapphire-open/obj/SHARED_LIBRARIES/
libdvm_intermediates/compiler/Compiler.o: In function
`dvmCompilerShutdown':
/home/dwang/android-donut/dalvik/vm/compiler/Compiler.c:256: undefined
reference to `gDvmJit'
out/target/product/sapphire-open/obj/SHARED_LIBRARIES/
libdvm_intermediates/compiler/Compiler.o: In function
`dvmCompilerSetupCodeCache':
/home/dwang/android-donut/dalvik/vm/compiler/Compiler.c:179: undefined
reference to `gDvmJit'
out/target/product/sapphire-open/obj/SHARED_LIBRARIES/
libdvm_intermediates/compiler/Compiler.o: In function
`dvmCompilerWorkEnqueue':
/home/dwang/android-donut/dalvik/vm/compiler/Compiler.c:90: undefined
reference to `gDvmJit'
out/target/product/sapphire-open/obj/SHARED_LIBRARIES/
libdvm_intermediates/compiler/Compiler.o: In function
`dvmCompilerStartup':
/home/dwang/android-donut/dalvik/vm/compiler/Compiler.c:237: undefined
reference to `gDvmJit'
out/target/product/sapphire-open/obj/SHARED_LIBRARIES/
libdvm_intermediates/compiler/Compiler.o: In function
`dvmCompilerDrainQueue':
/home/dwang/android-donut/dalvik/vm/compiler/Compiler.c:100: undefined
reference to `gDvmJit'
out/target/product/sapphire-open/obj/SHARED_LIBRARIES/
libdvm_intermediates/compiler/Compiler.o:/home/dwang/android-donut/
dalvik/vm/compiler/Compiler.c:149: more undefined references to
`gDvmJit' follow

Jim Huang

unread,
Nov 24, 2009, 12:57:44 AM11/24/09
to 0xlab...@googlegroups.com
2009/11/21 David Wang <dwa...@gmail.com>:
> I fixed the API error by running, make update-api, but I'm getting
> undefined reference to errors:
>

hi David,

Could you confirm that JIT related macros were defined in your build process?

Also, please avoid building from toplevel. That is, the hack only
works while going through the components with 'mm'.

Thanks,
Reply all
Reply to author
Forward
0 new messages