This information applies to the command-line interface (vtl) only.
Use the VTune(TM) Performance Analyzer to monitor and sample your JIT-compiled Java* code. The VTune analyzer gets the names of the active methods along with their load addresses, sizes, and debug information from the JIT/VM and keeps this data in an internal file. This data is used for later processing and displaying results.
When your Java application executes, the Just-in-Time (JIT) compiler converts your VM bytecode to native machine code. Depending on your Java environment, either the VM or the JIT provides the VTune analyzer with information about active Java classes and methods, such as their memory addresses, sizes, and symbol information. The VTune analyzer uses this information to keep track of all the classes and methods loaded into memory and the processes that are executed. It also uses this information for final analysis.
vtl activity <name> -c sampling -o "<java_options> <sampling_options>" -app <jvm_name>,"[JVM_options] <java_class/JAR_filename>" run
where:
<java_options> is one of the following:
java if your application is a Java application;
jitprofiling if your application uses JITProfiling API;
applet if your application is a Java applet.
<sampling_options> are sampling collector configuration options;
<JVM_name> is the full path to the JVM executable;
[JVM_options] are any JVM options, such as -cp <class_path>, -Xms;
<java_class/JAR_filename> is the name of the main class or .jar file, for example: MyAppClass, MyPackage.MyAppClass, or MyJarFile.jar.
Command-line examples:
>vtl
activity -d 120 -c sampling -o ”r;java”
-app /opt/SunJVM/bin/java,
”-jar ~/jarfiles/Java2Demo.jar”
run
In this example, the VTune analyzer samples Java2Demo.jar application for 120 seconds.
>vtl activity -d
180 -c sampling -o "java -cal no" -app
/usr/java/j2sdk1.4.1/bin/java,"-cp ~/java Xform" run
In this example, the VTune analyzer runs the java launcher to sample the Xform application located in the ~/java directory. The Activity duration is 180 seconds.
When sampling a Java application using the 32-bit JVM on the Intel(R) 64 architecture-based systems, enter from the command line before running vtl:
>source /intel/vtune/bin/clscript.common