skip to main content
10.1145/2950290.2950316acmconferencesArticle/Chapter ViewAbstractPublication PagesfseConference Proceedingsconference-collections
research-article

DiagDroid: Android performance diagnosis via anatomizing asynchronous executions

Published: 01 November 2016 Publication History

Abstract

Rapid UI responsiveness is a key consideration to Android app developers. However, the complicated concurrency model of Android makes it hard for developers to understand and further diagnose the UI performance. This paper presents DiagDroid, a tool specifically designed for Android UI performance diagnosis. The key notion of DiagDroid is that UI-triggered asynchronous executions contribute to the UI performance, and hence their performance and their runtime dependency should be properly captured to facilitate performance diagnosis. However, there are tremendous ways to start asynchronous executions, posing a great challenge to profiling such executions and their runtime dependency. To this end, we properly abstract five categories of asynchronous executions as the building basis. As a result, they can be tracked and profiled based on the specifics of each category with a dynamic instrumentation approach carefully tailored for Android. DiagDroid can then accordingly profile the asynchronous executions in a task granularity, equipping it with low-overhead and high compatibility merits. The tool is successfully applied in diagnosing 33 real-world open-source apps, and we find 14 of them contain 27 performance issues. It shows the effectiveness of our tool in Android UI performance diagnosis. The tool is open-source released online.

References

[1]
S. Alimadadi, A. Mesbah, and K. Pattabiraman. Understanding asynchronous interactions in full-stack JavaScript. In Proc. of ICSE ’16, 2016.
[2]
E. Altman, M. Arnold, S. Fink, and N. Mitchell. Performance analysis of idle programs. In Proc. of OOPSLA ’10, pages 739–753, 2010.
[3]
D. Amalfitano, A. R. Fasolino, P. Tramontana, S. De Carmine, and A. M. Memon. Using gui ripping for automated testing of android applications. In Proc. of ASE ’12, pages 258–261, 2012.
[4]
C. Amrutkar, M. Hiltunen, T. Jim, K. Joshi, O. Spatscheck, P. Traynor, and S. Venkataraman. Why is my smartphone slow? on the fly diagnosis of underperformance on the mobile internet. In Proc. of DSN ’13, pages 1–8, 2013.
[5]
S. Anand, M. Naik, M. J. Harrold, and H. Yang. Automated concolic testing of smartphone apps. In Proc. of FSE ’12, pages 1–11, 2012.
[6]
Apktool: A tool for reverse engineering Android apk files. http://ibotpeaches.github.io/Apktool/.
[7]
AsyncTask. http://developer.android.com/reference/ android/os/AsyncTask.html.
[8]
Automating User Interface Tests. http://developer. android.com/training/testing/ui-testing/index.html.
[9]
T. Azim and I. Neamtiu. Targeted and depth-first exploration for systematic testing of android apps. In Proc. of OOPLSA ’13, pages 641–660, 2013.
[10]
A. Banerjee. Static analysis driven performance and energy testing. In Proc. of FSE ’14, pages 791–794, 2014.
[11]
A. Banerjee, S. Chattopadhyay, and A. Roychoudhury. Static analysis driven cache performance testing. In Proc. of RTSS ’13, pages 319–329, 2013.
[12]
G. Bavota, M. Linares-Vásquez, C. E. Bernal-Cárdenas, M. Di Penta, R. Oliveto, and D. Poshyvanyk. The impact of api change- and fault-proneness on the user ratings of android apps. Software Engineering, IEEE Transactions on, 41(4):384–407, Apr 2015.
[13]
J. Burnim and K. Sen. Asserting and checking determinism for multithreaded programs. In Proc. of FSE ’09, pages 3–12, 2009.
[14]
Y. Cai and L. Cao. Effective and precise dynamic detection of hidden races for java programs. In Proc. of FSE ’15, pages 450–461, 2015.
[15]
Q. A. Chen, H. Luo, S. Rosen, Z. M. Mao, K. Iyer, J. Hui, K. Sontineni, and K. Lau. Qoe doctor: Diagnosing mobile app qoe with automated ui control and cross-layer analysis. In Proc. of IMC ’14, pages 151–164, 2014.
[16]
W. Choi, G. Necula, and K. Sen. Guided GUI testing of android apps with minimal restart and approximate learning. In Proc. of OOPSLA ’13, pages 623–640, 2013.
[17]
S. R. Choudhary, A. Gorla, and A. Orso. Automated test input generation for android: Are we there yet? In Proc. of ASE ’15, pages 429–440, 2015.
[18]
Configuring ART. https://source.android.com/ devices/tech/dalvik/configure.html.
[19]
DiagDroid - Android Performance Diagnosis via Anatomizing Asynchronous Executions. http://www.cudroid.com/DiagDroid.
[20]
D. Engler, D. Y. Chen, S. Hallem, A. Chou, and B. Chelf. Bugs as deviant behavior: A general approach to inferring errors in systems code. In Proc. of SOSP ’01, pages 57–72, 2001.
[21]
F-Droid. https://f-droid.org/.
[22]
FBReader - Favorite Book Reader. https://fbreader.org/.
[23]
Y. Fratantonio, A. Machiry, A. Bianchi, C. Kruegel, and G. Vigna. Clapp: Characterizing loops in android applications. In Proc. of FSE ’15, pages 687–697, 2015.
[24]
G. Gan, C. Ma, and J. Wu. Data Clustering: Theory, Algorithms, and Applications (ASA-SIAM Series on Statistics and Applied Probability). 2007.
[25]
L. Gomez, I. Neamtiu, T. Azim, and T. Millstein. Reran: Timing- and touch-sensitive record and replay for android. In Proc. of ICSE ’13, pages 72–81, 2013.
[26]
M. S. Gordon, D. K. Hong, P. M. Chen, J. Flinn, S. Mahlke, and Z. M. Mao. Accelerating mobile applications through flip-flop replication. In Proc. of MobiSys ’15, pages 137–150, 2015.
[27]
K. Herzig, M. Greiler, J. Czerwonka, and B. Murphy. The art of testing less without sacrificing quality. In Proc. of ICSE ’15, pages 483–493, 2015.
[28]
J. Huang and L. Rauchwerger. Finding schedule-sensitive branches. In Proc. of FSE ’15, pages 439–449, 2015.
[29]
C. S. Jensen, M. R. Prasad, and A. Møller. Automated testing with targeted event sequence generation. In Proc. of ISSTA ’13, pages 67–77, 2013.
[30]
M. Ji, E. W. Felten, and K. Li. Performance measurements for multithreaded programs. SIGMETRICS Perform. Eval. Rev., 26(1):161–170, June 1998.
[31]
M. Jovic, A. Adamoli, and M. Hauswirth. Catch me if you can: Performance bug detection in the wild. In Proc. of OOPLSA ’11, pages 155–170, 2011.
[32]
V. Kahlon, N. Sinha, E. Kruus, and Y. Zhang. Static data race detection for concurrent programs with asynchronous calls. In Proc. of FSE ’09, pages 13–22, 2009.
[33]
K. Lee, D. Chu, E. Cuervo, J. Kopf, Y. Degtyarev, S. Grizan, A. Wolman, and J. Flinn. Outatime: Using speculation to enable low-latency continuous interaction for mobile cloud gaming. In Proc. of MobiSys ’15, pages 151–165, 2015.
[34]
Y. Lei and R. H. Carver. Reachability testing of concurrent programs. IEEE Trans. Softw. Eng., 32(6):382–403, June 2006.
[35]
Y. Lin, S. Okur, and D. Dig. Study and refactoring of android asynchronous programming. In Proc. of ASE ’15, pages 224–235, 2015.
[36]
Y. Lin, C. Radoi, and D. Dig. Retrofitting concurrency for android applications through refactoring. In Proc. of FSE ’14, pages 341–352, 2014.
[37]
Y.-D. Lin, J. Rojas, E.-H. Chu, and Y.-C. Lai. On the accuracy, efficiency, and reusability of automated test oracles for android devices. Software Engineering, IEEE Transactions on, 40(10):957–970, Oct 2014.
[38]
Y. Liu, C. Xu, and S.-C. Cheung. Characterizing and detecting performance bugs for smartphone applications. In Proc. of ICSE ’14, pages 1013–1024, 2014.
[39]
Y. Liu, C. Xu, and S.-C. Cheung. Diagnosing energy efficiency and performance for mobile internetware applications. Software, IEEE, 32(1):67–75, Jan 2015.
[40]
Low RAM Configuration. https://source.android.com/ devices/tech/config/low-ram.html.
[41]
S. Lu, S. Park, E. Seo, and Y. Zhou. Learning from mistakes: A comprehensive study on real world concurrency bug characteristics. In Proc. of ASPLOS ’08, pages 329–339, 2008.
[42]
A. Machiry, R. Tahiliani, and M. Naik. Dynodroid: An input generation system for android apps. In Proc. of FSE ’13, pages 224–234, 2013.
[43]
R. Mahmood, N. Mirzaei, and S. Malek. Evodroid: Segmented evolutionary testing of android apps. In Proc. of FSE ’14, pages 599–609, 2014.
[44]
N. Mirzaei, S. Malek, C. S. Păsăreanu, N. Esfahani, and R. Mahmood. Testing android apps through symbolic execution. ACM SIGSOFT Software Engineering Notes, 37(6):1–5, Nov. 2012.
[45]
Monkeyrunner. http://developer.android.com/tools/ help/monkeyrunner concepts.html.
[46]
Y. Moon, D. Kim, Y. Go, Y. Kim, Y. Yi, S. Chong, and K. Park. Practicalizing delay-tolerant mobile apps with cedos. In Proc. of MobiSys ’15, pages 419–433, 2015.
[47]
F. F.-H. Nah. A study on tolerable waiting time: how long are web users willing to wait? Behaviour & Information Technology, 23(3):153–163, 2004.
[48]
D. T. Nguyen, G. Zhou, G. Xing, X. Qi, Z. Hao, G. Peng, and Q. Yang. Reducing smartphone application delay through read/write isolation. In Proc. of Mobisys ’15, pages 287–300, 2015.
[49]
J. Nielsen. Usability Engineering. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 1993.
[50]
S. Niida, S. Uemura, and H. Nakamura. Mobile services. IEEE Vehicular Technology Magazine, 5(3):61–67, Sep 2010.
[51]
A. Nistor, P. C. Chang, C. Radoi, and S. Lu. Caramel: Detecting and fixing performance problems that have non-intrusive fixes. In Proc. of ICSE ’15, 2015.
[52]
OpenLaw - Die Gesetze App. https://openlaw.jdsoft.de/.
[53]
Processes and Threads. http://developer.android. com/guide/components/processes-and-threads.html.
[54]
Profiling with Traceview and dmtracedump. http://developer.android.com/tools/debugging/ debugging-tracing.html.
[55]
Z. Qin, Y. Tang, E. Novak, and Q. Li. Mobiplay: A remote execution based record-and-replay tool for mobile applications. In Proc. of ICSE ’16, 2016.
[56]
L. Ravindranath, S. Nath, J. Padhye, and H. Balakrishnan. Automatic and scalable fault detection for mobile applications. In Proc. of Mobisys ’14, pages 190–203, 2014.
[57]
L. Ravindranath, J. Padhye, S. Agarwal, R. Mahajan, I. Obermiller, and S. Shayandeh. Appinsight: Mobile app performance monitoring in the wild. In Proc. of OSDI ’12, pages 107–120, 2012.
[58]
L. Ravindranath, J. Padhye, R. Mahajan, and H. Balakrishnan. Timecard: Controlling user-perceived delays in server-based mobile applications. In Proc. of SOSP ’13, pages 85–100, 2013.
[59]
RobotiumTech. Robotium: User scenario testing for Android. http://www.robotium.org.
[60]
V. Roto and A. Oulasvirta. Need for non-visual feedback with long response times in mobile hci. In Proc. of WWW ’05, pages 775–781, 2005.
[61]
A. Sarkar, J. Guo, N. Siegmund, S. Apel, and K. Czarnecki. Cost-efficient sampling for performance prediction of configurable systems. In Proc. of ASE ’15, pages 342–352, 2015.
[62]
M. Selakovic and M. Pradel. Performance issues and optimizations in JavaScript: An empirical study. In Proc. of ICSE ’16, 2016.
[63]
StrictMode. http://developer.android.com/reference/ android/os/StrictMode.html.
[64]
V. Terragni, S.-C. Cheung, and C. Zhang. Recontest: Effective regression testing of concurrent programs. In Proc. of ICSE ’15, pages 246–256, 2015.
[65]
Testing Support Library - UI Automator. https://developer.android.com/tools/ testing-support-library/index.html#UIAutomator.
[66]
R. A. to search for countries based on several parameters. https://github.com/abhi2rai/RestC.
[67]
UI/Application Exerciser Monkey. http: //developer.android.com/tools/help/monkey.html.
[68]
A. Wert, J. Happe, and L. Happe. Supporting swift reaction: Automatically uncovering performance problems by systematic experiments. In Proc. of ICSE ’13, pages 552–561, 2013.
[69]
Xposed Module overview. http://repo.xposed.info/module-overview.
[70]
Xposed Module Repository. http://repo.xposed.info.
[71]
X. Yu, S. Han, D. Zhang, and T. Xie. Comprehending performance from real-world execution traces: A device-driver case. SIGPLAN Not., 49(4):193–206, Feb. 2014.
[72]
L. Zhang, D. R. Bild, R. P. Dick, Z. M. Mao, and P. Dinda. Panappticon: Event-based tracing to measure mobile application and platform performance. In Proc. of CODES+ISSS ’13, pages 1–10, 2013.
[73]
Y. Zhang, J. Guo, E. Blais, and K. Czarnecki. Performance prediction of configurable software systems by fourier learning. In Proc. of ASE ’15, pages 365–373, 2015.

Cited By

View all
  • (2024)Understanding and Detecting Inefficient Image Displaying Issues in Android AppsJournal of Computer Science and Technology10.1007/s11390-022-1670-339:2(434-459)Online publication date: 1-Mar-2024
  • (2023)Detection of Java Basic Thread Misuses Based on Static Event Analysis2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE)10.1109/ASE56229.2023.00145(1049-1060)Online publication date: 11-Sep-2023
  • (2022)A Systematical Study on Application Performance Management Libraries for AppsIEEE Transactions on Software Engineering10.1109/TSE.2021.307765448:8(3044-3065)Online publication date: 1-Aug-2022
  • Show More Cited By

Index Terms

  1. DiagDroid: Android performance diagnosis via anatomizing asynchronous executions

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    FSE 2016: Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering
    November 2016
    1156 pages
    ISBN:9781450342186
    DOI:10.1145/2950290
    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 ACM 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: 01 November 2016

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Android
    2. Performance Diagnosis
    3. UI Responsiveness

    Qualifiers

    • Research-article

    Funding Sources

    Conference

    FSE'16
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 17 of 128 submissions, 13%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)25
    • Downloads (Last 6 weeks)3
    Reflects downloads up to 02 Mar 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)Understanding and Detecting Inefficient Image Displaying Issues in Android AppsJournal of Computer Science and Technology10.1007/s11390-022-1670-339:2(434-459)Online publication date: 1-Mar-2024
    • (2023)Detection of Java Basic Thread Misuses Based on Static Event Analysis2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE)10.1109/ASE56229.2023.00145(1049-1060)Online publication date: 11-Sep-2023
    • (2022)A Systematical Study on Application Performance Management Libraries for AppsIEEE Transactions on Software Engineering10.1109/TSE.2021.307765448:8(3044-3065)Online publication date: 1-Aug-2022
    • (2022)A Survey of Performance Optimization for Mobile ApplicationsIEEE Transactions on Software Engineering10.1109/TSE.2021.307119348:8(2879-2904)Online publication date: 1-Aug-2022
    • (2022)How resource utilization influences UI responsiveness of Android softwareInformation and Software Technology10.1016/j.infsof.2021.106728141:COnline publication date: 1-Jan-2022
    • (2022)AppSPIN: reconfiguration-based responsiveness testing and diagnosing for Android AppsAutomated Software Engineering10.1007/s10515-022-00347-929:2Online publication date: 1-Nov-2022
    • (2021)IMGDroidProceedings of the 43rd International Conference on Software Engineering10.1109/ICSE43902.2021.00080(823-834)Online publication date: 22-May-2021
    • (2021)Automatic Performance Testing for Image Displaying in Android Apps2021 28th Asia-Pacific Software Engineering Conference (APSEC)10.1109/APSEC53868.2021.00039(317-326)Online publication date: Dec-2021
    • (2020)Static asynchronous component misuse detection for Android applicationsProceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3368089.3409699(952-963)Online publication date: 8-Nov-2020
    • (2020)TANDEM: A Taxonomy and a Dataset of Real-World Performance BugsIEEE Access10.1109/ACCESS.2020.30009288(107214-107228)Online publication date: 2020
    • Show More Cited By

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media