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

查看:151
本文介绍了如何估算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划分上执行了多个周期,因此我认为使用划分的代码将比没有划分代码的代码消耗更多的能量.但是这种调侃是很直观的,是否有更好的方法来量化执行代码时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?

推荐答案

现成的工具与通常,电池运行系统具有电量监测计,该电量监测计通过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天全站免登陆