Preferential path profiling: compactly numbering interesting paths

Path profiles provide a more accurate characterization of a program's dynamic behavior than basic block or edge profiles, but are relatively more expensive to collect. This has limited their use in practice despite demonstrations of their advantages over edge profiles for a wide variety of applications.We present a new algorithm called preferential path profiling (PPP), that reduces the overhead of path profiling. PPP leverages the observation that most consumers of path profiles are only interested in a subset of all program paths. PPP achieves low overhead by separating interesting paths from other paths and assigning a set of unique and compact numbers to these interesting paths. We draw a parallel between arithmetic coding and path numbering, and use this connection to prove an optimality result for the compactness of path numbering produced by PPP. This compact path numbering enables our PPP implementation to record path information in an array instead of a hash table. Our experimental results indicate that PPP reduces the runtime overhead of profiling paths exercised by the largest (ref) inputs of the SPEC CPU2000 benchmarks from 50% on average (maximum of 132%) to 15% on average (maximum of 26%) as compared to a state-of-the-art path profiler.

[1]  Thomas M. Cover,et al.  Elements of Information Theory , 2005 .

[2]  Michael D. Bond,et al.  Practical path profiling for dynamic optimizers , 2005, International Symposium on Code Generation and Optimization.

[3]  James R. Larus,et al.  Programs Follow Paths , 1999 .

[4]  Ian H. Witten,et al.  Arithmetic coding for data compression , 1987, CACM.

[5]  Michael D. Bond,et al.  Targeted path profiling: lower overhead path profiling for staged dynamic optimization systems , 2004, International Symposium on Code Generation and Optimization, 2004. CGO 2004..

[6]  Thomas Ball,et al.  Edge profiling versus path profiling: the showdown , 1998, POPL '98.

[7]  Brad Calder,et al.  Variational path profiling , 2005, 14th International Conference on Parallel Architectures and Compilation Techniques (PACT'05).

[8]  James R. Larus,et al.  Efficient path profiling , 1996, Proceedings of the 29th Annual IEEE/ACM International Symposium on Microarchitecture. MICRO 29.

[9]  A. Kolmogorov Three approaches to the quantitative definition of information , 1968 .

[10]  Mary Jean Harrold,et al.  Selective path profiling , 2002, PASTE '02.

[11]  Xiangyu Zhang,et al.  Extending path profiling across loop backedges and procedure boundaries , 2004, International Symposium on Code Generation and Optimization, 2004. CGO 2004..

[12]  Glen G. Langdon,et al.  Arithmetic Coding , 1979 .

[13]  Thomas W. Reps,et al.  Interprocedural Path Profiling , 1999, CC.