This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: R: Timing with longjmp
- From: Jonathan Larmour <jifl at eCosCentric dot com>
- To: Michele Portolan <michele dot Portolan at imag dot fr>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Tue, 02 Sep 2003 03:44:44 +0100
- Subject: Re: [ECOS] R: [ECOS] Timing with longjmp
- References: <01a501c36d6c$80bbe940$7b81ab93@imag.fr> <1062080957.22288.3.camel@hermes> <003d01c36d70$bbe94ea0$7b81ab93@imag.fr>
Michele Portolan wrote:
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?
I am making some peculiar timing measures on eCos to develop some idea, as I
said on a precedent post. That is the reason why I am so interested in such
little things: they could make the difference.
Watch out for HAL_CLOCK_READ wrapping BTW.
Jifl
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
--["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss