Precise Heap Differentiating Using Access Path and Execution Index

Conference paper
Part of the Communications in Computer and Information Science book series (CCIS, volume 675)

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.

Keywords

Heap differentiating Dynamic analysis Memory leak 

Notes

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.

References

  1. 1.
    Java Heap Analysis Tool. http://docs.oracle.com/javase/6/docs/technotes/tools/share/jhat.html. Accessed 31 July 2016
  2. 2.
  3. 3.
    JavaScript Memory Profiling. https://developer.chrome.com/devtools/docs/javascript-memory-profiling. Accessed 31 July 2016
  4. 4.
    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)CrossRefGoogle Scholar
  5. 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
  6. 6.
    Marron, M., Sanchez, C., Su, Z., Fahndrich, M.: Abstracting runtime heaps for program understanding. IEEE Trans. Softw. Eng. 39(6), 774–786 (2013)CrossRefGoogle Scholar
  7. 7.
    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 CrossRefGoogle Scholar
  8. 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. 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. 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. 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. 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

Copyright information

© Springer Nature Singapore Pte Ltd. 2016

Authors and Affiliations

  • Tianxiao Gu
    • 1
  • Ruiqi Liu
    • 1
  • Xiaoxing Ma
    • 1
  • Zelin Zhao
    • 1
  1. 1.Department of Computer Science and TechnologyNanjing UniversityNanjingChina

Personalised recommendations