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 info
- PDF / 277,803 Bytes
- 16 Pages / 439.37 x 666.142 pts Page_size
- 9 Downloads / 229 Views
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
1
· Dynamic analysis · Memory leak
Introduction
Programs written in modern object-oriented programming languages such as C++ and Java generally dynamically allocate and deallocate a large set of heap objects during execution. As the heap reflects the majority of runtime information of a running program, determining a proper set of objects, together with their properties, is a critical step to various dynamic analysis. For example, a number of memory leak diagnosing tools require to compare two heaps to identify leaked objects [1,3,8]. Such tools may only be useful if they c Springer Nature Singapore Pte Ltd. 2016 L. Zhang and C. Xu (Eds.): NASAC 2016, CCIS 675, pp. 133–148, 2016. DOI: 10.1007/978-981-10-3482-4 10
134
T. Gu et al.
can report a small set of candidates for leaked objects. Besides, various fault localization tools leverage runtime state differences between a failing execution and a passing execution to guide the search of the fault location or narrow the failing input space [12], which inevitably demand a high precision of differences. With the increasing complexity of today’s software systems, heap differentiating, which aims to determine a proper set of objects among heaps, faces new challenges. This is because in large scale software systems, such as a big data system, the heap may be tremendously large, even in a minimum simplified execution environment for program debugging. Most runtime environments and debuggers support to create a snapshot
Data Loading...