Abstract
How to efficiently and adequately profile Java objects is one of the key problems for debugging, monitoring, program analysis, and many optimizations. Most current approaches have extra overheads in Java heaps and slow down the runtime performance significantly, or need to modify particular object layouts with limited extendibility and adaptivity. In this paper, we present a novel profiling mechanism, namely Address Chain, which has no overhead in Java heaps and does not modify object layouts, class layouts and any other key structures in Java Virtual Machines. So far, the Address Chain mechanism profiles the accurate life cycle, the allocation site in jitted code, as well as the physical memory trace of object movements with time stamps, etc., for every Java object. Furthermore, it provides a profiling framework that can be easily adapted to profile more or less information for future requirements. It is a general mechanism suitable for garbage collectors using mark-and-sweep, copying or generational algorithms. The runtime overheads of our approach are reasonable. We implemented our mechanism on Apache Harmony 6.0 DRLVM, which is a J2SE Virtual Machine with a generational garbage collector. The runtime overheads of the profiler are about 5% on average for SpecJVM2008, less than 8% for SpecJBB2005, and about 8% for Dacapo, respectively. We use a distributed mode to collect and calculate the object information from the profiled data sent via network. For most cases we studied, the object status can be calculated almost simultaneously when Java applications run on another computing device. Our mechanism has the capability of providing online object status in a distributed way. We also demonstrate how to use the profiled data to help optimizations like pretenuring.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Apache DRLVM GCV5, http://harmony.aparche.org/subcomponents/drlvm/gc-v5.html
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., Van Drunen, T., von Dincklage, D., Wiedermann, B.: The DaCapo Benchmarks: Java Benchmarking Development and Analysis. In: OOPSLA 2006: Proceedings of the 21st Annual ACM SIGPLAN Conference on Object-Oriented Programing, Systems, Languages, and Applications, Portland, USA, October 22-26 (2006)
Blackburn, S.M., Hertz, M., McKinley, K.S., Moss, J.E.B., Yang, T.: Profile-Based Pretenuring. ACM Transactions on Programming Languages and Systems 29(1) (2007)
Bond, M.D., McKinley, K.S.: Leak Pruning. In: Proceedings of ASPLOS 2009, Washington, DC, USA (2009)
Bond, M.D., McKinley, K.S.: Bell: Bit-Encoding Online Memory Leak Detection. In: Proceedings of ASPLOS 2006, San Jose, California, USA (2006)
Chilimbi, T.M., Hauswirth, M.: Low-Overhead Memory Leak Detection Using Adaptive Statistical Profiling. In: Proceedings of ASPLOS 2004, Boston, MA, USA (2004)
Ha, J., Arnold, M., Blackburn, S.M.: A Concurrent Dynamic Analysis Framework for Multicore Hardware. In: Proceedings of OOPSLA 2009, Orlando, Florida, USA (2009)
Hertz, M., Blackburn, S.M., Moss, J.E.B., McKinley, K.S., Stefanovic, D.: Error-free garbage collection traces: How to cheat and not get caught. In: Proceedings of the International Conference on Measurement and Modeling of Computer Systems, Marina Del Rey, CA, USA (2002)
Hertz, M., Blackburn, S.M., Moss, J.E.B., McKinley, K.S., Stefanovic, D.: Generating object lifetime traces with Merlin. ACM Transactions on Programming Languages and Systems (TOPLAS) 28(3), 476–516 (2006)
Jump, M., Blackburn, S.M., McKinley, K.S.: Dynamic object sampling for pretenuring. In: Proceedings of the 4th International Symposium on Memory Management, pp. 152–162 (2004)
JProbe, http://www.quest.com/jprobe
JProfiler, http://www.ej-technologies.com
Odaira, R., Ogata, K., Kawachiya, K., Onodera, T., Nakatani, T.: Efficient Runtime Tracking of Allocation Sites in Java. In: Proceedings of VEE 2010, Pittsburgh, Pennsylvania, USA (2010)
Odaira, R., Nakatani, T.: Continuous object access profiling and optimizations to overcome the memory wall and bloat. In: Proceedings of ASPLOS XVII, London, England, UK (2012)
Shaham, R., Kolodner, E.K., Sagiv, M.: Heap profiling for space-efficient Java. In: Proceedings of PLDI 2001, pp. 104–113 (2001)
Sun, Q.Y., Shi, X.H., Xie, J.R.: Profiling Object Life Ranges for Detecting Memory Leaks in Java Virtual Machine. In: Proceedings of PDCAT 2012, Beijing, China (2012)
Xu, G., Arnold, M., Mitchell, N., Rountev, A., Sevitsky, G.: Go with the Flow: Profiling Copies To Find Runtime Bloat. In: Proceedings of PLDI 2009, Dublin, Ireland (2009)
Xu, G.: Resurrector: A Tunable Object Lifetime Profiling Technique for Optimizing Real-World Programs. In: Proceedings of OOPSLA 2013, Indianapolis, Indiana, USA (2013)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer International Publishing Switzerland
About this paper
Cite this paper
Shi, X., Xie, J., Yu, H. (2014). Address Chain: Profiling Java Objects without Overhead in Java Heaps. In: Garrigue, J. (eds) Programming Languages and Systems. APLAS 2014. Lecture Notes in Computer Science, vol 8858. Springer, Cham. https://doi.org/10.1007/978-3-319-12736-1_22
Download citation
DOI: https://doi.org/10.1007/978-3-319-12736-1_22
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-12735-4
Online ISBN: 978-3-319-12736-1
eBook Packages: Computer ScienceComputer Science (R0)