Even in my last version I added a "TIME_STAMP" type that can be used in
the future to add some kind of synchronization into the trace, that reads
GTOD or whatnot.
But as you can see, I've been trying to implement these various ideas,
since the devil is in the details and the code is the details.
How do you get this GTOD read in the ring buffer? If the ring buffer does
it without any knowledge from the tracer, it may be doing it a
inappropriate times. This would also imply that the GTOD infrastructure
itself is reentrent safe. Imagine tracing the GTOD code when the buffer
decides it is about time to add the GTOD timestamp into the buffer. Can
the GTOD handle this recursion. If the GTOD has spinlocks, probably not.
Perhaps we can add a ring_buffer_write_safe() method that would prevent
the trace from doing these. Or we can add a way for the tracer to trigger
a time event (ring_buffer_tick());
If we do end up making a new clock API, I imagine that each arch will
define their own.
-- Steve
--