This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcj executable size reduction?


Adam Megacz wrote:

The way it works is this: you compile all your code into bytecode, it
traces reachability (including symbol tables in any CNI code) and
stubs out unreachable method with a one-line "throw new
UnsatisfiedLinkError()".  There are a few more optimizations, but
that's the main gist.

I'll look at this more closely. Does this also optimize libgcj?


The other change I made was to add -finhibit-reflection, which drops
as much reflection metadata as possible.  Class.forName() still works
and I keep enough method info to use interface dispatch (although I'd
love to do that differently).

Do you have a patch for this? Is this something that would/should be added to the source tree?

Any luck, Per?

I've added a -verbose:class to print out initializations, plus a -lgij to enable compiling a static executable. But the pieces aren't all together yet. -- --Per Bothner per@bothner.com http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]