ACM Home Page
Please provide us with feedback. Feedback
Optimally profiling and tracing programs
Full text PdfPdf (2.84 MB)
Source ACM Transactions on Programming Languages and Systems (TOPLAS) archive
Volume 16 ,  Issue 4  (July 1994) table of contents
Pages: 1319 - 1360  
Year of Publication: 1994
ISSN:0164-0925
Authors
Thomas Ball  University of Wisconsin, Madison
James R. Larus  University of Wisconsin, Madison
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 41,   Downloads (12 Months): 197,   Citation Count: 70
Additional Information:

abstract   references   cited by   index terms   review   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/183432.183527
What is a DOI?

ABSTRACT

This paper describes algorithms for inserting monitoring code to profile and trace programs. These algorithms greatly reduce the cost of measuring programs with respect to the commonly used technique of placing code in each basic block. Program profiling counts the number of times each basic block in a program executes. Instruction tracing records the sequence of basic blocks traversed in a program execution. The algorithms optimize the placement of counting/tracing code with respect to the expected or measured frequency of each block or edge in a program's control-flow graph. We have implemented the algorithms in a profiling/tracing tool, and they substantially reduce the overhead of profiling and tracing.We also define and study the hierarchy of profiling problems. These problems have two dimensions: what is profiled (i.e., vertices (basic blocks) or edges in a control-flow graph) and where the instrumentation code is placed (in blocks or along edges). We compare the optimal solutions to the profiling problems and describe a new profiling problem: basic-block profiling with edge counters. This problem is important because an optimal solution to any other profiling problem (for a given control-flow graph) is never better than an optimal solution to this problem. Unfortunately, finding an optimal placement of edge counters for vertex profiling appears to be a hard problem in general. However, our work shows that edge profiling with edge counters works well in practice because it is simple and efficient and finds optimal counter placements in most cases. Furthermore, it yields more information than a vertex profile. Tracing also benefits from placing instrumentation code along edges rather than on vertices.


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
2
3
4
5
6
 
7
 
8
 
9
GOLDBERG, A. 1991. Reducing overhead in counter-based execution profiling. Tech. Rep. CSL-TR- 91-495, Computer Systems Lab., Stanford Univ., Stanford, Calif., Oct.
 
10
 
11
GRAHAM, S. L., KESSLER, P. B., AND MCKUSICK, M. K. 1983. An execution profiler for modular programs. Softw. Pratt. Exper. 13, 671-685.
 
12
 
13
 
14
 
15
KNUTH, D. E., AND STEVENSON, F, R, 1973. Optimal measurement points for program fre-quency counts. BIT 13, 313-322.
 
16
 
17
 
18
 
19
MAHESHWARI, S. 1976. Traversal marker placement problems are NP-complete. Rep. CU-CS-092- 76, Dept. of Computer Science, Univ of Colorado, Boulder, Colo.
20
 
21
MENDOZA, K., ED 1989. Systems performance evaluation cooperative. SPEC Newsl. 1, 1 (Fall).
 
22
MIPS COMPUTERSYSTEMS. 1990. UMIPS-V Reference Manual (pixie and pixstats). MIPS Com-puter Systems, Sunnyvale, Calif.
23
24
 
25
PROBERT, R. L. 1975. Optimal insertion of software probes in well-dehmited programs. IEEE Trans. Softa,. Eng. SE-8, 1(Jan.), 34-42
 
26
RAMAMOORTHY, C. V., KIM, K. H., AND CHEN, W. T. 1975 Optimal placement of software monitors aiding systematic testing, IEEE Trans. Softw. Eng. SE-1, 4 (Dec.), 403 -410.
27
 
28
29
30
 
31
32

CITED BY  70


REVIEW

"Paul W. Abrahams : Reviewer"

Ball and Larus describe algorithms they developed for profiling and tracing programs. The components to be analyzed can be either the vertices of the program graph or its edges. The profile counts for the vertices can be deduced from those for  more...

Collaborative Colleagues:
Thomas Ball: colleagues
James R. Larus: colleagues