The executableUnit probe fragment type lets you perform fine-grained data collection for methods that match the probe's target specifications, 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 probe's target specifications but have no source code information, the fragment is inserted once, at the start of the method.
An executableUnit fragment can use all data item types except returnedObject, exceptionObject, isFinally, and thisObject. Most importantly, it can use the executableUnitNumber data item, which contains the number of the executable unit that is about to run.
The number of executable units in a method and in the line tables does not include executable units inserted into the method by Probekit.
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 runs, all of the instructions are executed, so the instructions are considered to be a single group.
Basic blocks end with instructions such as branch, call, throw, and return.
Some instructions, such as divide, are not considered to be the end of an executable unit, despite the fact that they can throw an exception. This is one 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.