This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: new static user probe types
- From: Josh Stone <jistone at redhat dot com>
- To: Stan Cox <scox at redhat dot com>
- Cc: systemtap at sourceware dot org
- Date: Wed, 15 Jul 2009 11:38:55 -0700
- Subject: Re: new static user probe types
- References: <4A453D09.60600@redhat.com> <4A5E0195.5080803@redhat.com>
On 07/15/2009 09:19 AM, Stan Cox wrote:
> The guard statements this experiments is using look like:
> kprobe:
> if ((task_tid(task_current())) != (_utrace_syscall_arg(1))) next #
> current task?
task_tid(task_current()) == tid(), and the latter should be faster. But
anyway, it's not clear to me what this is guarding against.
> if ((pointer_arg(1)) != (_stp_probe_name_test)) { # probe name ptr
> differs from saved?
> if ((user_int(pointer_arg(1))) != (1953719668)) next # check first word
> of probe name
> if ((user_string(pointer_arg(1))) != ("test")) next # check string
> if all else fails
> }
> (_stp_probe_name_test) = (pointer_arg(1)) # remember saved
> probe name ptr
Beware that the 1953719668 constant is little-endian specific.
I'm also nervous about saving _stp_probe_name_XXX -- murphy's law may
eventually produce a mark in one app that happens to have the same
pointer address as a different mark in a different app.
Josh