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. The instructions also assume that you are using Agent Controller, as well as the JVMPI or JVMTI agent 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. From the main workbench menu in the Profiling and Logging perspective, select Run > Profile. In the Profile dialog box, select or create a profiling launch configuration, then select the Profile Settings tab. Select the Probe Insertion profiling type and click on Edit Options.
  2. The Probe Insertion page displays a list of probes in your workspace, 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: The standard 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.

    In most scenarios you wouldn't need to specify custom filter sets. In most cases the standard filter sets are sufficient. If you do want to apply custom filters, follow the instructions below:

    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 on Finish to close the option page for probes
  6. To specify a standard filter set to apply generally to profiling data collection:

    1. Select Java Profiling in the Profile Settings tab and click on Edit Options
    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.

    Note: Data collection limits that you specify on the Limits page do not apply to probes.
    For more information about how filter sets and probe target specifications determine which classes and methods are instrumented, see Probe targets and filters

  7. When you have finished selecting and configuring probes, click Profile. Your application starts with the probes embedded in it. 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 reference
Probe Insertion page Collecting probe data: Special situations