This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Trace syscalls


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? "


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]