This is the mail archive of the ecos-discuss@sourceware.org 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: Performance timing


On Nov 16, 2007 1:47 PM, C B <csb_80@hotmail.com> wrote:
>
> System profiling is probably what I need.
>
> Unfortunately there isn't an implementation of the profiling timer for my target.  Any information or guidance available that you're aware of for implementing this?

The eCos Reference Manual has this functionality documented:
http://ecos.sourceware.org/docs-latest/ref/gprof.html

It's pretty straight forward to implement with in your HAL.  You'll
need a spare hardware timer to use for your instrumentation.  Try
looking in other HALs that use the profile timer as an example.

You need to setup two functions to implement the profile instrumentation:
1.) int hal_enable_profile_timer(int resolution)
       * Initializes hardware timer and ISR.
2.) unsigned int profile_isr(CYG_ADDRWORD vector, CYG_ADDRWORD data,
HAL_SavedRegisters *regs)
      * Saves current program counter
      * Handles timer hardware

Good luck!
Mike

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


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