Categorization and Detection of Energy Bugs and Application Tail Energy Bugs in Smartphones

Smartphones are the most ubiquitous and popular hand-held devices because of their rich set of features and wide variety of services. However, their daily use is hampered by their high energy consumption, which forces frequent battery recharging. In smartphones, most energy issues are due to energy bugs (ebugs). These energy bugs are said to exist when smartphone software applications (apps) consume more than expected power while executing or continue to consume energy even after these apps are closed or terminated. Therefore, it is very important to develop energy-efficient applications as these energy bugs severely impact user experience and cause significant user frustration. In the first half of this thesis, we discuss the problem of energy bugs. To develop frameworks and tools that detect energy bugs, we need to characterize the power consuming behaviour of software. To achieve that, we develop an operational definition for energy bugs that can be easily translated to a procedure to detect energy bugs in smartphones. Furthermore, we integrate the proposed definition with a diagnostic framework to provide a step-by-step procedure for application developers to identify different types of energy bugs. Using the proposed testing framework, developers can investigate the existence of energy bugs especially when apps or platforms evolve. We validate the proposed framework with experiments and real-world energy bug examples. The results show that there are energy bugs across different versions of the same app as well as across different versions of Operating systems running on the same smartphone. Being software builders and application support providers, software developers should make energy efficient applications for end-users. Thus in the second half of this thesis, we discuss the relationship between software changes and energy consumption by tracing wakelocks that keep a device awake, and services that might be engaging the CPU silently. Although, computer hardware and software engineers are involved in developing energy efficient mobile systems, unfortunately, the ultimate energy efficiency depends on the software choices and requirements of the end-user. We investigate multiple scenarios demonstrating that an application can consume energy differently when a user closes the app in four different ways (Home, Back, Swipe-out or Force-stop). This difference in energy consumption is also true when the app has different components such as activity or service with or without wakelocks, thus illustrating the trade-offs that end-users can make for the sake of energy consumption. Although these energy bugs trigger during the execution stage, their effect sometimes remain after closing the app. Borrowing a similar concept of tail energy loss from the field of computer networking, we call the loss of battery power, even after the app is closed or terminated, as application tail energy bug (app-tail-ebug). The diagnostic process begin by measuring any difference in energy consumption of the

[1]  Samuel P. Midkiff,et al.  What is keeping my phone awake?: characterizing and detecting no-sleep energy bugs in smartphone apps , 2012, MobiSys '12.

[2]  Kshirasagar Naik,et al.  Automation of Energy Performance Evaluation of Software Applications on Servers , 2014 .

[3]  Sorin Lerner,et al.  Towards Verifying Android Apps for the Absence of No-Sleep Energy Bugs , 2012, HotPower.

[4]  R. A. Powers Batteries for low power electronics , 1995, Proc. IEEE.

[5]  Jian Lu,et al.  GreenDroid: Automated Diagnosis of Energy Inefficiency for Smartphone Applications , 2014, IEEE Transactions on Software Engineering.

[6]  Abhik Roychoudhury,et al.  Detecting energy bugs and hotspots in mobile apps , 2014, SIGSOFT FSE.

[7]  Matti Siekkinen,et al.  Smartphone Energy Consumption: Modeling and Optimization , 2014 .

[8]  Ming Zhang,et al.  Where is the energy spent inside my app?: fine grained energy accounting on smartphones with Eprof , 2012, EuroSys '12.

[9]  Yepang Liu,et al.  Diagnosing Energy Efficiency and Performance for Mobile Internetware Applications , 2015, IEEE Software.

[10]  Hojung Cha,et al.  AppScope: Application Energy Metering Framework for Android Smartphone Using Kernel Activity Monitoring , 2012, USENIX Annual Technical Conference.

[11]  Ramesh Govindan,et al.  Estimating mobile application energy consumption using program analysis , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[12]  Lei Yang,et al.  ADEL: an automatic detector of energy leaks for smartphone applications , 2012, CODES+ISSS.

[13]  Ming Zhang,et al.  Bootstrapping energy debugging on smartphones: a first look at energy bugs in mobile devices , 2011, HotNets-X.

[14]  Sagar Naik,et al.  SMoW: An Energy-Bandwidth Aware Web Browsing Technique for Smartphones , 2014, IEEE Access.

[15]  Hojung Cha,et al.  DevScope: a nonintrusive and online power analysis tool for smartphone hardware components , 2012, CODES+ISSS.

[16]  Sagar Naik,et al.  A methodology for energy performance testing of smartphone applications , 2012, 2012 7th International Workshop on Automation of Software Test (AST).

[17]  Sasu Tarkoma,et al.  Collaborative Energy Debugging for Mobile Devices , 2012, HotDep.

[18]  Hojung Cha,et al.  WakeScope: Runtime WakeLock anomaly management scheme for Android platform , 2013, 2013 Proceedings of the International Conference on Embedded Software (EMSOFT).

[19]  Paramvir Bahl,et al.  Fine-grained power modeling for smartphones using system call tracing , 2011, EuroSys '11.

[20]  Xiao Ma,et al.  eDoctor : Automatically Diagnosing Abnormal Battery Drain Issues on Smartphones , 2013 .