Abstract

We present a compiler and microarchitecture assisted framework for dynamic energy monitoring by a program. The programs will perform an ealloc (The operating system will support energy allocation through a program level utility ealloc similar to the dynamic memory allocation primitives such as malloc.) before entering every logical algorithm such as sorting, FIR filter, convolution. Based on the actual energy allocated by the OS (return parameter of ealloc), a program will enter one of its many variants each consuming different amount of energy through an eswitch. The compiler needs to monitor energy more frequently, probably as often as once every basic block. The existing instruction level energy models can be used. Assuming reasonably accurate instruction level energy models, the compiler can compute fairly accurate energy value for a basic block. However, the uncertainty of the control flow paths makes it close to impossible for the compiler to maintain the program level energy value. We introduce a new semantics for the branch instructions to get around this problem. A branch instruction in addition to branch condition and target offset also contains two more fields: taken basic block energy, and not taken basic block energy. The microarchitecture is assumed to maintain an energy counter (EC) which is program visible. The branch instruction also modifies the EC by adding to it the energy of the taken or not taken basic block based on branch condition. The EC thus provides an exact model of program energy consumed until that point. An instruction to clear EC (make it zero) will allow the compiler to use EC to track energy used between some two fixed points in the program. The compiler can now insert transformations that are conditional upon EC.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.