This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: More user-space probes
- From: Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>
- To: David Smith <dsmith at redhat dot com>
- Cc: Systemtap List <systemtap at sources dot redhat dot com>
- Date: Thu, 8 May 2008 18:20:29 +0530
- Subject: Re: More user-space probes
- References: <480DEAD0.10802@redhat.com>
- Reply-to: ananth at in dot ibm dot com
On Tue, Apr 22, 2008 at 08:40:32AM -0500, David Smith wrote:
> I've just finished implementing some new forms of user-space probing.
> Here's an example script:
>
> probe process("/bin/ls").exec { print("ls exec'ed!\n") }
> probe process("/bin/ls").syscall { printf("|%d", $syscall) }
> probe process("/bin/ls").syscall.return { print("+") }
> probe process("/bin/ls").death { print("\nls done!\n") }
>
> There are 5 new probe variants:
>
> process(PID_OR_PATH).clone
> process(PID_OR_PATH).exec
> process(PID_OR_PATH).death
> process(PID_OR_PATH).syscall
> process(PID_OR_PATH).syscall.return
>
> (Internally, these are implemented using utrace. These probe types also
> use the new "task_finder" framework, which provides the support by
> probing by PID or by PATH. Eventually, the existing uprobes probes (and
> the future itrace probes) should be converted to use the "task_finder"
> framework.)
>
> Feel free to try out the new probe types and let me know if you find any
> issues.
Dave,
I am trying this on a multi-threaded process, I just get the traces for
the tgid. Running..
probe process(<path to multithreaded proc>).syscall
{
printf("%d thread[%d] syscall\n", pid(), tid())
}
on a process with 2 threads yields:
...
21850 thread[21850] syscall
21850 thread[21850] syscall
21850 thread[21850] syscall
21850 thread[21850] syscall
...
Where 21850 is the pid.
I suppose support for following thread creation is a TODO? Or am I
missing something?
Ananth