William, Nathan, > > Actually, one of my students, Nathan Hanish, at the University of Alabama in > Huntsville added profiling to Kaffe's JIT for the IA-32 architecure this > spring. We haven't released it yet. We are hoping we could incorporate it > into the new code generator that is suppose to be out soon. That sounds really great! If I may make my opinion known, I believe it would be unwise to wait for the new code generator. I believe that the profiling/timing support is almost completely independent anyway. > > number of times that each method was invoked. The overhead of the > additional instrumentation was relatively low, typically about 2%. This is a bit paperese, if I may say so. ;-) If you take a JIT as bad as Kaffe's as a baseline, no wonder you end up with a "relatively low" overhead. The number of cycles or microseconds per function invocation may have been a more informative number, although even that is processor dependent. > > This high-resolution profiling enhanced Kaffe JVM was used to > profile a number of benchmark programs and several possible > performance improvement were identified for Kaffe's Java Virtual > Machine. The profiling tool showed approximately one quarter of > the methods were invoked only once during the execution of the > programs and that there was an overhead of 1.5 microseconds per > method invocation to check for the stack overflow. The profiling Needless to say, the right thing to do is to inline the stack overflow check. From usually well-informed sources I can tell you that that will be part of the new jit. Some architectures, such as the ARM, even suggest in their procedure calling conventions the instruction to use to inline that test so that it takes only a few cycles. > tool identified class initializers, such as > /java/lang/System, contributed over 300 milliseconds to > the runtime of each program. Additionally, the tool was used to For these, the obvious solution is to not jit them (a la hotspot) --- but we need the infrastructure for that in place! Somebody (check the mailing list archives please) did this already, but like so many things it was either never released or never made it back into the distribution (I think the former). - Godmar