TY - JOUR
T1 - SPELLing out energy leaks
T2 - Aiding developers locate energy inefficient code
AU - Pereira, Rui
AU - Carção, Tiago
AU - Couto, Marco
AU - Cunha, Jácome
AU - Fernandes, João Paulo
AU - Saraiva, João
N1 - Publisher Copyright:
© 2019 Elsevier Inc.
PY - 2020/3
Y1 - 2020/3
N2 - Although hardware is generally seen as the main culprit for a computer's energy usage, software too has a tremendous impact on the energy spent. Unfortunately, there is still not enough support for software developers so they can make their code more energy-aware. This paper proposes a technique to detect energy inefficient fragments in the source code of a software system. Test cases are executed to obtain energy consumption measurements, and a statistical method, based on spectrum-based fault localization, is introduced to relate energy consumption to the source code. The result of our technique is an energy ranking of source code fragments pointing developers to possible energy leaks in their code. This technique was implemented in the SPELL toolkit. Finally, in order to evaluate our technique, we conducted an empirical study where we asked participants to optimize the energy efficiency of a software system using our tool, while also having two other groups using no tool assistance and a profiler, respectively. We showed statistical evidence that developers using our technique were able to improve the energy efficiency by 43% on average, and even out performing a profiler for energy optimization.
AB - Although hardware is generally seen as the main culprit for a computer's energy usage, software too has a tremendous impact on the energy spent. Unfortunately, there is still not enough support for software developers so they can make their code more energy-aware. This paper proposes a technique to detect energy inefficient fragments in the source code of a software system. Test cases are executed to obtain energy consumption measurements, and a statistical method, based on spectrum-based fault localization, is introduced to relate energy consumption to the source code. The result of our technique is an energy ranking of source code fragments pointing developers to possible energy leaks in their code. This technique was implemented in the SPELL toolkit. Finally, in order to evaluate our technique, we conducted an empirical study where we asked participants to optimize the energy efficiency of a software system using our tool, while also having two other groups using no tool assistance and a profiler, respectively. We showed statistical evidence that developers using our technique were able to improve the energy efficiency by 43% on average, and even out performing a profiler for energy optimization.
KW - Fault Localization
KW - Green Computing
KW - Green Software
KW - Program Analysis
KW - Program Optimization
UR - http://www.scopus.com/inward/record.url?scp=85076571333&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85076571333&partnerID=8YFLogxK
U2 - 10.1016/j.jss.2019.110463
DO - 10.1016/j.jss.2019.110463
M3 - Article
AN - SCOPUS:85076571333
SN - 0164-1212
VL - 161
JO - Journal of Systems and Software
JF - Journal of Systems and Software
M1 - 110463
ER -