SPELLing out energy leaks: Aiding developers locate energy inefficient code

Thumbnail Image
Date
2020
Authors
Carcao,T
João Alexandre Saraiva
João Paulo Fernandes
Cunha,J
Rui Alexandre Pereira
Marco Linhares Couto
Journal Title
Journal ISSN
Volume Title
Publisher
Abstract
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. © 2019 Elsevier Inc.
Description
Keywords
Citation