On Mon, Jul 21, 2008 at 07:00:52PM +0000, Grant Edwards wrote:
> I'm looking into ways to get some sort of event history/log
> info out of eCos apps. I've been looking at the instrument
> buffer mechanism that's implimented in the eCos kernel, but it
> doesn't really look appropriate.
>
> The main issue is that the timestamp in a log record is the
> number of HAL counter ticks since the last system tick. The
> only way that value is meaningful is if you have the kernel
> configured to instrument system ticks. But, if you do that the
> instrument buffer fills up with virtually nothing but 1ms
> system ticks. Even with 10ms system ticks, they're still going
> to completely swamp out events that might only happen once
> every few minutes.
>
> Has anybody used the instrument buffer scheme to log
> application events?
I have, but my events were over a short period of time.
Interestingly, if you look in
packages/kernel/current/src/instrmnt/meminst.cxx you will find:
#ifdef CYGVAR_KERNEL_COUNTERS_CLOCK
// p->timestamp = Cyg_Clock::real_time_clock->current_value_lo();
HAL_CLOCK_READ( &p->timestamp );
#else
p->timestamp = 0;
#endif
so it looks like you can change from HW ticks to slower eCos timer
ticks.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss