[ECOS] Timing with longjmp

Gary Thomas gary@mlbassoc.com
Thu Aug 28 14:29:00 GMT 2003


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



More information about the Ecos-discuss mailing list