Measuring CPU load using idle task counter on Cortex-A8

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Measuring CPU load using idle task counter on Cortex-A8

3,006件の閲覧回数
FredrikMoller
Contributor III

I'm measuring CPU load from time t1 to t2 by inspecting how many times the counter in the RTOS idle task has been incremented and comparing this value with a reference value calculated at system startup. This appears to be a common way to measure CPU load and it has worked fine in the past for simpler ARM cores.

Q: Given the complexity of the Cortex-A8 core, is this way of measuring load reliable?

I figured it should be reliable, save for cases when the time span between the two measurements is extremely small and cache misses could influence the result in undesired ways. However, when  measuring load when no tasks are running, I get a CPU load of up to 34%. The reason for this is that the idle loop runs slower, which I find to be quite odd.

ラベル(1)
タグ(3)
0 件の賞賛
返信
1 返信

2,301件の閲覧回数
JerryFan
NXP Employee
NXP Employee

A more accurate way is using the performance counter inside the cortex-a8. http://infocenter.arm.com/help/index.jsp