OSDN Git Service
Use GCC visibility to reduce the size of libdvm by 10%
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