Status of mix jit/intrp
skumars at earthlink.net
Mon Dec 7 20:21:42 PST 1998
Due to time constraints and other things, I am no longer doing
anything with it.
I am willing to upload the source in the form of a CVS repository
tar ball to some place so that interested pple
can poke at it. I am too lazy to create my
web page :-)
The base line is the b2 release of Kaffe.
Here is the aprx status.
1. Exceptions are not 100 % there. I think this must
be some subtle and hard to find bug somewhere in the
stuff I have done.
2. Only for i386-Linux and only static libraries.
3. The timing measurements assume a Pentium (I have P-75).
Apparently the pentium has two addresses wherein one
can get the system clock ticks as a 64 bit thing. I used
this to get 9-15 nanosecond accuracy.
4. Timing improvements are there only for trivial code. eg.
the stuff I posted about compiling hello world. There are
a lot of areas to further reduce timing. Verifying only
5. There is no doubt that mixing stuff helps in short lived
programs. The real benefit of mixing is probably in
inlining code and then JIT'ing it etc. after getting interesting
info at runtime.
6. I think I have a flag called -stat which prints out interesting
info on all the called methods. number of branch instructions,
exceptions blocks, switch statements, time to interpret etc.
There is actually quite an interesting heuristic that I use
to determine when to JIT compile some method. Perhaps I should
write a latex doc to explain this thing.
This is a really cool area to work on and is
probably an ideal M.S. thesis, because a lot of work can
be done. I have barely scratched the surface. I am surprised
that no one seems to be doing anything on this?? I can see
the number of papers on could publish on this topic :-)
Some problem areas as far as performance is concerned.
1. The latency in switching from JIT -> intrp and vice
versa adds up and contributes to the overall time.
I tried to start on this, but felt too lazy.
It is my *belief* that this causes performace to
degrade. This should be easy to verify.
2. The structure of the code needs to be modified
with the view of having a mixture. Should make
it more efficient. eg. verification etc.
3. Perhaps GC could be improved upon.
As a note to folks who might try to go further than
I have gone, getting Kaffe to do mixture is actually
quite trivial, provided one has a basic understanding
of assembler and how the frame pointer is used etc.
I never knew what the %bp was for in a PC. Now I know :-)
The other interesting part was the trapoline.
Once I figured this out the rest was just routine.
Whatever I have done builds on the work done by
Transvirtual and others on this list and is GPL.
I guess I will have to add a statement like this
in a readme file within the tar ball to avoid
More information about the kaffe