[kaffe] expect advice!
Dalibor Topic
robilad at kaffe.org
Thu Nov 13 02:55:03 PST 2003
Hi Xikun,
xk s wrote:
> hello:
>
> I am a master student of BHU (bei hang university) in china. I will preparing my master thesis about Java virtual machine and just-in-time compiler next year.
>
> In kaffe document, I know it is a simple JIT, it compile each method without advanced optimization the first time this method is invoked. What do you think about hot spot VM and sophisticated adaptive online feedback-directed optimization with muti-level compiler system?
I'd like to see something like it in kaffe ;)
There are two efforts in this area: Tim Stack has done some work on
allowing re-jitting methods in JanosVM 1.0[1], a cool VM based on kaffe.
He may be able to shed some light on that.
Citing from the release notes[2]:
"* As a byproduct of the lazy loading work, support was added for
recompiling methods. Because methods with lazy lookups must go
through the sub-optimal deferral process, recompilation makes it
possible to eventually generate 'optimal' code. As such, jitted
code is now garbage collected and the finalizer thread has been
tasked with doing the actual recompiling work."
There is also a feedback framework within kaffe, that may allow for
feeding back information from the jitter to the VM core for rejitting [3].
The second effort is on another cool VM based on an earlier version of
kaffe, LaTTe[4]. According to the website, it includes an adaptive
compilation framework:
"As a research prototype for the study of run-time compilation
techniques, LaTTe includes the following features:
* Fast and effective JIT translation with:
o efficient register mapping and allocation (i.e.,
consistently taking one or two seconds for SPECjvm98 which runs 40-70
seconds with LaTTe)
o traditional optimizations (e.g., common subexpression
elimination and loop invariant code motion)
o object oriented optimizations (e.g., customization and
limited specialization)
* A limited framework for adaptive compilation, which is currently
based on method run counts.
* A reasonably fast bytecode interpreter, intended to be used with
the adaptive compilation framework.
* Lightweight monitors.
* On-demand translation of exception handlers.
* A fast non-incremental garbage collector."
The LaTTe developers seem to be interested in bringing some of their
improvements back into kaffe.
There was also an abandoned project to add the ability to integrate JIT
and interpreter in kaffe instead of having to work with a single engine
configured at compile time, based on a very old version of kaffe. The
code is here:
http://www.flux.utah.edu/~tullmann/kaffe/jitintrp/index.html
> And I think , there is no explicit transform form bytecode stack semantics to register operations as in many RISC machine. Would you think Sequence struct is a suitful IR for multi-level optimization and adptive optimization?
Unfortuntaly, I can't comment on that, as I haven't hacked on the jitter
myself (yet). I hope other, nor comepetent kaffe developers will chip in
with some advice here.
> Would you give some instruments and advices? I expected your advice earnestly.
hope this helped.
cheers,
dalibor topic
[1] http://www.cs.utah.edu/flux/janos/janosvm.html
[2] http://www.cs.utah.edu/flux/janos/janosvm-1.0/RELEASE-NOTES
[3]
http://www.kaffe.org/cgi-bin/viewcvs.cgi/*checkout*/kaffe/FAQ/FAQ.feedback?rev=HEAD
[4] http://latte.snu.ac.kr/
More information about the kaffe
mailing list