|
From: Oriol P. <aut...@gm...> - 2007-08-06 09:30:36
|
Hi, Thanks Nick. It works fine. But is not a high cost to track entry and exit of all system calls? I'm only interested on clone post_syscall. I guess a function call is expensive for waste twice this time on each system call. Is it possible to track only one system call number? Regards, Oriol 2007/8/4, Nicholas Nethercote <nj...@cs...>: > On Fri, 3 Aug 2007, Oriol Prat wrote: > > > Is it possible to track a fork in a tool code? > > > > There is a VG_(track_post_thread_create) where you can register a > > function callback to be called when a thread is created but is only > > called in thread creation not in process fork. > > > > The purpose is to open a new file descriptor for tracing code in a > > separated file (one for each process (fork call)). > > I think you can do this with the pre_syscall/post_syscall hooks -- just look > at the syscall number to work out if the syscall is 'fork'. > > Nick > |