[ECOS] Profiling eCos thread handling

Andrew Lunn andrew.lunn@ascom.ch
Tue Jan 28 15:27:00 GMT 2003


On Tue, Jan 28, 2003 at 03:02:58PM +0100, Ola Göök wrote:
> I need to know the execution time of each thread in an eCos environment.
> A definable hook routine called at every task switch, indicating the thread id to be run, would be ideal.
> 
> Does anyone know if this is possible and where to place such a hook routine?
> /Ola

packages/kernel/current/src/sched/sched.cxx:Cyg_Scheduler::unlock_inner

Be very carefull with that you do in your callback. Since you are deep
in the scheduler, most things you try to do will kill you! Blocking is
defiantly out.

The other way to do what you want is to use the use the
instrumentation code. It logs an event when interesting things happen,
and context switch is one of the interesting things. See the
documentation.

One thing to watch out for. Processing time for ISR and DSR will
appear in what ever thread was running at the time.

       Andrew

--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list