|
ABSTRACT
This paper presents algorithms for inserting monitoring code to profile and trace programs. These algorithms greatly reduce the cost of measuring programs. Profiling counts the number of times each basic block in a program executes and has a variety of applications. Instruction traces are the basis for trace-driven simulation and analysis, and are also used in trace-driven debugging.
The profiling algorithm chooses a placement of counters that is optimized—and frequently optimal—with respect to the expected or measured execution frequency of each basic block and branch in the program. The tracing algorithm instruments a program to obtain a subsequence of the basic block trace—whose length is optimized with respect to the program's execution—from which the entire trace can be efficiently regenerated.
Both algorithms have been implemented and produce a substantial improvement over previous approaches. The profiling algorithm reduces the number of counters by a factor of two and the number of counter increments by up to a factor of four. The tracing algorithm reduces the file size and overhead of an already highly optimized tracing system by 20-40%.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
T. Ball and j. R. Larus, "'Optimally Profiling and Tracing Programs," Technical Report #1031, University of Wisconsin, Madison (July 1991).
|
 |
2
|
|
| |
3
|
Systems Performance Evaluation Cooperative, SPEC Newsletter (K. Mendoza, editor) 1(1)(1989).
|
 |
4
|
Joseph A. Fisher , John R. Ellis , John C. Ruttenberg , Alexandru Nicolau, Parallel processing: a smart compiler and a dumb machine, Proceedings of the 1984 SIGPLAN symposium on Compiler construction, p.37-47, June 17-22, 1984, Montreal, Canada
|
| |
5
|
S.L. Graham, P. B. Kessler, and M. K. McKusick, "An Execution Profiler for Modular Programs," Software Practice and Experience 13 pp. 671-685 (1983).
|
| |
6
|
|
| |
7
|
D.E. Knuth and F. R. Stevenson, "Optimal Measurement Points for Program Frequency Counts," BIT 13 pp. 313-322 (1973).
|
| |
8
|
|
| |
9
|
S. Maheshwari, "Traversal marker placement problems are NP-complete," Report No. CU-CS-092-76, Dept. of Computer Science, University of Colorado, Boulder, CO (1976).
|
 |
10
|
|
 |
11
|
|
 |
12
|
|
 |
13
|
|
| |
14
|
S. Pottle, private communication. October 1991.
|
| |
15
|
R. L. Probert, "Optimal Insertion of Software Probes in Well-Delimited Programs," IEEE Transactions on Software Engineering SE-8(1) pp. 34-42 (January, 1975).
|
| |
16
|
C.V. Ramamoorthy, K. H. Kim, and W. T. Chen, "Optimal Placement of Software Monitors Aiding Systematic Testing," IEEE Transactions on Software Engineering SE-I(4)pp. 403-410 (December, 1975).
|
| |
17
|
|
 |
18
|
|
 |
19
|
|
| |
20
|
MIPS Computer Systems, inc., UMIPS-V Reference Manual (pixie and pixstats), MIPS Computer Systems, Sunnyvale, CA (1990).
|
| |
21
|
|
CITED BY 59
|
|
Amer Diwan , David Tarditi , Eliot Moss, Memory subsystem performance of programs using copying garbage collection, Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.1-14, January 16-19, 1994, Portland, Oregon, United States
|
|
|
Koen De Bosschere , Saumya Debray , David Gudeman , Sampath Kannan, Call forwarding: a simple interprocedural optimization technique for dynamically typed languages, Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.409-420, January 16-19, 1994, Portland, Oregon, United States
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Hiralal Agrawal, Dominators, super blocks, and program coverage, Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.25-34, January 16-19, 1994, Portland, Oregon, United States
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Steven K. Reinhardt , Mark D. Hill , James R. Larus , Alvin R. Lebeck , James C. Lewis , David A. Wood, The Wisconsin Wind Tunnel: virtual prototyping of parallel computers, ACM SIGMETRICS Performance Evaluation Review, v.21 n.1, p.48-60, June 1993
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Keith D. Cooper , Alexander Grosul , Timothy J. Harvey , Steven Reeves , Devika Subramanian , Linda Torczon , Todd Waterman, ACME: adaptive compilation made efficient, ACM SIGPLAN Notices, v.40 n.7, July 2005
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|