This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: idle thread


On Tue, Jan 22, 2002 at 01:16:52PM +0100, Andrea Acquaviva wrote:
> Hi,
> I would like to monitor the CPU activity while running an ecos
> application.
> Is the idle_thread_loop variable in thread.cxx a correct indicator of
> the CPU utilization?
> 
> More precisely, is this variable incremented each time a thread  stalls
> waiting for a locked device?

Look back in the archive about 18 months. There is a post where i gave
some code to monitor the CPU usage.

There is a counter in the idle thread which is incremented every
iteration of the endless loop. I calibrate how much the counter goes
up for a completely idle system and then use that to determine the
load at other times. It assumes your processor is not doing any clever
power saving tricks etc.

     Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]