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: Profiling eCos thread handling


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


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