To accurately and comprehensively monitor a program's behavior, many performance measurement tools transform the program's executable representation or binary. By instrumenting binary programs to monitor program events, tools can precisely analyze compiler optimization effectiveness, memory system performance, pipeline interlocking, and other dynamic program characteristics that are fully exposed only at this level. Binary transformation has also been used to support software-enforced fault isolation, debugging, machine re-targeting, and machine-dependent optimization.
At present, binary transformation applications face a difficult trade-off. Previous approaches to implementing robust transformations result in significant disk space and run-time overhead. To improve efficiency, some current systems sacrifice robustness, relying on heuristic assumptions about the program and recognition of compiler-dependent code generation idioms. In this paper we begin by investigating the run-time and disk space overhead of transformation strategies that do not require assumptions about the program's control flow or register usage. We then detail simple information about the binary program that can significantly reduce this overhead. For each type of information, we show how it enables a corresponding type of binary transformation. We call binary programs that contain such enabling information adaptable binaries. Because adaptable binary information is simple, any compiler can generate it. Despite its simplicity, adaptable binary information has the necessary and sufficient expressive power to support a rich set of binary transformations.
[1]
David W. Wall,et al.
Generation and analysis of very long address traces
,
1990,
ISCA '90.
[2]
T. Anderson,et al.
Eecient Software-based Fault Isolation
,
1993
.
[3]
David W. Wall,et al.
Global register allocation at link time
,
1986,
SIGPLAN '86.
[4]
Alfred V. Aho,et al.
Compilers: Principles, Techniques, and Tools
,
1986,
Addison-Wesley series in computer science / World student series edition.
[5]
John L. Hennessy,et al.
MTOOL: a method for detecting memory bottlenecks
,
1991,
SIGMETRICS '91.
[6]
Margaret Martonosi,et al.
MemSpy: analyzing memory system bottlenecks in programs
,
1992,
SIGMETRICS '92/PERFORMANCE '92.
[7]
Richard L. Sites,et al.
Binary translation
,
1993,
CACM.
[8]
Abraham Lempel,et al.
A universal algorithm for sequential data compression
,
1977,
IEEE Trans. Inf. Theory.
[9]
Virgínia,et al.
News release
,
1984
.
[10]
Colin B. Hunter,et al.
DOS at RISC
,
1989
.
[11]
David W. Wall,et al.
Systems for Late Code Modification
,
1991,
Code Generation.
[12]
Robert Wahbe,et al.
Practical data breakpoints: design and implementation
,
1993,
PLDI '93.
[13]
Paul Hudak,et al.
ORBIT: an optimizing compiler for scheme
,
1986,
SIGPLAN '86.
[14]
James R. Larus,et al.
Rewriting executable files to measure program behavior
,
1994,
Softw. Pract. Exp..
[15]
David W. Wall,et al.
Experience with a software-defined machine architecture
,
1992,
TOPL.
[16]
Robert O. Hastings,et al.
Fast detection of memory leaks and access errors
,
1991
.