> Recent Intel hardware provides high-quality estimates of processor and memory power consumption ... But the big problem is that they are machine-wide measures that cannot be used on a per-process basis.
Would it not be possible for the OS to poll the CPU for these power consumption stats, and attribute the value returned to the currently running process?
Over time, I think it would be possible to see how much power the Intel CPU thinks each process is using.
Ideally you'd do an accounting update on task switch, along with all the other housekeeping. Then you don't need to do any polling. There's a "process accounting" infrastructure which perhaps could be adapted for this.
Would it not be possible for the OS to poll the CPU for these power consumption stats, and attribute the value returned to the currently running process?
Over time, I think it would be possible to see how much power the Intel CPU thinks each process is using.