Precise Heap Differentiating Using Access Path and Execution Index
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.
KeywordsHeap differentiating Dynamic analysis Memory leak
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.
- 1.Java Heap Analysis Tool. http://docs.oracle.com/javase/6/docs/technotes/tools/share/jhat.html. Accessed 31 July 2016
- 2.Java Memory Map Tool. http://docs.oracle.com/javase/6/docs/technotes/tools/share/jmap.html. Accessed 31 July 2016
- 5.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)Google Scholar
- 8.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)Google Scholar
- 9.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)Google Scholar
- 10.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)Google Scholar
- 11.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)Google Scholar
- 12.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)Google Scholar