Abstract
Tracking the allocation site of every object at runtime is useful for reliable, optimized Java. To be used in production environments, the tracking must be accurate with minimal speed loss. Previous approaches suffer from performance degradation due to the additional field added to each object or track the allocation sites only probabilistically. We propose two novel approaches to track the allocation sites of every object in Java with only a 1.0% slow-down on average. Our first approach, the Allocation-Site-as-a-Hash-code (ASH) Tracker, encodes the allocation site ID of an object into the hash code field of its header by regarding the ID as part of the hash code. ASH Tracker avoids an excessive increase in hash code collisions by dynamically shrinking the bit-length of the ID as more and more objects are allocated at that site. For those Java VMs without the hash code field, our second approach, the Allocation-Site-via-a-Class-pointer (ASC) Tracker, makes the class pointer field in an object header refer to the allocation site structure of the object, which in turn points to the actual class structure. ASC Tracker mitigates the indirection overhead by constant-class-field duplication and allocation-site equality checks. While a previous approach of adding a 4-byte field caused up to 14.4% and an average 5% slowdown, both ASH and ASC Trackers incur at most a 2.0% and an average 1.0% loss. We demonstrate the usefulness of our low-overhead trackers by an allocation-site-aware memory leak detector and allocation-site-based pretenuring in generational GC. Our pretenuring achieved on average 1.8% and up to 11.8% speedups in SPECjvm2008.
- Agesen, O. and Garthwaite, A. Efficient object sampling via weak references. In Proceedings of the 2nd International Symposium on Memory Management, pp. 121--126, 2000. Google Scholar
Digital Library
- Bacon, D. F., Fink, S. J., and Grove, D. Space- and time-efficient implementation of the Java object model. In Proceedings of the 16th European Conference on Object-Oriented Programming, pp. 111--132, 2002. Google Scholar
Digital Library
- Bacon, D. F., Konuru, R., and Serrano, M. Thin locks: featherweight synchronization for Java. In Proceedings of the ACM SIGPLAN 1998 Conference on Programming Language Design and Implementation, pp. 258--268, 1998. Google Scholar
Digital Library
- Barrett, D. A., and Zorn, B. G. Using lifetime predictors to improve memory allocation performance. In Proceedings of the ACM SIG--PLAN 1993 Conference on Programming Language Design and Im-plementation, pp. 187--196, 1993. Google Scholar
Digital Library
- Blackburn, S. M., Hertz, M., McKinley, K. S., Moss, J. E. B., and Yang, T. Profile-based pretenuring. ACM Transactions on Programming Languages and Systems, vol. 29, no. 1, pp. 1--57, 2007. Google Scholar
Digital Library
- Blackburn, S. M., Singhai, S., Hertz, M., McKinley, K. S., and Moss, J. E. B. Pretenuring for Java. In Proceedings of the 16th ACM SIG--PLAN Conference on Object Oriented Programming, Systems, Languages, and Applications, pp. 342--352, 2001. Google Scholar
Digital Library
- Bond, M. D. and Mckinley, K. S. Bell: bit-encoding online memory leak detection. In Proceedings of the 12th International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 61--72, 2006. Google Scholar
Digital Library
- Chen, G., Kandemir, M., Vijaykrishnan, N., and Irwin, M. J. Field level analysis for heap space optimization in embedded java environments, In Proceedings of the 4th International Symposium on Memory Management, pp. 131--142, 2004. Google Scholar
Digital Library
- Cheng, P., Harper, R., and Lee, P. Generational stack collection and profile-driven pretenuring. In Proceedings of the ACM SIGPLAN 1998 Conference on Programming Language Design and Implementation, pp. 162--173, 1998. Google Scholar
Digital Library
- Chilimbi, T. M. and Shaham, R. Cache-conscious coallocation of hot data streams. In Proceedings of the ACM SIGPLAN 2006 Conference on Programming Language Design and Implementation, pp. 252--262, 2006. Google Scholar
Digital Library
- Chilimbi, T. M. Efficient representations and abstractions for quantifying and exploiting data reference locality. In Proceedings of the ACM SIGPLAN 2001 Conference on Programming Language Design and Implementation, pp. 191--202, 2001. Google Scholar
Digital Library
- DaCapo Benchmarks. http://dacapobench.org/Google Scholar
- Eclipse.org. http://www.eclipse.org/ .Google Scholar
- Grcevski, N., Kilstra, A., Stoodley, K., Stoodley, M., and Sundaresan, V. Java just-in-time compiler and virtual machine improvements for server and middleware applications. In Proceedings of the 3rd Virtual Machine Research and Technology Symposium, pp. 151--162, 2004. Google Scholar
Digital Library
- Harris, T. L. Dynamic adaptive pre-tenuring. In Proceedings of the 2nd international Symposium on Memory Management, pp. 127--136, 2000, Google Scholar
Digital Library
- Hastings, R. and Joyce, B. Purify: Fast detection of memory leaks and access errors. In Proceedings of the Winter USENIX Conference, pp. 125--136, 1992.Google Scholar
- Hauswirth, M. and Chilimbi, T. M. Low-overhead memory leak detection using adaptive statistical profiling. In Proceedings of the 11th International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 156--164, 2004. Google Scholar
Digital Library
- Huang, W., Srisa-an, W., and Chang, J. M. Dynamic pretenuring schemes for generational garbage collection. In Proceeding of the 2004 IEEE International Symposium on Performance Analysis of Systems and Software, pp. 133--140, 2004. Google Scholar
Digital Library
- IBM Java Diagnosis Guide 6. http://www.ibm.com/developerworks/java/jdk/diagnosis/ .Google Scholar
- Intel IA-32 Architecture Software Developer's Manual.Google Scholar
- Java SE 6 API Specification. http://java.sun.com/javase/6/docs/api/ .Google Scholar
- Java VM Specification. http://java.sun.com/docs/books/jvms/Google Scholar
- Jump, M., Blackburn, S. M., and Mckinley, K. S. Dynamic object sampling for pretenuring. In Proceedings of the 4th International Symposium on Memory Management, pp. 152--162, 2004. Google Scholar
Digital Library
- Novark, G., Berger, E. D., and Zorn, B. G. Efficiently and precisely locating memory leaks and bloat. In Proceedings of the ACM SIG-PLAN 2009 Conference on Programming Language Design and Implementation, pp. 397--407, 2009. Google Scholar
Digital Library
- Novark, G., Berger, E. D., and Zorn, B. G. Exterminator: automatically correcting memory errors with high probability. In Proceedings of the ACM SIGPLAN 2007 Conference on Programming Language Design and Implementation, pp. 1--11, 2007. Google Scholar
Digital Library
- Novark, G., Berger, E. D., and Zorn, B. G. Plug: automatically tolerating memory leaks in C and C++ applications. Technical Report UM--CS--2008--009, University of Massachusetts, 2008.Google Scholar
- Qin, F., Lu, S., and Zhou, Y. SafeMem: exploiting ECC-memory for detecting memory leaks and memory corruption during production runs In Proceedings of the 2005 International Symposium on High-Performance Computer Architecture, pp. 291--302, 2005. Google Scholar
Digital Library
- Seidl, M. L. and Zorn, B. G. Segregating heap objects by reference behavior and lifetime. In Proceedings of the 8th International Con--ference on Architectural Support for Programming Languages and Operating Systems, pp. 12--23, 1998. Google Scholar
Digital Library
- Seward, J. and Nethercote, N. Using valgrind to detect undefined value errors with bit-precision. In Proceedings of the 2005 Annual Conference on USENIX Annual Technical Conference, pp. 17--30, 2005. Google Scholar
Digital Library
- Shaham, R., Kolodner, E. K., and Sagiv, M. Heap profiling for space-efficient java. In Proceedings of the ACM SIGPLAN 2001 Confer--ence on Programming Language Design and Implementation, pp. 104--113, 2001. Google Scholar
Digital Library
- Standard Performance Evaluation Corporation. SPECjbb2005. http://www.spec.org/jbb2005/ .Google Scholar
- Standard Performance Evaluation Corporation. SPECjvm2008. http://www.spec.org/jvm2008/ .Google Scholar
- Sun Microsystems. HotSpot VM. http://java.sun.com/javase/tech-nologies/hotspot/index.jspGoogle Scholar
Index Terms
Efficient runtime tracking of allocation sites in Java
Recommendations
Efficient runtime tracking of allocation sites in Java
VEE '10: Proceedings of the 6th ACM SIGPLAN/SIGOPS international conference on Virtual execution environmentsTracking the allocation site of every object at runtime is useful for reliable, optimized Java. To be used in production environments, the tracking must be accurate with minimal speed loss. Previous approaches suffer from performance degradation due to ...
Creating and preserving locality of java applications at allocation and garbage collection times
OOPSLA '02: Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applicationsThe growing gap between processor and memory speeds is motivating the need for optimization strategies that improve data locality. A major challenge is to devise techniques suitable for pointer-intensive applications. This paper presents two techniques ...
Creating and preserving locality of java applications at allocation and garbage collection times
The growing gap between processor and memory speeds is motivating the need for optimization strategies that improve data locality. A major challenge is to devise techniques suitable for pointer-intensive applications. This paper presents two techniques ...







Comments