This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Using gcj as a JIT Compiler
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: java at gcc dot gnu dot org
- Date: Fri, 3 Jan 2003 12:08:31 -0500 (EST)
- Subject: Re: Using gcj as a JIT Compiler
On Thu, 2 Jan 2003, Andrew Haley wrote:
> You may find this interesting. On the other hand, you may find it
> totally horrible!
Can it be both? :)
I don't think this is absurd. I think a similar technique would be useful
for ahead-of-time compilation... run the code and let the JIT discover
what classes are needed, then link the cached objects into a final
executable.
> Alternatively, if we could persuade ld.so to load a DSO without
> resolving all of its references we could always use direct calls.
> We'd need to split ld.so so that loading a DSO and resolving its
> references were separate actions.
How difficult could it be for libgcj to implement its own loader? Surely
less effort than an entire JIT would be.
A custom object loader could:
- load .o files directly, saving the ld pass
- allocate text & data segments on the heap
- eliminate the 4k page boundaries per class
- perform text/data relocations without the need for PIC
- read debug sections and provide file/line# info in tracebacks
A library like libelf might be a good starting point.
Jeff