2007-10-20

Interesting gettimeofday() on x86_64

During doing strace() on application I found that there are no gettimeofday() syscalls. That's nothing new, for x86_64 experts, but it's interesting for me.

Here is an example of the code:

#include <stdio.h>
int main(){
printf("start\n");
gettimeofday(NULL,NULL);
printf("stop\n");
return(0);
}
Sample strace from i386:

...
write(1, "start\n", 6) = 6
gettimeofday(NULL, NULL) = 0
write(1, "stop\n", 5) = 5
...
And the same code on x86_64:

...
write(1, "start\n", 6) = 6
write(1, "stop\n", 5) = 5
...


No comments: