On Thu, 2012-02-09 at 15:49 +0100, Marcus Meissner wrote:
On Thu, Feb 09, 2012 at 03:37:30PM +0100, Roger Oberholtzer wrote:
On Thu, 2012-02-09 at 15:00 +0100, Per Jessen wrote:
Roger Oberholtzer wrote:
Is it the case that applications should just magically get the VDSO version of the three system calls listed above? If that is the case, I should not see calls to gettimeofday in straces of my app. But I do.
I suspect there is is an additional step needed. I have not recognized it in my googling on the topic. Perhaps a compile/linker option?
I think you need to link in the vdso module when you build your application.
OK. Where is that? I looked for something called *vdso* in /usr/lib, but came up empty.
I thought it sounded like glibc was managing this. If vdso was available, it did that instead of a syscall(SYS_xxx) call.
You dont need to do anything to link it, it should just work out of the box.
Which processor architecture do you build this for, which kernel version?
Can you check this simple sample with strace?
#include
#include int main(int argc, char **argv) { struct timeval tv; gettimeofday (&tv,NULL); printf("%d\n", tv.tv_sec); }
openSUSE 11.2, 2.6.31.14-51-desktop, vdso listed in /proc/self/maps: gettimeofday({1328857222, 418127}, NULL) = 0 openSUSE 12.1, 3.1.9-1.4-desktop, vdso listed in /proc/self/maps: gettimeofday({1328857436, 119151}, NULL) = 0 Yours sincerely, Roger Oberholtzer OPQ Systems / Ramböll RST Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 roger.oberholtzer@ramboll.se ________________________________________ Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden www.rambollrst.se -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-programming+owner@opensuse.org