Considerations for Java

Before Java™ programs can be sampled, the J9VM support in Application Performance Analyzer must be enabled. Contact your systems programmer to verify whether this support is enabled.

Measuring a Java application requires loading a JVMTI agent to obtain Java samples. There are two ways that this can be accomplished:
  • Use a preloaded JVMTI agent. This is the recommended option.

    This option loads the JVMTI agent when the target Java job is started. The agent remains alive until the Java job terminates. The agent sits in a wait state until a sampling session is requested. After the sampling session completes, the agent returns to a wait state.

  • Use a dynamically loaded JVMTI agent.

    This option loads the JVMTI agent at the time that a sampling session is started. The JVMTI agent is loaded using the Java Attach API. The agent runs only for the duration of the sampling session.

Application Performance Analyzer can be configured to support one of these options, not both. Contact your systems programmer to find out which of these two options your installation is using.

Only one observation at a time is supported for a specific Java address space.

IMS™ Java programs are supported in Java Message Processing (JMP) and Java Batch Processing (JBP) regions by using the preloaded Application Performance Analyzer JVMTI agent.

CICS® Java programs are supported for CICS/TS 4.2 and above.

Application Performance Analyzer will stop sampling Java programs when the main thread ends, even if the specified number of samples has not been reached.

Java measurement reports are unrelated to CPU Usage Analysis and CPU Wait Analysis reports, since Java samples are extracted by running a JVMTI agent asynchronously with CPU samples.

Java calls that are observed with a native method at the top of the call stack are only included in the Service Time reports. This is because the J9VM does not know whether the native method is executing, waiting, or queued for execution.

Java native methods are identified in the method detail pop-up window of Java Service Time reports.