The executableUnit probe fragment

The executableUnit probe fragment lets you perform fine-grained data collection for methods that match the probe's target and filter specification, and that have source code information available.

A call to this type of fragment is inserted before every "executable unit" in the target method. For methods that match the the probe's target and filter specification but have no source code information, the fragment is inserted once, at the start of the method.

executableUnit fragments can use all data item types except returnedObject, exceptionObject, isFinally, and thisObject. Most importantly, they can use the executableUnitNumber data item, which contains the number of the executable unit that is about to execute.

The number of executable units in a method and in the line tables will not include executable units inserted into the method by Probekit.

Executable units and basic blocks

An executable unit begins at the start of every basic block, and at every byte code whose source line number is different from the previous byte code. A basic block is a region of byte code instructions that cannot be branched out of, or branched into. When the first instruction in a basic block executes, all of the instructions will be executed, so the instructions are considered to be a single group.

Basic blocks end with branch, call, throw, and return instructions, among others.

Some instructions, like "divide," are not considered to be the end of an executable unit, despite the fact that they can throw an exception. This is another way that an executable unit is not technically the same as a basic block.

If a Java method does not have any associated source information, the entire method is considered to have only one executable unit.

Parent topic: Probekit element reference

Related reference
The Fragment probe object
The Data probe object

Related information
ExecutableUnit example

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