如何估算ARM平台上的程序消耗的能量? [英] How to give an estimation of the energy consumed by a program on an ARM platform?

查看:23
本文介绍了如何估算ARM平台上的程序消耗的能量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法估计一个程序在 ARM CPU 上消耗的能量?在嵌入式系统中,能耗是最重要的参数之一,我想知道程序员是否有可能知道运行程序大约需要多少能量?

Is there a way to estimate the energy consumed by a program on an ARM CPU? In embedded systems, energy consumption is one of the most important parameters and I was wondering whether it is possible for a programmer to know approximately how much energy is needed to run the program?

例如,由于在多个周期执行的 ARM CPU 除法,我想使用除法的代码会比不使用除法的代码消耗更多的能量.但是这个reasing是很直观的,有没有更好的方法来衡量一个CPU在执行代码时消耗的能量?

For example, since on the ARM CPU division executed on multiple cycles I imagine that a code using divisions would consume more energy than a code that doesn't. But this reasing is quite intuitive, is there a better way to qulify the energy consumed by a CPU when executing a code?

推荐答案

与现成工具最接近的是类似于 http://ds.arm.com/ds-5/optimize/arm-energy-probe/

Closest you'll get with off the shelf tools is something similar to http://ds.arm.com/ds-5/optimize/arm-energy-probe/

通常电池运行系统都有电量计,这些电量计通过 sysfs 条目暴露出来,可以提供流过的电流量.把它想象成智能手机电池/充电指示器.这些通常不那么可靠并且难以与应用程序运行的确切时间相关联,但可能会给您一个粗略的估计.

Generally battery run systems have fuel gauges which are exposed through sysfs entries and can provide how much current is passing by. Think it like smart phone battery/charge indicator. Those are generally not that reliable and hard to correlate with exact time of application run, but may give you a rough estimate.

这篇关于如何估算ARM平台上的程序消耗的能量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆