Hi all,
I just noticed an apparent discrepancy between these two and wanted to know
whether this is documented (and I missed it), and whether this is
intentional behaviour.
I''m ''dtrace -F''ing some part of the nxge driver with
a script fragment that
looks like this:
fbt:::
/self->w/
{
self->d = walltimestamp - self->wt;
self->wt = walltimestamp;
printf("\t\t%x %d", self->wt, self->d);
}
this means I want to see the delay I get between *every* call in and return
from a function.
I get output like this:
3 -> nxge_m_tx 10875582dfac70b3 0
3 -> nxge_send 10875582dfac70b3 0
3 -> nxge_tx_lb_ring_1 10875582dfac70b3 0
3 <- nxge_tx_lb_ring_1 10875582dfac70b3 0
3 -> nxge_serialize_enter 10875582dfac70b3 0
3 -> nxge_serial_put 10875582dfac70b3 0
3 <- nxge_serial_put 10875582dfac70b3 0
3 -> nxge_freelance 10875582dfac70b3 0
3 -> nxge_serial_getn 10875582dfac70b3 0
3 <- nxge_serial_getn 10875582dfac70b3 0
3 -> nxge_serial_tx 10875582dfac70b3 0
3 -> nxge_start 10875582dfac70b3 0
(much longer ... and always the same timestamp). I tried replacing
"walltimestamp" with "timestamp", and got:
3 -> nxge_m_tx 4692f8c2733f 2887
3 -> nxge_send 4692f8c284be 4479
3 -> nxge_tx_lb_ring_1 4692f8c28ea3 2533
3 <- nxge_tx_lb_ring_1 4692f8c297ea 2375
3 -> nxge_serialize_enter 4692f8c2a382 2968
3 -> nxge_serial_put 4692f8c2acd4 2386
3 <- nxge_serial_put 4692f8c2b536 2146
3 -> nxge_freelance 4692f8c2c72b 4597
3 -> nxge_serial_getn 4692f8c2ce77 1868
3 <- nxge_serial_getn 4692f8c2d73b 2244
3 -> nxge_serial_tx 4692f8c2e055 2330
3 -> nxge_start 4692f8c2ea16 2497
3 -> hcksum_retrieve 4692f8c2f537 2849
3 <- hcksum_retrieve 4692f8c30513 4060
3 -> nxge_txdma_reclaim 4692f8c31112 3071
which looks much more likely to me.
I always thought that walltimestamp was the same thing as timestamp plus an
offset ... but this does not seem to be the case.
comments? RTFM?
thx!
Michael
--
Michael Schuster
Recursion, n.: see ''Recursion''
Right, as you noted they are not the same. The timestamp is tied to the hires timer, while the walltimestamp is tied to the system clock. Thus timestamp is not affected by setting the system time (modulo the occasional bug) but walltimestamp is. Since the system clock ticks with the tick timer, it will return the same number for the tick interval, usually 10ms. Michael Schuster wrote:> Hi all, > > I just noticed an apparent discrepancy between these two and wanted to know > whether this is documented (and I missed it), and whether this is > intentional behaviour. > > I''m ''dtrace -F''ing some part of the nxge driver with a script fragment that > looks like this: > > fbt::: > /self->w/ > { > self->d = walltimestamp - self->wt; > self->wt = walltimestamp; > printf("\t\t%x %d", self->wt, self->d); > } > > this means I want to see the delay I get between *every* call in and return > from a function. > > I get output like this: > > 3 -> nxge_m_tx 10875582dfac70b3 0 > 3 -> nxge_send 10875582dfac70b3 0 > 3 -> nxge_tx_lb_ring_1 10875582dfac70b3 0 > 3 <- nxge_tx_lb_ring_1 10875582dfac70b3 0 > 3 -> nxge_serialize_enter 10875582dfac70b3 0 > 3 -> nxge_serial_put 10875582dfac70b3 0 > 3 <- nxge_serial_put 10875582dfac70b3 0 > 3 -> nxge_freelance 10875582dfac70b3 0 > 3 -> nxge_serial_getn 10875582dfac70b3 0 > 3 <- nxge_serial_getn 10875582dfac70b3 0 > 3 -> nxge_serial_tx 10875582dfac70b3 0 > 3 -> nxge_start 10875582dfac70b3 0 > > (much longer ... and always the same timestamp). I tried replacing > "walltimestamp" with "timestamp", and got: > > 3 -> nxge_m_tx 4692f8c2733f 2887 > 3 -> nxge_send 4692f8c284be 4479 > 3 -> nxge_tx_lb_ring_1 4692f8c28ea3 2533 > 3 <- nxge_tx_lb_ring_1 4692f8c297ea 2375 > 3 -> nxge_serialize_enter 4692f8c2a382 2968 > 3 -> nxge_serial_put 4692f8c2acd4 2386 > 3 <- nxge_serial_put 4692f8c2b536 2146 > 3 -> nxge_freelance 4692f8c2c72b 4597 > 3 -> nxge_serial_getn 4692f8c2ce77 1868 > 3 <- nxge_serial_getn 4692f8c2d73b 2244 > 3 -> nxge_serial_tx 4692f8c2e055 2330 > 3 -> nxge_start 4692f8c2ea16 2497 > 3 -> hcksum_retrieve 4692f8c2f537 2849 > 3 <- hcksum_retrieve 4692f8c30513 4060 > 3 -> nxge_txdma_reclaim 4692f8c31112 3071 > > which looks much more likely to me. > > I always thought that walltimestamp was the same thing as timestamp plus an > offset ... but this does not seem to be the case. > > comments? RTFM? > > thx! > Michael >