Energy efficiency significantly influences user experience of battery-driven devices such as smartphones and tablets. The goal of an energy model of source code is to lay a foundation for  energy-saving techniques from architecture to software development. The challenge is linking hardware energy consumption to the high-level application source code, considering the complex run-time context , such as thread scheduling, user inputs and the abstraction of the virtual machine. Traditional energy modeling is bottom-to-top, but this approach faces obstacles when software consists of a number of abstract layers.  In this paper, we propose a top-to-bottom view. We focus on identifying valuable information from the source code, which results in the idea of utilizing an intermediate representation, "energy operation " , to capture the energy characteristics. The experiment results show that the energy model at such a high-level can reduce the error margin to within 10\% and enable energy breakdown at function-level, which helps developers understand the energy-related features of the code .
Energy efficiency has a significant influence on user experience of battery-driven devices such as smartphones and tablets. The goal of an energy model for source code is to lay a foundation for the application of energy-saving techniques during software development. The challenge is to relate hardware energy consumption to high-level application code, considering the complex run-time context and software stack. Traditional techniques build the energy model by mapping a hardware energy model onto software constructs; this approach faces obstacles when the software stack consists of a number of abstract layers. Another approach that has been followed is to utilize hardware or operating system features to estimate software energy information at a coarse level of granularity such as blocks, methods or even applications. In this paper, we explain how to construct a fine-grained energy model for the source code, which is based on "energy operations " identified directly from the source code and able to provide more valuable information for code optimization. We apply the approach to a class of applications based on a game-engine, and explain the wider applicability of the method .
R
significantly influences
has a significant influence on
R
of
for
A
the application of
R
from architecture to
during
R
linking
to relate
D
the
D
source
R
, such as thread scheduling, user inputs and the abstraction of the virtual machine. Traditional energy modeling is bottom-to-top, but
and software stack. Traditional techniques build the energy model by mapping a hardware energy model onto software constructs;
R
software
the software stack
A
Another approach that has been followed is to utilize hardware or operating system features to estimate software energy information at a coarse level of granularity such as blocks, methods or even applications.
R
propose a top-to-bottom view. We focus on identifying valuable information from
explain how to construct a fine-grained energy model for
R
results in the idea of utilizing an intermediate representation,
is based on
R
operation
operations
R
, to capture the energy characteristics. The experiment results show that the energy model at such a high-level can reduce the error margin to within 10\% and enable energy breakdown at function-level, which helps developers understand the energy-related features of the code
identified directly from the source code and able to provide more valuable information for code optimization. We apply the approach to a class of applications based on a game-engine, and explain the wider applicability of the method