Julio M. Merino Vidal wrote:
Now I am finding another issue slightly related to this. I have just
added a new marker to the code in an interrupt context, and this
interrupt wakes up a specific thread to handle it later on. The
problem is that, if the interrupt is handled on one CPU and the
thread, once awaken, is handled by the other one, I can still get the
timestamps (cycles) reversed. Any easy way around this?
Unfortunately, there is no general workaround for this issue, because
it strongly depends on the processor specification.
For example, IPF could easily synchronize time because it has a
system-wide clock source. However, most of i386 variant processors
don't have this kind of clock source. Moreover, some of it may
change clock frequency when it changes its cpu-frequency.
If all of your processors have constant-freq clock and same
frequency, there are constant gaps between each processor's clock.
So, I think easy way is to estimate the gap from log by hand...