syscalls performance

Mulyadi Santosa mulyadi.santosa at gmail.com
Fri Feb 25 23:31:08 EST 2011


Hi Enrico...

On Sat, Feb 26, 2011 at 03:42, Enrico Granata <egranata at ucsd.edu> 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



More information about the Kernelnewbies mailing list