View Single Post
Old 21 December 2014, 17:02   #6
Registered User
Join Date: Apr 2005
Location: Hangover
Posts: 1,855
The CPU-usage of a task is calculated with the help of the multitasking scheduler. There are sleeping tasks, tasks waiting in the ready state and one running task which is using the CPU for a limited period, a time slice. The scheduler uses the task priorities to decide which of the waiting tasks comes next to get the CPU. So the CPU-usage of a task depends on the time it is in the running state in relation to the overall time.

But there is no FPU scheduler. FPU instructions are just some special commands that the running task can make use of. Of course it would be possible to count the access to any FPU instruction and set it in relation to the standard CPU instruction calls. But this would only make sense for an optional debug mode, because it will probably cause a big slowdown.

If you only want to know whether a program uses the FPU then simply disassemble it and scan for the mathlib strings or for FMOVE, FADD, FMUL instructions etc. Use your editor and count the occurrences of these or other Fxxx commands.
PeterK is offline  
Page generated in 0.09364 seconds with 9 queries