Launching or attaching to a process for profiling

The Profiling Tool provides the ability to attach to a running application or to launch an application for profiling.
Attaching to an application means that a monitor is created to contain the results observed by an associated agent.
Launching a process means that the process is started with an agent is associated with to process, and a monitor is created to contain the results observed by the agent.

Whenever you launch or attach to a Java process, a logical representation of the Java process is created in the Profiling Monitor view. This representation, the process object, is identified both by name and an ID number (PID) that appears in the view along with the associated agents.

Attaching to an application

  1. From the Profiling and Logging Perspective, click on the Profile profiling icon drop-down menu, and select Profile... The Profile wizard opens.
  2. Double click on Attach - Java Process. A new configuration is created.
  3. Under the Host tab, specify the Host name or IP address and the Agent Controller port (if different from the default).
  4. Select the agents that are associated with the process ID you want to attach to.
  5. Use the arrow keys to select the agent.
    Hint: Click Refresh at any time to get a list of agents.
  6. Select the Monitor tab. Configure the profiling filters as required. Refer to the Specifying profiling criteria topic for more information on configuring the profiling filters.
  7. Click Apply to apply the changes.
  8. Click Profile to attach to the application.
  9. The Profiling Monitor view is refreshed displaying the agent representing your application. The workbench console opens, displaying program input and output.

Launching an application

To either launch a local or a remote Java process, follow these steps:

  1. From the Profiling and Logging Perspective, click on the Profile profiling icon drop-down menu, and select Profile... The Profile wizard opens.
  2. There are several types of Java processes that can be launched:
  3. Select the Monitor tab. Configure the profiling filters as required. Refer to the Specifying profiling criteria topic for more information on configuring the profiling filters.
  4. Click Apply to apply the changes.
  5. Click Profile to attach to the application.
  6. The Profiling Monitor view is refreshed displaying the agent representing your application. The workbench console opens, displaying program input and output.

Once your application is being profiled, you can perform a number of other data collection activities on the application such as collecting object references and garbage collection.

Note. The iSeries JVM requires the following options to generate method entry and exit events for method statistics:

      -Dos400.enbprfcol=1 -Djava.compiler=jitc

Related concepts
Overview of the Profiling Tool
Profiling resources

Related tasks
Collecting object references
Studying garbage collection
Profiling an application in stand-alone mode
Profiling with a local deployment
Specifying profiling criteria
Using the Profiling Monitor view