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.

We will have a poster at Java Grande (June 12-13) in San Francisco that
describes it in more detail. The profiling makes use of inline code that
reads the Pentium timestamp register.  Below is the abstract for the poster
presentation:

  Profiling Java Programs via High-Resolution Timing Measurements

                         Nathan M. Hanish

                           William Cohen

         Department of Electrical and Computer Engineering
                University of Alabama in Huntsville
                       Huntsville, AL 35816


Abstract

Given  the  interest  in  high-performance Java  such  as  Hotspot 
[4][1],  high-resolution,   low-overhead  time   measurements  are 
required for  accurate profiling  of the executing  program. These 
time measurements  allow programmers  of applications  and runtime 
systems to identify the code  that should be examined for possible 
performance improvements.  Modifications  were made  to  the Kaffe 
Java Virtual Machine's (JVM)  Just-In-Time (JIT) translator [5] to 
generate instructions to  read the Pentium  timestamp register [2] 
and determine  the amount  of time  spent in  each method  and the 
number of times that each method  was invoked. The overhead of the 
additional instrumentation was relatively low, typically about 2%.

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 
tool     identified      class      initializers,      such     as 
/java/lang/System<clinit>, contributed  over  300  milliseconds to 
the runtime of  each program.  Additionally, the tool  was used to 
identify possible  improvements to Pizza  [3], a  Java to bytecode 
translator.

References

[1]       Ping Huang, Selecting better-performing alternative code 
          using        run-time         profiling        feedback,  
          http://www.ai.mit.edu/projects/reinventing_computing/pa-
          pers/theses/pshuang/meng/main.html,    Masters   Thesis, 
          Massachusetts Institute of Technology, June 1995.

[2]       Intel,  Intel  Architecture   Optimization  Manual,  Mt. 
          Prospect, Illinois, order number 242816-003, 1997.

[3]       Martin Odersky  and  Philip Wadler,  ``Pizza  into Java: 
          Translating  theory  into  practice,''  Proc.  24th  ACM 
          Symposium on Principles of Programming Languages, Paris, 
          France, January 1997. 

[4]       Sun, THE JAVA HOTSPOTTM PERFORMANCE ENGINE ARCHITECTURE, 
          http://www.javasoft.com/products/hotspot/whitepaper.htm-
          l, April 1999.

[5]       Transvirtual,                                     Kaffe, 
          http://www.transvirtual.com/kaffe.html, May 1999.



> 
> 
> On Sat, 5 Jun 1999, Samarjeet S Tomar wrote:
> 
> | Is there a Java profiler for kaffe ?
> 
> I don't believe Kaffe supports the "-prof" command-line option yet.
> 
> Alan
> 
> 


 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   William Cohen                                 [EMAIL PROTECTED]
   Assistant Professor
   Electrical and Computer Engineering
   College of Engineering
   University of Alabama in Huntsville           voice: 256/890-6830
   Huntsville, AL 35899                          fax:   256/890-6803
   ECE Homepage: http://www.eb.uah.edu/ece/ecehome.html
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Reply via email to