Tools Home

Common Usage of the Tools

UsageOverview
--------------------------------     -------------
CPU profiling TPROF
CPU Utilization AI
Java Callflow (Generic) JPROF
Java Lock Monitor JLM
Heap dump HDUMP
Instruction Tracing ITRACE
The trainer Program trainer


All of the following examples use the JVM Profiler Interface (JVMPI) to invoke our Java Profiler (JPROF). However, JVMPI is no longer supported after Java 5. Its replacement, the JVM Tools Interface (JVMTI), is available on all Java versions beginning with Java 5.

To use JVMTI instead of JVMPI, simply replace -Xrunjprof: with -agentlib:jprof= wherever it appears below.


Back to TOP

CPU Profiling (TProf)


Back to TOP

CPU Utilization (AI)

    1. Execute swtrace ai

    2. Output is written to stdout

      swtrace


Back to TOP

Java CallFlow (Generic/Gencalib)


Back to TOP

Java Lock Monitor

    1. Start your Java application with the following command:

      java   -Xrunjprof:classloadinfo[,logpath=path]   classfile

      • classloadinfo enables the tracking of classes

      • logpath=path sets the path directory as the location for the JPROF output files. Use the appropriate slash ("/" or "\") for your operating system.

    2. For runtime control, you must execute rtdriver -l in another window

      • jlm | jlmstart
      • jlml | jlmstartlite
      • jd | jlmdump
      • jreset | jlmreset
      • jstop | jlmstop

    3. Output is in log-jlm.n

      jlm . jprof . rtdriver


Back to TOP

Heapdump


Back to TOP

Instruction Trace ( ITrace )

    Instruction trace (ITrace) is performed by the following steps:

    1. Execute run.itrace in a window and follow the prompts until you are asked to press Enter to begin tracing.

    2. Start your application in another window.

      If it is a Java application, use the following command:

      java   -Xrunjprof:itrace[,logpath=path]   classfile

      • logpath=path sets the path directory as the location for the JPROF output files. post requires a corresponding -jdir path/log option to locate these files. Use the appropriate slash ("/" or "\") for your operating system.

    3. Press Enter when you are ready to begin tracing.

    4. Press Enter again when you are ready to end tracing.

      swtrace . itrace . post . jprof .


Back to TOP

The trainer Program

Tools Home