Rewriting executable files to measure program behavior
Authors:
- 1 February 1994
- journal article
- research article
- Published by Wiley in Software: Practice and Experience
- Vol. 24 (2) , 197-218
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.Keywords
This publication has 16 references indexed in Scilit:
- Binary translationCommunications of the ACM, 1993
- Monitoring semanticsACM SIGPLAN Notices, 1991
- Abstract execution: A technique for efficiently tracing programsSoftware: Practice and Experience, 1990
- Fast breakpoints: design and implementationACM SIGPLAN Notices, 1990
- IPS-2: the second generation of a parallel program measurement systemIEEE Transactions on Parallel and Distributed Systems, 1990
- Measuring parallelism in computation-intensive scientific/engineering applicationsIEEE Transactions on Computers, 1988
- Profiling under UNIX by patchingSoftware: Practice and Experience, 1987
- Global register allocation at link timeACM SIGPLAN Notices, 1986
- An execution profiler for modular programsSoftware: Practice and Experience, 1983
- An empirical study of FORTRAN programsSoftware: Practice and Experience, 1971