CoCo: Sound and Adaptive Replacement of Java Collections

  • Guoqing Xu
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7920)

Abstract

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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Xu, G., Arnold, M., Mitchell, N., Rountev, A., Sevitsky, G.: Go with the flow: Profiling copies to find runtime bloat. In: PLDI, pp. 419–430 (2009)Google Scholar
  2. 2.
    Xu, G., Arnold, M., Mitchell, N., Rountev, A., Schonberg, E., Sevitsky, G.: Finding low-utility data structures. In: PLDI, pp. 174–186 (2010)Google Scholar
  3. 3.
    Xu, G., Rountev, A.: Detecting inefficiently-used containers to avoid bloat. In: PLDI, pp. 160–173 (2010)Google Scholar
  4. 4.
    Mitchell, N., Sevitsky, G.: The causes of bloat, the limits of health. In: OOPSLA, pp. 245–260 (2007)Google Scholar
  5. 5.
    Mitchell, N., Sevitsky, G., Srinivasan, H.: Modeling runtime behavior in framework-based applications. In: Thomas, D. (ed.) ECOOP 2006. LNCS, vol. 4067, pp. 429–451. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  6. 6.
    Mitchell, N., Schonberg, E., Sevitsky, G.: Four trends leading to Java runtime bloat. IEEE Software 27(1), 56–63 (2010)CrossRefGoogle Scholar
  7. 7.
    Shacham, O., Vechev, M., Yahav, E.: Chameleon: Adaptive selection of collections. In: PLDI, pp. 408–418 (2009)Google Scholar
  8. 8.
    Xu, G., Rountev, A.: Precise memory leak detection for Java software using container profiling. In: ICSE, pp. 151–160 (2008)Google Scholar
  9. 9.
    Jung, C., Rus, S., Railing, B.P., Clark, N., Pande, S.: Brainy: effective selection of data structures. In: PLDI, pp. 86–97 (2011)Google Scholar
  10. 10.
    Gil, J., Shimron, Y.: Smaller footprint for java collections. In: Noble, J. (ed.) ECOOP 2012. LNCS, vol. 7313, pp. 356–382. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  11. 11.
    Ansel, J., Chan, C., Wong, Y.L., Olszewski, M., Zhao, Q., Edelman, A., Amarasinghe, S.: Petabricks: a language and compiler for algorithmic choice. In: PLDI, pp. 38–49 (2009)Google Scholar
  12. 12.
    Ansel, J., Chan, C., Wong, Y.L., Olszewski, M., Edelman, A., Amarasinghe, S.: Language and compiler support for auto-tuning variable-accuracy algorithms, pp. 85–96 (2011)Google Scholar
  13. 13.
    Diniz, P.C., Rinard, M.C.: Dynamic feedback: an effective technique for adaptive computing. In: PLDI, pp. 71–84 (1997)Google Scholar
  14. 14.
    Blackburn, S.M., McKinley, K.S.: Immix: a mark-region garbage collector with space efficiency, fast collection, and mutator performance. In: PLDI, pp. 22–32 (2008)Google Scholar
  15. 15.
    Schonberg, E., Schwartz, J.T., Sharir, M.: Automatic data structure selection in SETL. In: POPL, pp. 197–210 (1979)Google Scholar
  16. 16.
    Schonberg, E., Schwartz, J.T., Sharir, M.: An automatic technique for selection of data representations in SETL programs. TOPLAS 3, 126–143 (1981)MATHCrossRefGoogle Scholar
  17. 17.
    Freudenberger, S.M., Schwartz, J.T.: Experience with the SETL optimizer. TOPLAS 5, 26–45 (1983)MATHCrossRefGoogle Scholar
  18. 18.
    Hawkins, P., Aiken, A., Fisher, K., Rinard, M., Sagiv, M.: Data representation synthesis. In: PLDI, pp. 38–49 (2011)Google Scholar
  19. 19.
    Mitchell, N.: The runtime structure of object ownership. In: Thomas, D. (ed.) ECOOP 2006. LNCS, vol. 4067, pp. 74–98. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  20. 20.
    Dufour, B., Ryder, B.G., Sevitsky, G.: A scalable technique for characterizing the usage of temporaries in framework-intensive Java applications. In: FSE, pp. 59–70 (2008)Google Scholar
  21. 21.
    Mitchell, N., Schonberg, E., Sevitsky, G.: Making sense of large heaps. In: Drossopoulou, S. (ed.) ECOOP 2009. LNCS, vol. 5653, pp. 77–97. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  22. 22.
    Shankar, A., Arnold, M., Bodik, R.: JOLT: Lightweight dynamic analysis and removal of object churn. In: OOPSLA, pp. 127–142 (2008)Google Scholar
  23. 23.
    Bhattacharya, S., Nanda, M.G., Gopinath, K., Gupta, M.: Reuse, recycle to de-bloat software. In: Mezini, M. (ed.) ECOOP 2011. LNCS, vol. 6813, pp. 408–432. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  24. 24.
    Chis, A.E., Mitchell, N., Schonberg, E., Sevitsky, G., O’Sullivan, P., Parsons, T., Murphy, J.: Patterns of memory inefficiency. In: Mezini, M. (ed.) ECOOP 2011. LNCS, vol. 6813, pp. 383–407. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  25. 25.
    Xu, G.: Finding reusable data structures. In: OOPSLA, pp. 1017–1034 (2012)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Guoqing Xu
    • 1
  1. 1.University of CaliforniaIrvineUSA

Personalised recommendations