On Mon, Jun 11, 2012 at 7:30 PM, Addison Mayberry <[email protected]>wrote:
> Greetings, > Working with system calls in MARSS, I have noticed that whereas most > system calls trigger a call to the assist_syscall function within PTLsim, > the gettimeofday syscall does not seem to incur such a call. Since I'm > hooking my instrumentation into assist_syscall this could lead to > overlooking certain instances of system calls. Does anyone know why > gettimeofday is different offhand, and how to figure out what other calls > might also not be passing through assist_syscall? Thanks in advance. > This is really interesting question because many system calls like these are already optimized by linux kernel using VDSO (virtual dynamic shared object) library. Run 'ldd' on '/bin/sh' and you'll see something like this: linux-vdso.so.1 => (0x00007ffff4263000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd0ee15f000) /lib64/ld-linux-x86-64.so.2 (0x00007fd0ee553000) Here 'linux-vdso.so.1' is pointing to memory but there is no .so file!! Its because linux kernel expose this linux-vdso.so.1. This virtual library implements few system calls like 'gettimeofday' in each application so the process doesn't have to switch out and perform context switch to kernel for such basic systemcalls. You can find some info over here: http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/1.3/html/Realtime_Tuning_Guide/sect-Realtime_Tuning_Guide-General_System_Tuning-gettimeofday_speedup.html I can't find the list of function calls that are implemented with this library but you might find more in lxr.linux.no. So this is one of many reasons why we are all advocating people to use full-system simulators that run latest version of application and kernels!! - Avadh Sincerely, > Addison > > ______________________________**_________________ > http://www.marss86.org > Marss86-Devel mailing list > [email protected].**edu <[email protected]> > https://www.cs.binghamton.edu/**mailman/listinfo/marss86-devel<https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel> >
_______________________________________________ http://www.marss86.org Marss86-Devel mailing list [email protected] https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel
