diff options
author | Jim Huang <jserv@0xlab.org> | 2010-09-13 20:04:09 +0800 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2010-11-20 02:14:14 -0500 |
commit | 51ab0adb191273f9e28441724f1384c31779c125 (patch) | |
tree | 6d8586ff48142d7f59f8b4056a61b54c21da0bcc /vm/Init.c | |
parent | 27ed151a61235e67a22629df8b66a01bc16e4502 (diff) | |
download | android_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.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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) { |