Cross-class inlining

Andrew Haley aph@redhat.com
Wed Oct 22 12:17:00 GMT 2003


Robin Garner writes:
 > So it does !
 > 
 > Only seems to work if I compile the whole system in a single command, though.

The inler does its work at the source tree level, so it needs all the
source code.

 > Under what circumstances does it do this inlining ?  I tried this:
 > 
 > gcc -O3 -o a.o a.java
 > gcc -O3 -o b.o b.java a.java
 > gcc -O3 -o c.o c.java a.java
 > gcc -O3 -o d.o d.java c.java a.java
 > 
 > etc, where I know (from profiling and hand tinkering) that inlining
 > methods from the rightmost classes in the leftmost ones produced a
 > good speedup.  This didn't seem to work at all.

I have no idea why it didn't work.  Inlining should be independent of
the order of source files.  Maybe you're using an old gcj release?

 > Still, the "all in 1" approach gets a 49% speedup over just -O3 on
 > individual modules, and 17% better than I could do by hand.
 > 
 > And for your interest, JMTk, the memory management subsystem of
 > Jikes RVM now compiles and runs with gcj.  Still quite limited
 > (only 1 of the JMTk collectors so far), and only in a testbed
 > environment.  Performance, however, is great (and now even better).

Cool.

Andrew.



More information about the Java mailing list