Method probes versus callsite probes

There are two types of probes that you can use to monitor target methods.

The first type of probe is inserted anywhere within the body of a method. Because it is inserted into the target method, this type of probe is called a method probe. For method probes, the class or jar files containing the target methods are instrumented by the byte-code instrumentation (BCI) engine.

The second type of probe is inserted into the body of any method that calls the target method. Because it is inserted at the call site - that is, into the calling method, not the called method - this type of probe is called a callsite probe. For callsite probes, the class or jar files containing the methods that call the target methods are instrumented by the BCI engine.

Callsite probes are often used when you want to monitor calls from your project to a system library, or to other support classes outside your project. Callsite probes are also useful when it is difficult or impossible to instrument the class files containing the methods you want to target.

You cannot have method fragments and callsite fragments in a single probe. You can have method probes and callsite probes in a single .probe file.

Parent topic: Collecting runtime data with user-defined probes

Related concepts
Probekit overview

Related reference
Probekit Examples

Terms of use | Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.