DTrace timestamps


While rereading several sections in the Solaris DTrace user guide, I came across the following descriptions for the timestamp and vtimestamp variables:

uint64_t timestamp: The current value of a nanosecond timestamp counter. This counter increments from an arbitrary point in the past and should only be used for relative computations.

uint64_t vtimestamp: The current value of a nanosecond timestamp counter that is virtualized to the amount of time that the current thread has been running on a CPU, minus the time spent in DTrace predicates and actions. This counter increments from an arbitrary point in the past and should only be used for relative time computations.

After reading this, it dawned on me that some of the scripts I wrote should have used vtimestamp instead of timestamp (blocking operations can really skew the results). Luckily I foudn this now, so I can take advatnage of it whiel debugging problems in the future.

This article was posted by Matty on 2006-04-22 11:47:00 -0400 -0400