CoCo: Sound and Adaptive Replacement of Java Collections

Inefficient use of Java containers is an important source of run-time inefficiencies in large applications. This paper presents an application-level dynamic optimization technique called CoCo, that exploits algorithmic advantages of Java collections to improve performance. CoCo dynamically identifies optimal Java collection objects and safely performs run-time collection replacement, both using pure Java code. At the heart of this technique is a framework that abstracts container elements to achieve efficiency and that concretizes abstractions to achieve soundness. We have implemented part of the Java collection framework as instances of this framework, and developed a static CoCo compiler to generate Java code that performs optimizations. This work is the first step towards achieving the ultimate goal of automatically optimizing away semantic inefficiencies.

[1]  James Noble ECOOP 2012 – Object-Oriented Programming , 2012, Lecture Notes in Computer Science.

[2]  Atanas Rountev,et al.  Detecting inefficiently-used containers to avoid bloat , 2010, PLDI '10.

[3]  Nick Mitchell,et al.  The causes of bloat, the limits of health , 2007, OOPSLA.

[4]  Martin C. Rinard,et al.  Dynamic feedback: an effective technique for adaptive computing , 1997, PLDI '97.

[5]  Sophia Drossopoulou ECOOP 2009 - Object-Oriented Programming, 23rd European Conference, Genoa, Italy, July 6-10, 2009. Proceedings , 2009, ECOOP.

[6]  Micha Sharir,et al.  Automatic data structure selection in SETL , 1979, POPL.

[7]  Kathryn S. McKinley,et al.  Immix: a mark-region garbage collector with space efficiency, fast collection, and mutator performance , 2008, PLDI '08.

[8]  Matthew Arnold,et al.  Jolt: lightweight dynamic analysis and removal of object churn , 2008, OOPSLA.

[9]  Atanas Rountev,et al.  Precise memory leak detection for java software using container profiling , 2013, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[10]  Edith Schonberg,et al.  Making Sense of Large Heaps , 2009, ECOOP.

[11]  Matthew Arnold,et al.  Go with the flow: profiling copies to find runtime bloat , 2009, PLDI '09.

[12]  Alan Edelman,et al.  Language and compiler support for auto-tuning variable-accuracy algorithms , 2011, International Symposium on Code Generation and Optimization (CGO 2011).

[13]  Alan Edelman,et al.  PetaBricks: a language and compiler for algorithmic choice , 2009, PLDI '09.

[14]  Edith Schonberg,et al.  Four Trends Leading to Java Runtime Bloat , 2010, IEEE Software.

[15]  Micha Sharir,et al.  Experience with the SETL Optimizer , 1983, TOPL.

[16]  Edith Schonberg,et al.  Finding low-utility data structures , 2010, PLDI '10.

[17]  Nick Mitchell,et al.  Modeling Runtime Behavior in Framework-Based Applications , 2006, ECOOP.

[18]  Alexander Aiken,et al.  Data representation synthesis , 2011, PLDI '11.

[19]  R LowJames Automatic data structure selection , 1978 .

[20]  Joseph Gil,et al.  Smaller footprint for Java collections , 2011, OOPSLA Companion.

[21]  Santosh Pande,et al.  Brainy: effective selection of data structures , 2011, PLDI '11.

[22]  Andrew D. Gordon,et al.  Maintaining Database Integrity with Refinement Types , 2011, ECOOP.

[23]  Micha Sharir,et al.  An Automatic Technique for Selection of Data Representations in SETL Programs , 1981, TOPL.

[24]  Guoqing Xu,et al.  Finding reusable data structures , 2012, OOPSLA '12.

[25]  Manish Gupta,et al.  Reuse, Recycle to De-bloat Software , 2011, ECOOP.

[26]  Nick Mitchell,et al.  The Runtime Structure of Object Ownership , 2006, ECOOP.

[27]  Dave Thomas ECOOP 2006 - Object-Oriented Programming, 20th European Conference, Nantes, France, July 3-7, 2006, Proceedings , 2006, ECOOP.

[28]  Languages Object-Oriented Programming Systems,et al.  OOPSLA'12 : proceedings of the 2012 ACM International Conference on Object Oriented Programming Systems Languages and Applications, October 19-26, 2012, Tucson, Arizona, USA , 2012 .

[29]  Eran Yahav,et al.  Chameleon: adaptive selection of collections , 2009, PLDI '09.

[30]  Barbara G. Ryder,et al.  A scalable technique for characterizing the usage of temporaries in framework-intensive Java applications , 2008, SIGSOFT '08/FSE-16.

[31]  Edith Schonberg,et al.  Patterns of Memory Inefficiency , 2011, ECOOP.