This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Out of order timings of gettimeofday_us()


I have a very simple script which seems to demonstrate time values coming
out of gettimeofday_us() being out of order.  I believe this function I am
probing is extremely fast - but, regardless, it shouldn't take negative
time to complete. :)

Here's the probe:

probe kernel.function("cbe_system_reset_exception") {
   printf(" IN: %d\n", gettimeofday_us());
}

probe kernel.function("cbe_system_reset_exception").return {
   printf("OUT: %d\n", gettimeofday_us());
}

Here's some output from it:

 IN: 1169591399721428
OUT: 1169591399721437
 IN: 1169591399721484
OUT: 1169591399721492
 IN: 1169591399722383
OUT: 1169591399722298 **** ERROR - NOTICE this is before the above "IN" line
 IN: 1169591399723387
OUT: 1169591399723302 **** ALSO OUT OF ORDER!
 . . .

I annotated the above line where I see an error.  This happens very often
with this probe.

Is the us() timing just too fine grained?  If it's acting like this here I
question its values in other places.

Please advise.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]