Abstract
Programs written in modern object-oriented programming languages heavily use dynamically allocated objects in the heap. Therefore, dynamic program analysis techniques, such as memory leak diagnosing and automatic debugging, depend on various kinds of information derived from the heap. Identifying the differences between two heaps is one of the most important task and provided by many free and commercial problem diagnosing tools that are widely used by industry. However, existing heap differentiating tools usually leverage singular kind of information of an object, e.g., the address, allocation site or access path in the heap object graph. Such a single kind of information usually has disadvantages and thus can only provide an imprecise result, which cannot further satisfy the requirement of other high-level dynamic analysis. We have observed that the disadvantage of a kind of information can be remedied by another one in many situations. This paper presents PHD, a precise heap differentiating tool for Java programs, using objects’ spatial information (i.e., access path) and temporal information (i.e., execution index), which are both derived from the execution. To practically collect execution index, we implemented PHD on an industrial-strength Java virtual machine and thus it can be seamlessly integrated in production environments. Furthermore, we conducted case studies using PHD for three different dynamic analysis tasks on real-world applications such as Eclipse Compiler for Java, Apache Derby and Apache FTP Server.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Java Heap Analysis Tool. http://docs.oracle.com/javase/6/docs/technotes/tools/share/jhat.html. Accessed 31 July 2016
Java Memory Map Tool. http://docs.oracle.com/javase/6/docs/technotes/tools/share/jmap.html. Accessed 31 July 2016
JavaScript Memory Profiling. https://developer.chrome.com/devtools/docs/javascript-memory-profiling. Accessed 31 July 2016
Gu, T., Cao, C., Xu, C., Ma, X., Zhang, L., Lü, J.: Low-disruptive dynamic updating of Java applications. Inf. Softw. Technol. 56(9), 1086–1098 (2014)
Magill, S., Hicks, M., Subramanian, S., McKinley, K.S.: Automating object transformations for dynamic software updating. In: Proceedings of ACM International Conference on Object Oriented Programming Systems Languages and Applications, pp. 265–280 (2012)
Marron, M., Sanchez, C., Su, Z., Fahndrich, M.: Abstracting runtime heaps for program understanding. IEEE Trans. Softw. Eng. 39(6), 774–786 (2013)
Mitchell, N., Sevitsky, G.: LeakBot: an automated and lightweight tool for diagnosing memory leaks in large Java applications. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, pp. 351–377. Springer, Heidelberg (2003). doi:10.1007/978-3-540-45070-2_16
Pauw, W.D., Sevitsky, G.: Visualizing reference patterns for solving memory leaks in Java. In: Proceedings of European Conference on Object-Oriented Programming, pp. 116–134 (1999)
Sumner, W.N., Zhang, X.: Memory indexing: canonicalizing addresses across executions. In: Proceedings of 18th ACM SIGSOFT International Symposium on Foundations of Software Engineering, pp. 217–226 (2010)
Sumner, W.N., Zhang, X.: Identifying execution points for dynamic analyses. In: Proceedings of 28th IEEE/ACM International Conference on Automated Software Engineering, pp. 81–91 (2013)
Xin, B., Sumner, W.N., Zhang, X.: Efficient program execution indexing. In: Proceedings of 29th ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 238–248 (2008)
Zeller, A.: Isolating cause-effect chains from computer programs. In: Proceedings of 10th ACM SIGSOFT Symposium on Foundations of Software Engineering, pp. 1–10 (2002)
Acknowledgements
This work was supported in part by National Basic Research 973 Program (Grant #2015CB352202), National Natural Science Foundation (Grants #61472177, #91318301, #61321491) of China. The authors would also like to thank the support of the Collaborative Innovation Center of Novel Software Technology and Industrialization, Jiangsu, China.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Gu, T., Liu, R., Ma, X., Zhao, Z. (2016). Precise Heap Differentiating Using Access Path and Execution Index. In: Zhang, L., Xu, C. (eds) Software Engineering and Methodology for Emerging Domains. NASAC 2016. Communications in Computer and Information Science, vol 675. Springer, Singapore. https://doi.org/10.1007/978-981-10-3482-4_10
Download citation
DOI: https://doi.org/10.1007/978-981-10-3482-4_10
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-10-3481-7
Online ISBN: 978-981-10-3482-4
eBook Packages: Computer ScienceComputer Science (R0)