summaryrefslogtreecommitdiffstats
path: root/vm/Init.c
diff options
context:
space:
mode:
authorJim Huang <jserv@0xlab.org>2010-09-13 20:04:09 +0800
committerSteve Kondik <shade@chemlab.org>2010-11-20 02:14:14 -0500
commit51ab0adb191273f9e28441724f1384c31779c125 (patch)
tree6d8586ff48142d7f59f8b4056a61b54c21da0bcc /vm/Init.c
parent27ed151a61235e67a22629df8b66a01bc16e4502 (diff)
downloadandroid_dalvik-51ab0adb191273f9e28441724f1384c31779c125.tar.gz
android_dalvik-51ab0adb191273f9e28441724f1384c31779c125.tar.bz2
android_dalvik-51ab0adb191273f9e28441724f1384c31779c125.zip
Use GCC visibility to reduce the size of libdvm by 10%froyo-stablefroyo
Originally, libdvm exports many ELF symbols, but Zygote and other applications don't really depend on all of them. This change hides most of the symbols which would have previously (and unnecessarily) been public. This means, it improves load time of libdvm, and the link optimizer could produce better code as well. The technique is applied in the "Performance" profile. Reference experimental results of Qualcomm MSM7x25: (524 MHz) [before] (1) number of ELF symbols (when WITH_JIT=true) # arm-eabi-nm --dynamic ./system/lib/libdvm.so | grep "T " | wc -l 1222 (2) dlopen/dlsym time 76906 us (3) code size ./system/lib/libdvm.so 601480 bytes [after] (1) number of ELF symbols (when WITH_JIT=true) # arm-eabi-nm --dynamic ./system/lib/libdvm.so | grep "T " | wc -l 58 (2) dlopen/dlsym time 72296 us (3) code size ./system/lib/libdvm.so 540016 bytes * dlopen/dlsym time: the time consumption from dlopen "libdvm" to dlsym "dvmPrepForDexOpt" Change-Id: I47fcf0da1acd970ff136378661360d3328c9c6c0
Diffstat (limited to 'vm/Init.c')
-rw-r--r--vm/Init.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/vm/Init.c b/vm/Init.c
index 66303958c..ab1be0eee 100644
--- a/vm/Init.c
+++ b/vm/Init.c
@@ -1491,6 +1491,7 @@ static bool dvmInitJDWP(void)
*
* Returns 0 on success.
*/
+DVM_EXPORT
int dvmPrepForDexOpt(const char* bootClassPath, DexOptimizerMode dexOptMode,
DexClassVerifyMode verifyMode, int dexoptFlags)
{