Topic created on: December 7, 2008 02:06 CST by jordanpz.
when I use the PaiMeiStalker ,there is two choice to select for computing the code coverage,which is either "FUNCTIONS"or "Basic Blocks".I wonder what 's the difference?
To understand the difference, you need to know what basic block is:
Basic block is code that has one entry point , one exit point and no jump instructions contained within it.
Once you understand that, the difference is pretty clear.
Covering just the functions will tell you the functions being called during the execution but choosing basic blocks will narrow down the result to give you more details on
what instructions within a function are being executed. Since there is only one entry/exit point in a basic block, if the first instruction in a basic block gets executed, we can be sure that every other instructions within that basic block will be executed too.