Command Line Interface
The runtime analysis tools for Java covered in this section include:
Performance Profiling
Code Coverage
Runtime Tracing
These features use Source Code Insertion (SCI) technology. Memory Profiling for Java relies on JVMPI instead of SCI technology.
The easiest way to implement SCI from the command line is to use the Java Instrumentation Launcher: javic. The product provides two methods for use of javic:
Java Instrumentation Launcher: designed to fit directly into your compilation sequence; simply add the javic command in front of your usual compilation or link command line
Java Instrumentation Launcher for Ant: this integrates javic with the Apache Jakarta Ant utility
For details of command line usage and option syntax, see the Reference section.
To perform runtime analysis on Java source code:
First, set up the necessary environment variables. See Setting environment variables.
Edit your usual makefile by adding the Java Instrumentation Launcher to the command line:
javic [-options] -- <compiler command line>
Where <compiler command line> is the command that you usually invoke to build your application.
Please refer to the Instrumentation Launcher section of the Reference section for information on the options and settings.
After execution, to obtain the final test results, as well as any trace dump information, you need to separate the output file into separate result files:
For Memory Profiling for Java, the studio command splits the .jpt JVMPI trace dump file.
For all other features, the atlsplit command splits the .spt SCI trace dump file.
See Splitting the trace dump file for details about this task.
Finally, launch the Graphical User Interface to view the test reports. See Opening reports from the command line.
Related Topics
Runtime Analysis | Source Code Insertion Technology | JVMPI Agent | Java Instrumentation Launcher - javic |