This is the mail archive of the
mailing list for the GCC project.
Re: [JAVA,libtool] Big libjava is biiiig.
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: Dave Korn <dave dot korn dot cygwin at googlemail dot com>, java at gcc dot gnu dot org, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Wed, 06 May 2009 17:56:08 +0100
- Subject: Re: [JAVA,libtool] Big libjava is biiiig.
- References: <4A01B55C.firstname.lastname@example.org> <4A01B621.email@example.com> <4A01BD26.firstname.lastname@example.org>
Andrew Haley wrote:
> Dave Korn wrote:
>> 1) Would this be a reasonable approach, specifically i) in adding a configure
>> option to cause sublibraries to be built, and ii) in using gmake's $(filter)
>> construct to crudely subdivide the libraries like this?
> At program startup the first library would be loaded, it would load
> the next, and so on. There are a few parts of libgcj that are truly
> independent, but I suspect that you'd always load almost all of it.
> So, you'd have longer startup time for loading all those files.
Compared to a single DLL that is unusably malformed because it exceeds
system limits, that's still an improvement :)
> With regard to GNU libc platforms:
> You'd no longer be able to make so much use of fast calls between
> functions in the same library; you'd have to go via the PLT.
> Also, dl_iterate_phdr() is used a great deal (for finding exception
> regions, garbage collection, etc.) and it linearly scans the libraries
> that are loaded. So, the more libraries you have loaded, the slower
> it goes.
> Now, I don't know how much of these characteristics are shared by
> Windows, but I imagine some of them are.
Yes, the inter-library calls would have to be dllimports and go through
stubs (one extra indirect branch). I don't know how dl_iterate_phdr works on
win32 but I imagine that it's also linear in the number of libs.
> So, I suspect your best bet would be to split libgcj into core and
> non-core libraries and not slice much more thinly than that. I can
> advise you what is core and what isn't.
Please do, I'll happily try that approach since it might significantly
simplify my inter-dependences problems.