It doesn't need to read the GTOD synchronously when writing the trace
record. When a tsc event occurs, it needs to store the
GTOD/tsc/frequency somewhere at that point. When you next write a trace
record, if that structure has been updated, you write it into the trace
before emitting the next delta timestamp.
In fact you can read the GTOD at almost any time between tsc frequency
updates, so you can defer it to whenever is convenient. At the time the
tsc changes frequency, you emit: (tsc,frequency), and a bit later
(before it changes again) you emit (tsc,GTOD). That allows you to
retroactively compute GTODs for all timestamps. Obviously it would be
good to get them as close as possible together.
J
--