On Mon, 12 Aug 2002, Andrew Haley wrote:
> As a data point, when I build my CMS app with gcj I have 7 DSOs totalling
> about 190,000 load-time relocations (not counting libgcj.so). Some of
> these are resolved lazily, most are in .data and cannot be. Startup
> time is about 2 seconds on sparc-solaris and initial memory footprint
> around 28MB. Not too impressive, compared with 1 second and 15MB for the
> JRE.
That's weird, because IME interpreted Java takes forever to start
because of lazy class loading.
Yes, but... there are some 1900 classes in my app, plus another 1326 in
libgcj.jar.
With the JRE, I see just 296 classes loaded initially, and 395 when it
reaches steady-state.
With gcj, I have to wait for ld.so to link ~3200 classes before anything
happens.
Suppose the compiled class metadata were free of pointers instead. No
relocations, except lazy function calls. The metadata could then be
constant and loaded into .rodata. Some advantages:
When thinking about the layout of the class and binary compatiblity
structures I've worked on the assumption that non-symbolic, private
relocations within the same binary object are much cheaper than symbolic
relocations (like the vtable ones) which need to be looked up globally.
If that isn't really the case then I guess we'd need to re-think the design.