Static Dalvik Bytecode Optimization for Android Applications

Since just-in-time (JIT) has considerable overhead to detect hot spots and compile them at runtime, using sophisticated optimization techniques for embedded devices means that any resulting performance improvements will be limited. In this paper, we introduce a novel static Dalvik bytecode optimization framework, as a complementary compilation of the Dalvik virtual machine, to improve the performance of Android applications. Our system generates optimized Dalvik bytecodes by using Low Level Virtual Machine (LLVM). A major obstacle in using LLVM for optimizing Dalvik bytecodes is determining how to handle the high-level language features of the Dalvik bytecode in LLVM IR and how to optimize LLVM IR conforming to the language information of the Dalvik bytecode. To this end, we annotate the high-level language features of Dalvik bytecode to LLVM IR and successfully optimize Dalvik bytecodes through instruction selection processes. Our experimental results show that our system with JIT improves the performance of Android applications by up to 6.08 times, and surpasses JIT by up to 4.34 times.

[1]  Yuan Zhang,et al.  Swift: a register-based JIT compiler for embedded JVMs , 2012, VEE '12.

[2]  Julia L. Lawall,et al.  VMKit: a substrate for managed runtime environments , 2010, VEE '10.

[3]  Javed Absar,et al.  Eliminating partially-redundant array-bounds check in the Android Dalvik JIT compiler , 2011, PPPJ.

[4]  Yeong-Kyu Lim,et al.  A Selective Ahead-Of-Time Compiler on Android Device , 2012, 2012 International Conference on Information Science and Applications.

[5]  Cheng Wang,et al.  Acceldroid: Co-designed acceleration of Android bytecode , 2013, Proceedings of the 2013 IEEE/ACM International Symposium on Code Generation and Optimization (CGO).

[6]  Vikram S. Adve,et al.  LLVM: a compilation framework for lifelong program analysis & transformation , 2004, International Symposium on Code Generation and Optimization, 2004. CGO 2004..

[7]  Minseong Kim,et al.  AndroScope: An Insightful Performance Analyzer for All Software Layers of the Android-Based Systems , 2013 .

[8]  Venkatesh Krishnan,et al.  sEc: A Portable Interpreter Optimizing Technique for Embedded Java Virtual Machine , 2002, Java Virtual Machine Research and Technology Symposium.

[9]  Wei-Kuan Shih,et al.  A method-based ahead-of-time compiler for Android applications , 2011, 2011 Proceedings of the 14th International Conference on Compilers, Architectures and Synthesis for Embedded Systems (CASES).

[10]  Amer Diwan,et al.  Partial redundancy elimination for access path expressions , 1999, Softw. Pract. Exp..

[11]  Laurie Hendren,et al.  Soot: a Java bytecode optimization framework , 2010, CASCON.