Trace syscalls

Rus-Rebreanu Alin-Florin netblock@gmail.com
Mon Mar 24 19:43:00 GMT 2008


Hi,

 i'm quite new with systemtap but it seems as a wonderful way to trace
syscalls. i want to trace for example sys_write in such a way that it
would print the internal path of the sys_write syscall. such as:
entering fget_light()->exit fget_light()->entering
file_pos_read()->exit file_pos_read() or even follow the path into
those functions.
do i have to write a probe for every single kernel function i want to
trace? or is it a simpler way to trace the path through a syscall?

i tried , and it's almost what i want :
probe kernel.function("*@fs/read_write.c"){
   printf("%s->%s\n",thread
_indent(1),probefunc())
}
probe kernel.function("*@fs/read_write.c").return{
   printf("%s->%s\n",thread_indent(1),probefunc())
}

but this adds probes to all the functions in the read_write file, and
i'm only interested in read or write syscalls, but entering every
function of the syscall

Some "pointers"?

-- 
"In a world without walls and fences, who needs windows or gates? "



More information about the Systemtap mailing list