skip to main content
10.1145/1542476.1542522acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

Chameleon: adaptive selection of collections

Published:15 June 2009Publication History

ABSTRACT

Languages such as Java and C#, as well as scripting languages like Python, and Ruby, make extensive use of Collection classes. A collection implementation represents a fixed choice in the dimensions of operation time, space utilization, and synchronization. Using the collection in a manner not consistent with this fixed choice can cause significant performance degradation. In this paper, we present CHAMELEON, a low-overhead automatic tool that assists the programmer in choosing the appropriate collection implementation for her application. During program execution, CHAMELEON computes elaborate trace and heap-based metrics on collection behavior. These metrics are consumed on-thefly by a rules engine which outputs a list of suggested collection adaptation strategies. The tool can apply these corrective strategies automatically or present them to the programmer. We have implemented CHAMELEON on top of a IBM's J9 production JVM, and evaluated it over a small set of benchmarks. We show that for some applications, using CHAMELEON leads to a significant improvement of the memory footprint of the application.

References

  1. Apache collections. http://commons.apache.org/collections/.Google ScholarGoogle Scholar
  2. Google collections. http://code.google.com/p/google-collections/.Google ScholarGoogle Scholar
  3. Javolution collections. http://javolution.org/.Google ScholarGoogle Scholar
  4. Trove collections. http://trove4j.sourceforge.net/.Google ScholarGoogle Scholar
  5. AFTANDILIAN, E., AND GUYER, S. Z. GC assertions: Using the garbage collector to check heap properties. In MSPC (2008), ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. ARNOLD, M., VECHEV, M., AND YAHAV, E. QVM: an efficient runtime for detecting defects in deployed systems. In OOPSLA '08: Proceedings of conference on Object oriented programming systems languages and applications (2008), pp. 143--162. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. BARRETT, D. A., AND ZORN, B. G. Using lifetime predictors to improve memory allocation performance. In PLDI '93: Proceedings of the ACM SIGPLAN 1993 conference on Programming language design and implementation (New York, NY, USA, 1993), ACM, pp. 187--196. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. BLACKBURN, S. M., GARNER, R., HOFFMAN, C., KHAN, A. M., MCKINLEY, K. S., BENTZUR, R., DIWAN, A., FEINBERG, D., FRAMPTON, D., GUYER, S. Z., HIRZEL, M., HOSKING, A., JUMP, M., LEE, H., MOSS, J. E. B., PHANSALKAR, A., STEFANOVIC, D., VANDRUNEN, T., VON DINCKLAGE, D., AND WIEDERMANN, B. The DaCapo benchmarks: Java benchmarking development and analysis. In OOPSLA '06: conf. on Object-Oriented Programing, Systems, Languages, and Applications (2006), pp. 169--190. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. BLACKBURN, S. M., SINGHAI, S., HERTZ, M., MCKINELY, K. S., AND MOSS, J. E. B. Pretenuring for java. In OOPSLA'01: Proceedings of the 16th ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications (New York, NY, USA, 2001), ACM, pp. 342--352. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. BOND, M. D., AND MCKINLEY, K. S. Probabilistic calling context. SIGPLAN Not. 42, 10 (2007), 97--112. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. CHUNG, I.-H., AND HOLLINGSWORTH, J. K. Runtime selection among different api implementations. Parallel Processing Letters 13, 2 (2003), 123--134.Google ScholarGoogle ScholarCross RefCross Ref
  12. DEWAR, R. K., ARTHUR, LIU, S.-C., SCHWARTZ, J. T., AND SCHONBERG, E. Programming by refinement, as exemplified by the setl representation sublanguage. ACM Trans. Program. Lang. Syst. 1, 1 (1979), 27--49. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. HARRIS, T. L. Dynamic adaptive pre-tenuring. In ISMM '00: Proceedings of the 2nd international symposium on Memory management (New York, NY, USA, 2000), ACM, pp. 127--136. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. HOVEMEYER, D., AND PUGH, W. Finding bugs is easy. In OOPSLA'04: Companion to the conference on Object-oriented programming systems, languages, and applications (2004), pp. 132--136. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. JONES, R. E., AND RYDER, C. A study of java object demographics. In ISMM '08: Proceedings of the 7th international symposium on Memory management (2008), pp. 121--130. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. JUMP, M., BLACKBURN, S. M., AND MCKINLEY, K. S. Dynamic object sampling for pretenuring. In ISMM '04: Proceedings of the 4th international symposium on Memory management (New York, NY, USA, 2004), ACM, pp. 152--162. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. LAGOUDAKIS, M. G., AND LITTMAN, M. L. Learning to select branching rules in the dpll procedure for satisfiability. In SAT (2001).Google ScholarGoogle Scholar
  18. LEV-AMI, T., AND SAGIV, M. TVLA: A framework for Kleene based static analysis. In Saskatchewan (2000), vol. 1824 of Lecture Notes in Computer Science, Springer-Verlag, pp. 280--301. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. LOW, J. R. Automatic data structure selection: an example and overview. Commun. ACM 21, 5 (1978), 376--385. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. MITCHELL, J. C. Representation independence and data abstraction. In POPL '86: Proceedings of the 13th ACM SIGACT-SIGPLAN symposium on Principles of programming languages (New York, NY, USA, 1986), ACM, pp. 263--276. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. MITCHELL, N., AND SEVITSKY, G. Leakbot: An automated and lightweight tool for diagnosing memory leaks in large java applications. In ECOOP 2003 -- Object-Oriented Programming, 17th European Conference (2003), vol. 2743 of Lecture Notes in Computer Science, pp. 351--377.Google ScholarGoogle ScholarCross RefCross Ref
  22. MITCHELL, N., AND SEVITSKY, G. The causes of bloat, the limits of health. In OOPSLA '07: Proceedings of the 22nd annual ACM SIGPLAN conference on Object oriented programming systems and applications (New York, NY, USA, 2007), ACM, pp. 245--260. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. SCHONBERG, E., SCHWARTZ, J. T., AND SHARIR, M. Automatic data structure selection in setl. In POPL '79: Proceedings of the 6th ACM SIGACT-SIGPLAN symposium on Principles of programming languages (New York, NY, USA, 1979), ACM, pp. 197--210. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. SOMAN, S., AND KRINTZ, C. Application-specific garbage collection. J. Syst. Softw. 80, 7 (2007), 1037--1056. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. SUTTER, B. D., TIP, F., AND DOLBY, J. Customization of java library classes using type constraints and profile information. In ECOOP 2004 -- Object-Oriented Programming, 18th European Conference, Oslo, Norway, June 14-18, 2004 (2004), vol. 3086 of Lecture Notes in Computer Science, pp. 585--610.Google ScholarGoogle ScholarCross RefCross Ref
  26. VALLÉ E-RAI, R., CO, P., GAGNON, E., HENDREN, L., LAM, P., AND SUNDARESAN, V. Soot -- a java bytecode optimization framework. In CASCON '99: Proceedings of the 1999 conference of the Centre for Advanced Studies on Collaborative research (1999), IBM Press, p. 13. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. WHALEY, C. R., AND DONGARRA, J. J. Automatically tuned linear algebra software. In Supercomputing (1998). Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. ZHUANG, X., SERRANO, M. J., CAIN, H. W., AND CHOI, J. D., Accurate, efficient, and adaptive calling context profiling. In PLDI'06 (2006), pp. 263--271. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Chameleon: adaptive selection of collections

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Conferences
        PLDI '09: Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation
        June 2009
        492 pages
        ISBN:9781605583921
        DOI:10.1145/1542476
        • cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 44, Issue 6
          PLDI '09
          June 2009
          478 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/1543135
          Issue’s Table of Contents

        Copyright © 2009 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 15 June 2009

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        Overall Acceptance Rate406of2,067submissions,20%

        Upcoming Conference

        PLDI '24

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader