RUS  ENG
Full version
JOURNALS // Proceedings of the Institute for System Programming of the RAS // Archive

Proceedings of ISP RAS, 2015 Volume 27, Issue 2, Pages 23–38 (Mi tisp120)

This article is cited in 1 paper

Dynamic Java program analysis using virtual machine modification

M. Ermakov, S. Vartanov

Department of Computational Mathematics and Cybernethics, Moscow State University

Abstract: At the present time automatic static and dynamic program analysis methods are extensively used during software development. Dynamic methods in particular allow cost-efficient detection of various runtime issues with minimal expert interaction, thus saving time and resources. Dynamic analysis methods for native applications employ external monitoring instruments and code modification in order to evaluate execution, while programs running under control of an interpreter or a virtual machine it offers a balanced observation layer – the interpreter or virtual machine itself. In this paper we focus on automatic memory profiling methods for Java applications running on Dalvik virtual machine – a part of rapidly growing Android operating system.
Current Dalvik VM limitations make it impossible to use complex Java profilers designed for desktop applications; Dalvik-compatible profiling tools provide insufficient data to perform deep memory usage analysis. In this paper we describe a set of extensions for Dalvik implementation of standard Java Debug Wire Protocol which allow tracking of in-depth program memory events: object allocation, garbage collection, memory read and write access. We present a debugger-level tool based on existing Dalvik Debug Monitor utility, that is compatible with the extended Dalvik VM and allows online tracking of aforementioned events along with base debugging features and gprof memory dump support. As the original DDM utility, our design supports concurrent tracking of multiple applications to identify memory usage issues related to interprocess communication.
We have used the developed system to analyze a set of standard Android applications identifying several memory usage trends, including prevalence of primitive array allocations and inefficient use of memory among standard Android GUI Java classes.

Keywords: dynamic program analysis, memory profiling, Java, Android.

DOI: 10.15514/ISPRAS-2015-27(2)-2



Bibliographic databases:


© Steklov Math. Inst. of RAS, 2024