Hello,
Julio M. Merino Vidal wrote:
But the big problem is that sometimes I receive events in the
incorrect order! That is, I place a marker B after a marker A in the
code, and I know it is impossible for B to appear before A in a
trace. However, sometimes, I get B before A in the final trace with
the timings (supposedly) reversed. I also print the CPU that fired
the events, and both are happening from the same virtual CPU, so the
possibility of both CPUs using different timings is not relevant.
Indeed. The systemtap's gettimeofday_*() tries to adjust base-time
(this means, change the base-time forward and backward) periodically.
It is for synchronizing trace logs with in-kernel logs(dmesg, etc).
We are discussing about this on bz3916,
http://sources.redhat.com/bugzilla/show_bug.cgi?id=3916
If I change the gettimeofday_ns call to get_cycles or to a custom
counter instead, things go perfectly.
Sure, I think it is the best way to get the monotonic counter on
some processors.