Collecting probe data: Basic usage

To collect probe data, select and configure the probes that you want to use when you define a profiling configuration in the Profile dialog box. The probes will be applied each time you use the profiling configuration to launch your application in the workbench.

Note: These basic usage instructions are intended for applications that you can launch from the Profile dialog box, which constructs a Java™ command line, including the -Xrun option, to run the application. The instructions also assume that you are using Agent Controller, as well as the JVMPI agent piAgent, on the machine from which you want to collect data.

If your application cannot be launched from the Profile dialog box, or if you cannot use Agent Controller or piAgent, refer to Collecting probe data: Special situations.

To use probes with a profiling configuration:

  1. Open the Edit Profiling Set dialog box. To do this, from the main workbench menu in the Profiling and Logging perspective, select Run > Profile. In the Profile dialog box, select or create a profiling configuration, then select the Profiling page. In the Overview page, select a profiling set and profiling type, then click Edit, and then click Next.
  2. In the profiling types tree, expand Probes, then select Probe Insertion. The Probe Insertion page displays a list of the probes in your Probekit registry, all of which are available for you to use.
  3. Select the check boxes next to the probes that you want to apply. These probes will be applied each time you launch your application in the workbench using the current profiling configuration.
  4. If you do not want to use the default filter set, specify a different filter set to target the classes and methods for which you want to collect data. You can specify custom filter sets that apply only to the probes that you have selected, or standard filter sets that apply generally to profiling data collection. If you specify both, the custom filters override the standard filter sets for the selected probes.
    Attention: Profiling filter sets are global. Changing, renaming, or removing a filter set will affect all profiling sets that use the filter set. If you want to change or rename a filter set, make a backup copy of the filter set before modifying it.

    To specify custom filter sets:

    1. Below the list of probes, click the Filters tab.
    2. Select the check box for Use custom filters (instead of standard profiling filters) for selected probe.
    3. Select a filter set, or click Add to configure a new set.
    4. To edit the filter set, click Add, Edit, or Remove.
    5. Click Finish, or, if you also want to specify a standard filter set, click Next.

    To specify a standard filter set to apply generally to profiling data collection:

    1. Click Next.
    2. Select a filter set, or click Add to configure a new set.
    3. To edit the filter set, click Add, Edit, or Remove.
    4. Click Finish.

    For more information about how filter sets and probe target specifications determine which classes and methods are instrumented, see Probe targets and filters

  5. When you have finished selecting and configuring probes, click Finish. The names of the probes you selected are displayed in the contents list for the profiling set.
    Note: Data collection limits that you specify on the Limits page of the Profiling dialog box do not apply to probes.
  6. To launch and profile your application, click Profile. Your application starts, and profiling begins. The probes you selected are applied according to their filter rules.
    Note:

    When you use the Attach - Java process launch configuration, the probes will be applied only to classes that are loaded after you attach to the Java process. If a class is loaded before you attach, the probes will not be applied to the class.

    When you detach, the probes that have been applied will continue to collect data. In addition, they will continue to be applied to new classes that are loaded, provided that the target specifications and the filter patterns for the probes match the class names.

    If you re-attach to the process, you can apply additional probes. If you do this, the new probes and the old probes will both operate. The targets and filters of each will be compared with the names of new classes that are loaded, and each will be applied to matching classes.

Related tasks
Managing the Probekit registry
Importing probes into the Probekit registry
Related reference
Probe Insertion page, Edit Profiling Set dialog box
Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.