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: Question about Instrumentation? Thanks


On Wed, Mar 26, 2003 at 10:42:36AM -0000, Qiang Huang wrote:
> Hi all:
>    I just tried to use kernel instrumentation in ecos. I have a question:
> Seen from the source code in "instrmnt/meminst.cxx", In function
> "cyg_instrument( )" it just record the time stamp by reading the clock as
> "HAL_CLOCK_READ( &p->timestamp );", but the system clock is running forever
> and roll over when it reach the limits, so through the whole program the
> clock may have already been roll over some times so how can I interept the
> time stamp recorded by the kernel instrumentation? probably a later
> instrumentation will have the time stamp less than the earlier one? so how?
> Am I wrong somewhere?

You need to combine the timestamp with the instrumentation for
ticks. Normally the HAL_CLOCK_READ returns the number of hardware
ticks since the last eCos clock tick. When the HW signals an interrupt
an eCos tick will happen and an instrumentation log will be made. So
add the two together to get a unique 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]