Object combining: A new aggressive optimization for object intensive programs

Object combining tries to put objects together that have roughly the same life times in order to reduce strain on the memory manager and to reduce the number of pointer indirections during a program's execution. Object combining works by appending the fields of one object to another, allowing allocation and freeing of multiple objects with a single heap (de)allocation. Unlike object inlining, which will only optimize objects where one has a (unique) pointer to another, our optimization also works if there is no such relation. Object inlining also directly replaces the pointer by the inlined object's fields. Object combining leaves the pointer in place to allow more combining. Elimination of the pointer accesses is implemented in a separate compiler optimization pass.Unlike previous object inlining systems, reference field overwrites are allowed and handled, resulting in much more aggressive optimization. Our object combining heuristics also allow unrelated objects to be combined, for example those allocated inside a loop; recursive data structures (linked lists, trees) can be allocated several at a time and objects that are always used together can be combined.The main focus of object combining in this paper is on reducing object (de)allocation overhead, by reducing both garbage collection work and the number of object allocations. Reduction of memory management overhead causes execution time to be reduced by up to 35%. Indirection removal further reduces execution time by up to 6%.

[1]  David R. Hanson Fast allocation and deallocation of memory based on object lifetimes , 1990, Softw. Pract. Exp..

[2]  Henry Massalin Superoptimizer: a look at the smallest program , 1987, ASPLOS 1987.

[3]  Keith H. Randall,et al.  Field analysis: getting useful and low-cost interprocedural information , 2000, PLDI '00.

[4]  David Gay,et al.  Language support for regions , 2001, PLDI '01.

[5]  James R. Larus,et al.  Cache-conscious structure definition , 1999, PLDI '99.

[6]  Jason Maassen,et al.  An efficient implementation of Java's remote method invocation , 1999, PPoPP '99.

[7]  Steven W. K. Tjiang,et al.  SUIF: an infrastructure for research on parallelizing and optimizing compilers , 1994, SIGP.

[8]  Christoforos E. Kozyrakis,et al.  A case for intelligent RAM , 1997, IEEE Micro.

[9]  Andrew A. Chien,et al.  The concert system--compiler and runtime support for efficient, fine-grained concurrent object-oriented programs , 1993 .

[10]  Martin C. Rinard,et al.  Compositional pointer and escape analysis for Java programs , 1999, OOPSLA '99.

[11]  Laurie J. Hendren,et al.  Putting pointer analysis to work , 1998, POPL '98.

[12]  Mark N. Wegman,et al.  An efficient method of computing static single assignment form , 1989, POPL '89.

[13]  François Bodin,et al.  Improving cache behavior of dynamically allocated data structures , 1998, Proceedings. 1998 International Conference on Parallel Architectures and Compilation Techniques (Cat. No.98EX192).

[14]  Jong-Deok Choi,et al.  Escape analysis for Java , 1999, OOPSLA '99.

[15]  Andrew A. Chien,et al.  An automatic object inlining optimization and its evaluation , 2000, PLDI '00.