Exploiting hardware performance counters with flow and context sensitive profiling
Glenn Ammons, Thomas Ball, James R. Larus · Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation · 1997
A program profile attributes run-time costs to portions of a program's execution. Most profiling systems suffer from two major deficiencies: first, they only apportion simple metrics, such as execution frequency or elapsed time to static, syntactic units, such as procedures or statements; second, they aggressively reduce the volume of information collected and reported, although aggregation can hide striking differences in program behavior.This paper addresses both concerns by exploiting the hardware counters available in most modern processors and by incorporating two concepts from data flow analysis--flow and context sensitivity--to report more context for measurements. This paper extends our previous work on efficient path profiling to flow sensitive profiling, which associates hardware performance metrics with a path through a procedure. In addition, it describes a data structure, the calling context tree, that efficiently captures calling contexts for procedure-level measurements.Our measurements show that the SPEC95 benchmarks execute a small number (3--28) of hot paths that account for 9--98% of their L1 data cache misses. Moreover, these hot paths are concentrated in a few routines, which have complex dynamic behavior.
Cited by 453 works. doi:10.1145/258915.258924
Authors
References
- An empirical study of FORTRAN programs
- EEL
- An execution profiler for modular programs
- Two approaches to interprocedural data flow analysis
- Experience with Path Analysis and Testing of Programs
- Efficient Path Profiling
- Optimally profiling and tracing programs
- Cache profiling and the SPEC benchmarks: a case study
- Using profile information to assist classic code optimizations
- Visualizing interactions in program executions