Profiling selected paths with loops
Path profiling records the frequency of each path in an executed program. To accomplish profiling, probes are instrumented in the program and executed as the program runs. So, the number of probes has a significant impact on the efficiency of a profiling technique. By profiling only the interesting paths, existing techniques try to improve the profiling efficiency by reducing the number of probes and optimize path encodings for efficient storage. However, they lack accuracy, waste time on running uninteresting paths, and can mainly deal with acyclic paths. In this article, a novel technique called Profiling Selected Paths (PSP) is introduced to profile selected paths, which enables custom selection for both acyclic and cyclic paths and increases the execution efficiency by early termination on uninteresting paths. Theoretical analysis and experimental evaluation indicate that PSP performs better than existing techniques.