DroidPerf: profiling memory objects on android devices

B Li, Q Zhao, S Jiao, X Liu - Proceedings of the 29th annual international …, 2023 - dl.acm.org
Proceedings of the 29th annual international conference on mobile computing …, 2023dl.acm.org
Optimizing performance inefficiencies in memory hierarchies is well-known for native
languages, such as C and C++. There are few studies, however, on exploring memory
inefficiencies in Android Runtime (ART). Running in ART, managed languages, such as
Java and Kotlin, employ various abstractions, such as runtime support, ahead-of-time (AOT)
compilation, and garbage collection (GC), which hide important execution details from the
plain source code. In this paper, we develop DroidPerf, a lightweight, object-centric memory …
Optimizing performance inefficiencies in memory hierarchies is well-known for native languages, such as C and C++. There are few studies, however, on exploring memory inefficiencies in Android Runtime (ART). Running in ART, managed languages, such as Java and Kotlin, employ various abstractions, such as runtime support, ahead-of-time (AOT) compilation, and garbage collection (GC), which hide important execution details from the plain source code.
In this paper, we develop DroidPerf, a lightweight, object-centric memory profiler for ART, which associates memory inefficiencies with objects created and used in Android apps. With such object-level information, DroidPerf is able to guide locality optimization on memory layouts, access patterns, and allocation patterns. Guided by DroidPerf, we optimize a number of popular Android apps and obtain significant performance gains. Many inefficiencies are confirmed by the code authors and optimization patches are under evaluation for upstreaming. As a practical tool, DroidPerf incurs ~32% runtime overhead and ~14% memory overhead on average. Furthermore, DroidPerf works in the production environment with off-the-shelf hardware, OS, Dalvik virtual machine, ART, and unmodified Android app source code.
ACM Digital Library