Re: Unified tracing buffer

From: Steven Rostedt
Date: Tue Sep 23 2008 - 06:53:33 EST




On Tue, 23 Sep 2008, Masami Hiramatsu wrote:

> Steven Rostedt wrote:
> > But, with that, with a global atomic counter, and the following trace:
> >
> > cpu 0: trace_point_a
> > cpu 1: trace_point_c
> > cpu 0: trace_point_b
> > cpu 1: trace_point_d
> >
> >
> > Could the event a really come after event d, even though we already hit
> > event b?
>
> yes, if event c is an interrupt event :-).
>
> cpu 0 cpu 1
> hit event d
> hit event a
> log event a
> irq event c
> log event c

heh, This is assuming that event c is in an IRQ handler.

Since I control where event c is, I can prevent that. I'm talking about
the CPU doing something funny that would have c come after d.

But I didn't specify exactly what the events were, so I'll accept that
explanation ;-)

-- Steve

> hit event b
> log event b
> log event d
>
> so, I think if we really need to order events, we have to stop
> irq right after hitting an event.
>
> Anyway, in most case, I think it works, but as accurate as
> synchronized-TSC if hardware supports it.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/