Re: VDSO gettimeofday() x86_64 linux 3.2

2012-10-16 Thread Andy Lutomirski
On Tue, Oct 16, 2012 at 12:43 PM, wilson self wrote: > I am just using gcc timetest.c -o timetest > > Should be dynamically linked. glibc is 2.5, which is quite old, but I > think this should still work with it, no? You need at least glibc 2.7 for this to work well on modern kernels. FWIW, glibc

Re: VDSO gettimeofday() x86_64 linux 3.2

2012-10-16 Thread wilson self
I am just using gcc timetest.c -o timetest Should be dynamically linked. glibc is 2.5, which is quite old, but I think this should still work with it, no? On Tue, Oct 16, 2012 at 2:39 PM, Andy Lutomirski wrote: > On Tue, Oct 16, 2012 at 12:33 PM, wilson self wrote: >> current_clocksource is tsc

Re: VDSO gettimeofday() x86_64 linux 3.2

2012-10-16 Thread Andy Lutomirski
On Tue, Oct 16, 2012 at 12:33 PM, wilson self wrote: > current_clocksource is tsc. > > the entire source of the test application: > --- > #include > #include > #include > #include > > int main() { > struct timeval tim; > gettimeofday(&tim, NULL); > printf("%.6lf seconds\n", t

Re: VDSO gettimeofday() x86_64 linux 3.2

2012-10-16 Thread wilson self
current_clocksource is tsc. the entire source of the test application: --- #include #include #include #include int main() { struct timeval tim; gettimeofday(&tim, NULL); printf("%.6lf seconds\n", tim.tv_sec+tim.tv_usec/100.0); } --- nothing fancy going on here. thanks f

Re: VDSO gettimeofday() x86_64 linux 3.2

2012-10-16 Thread Andy Lutomirski
On 10/16/2012 11:09 AM, wilson self wrote: > I noticed recently that my get time of day calls are quite a bit > slower than I would have expected; and it would see that a likely > cause is that they are not going via vdso, but rather a system call. > > In older kernels there was kernel.vsyscall64