Patent ID: 7590521

Claim:
A computer-implemented method for instrumenting a program, comprising: generating a post-dominator tree from a control flow graph associated with the program; building an arc to block map from the control flow graph, such that when data is received from a probe, the data is overlaid on the arc to block map to discover arc and block coverage data for the program; examining the post-dominator tree; building an optimization map according to the examination of the post-dominator tree, wherein the optimization map correlates probes to arcs and the building of the optimization map includes optimization map entries for calls; determining probe insertion points into the program according to the optimization map entries; inserting the probe into the program according to the probe insertion points; executing the program to obtain return probe data; determining executed arcs by correlating return probe data with the optimization map; and determining executed blocks form the executed arcs using the arc to block map.