We tried JIT profiling with oprofile 0.9.4, and found two problems.

1) IBM JDK 1.5.0 - No source line number information can be got in opm file.
We noticed that some JVMs cannot provide debug information according to http://oprofile.sourceforge.net/doc/getting-jit-reports.html. But as I know, AIX tprof can get source line number information from IBM JVM. So I think IBM JVM can provide debug information.

2) SUN JDK 1.5.0 - Source file in opm file is wrong.
Here is one JIT symbol java.lang.String.indexOf, but its file name is PrintStream.java.
<symboldata id="486" name="int java.lang.String.indexOf(char[], int, int, char[], int, int, int)" file="PrintStream.java" line="742" startingaddr="b28a58e0"/>

Here are steps we run oprofile.

1.Install oprofile command:
# ./configure --with-kernel-support --with-java=/opt/ibm/java2-i386-50
# make
# make install

2.Run command:
# oprofiled -v
oprofile 0.9.4 compiled on Jan 9 2009 06:13:35

# opcontrol --event=default
# opcontrol --deinit
# opcontrol --init
# opcontrol --reset
# opcontrol --setup --separate=all
# opcontrol --no-vmlinux
# export LD_LIBRARY_PATH=/usr/local/lib/oprofile
# export PATH=/opt/ibm/java2-i386-50/bin:$PATH
# opcontrol --start
# java -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pxi32dev-20081129 (SR9-0 ))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223-20081129 (JIT enabled)
J9VM - 20081126_26240_lHdSMr
JIT - 20081112_1511ifx1_r8
GC - 200811_07)
JCL - 20081128

# java -agentlib:jvmti_oprofile=debug MultiThread.class
# opcontrol --stop
# opcontrol --dump
# opreport -l /opt/ibm/java2-i386-50/bin/java -g -d --xml -o Multi_x86.opm


Best Regards,

Qi Liang (มบ์๗)
System Performance Tools
China Systems and Technology Lab, IBM Shanghai
Tel : 86-21-60928135
Email: liangqi@cn.ibm.com