This is the mail archive of the
java-patches@sources.redhat.com
mailing list for the Java project.
Re: PATCH: Speed up libgcj build
- To: Jeff Sturm <jeff dot sturm at appnet dot com>
- Subject: Re: PATCH: Speed up libgcj build
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 13 Oct 2000 17:22:12 -0200
- Cc: Bryce McKinlay <bryce at albatross dot co dot nz>, java-patches at sourceware dot cygnus dot com
- Organization: GCC Team, Red Hat
- References: <39E69DEC.4FFCCEEA@albatross.co.nz> <39E71CFB.89A9992F@appnet.com>
On Oct 13, 2000, Jeff Sturm <jeff.sturm@appnet.com> wrote:
> Bryce McKinlay wrote:
>> This patch speeds up the .java->object file stage of the libgcj build
>> quite a lot. It appears that passing the -I flag to gcj forced it to
>> only parse .java source files and not use the already-built .class files
>> for its dependencies (which is much faster). With this, the time to
>> build java/lang/String.java, for example, goes from about 1.5 seconds to
>> 90ms for me.
> I think Alex said the -I flag was for inlining methods across
> classes.
Not only that. I'm pretty sure there was something that broke without
it, but I'd have to build from scratch to remember what it was :-(
>> 1. Running "sh ./libtool --mode=compile" for every single .java file is
>> now actually far slower than running the compiler itself. I really wish
>> we could avoid it.
> You should see libtool run on a show shell (e.g. bash under Cygwin).
> I really, really wish libtool ran in perl, or something with a
> little speed...
There are plans on moving to C (with a shell-script as a fallback,
when no CC_FOR_BUILD is available). Bruce Korb is the one to blame :-)
Stay tuned in libtool@gnu.org :-)
>> 2. Can someone remind me why the .java->.class stage was changed to run
>> gcj separately for every file?
To avoid limits on command-line size.
>> This is now the slowest part of the compile by far.
Wasn't it already?
>> -GCJCOMPILE = $(LIBTOOL) --mode=compile $(GCJ) -fassume-compiled -fclasspath=$(here) -L$(here) $(JC1FLAGS) -c
>> +GCJCOMPILE = $(LIBTOOL) --tag=GCJ --mode=compile $(GCJ) -fassume-compiled -fclasspath=$(here) -L$(here) $(JC1FLAGS) -c
> What is --tag=GCJ for?
It tells the multi-language libtool that the configuration for GCJ is
to be used. Without it, libtool uses the first non-libtool arguments
in the command line (namely, $(GCJ)) to decide what configuration to
use.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me