syscalls performance
From: Mulyadi Santosa <hidden>
Date: 2011-02-26 04:31:08
Hi Enrico... On Sat, Feb 26, 2011 at 03:42, Enrico Granata [off-list ref] wrote:
I modified the source code to show exactly how many clock ticks it is taking for each call. It seems that the behavior hinted by Mauro Romano Trajber is actually there: [enrico at espresso ~]$ ./syscallperf 15 4925 1190 942
watching strace, objdump etc etc, I roughly conclude the high initial tsc number might be due to initial symbol resolve to mygetpid() and/or syscall() (IIRC this is called PLT/GOT symbol resolve). After the GOT/PLT table had the syscall/mygetpid address, the rest went fast. PS: if using gcc -O2, seems like mygetpid() is really inlined.... -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com