Probe targets and filters

Probekit uses two sets of rules to determine whether a given method is to be instrumented: rules specified in the target specifications part of the probe definition, and rules specified as filters in the Profile dialog box when you launch your application. Both target specifications and filters affect whether a probe is applied to a given method, even if you do not specify them explicitly.

For a probe to be applied to a given method, both sets of rules must result in the method being marked "included."

To determine whether a set of rules includes the method, Probekit considers each rule one by one, in the order in which you have arranged them, and checks the package, class, and method name for the method against the patterns in the rule. As soon as there is a match, the method is marked "included" or "excluded," as stated in the rule. This first match determines the results for the method; no other rules are checked. There is an implicit "include all" rule at the end of each set, so if a set is empty, or if there is no rule whose patterns match the method, the method is included.

To probe a specific method or set of methods, you can use target specifications, filters, or a combination of both:

Related reference
Collecting probe data: Basic usage