Abstract A path profile determines how many times each acyclic path in a routine executes. This type of profiling subsumes the more common basic block and edge profiling, which only approximate path frequencies. Path profiles have many potential uses in program performance tuning, profile-directed compilation, and software test coverage. We describe a new algorithm for path profiling. This simple, fast algorithm selects and places profile instrumentation to minimize run-time overhead.
Instrumented programs run with overhead comparable to the best previous profiling techniques.
On the SPEC95 benchmarks, path profiling overhead averaged 31 percent, as compared to 16 percent for efficient edge profiling. Moreover, profiling shows that the SPEC95 train input datasets covered most of the paths executed in the ref datasets.