Rewriting executable files to measure program behavior
James R. Larus, Thomas Ball · Software Practice and Experience · 1994
Abstract Inserting instrumentation code in a program is an effective technique for detecting, recording, and measuring many aspects of a program's performance. Instrumentation code can be added at any stage of the compilation process by specially‐modified system tools such as a compiler or linker or by new tools from a measurement system. For several reasons, adding instrumentation code after the compilation process—by rewriting the executable file—presents fewer complications and leads to more complete measurements. This paper describes the difficulties in adding code to executable files that arose in developing the profiling and tracing tools qp and qpt. The techniques used by these tools to instrument programs on MIPS and SPARC processors are applicable in other instrumentation systems running on many processors and operating systems. In addition, many difficulties could have been avoided with minor changes to compilers and executable file formats. These changes would simplify this approach to measuring program performance and make it more generally useful.
Cited by 155 works. doi:10.1002/spe.4380240204
Authors
References
- Computer Architecture: A Quantitative Approach
- An empirical study of FORTRAN programs
- MIPS RISC architecture
- Binary translation
- An execution profiler for modular programs
- Systems for Late Code Modification
- IPS-2: the second generation of a parallel program measurement system
- Optimally profiling and tracing programs
- Abstract execution: A technique for efficiently tracing programs
- Efficient program tracing