Object equality profiling

被引:26
作者
Marinov, D [1 ]
O'Callahan, R
机构
[1] MIT, Comp Sci Lab, Cambridge, MA 02139 USA
[2] IBM Corp, Div Res, TJ Watson Res Ctr, Yorktown Hts, NY 10598 USA
关键词
object equality; object mergeability; profiling; profile-guided optimization; space savings; !text type='Java']Java[!/text] language;
D O I
10.1145/949343.949333
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present Object Equality Profiling (OEP), a new technique for helping programmers discover optimization opportunities in programs. OEP discovers opportunities for replacing a set of equivalent object instances with a single representative object. Such a set represents an opportunity for automatically or manually applying optimizations such as hash consing, heap compression, lazy allocation, object caching, invariant hoisting, and more. To evaluate OEP, we implemented a tool to help programmers reduce the memory usage of Java programs. Our tool performs a dynamic analysis that records all the objects created during a particular program run. The tool partitions the objects into equivalence classes, and uses collected timing information to determine when elements of an equivalence class could have been safely collapsed into a single representative object without affecting the behavior of that program run. We report the results of applying this tool to benchmarks, including two widely used Web application servers. Many benchmarks exhibit significant amounts of object equivalence, and in most benchmarks our profiler identifies optimization opportunities clustered around a small number of allocation sites. We present a case study of using our profiler to find simple manual optimizations that reduce the average space used by live objects in two SpecJVM benchmarks by 47% and 38% respectively.
引用
收藏
页码:313 / 325
页数:13
相关论文
共 39 条
[1]  
ACAR UA, 2003, 30 ANN ACM SIGACT SI, P14
[2]  
AGESEN O, 1999, P 1999 ACM SIGPLAN C, P207
[3]  
AGESEN O, 1998, PROGRAMMING LANGUAGE, P269
[4]  
Aho A.V., 1974, The Design and Analysis of Computer Algorithms
[5]  
ALLEN J, 1978, ANATOMY LISP
[6]  
Alpern B., 1988, Conference Record of the Fifteenth Annual ACM Symposium on Principles of Programming Languages, P1, DOI 10.1145/73560.73561
[7]  
ANANIAN CS, 2003, 2003 WORKSH LANG COM
[8]  
[Anonymous], P PLDI
[9]  
APPEL AW, 1993, TR41293 PRINC U COMP
[10]  
Bacon DF, 2002, LECT NOTES COMPUT SC, V2374, P111