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: Timing with longjmp


On Thu, 2003-08-28 at 07:58, Michele Portolan wrote:
> Is there a test in ecos2.0 release to measure the execution time needed by
> "longjmp"?
> If not, hwo can I do it (apart from counting assembler lines)?

There is not currently a test to time this.  If you look at the
code in 'tm_basic.cxx', you can get a pretty good idea how to measure
such [small] quantities.  Basically, you need to capture the current
raw clock time (tm_basic uses 'HAL_CLOCK_READ()' for this).  Grab the
value before doing the longjump and then after you land in the new
location.  Then it's just simple math to figure out how long it took.
Again, tm_basic can show you how to convert the values to real time
(micro-seconds or whatever).

Why are you bothering with such minutia?

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
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]