Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3570361.3592503acmconferencesArticle/Chapter ViewAbstractPublication PagesmobicomConference Proceedingsconference-collections
research-article
Public Access

DroidPerf: Profiling Memory Objects on Android Devices

Published: 10 July 2023 Publication History
  • Get Citation Alerts
  • Abstract

    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.

    References

    [1]
    2014. A Closer Look at Android RunTime (ART) in Android L. https://www.anandtech.com/show/8231/a-closer-look-at-android-runtime-art-in-android-l/.
    [2]
    2020. Performance Monitoring Unit in ARM. https://lnxblog.github.io/2020/02/02/arm-pmu.html.
    [3]
    2021. The Android Profiler. https://developer.android.com/studio/profile/android-profiler.
    [4]
    2021. Dalvik Debug Monitor Server(DDMS). http://www.dre.vanderbilt.edu/~schmidt/android/android-4.0/out/target/common/docs/doc-comment-check/guide/developing/tools/ddms.html.
    [5]
    2021. The Datadog Profiler. https://www.datadoghq.com.
    [6]
    2021. Perfetto - System profiling, app tracing and trace analysis. https://perfetto.dev.
    [7]
    2022. Android Runtime (ART) and Dalvik. https://source.android.com/devices/tech/dalvik/index.html.
    [8]
    2022. Applozic: Real-Time Chat and Messaging API for Developers. https://www.applozic.com.
    [9]
    2022. ART TI. https://source.android.com/devices/tech/dalvik/art-ti.
    [10]
    2022. CaffeineMark 3.0 Benchmarks. http://www.benchmarkhq.ru/cm30/.
    [11]
    2022. DNS-based Host Blocker (and lightweight ad blocker) for Android. https://github.com/julian-klode/dns66.
    [12]
    2022. EEMBC Benchmarks. https://github.com/eembc/coremark.
    [13]
    2022. Foxy Droid. https://github.com/kitsunyan/foxy-droid.
    [14]
    2022. How ART works. https://source.android.com/devices/tech/dalvik/configure.html.
    [15]
    2022. LeakCanary. https://square.github.io/leakcanary/.
    [16]
    2022. Media Picker. https://github.com/alhazmy13/MediaPicker.
    [17]
    2022. MicroG Services Core (GmsCore). https://github.com/microg/GmsCore.
    [18]
    2022. Official Android SDK for Stream Chat. https://github.com/GetStream/stream-chat-android.
    [19]
    2022. OxBenchmark suite. https://code.google.com/archive/p/0xbench/.
    [20]
    2022. PerfMon Events. https://perfmon-events.intel.com.
    [21]
    2022. Rajawali: Android OpenGL ES 2.0/3.0 Engine. https://github.com/Rajawali/Rajawali.
    [22]
    2022. RxJava bindings for Android. https://github.com/ReactiveX/RxAndroid.
    [23]
    2022. SciMark 2.0 Benchmarks. https://math.nist.gov/scimark2/.
    [24]
    2022. Simpleperf. https://developer.android.com/ndk/guides/simpleperf.
    [25]
    2022. Stetho. https://github.com/facebook/stetho.
    [26]
    2022. Twire: Alternative and open source Twitch client for Android. https://github.com/twireapp/Twire.
    [27]
    Matthew Arnold and Peter F. Sweeney. 1999. Approximating the Calling Context Tree via Sampling. Technical Report 21789. IBM.
    [28]
    Daniel Arp, Michael Spreitzenbarth, Malte Hubner, Hugo Gascon, and Konrad Rieck. 2014. DREBIN: effective and explainable detection of android malware in your pocket. Proceedings of 21st Annual Network and Distributed System Security Symposium (NDSS'14), 1--15.
    [29]
    Kathy Wain Yee Au, Yi Fan Zhou, Zhen Huang, and David Lie. 2012. PScout: analyzing the Android permission specification. Proceedings of the 2012 ACM conference on Computer and communications security (CCS'12), 217--228.
    [30]
    Sakil Barbhuiya, L Peter Kilpatrick, and S. Dimitrios Nikolopoulos. 2020. DroidLight: Lightweight Anomaly-based Intrusion Detection System for Smartphone Devices. Proceedings of the 21st International Conference on Distributed Computing and Networking (ICDCN), 1--10.
    [31]
    Cédric Bastoul and Paul Feautrier. 2003. Improving Data Locality by Chunking. International Conference on Compiler Construction, 320--334.
    [32]
    Erik Berg and Erik Hagersten. 2005. Fast data-locality profiling of native execution. SIGMETRICS Perform. Eval. Rev. 33, 1 (2005), 169--180.
    [33]
    Kristof Beyls and Erik D'Hollander. 2006. Discovery of Locality-Improving Refactorings by Reuse Path Analysis. Proc. of the 2nd Intl. Conf. on High Performance Computing and Communications (HPCC) (2006).
    [34]
    Kristof Beyls and Erik H. D'Hollander. 2009. Refactoring for Data Locality. Computer 42, 2 (Feb. 2009), 62 --71.
    [35]
    Calin Caşcaval and David A. Padua. 2003. Estimating cache misses and locality using stack distances. In Proc. of the 17th annual Intl. conference on Supercomputing (San Francisco, CA, USA) (ICS '03). ACM.
    [36]
    Oracle Corporation. 2007. JVMTI Tool Interface Online Document. https://docs.oracle.com/javase/8/docs/platform/jvmti/jvmti.html.
    [37]
    Eduardo Cuervo, Arun Balasubramanian, Daeki Cho, Alec Wolman, Stefan Saroiu, Ranveer Chandra, and Paramvir Bahl. 2010. MAUI: making smartphones last longer with code offload. Proceedings of the 8th international conference on Mobile systems, applications, and services (MobiSys), 49--62.
    [38]
    Shuaifu Dai, Alok Tongaonkar, Xiaoyin Wang, Antonio Nucci, and Dawn Song. 2013. NetworkProfiler: Towards automatic fingerprinting of Android apps. Proceedings IEEE INFOCOM.
    [39]
    Chen Ding and Yutao Zhong. 2003. Predicting whole-program locality through reuse distance analysis. In Proc. of the ACM SIGPLAN 2003 conference on Programming Language Design and Implementation (San Diego, California, USA) (PLDI '03). ACM, New York, NY, USA, 245--257.
    [40]
    Hossein Falaki, Dimitrios Lymberopoulos, Ratul Mahajan, Srikanth Kandula, and Deborah Estrin. 2010. A First Look at Traffic on Smart-phones. Proceedings of the 10th ACM SIGCOMM conference on Internet measurement (IMC), 281--287.
    [41]
    Hossein Falaki, Ratul Mahajan, and Deborah Estrin. 2011. SystemSens: A Tool for Monitoring Usage in Smartphone Research Deployments. Proceedings of the sixth international workshop on MobiArch, 25--30.
    [42]
    Hossein Falaki, Ratul Mahajan, Srikanth Kandula, Dimitrios Lymberopoulos, Ramesh Govindan, and Deborah Estrin. 2010. Diversity in Smartphone Usage. Proceedings of the 8th international conference on Mobile systems, applications, and services (MobiSys), 179--194.
    [43]
    Michal Ficek, Tomáš Pop, Petr Vlácil, Kencl Lukas Dufková, Katerina, and Martin Tomek. 2010. Performance study of active tracking in a cellular network using a modular signaling platform. Proceedings of the 8th International Conference on Mobile Systems, Applications, and Services (MobiSys), 239--254.
    [44]
    Jason Flinn and M. Satyanarayanan. 1999. PowerScope: A Tool for Profiling the Energy Usage of Mobile Applications. Mobile Computing Systems and Applications.
    [45]
    D. Brett Higgins, Azarias Reda, Timur Alperovich, Nelson Jason Flinn, J TJ Giuli, David Brain Noble, and Leslie David Watson. 2010. Intentional networking: opportunistic exploitation of mobile network diversity. Proceedings of the sixteenth annual international conference on Mobile computing and networking (MobiCom), 73--84.
    [46]
    Junxian Huang, Qiang Xu, Birjodh Tiwana, Morley Zhuoqing Mao, Ming Zhang, and Paramvir Bahl. 2010. Anatomizing Application Performance Differences on Smartphones. Proceedings of the 8th international conference on Mobile systems, applications, and services (MobiSys), 165--178.
    [47]
    Canturk Isci and Margaret Martonosi. 2003. Runtime Power Monitoring in High-End Processors: Methodology and Empirical Data. Proceedings of the 36th annual IEEE/ACM International Symposium on Microarchitecture (MICRO).
    [48]
    Russ Joseph and Margaret Martonosi. 2001. Run-time power estimation in high performance microprocessors. Proceedings of the 2001 international symposium on Low power electronics and design (ISLPED), 135--140.
    [49]
    Takeshi Kamiyama, Hiroshi Inamura, and Ken Ohta. 2018. A model-based energy profiler using online logging for Android applications. 2018 International Conference on Advances in Computing, Communication Control and Networking (ICACCCN).
    [50]
    Sameer Kumar and Chris Wilkerson. 1998. Exploiting spatial locality in data caches using spatial footprints. Proceedings. 25th Annual International Symposium on Computer Architecture, 357--368.
    [51]
    LinuxCafeFederation. 2022. Awesome Android Apps. https://github.com/LinuxCafeFederation/awesome-android.
    [52]
    Xu Liu and John Mellor-Crummey. 2011. Pinpointing data locality problems using data-centric analysis. In Proc. of the 9th IEEE/ACM Intl. Symp. on Code Generation and Optimization. Washington, DC, 171--180.
    [53]
    Xu Liu and John Mellor-Crummey. 2013. Pinpointing data locality bottlenecks with low overhead. In Performance Analysis of Systems and Software (ISPASS), 2013 IEEE Intl. Symp. 183--193.
    [54]
    Xu Liu and John Mellor-Crummey. 2013. Pinpointing Data Locality Bottlenecks with Low Overheads. In Proc. of the 2013 IEEE Intl. Symp. on Performance Analysis of Systems and Software.
    [55]
    Xu Liu and John M. Mellor-Crummey. 2013. A Data-centric Profiler for Parallel Programs. In SC.
    [56]
    Xu Liu, Kamal Sharma, and John Mellor-Crummey. 2014. ArrayTool: a lightweight profiler to guide array regrouping. In PACT.
    [57]
    Xu Liu and Bo Wu. 2015. ScaAnalyzer: A Tool to Identify Memory Scalability Bottlenecks in Parallel Programs. In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis (Austin, Texas) (SC '15). ACM, New York, NY, USA, Article 47, 12 pages.
    [58]
    Adrienne Porter Felt, Erika Chin, Steve Hanna, Dawn Song, and David Wagner. 2011. Android Permissions Demystified. Proceedings of the 18th ACM Conference on Computer and Communications Security (CCS'11).
    [59]
    Feng Qian, Zhaoguang Wang, Alexandre Gerber, Morley Zhuoqing Mao, Subhabrata Sen, and Oliver Spatscheck. 2011. Profiling Resource Usage for Mobile Applications: A Cross-layer Approach. Proceedings of the 9th international conference on Mobile systems, applications, and services (MobiSys), 321--334.
    [60]
    Lu Qiong, Tianyong Wu, Jiwei Yan, and Jun Yan. 2016. Lightweight Method-Level Energy Consumption Estimation for Android Applications. 10th International Symposium on Theoretical Aspects of Software Engineering (TASE).
    [61]
    Ashay Rane and James Browne. 2012. Enhancing performance optimization of multicore chips and multichip nodes with data structure metrics. In PACT.
    [62]
    Xipeng Shen, Jonathan Shaw, Brian Meeker, and Chen Ding. 2007. Locality approximation using time. In Proc. of the 34th annual ACM SIGPLAN-SIGACT Symposium on Principles Of Programming Languages (Nice, France) (POPL '07). ACM, New York, NY, USA, 55--61.
    [63]
    Clayton Shepard, Ahmad Rahmati, Chad Tossell, Lin Zhong, and Phillip Kortum. 2010. LiveLab: Measuring Wireless Networks and Smartphone Users in the Field. ACM SIGMETRICS Performance Evaluation Review, 165--178.
    [64]
    Ki-Cheol Son and Jong-Yeol Lee. 2011. The method of android application speed up by using NDK. International Conference on Awareness Science and Technology (iCAST), 382--385.
    [65]
    Jürgen Stumpp. 2022. Awesome Android. https://github.com/JStumpp/awesome-android.
    [66]
    Nathan R. Tallent. 2010. Performance analysis for parallel programs from multicore to petascale. Ph.D. thesis. Department of Computer Science, Rice University.
    [67]
    Fei Wang, Xiaohua Shi, and Xinghai Lu. 2020. A low-overhead and efficient Java object profiler on ART virtual machine. Journal of Intelligent and Fuzzy Systems.
    [68]
    Vince Weaver. 2013. The Unofficial Linux Perf Events Web-Page. http://web.eece.maine.edu/~vweaver/projects/perf_events. Last accessed: Dec. 12, 2013.
    [69]
    Xuetao Wei, Lorenzo Gomez, Gheorghe Lulian Neamtiu, and Michalis Faloutsos. 2012. ProfileDroid: Multi-layer Profiling of Android Applications. Proceedings of the 18th annual international conference on Mobile computing and networking (Mobicom), 137--148.
    [70]
    Guoqing Xu. 2012. Finding reusable data structures. ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 1017--1034.
    [71]
    Qiang Xu, Jeffrey Erman, Alexandre Gerber, Z. Morley Mao, Jeffrey Pang, and Shobha Venkataraman. 2011. Identifying Diverse Usage Behaviors of Smartphone Apps. Proceedings of the 2011 ACM SIGCOMM conference on Internet measurement conference (IMC), 329--344.
    [72]
    Peixing Yang and Di Zhou. 2015. A Light Weight Energy Profiling Approach on Android Devices. 4th International Conference on Mechatronics, Materials, Chemistry and Computer Engineering (ICMMCCE).
    [73]
    Lide Zhang, Birjodh Tiwana, Zhiyun Qian, Zhaoguang Wang, P. Robert Dick, Morley Zhuoqing Mao, and Lei Yang. 2010. Accurate online power estimation and automatic battery behavior based power model generation for smartphones. Proceedings of the eighth IEEE/ACM/IFIP international conference on Hardware/software codesign and system synthesis (CODES/ISSS), 105--114.
    [74]
    Min Zhao, Tao Zhang, Fangbin Ge, and Zhijian Yuan. 2012. Robot-Droid: A Lightweight Malware Detection Framework On Smartphones. Journal of Networks, 715--722.
    [75]
    Yujie Zhao, Zhanyong Tang, Dongxu Peng, Dingyi Fang, Xiaojiang Chen, and Zheng Wang. 2020. Compile-time Code Virtualization for Android Applications. Journal of Computers and Security.
    [76]
    Yutao Zhong and Wentao Chang. 2008. Sampling-based program locality approximation. In Proc. of the 7th Intl. Symposium on Memory Management (Tucson, AZ, USA) (ISMM '08). ACM, New York, NY, USA, 91--100.
    [77]
    Yutao Zhong, Xipeng Shen, and Chen Ding. 2009. Program locality analysis using reuse distance. ACM Trans. Program. Lang. Syst. 31, 6 (Aug. 2009), 20:1--20:39.

    Cited By

    View all
    • (2024)Detecting cyberbullying using deep learning techniques: a pre-trained glove and focal loss techniquePeerJ Computer Science10.7717/peerj-cs.196110(e1961)Online publication date: 27-Mar-2024
    • (2024)Precision-Driven Product Recommendation Software: Unsupervised Models, Evaluated by GPT-4 LLM for Enhanced Recommender SystemsSoftware10.3390/software30100043:1(62-80)Online publication date: 29-Feb-2024
    • (2024)A Survey on Factors Preventing the Adoption of Automated Software Testing: A Principal Component Analysis ApproachSoftware10.3390/software30100013:1(1-27)Online publication date: 2-Jan-2024
    • Show More Cited By

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    ACM MobiCom '23: Proceedings of the 29th Annual International Conference on Mobile Computing and Networking
    October 2023
    1605 pages
    ISBN:9781450399906
    DOI:10.1145/3570361
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 10 July 2023

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. profiling
    2. memory inefficiencies
    3. performance
    4. Android

    Qualifiers

    • Research-article

    Funding Sources

    Conference

    ACM MobiCom '23
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 440 of 2,972 submissions, 15%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)505
    • Downloads (Last 6 weeks)30

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)Detecting cyberbullying using deep learning techniques: a pre-trained glove and focal loss techniquePeerJ Computer Science10.7717/peerj-cs.196110(e1961)Online publication date: 27-Mar-2024
    • (2024)Precision-Driven Product Recommendation Software: Unsupervised Models, Evaluated by GPT-4 LLM for Enhanced Recommender SystemsSoftware10.3390/software30100043:1(62-80)Online publication date: 29-Feb-2024
    • (2024)A Survey on Factors Preventing the Adoption of Automated Software Testing: A Principal Component Analysis ApproachSoftware10.3390/software30100013:1(1-27)Online publication date: 2-Jan-2024
    • (2024)Performance Evaluation and Analysis of Urban-Suburban 5G Cellular NetworksComputers10.3390/computers1304010813:4(108)Online publication date: 22-Apr-2024
    • (2023)Recommending K-Wave Items Tailored for Small-Sized Exporters by Incorporating Dense and Sparse VectorsSustainability10.3390/su15221609815:22(16098)Online publication date: 20-Nov-2023
    • (2023)IoV Vulnerability Classification Algorithm Based on Knowledge GraphElectronics10.3390/electronics1223474912:23(4749)Online publication date: 23-Nov-2023
    • (2023)CLICK: Integrating Causal Inference and Commonsense Knowledge Incorporation for Counterfactual Story GenerationElectronics10.3390/electronics1219417312:19(4173)Online publication date: 8-Oct-2023
    • (2023)Improvement of Malicious Software Detection Accuracy through Genetic Programming Symbolic Classifier with Application of Dataset Oversampling TechniquesComputers10.3390/computers1212024212:12(242)Online publication date: 21-Nov-2023

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Get Access

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media