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.
- Apache collections. http://commons.apache.org/collections/.Google Scholar
- Google collections. http://code.google.com/p/google-collections/.Google Scholar
- Javolution collections. http://javolution.org/.Google Scholar
- Trove collections. http://trove4j.sourceforge.net/.Google Scholar
- AFTANDILIAN, E., AND GUYER, S. Z. GC assertions: Using the garbage collector to check heap properties. In MSPC (2008), ACM. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- BOND, M. D., AND MCKINLEY, K. S. Probabilistic calling context. SIGPLAN Not. 42, 10 (2007), 97--112. Google ScholarDigital Library
- CHUNG, I.-H., AND HOLLINGSWORTH, J. K. Runtime selection among different api implementations. Parallel Processing Letters 13, 2 (2003), 123--134.Google ScholarCross Ref
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- LAGOUDAKIS, M. G., AND LITTMAN, M. L. Learning to select branching rules in the dpll procedure for satisfiability. In SAT (2001).Google Scholar
- 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 ScholarDigital Library
- LOW, J. R. Automatic data structure selection: an example and overview. Commun. ACM 21, 5 (1978), 376--385. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarCross Ref
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- SOMAN, S., AND KRINTZ, C. Application-specific garbage collection. J. Syst. Softw. 80, 7 (2007), 1037--1056. Google ScholarDigital Library
- 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 ScholarCross Ref
- 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 ScholarDigital Library
- WHALEY, C. R., AND DONGARRA, J. J. Automatically tuned linear algebra software. In Supercomputing (1998). Google ScholarDigital Library
- 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 ScholarDigital Library
Index Terms
- Chameleon: adaptive selection of collections
Recommendations
Empirical Study of Usage and Performance of Java Collections
ICPE '17: Proceedings of the 8th ACM/SPEC on International Conference on Performance EngineeringCollection data structures have a major impact on the performance of applications, especially in languages such as Java, C#, or C++. This requires a developer to select an appropriate collection from a large set of possibilities, including different ...
Chameleon: adaptive selection of collections
PLDI '09Languages 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 ...
JBrainy: Micro-benchmarking Java Collections with Interference
ICPE '20: Companion of the ACM/SPEC International Conference on Performance EngineeringSoftware developers use collection data structures extensively and are often faced with the task of picking which collection to use. Choosing an inappropriate collection can have major negative impact on runtime performance. However, choosing the right ...
Comments