public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS]  Using instrument buffer by applications?
@ 2008-07-21 19:01 Grant Edwards
  2008-07-21 19:09 ` Andrew Lunn
  0 siblings, 1 reply; 3+ messages in thread
From: Grant Edwards @ 2008-07-21 19:01 UTC (permalink / raw)
  To: ecos-discuss

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?

-- 
Grant Edwards                   grante             Yow! CHUBBY CHECKER just
                                  at               had a CHICKEN SANDWICH in
                               visi.com            downtown DULUTH!


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS]  Using instrument buffer by applications?
  2008-07-21 19:01 [ECOS] Using instrument buffer by applications? Grant Edwards
@ 2008-07-21 19:09 ` Andrew Lunn
  2008-07-21 19:28   ` [ECOS] " Grant Edwards
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2008-07-21 19:09 UTC (permalink / raw)
  To: Grant Edwards; +Cc: ecos-discuss

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ECOS]  Re: Using instrument buffer by applications?
  2008-07-21 19:09 ` Andrew Lunn
@ 2008-07-21 19:28   ` Grant Edwards
  0 siblings, 0 replies; 3+ messages in thread
From: Grant Edwards @ 2008-07-21 19:28 UTC (permalink / raw)
  To: ecos-discuss

On 2008-07-21, Andrew Lunn <andrew@lunn.ch> wrote:

>> Has anybody used the instrument buffer scheme to log
>> application events?
>
> I have, but my events were over a short period of time.

For my apps, there are going to be bursts of a few events
separated by gaps that are pretty large (on the scale of the
HAL counter).

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

I saw that, but assumed it would break other stuff if I changed
it.  I thought about adding aonther field so that it recorded
both the low 32 bits of the system tick counter and the value
from HAL_CLOCK_READ().  That would get me a rollover at about 3
(1ms) or 30 years (10ms), but I'd still have a resolution of
about 25ns.

years with 

-- 
Grant Edwards                   grante             Yow! Hello...  IRON
                                  at               CURTAIN?  Send over a
                               visi.com            SAUSAGE PIZZA!  World War
                                                   III?  No thanks!


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-07-21 19:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-21 19:01 [ECOS] Using instrument buffer by applications? Grant Edwards
2008-07-21 19:09 ` Andrew Lunn
2008-07-21 19:28   ` [ECOS] " Grant Edwards

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).