This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH v2.5][DRAFT] Add test for target_set tapset.
- From: Josh Stone <jistone at redhat dot com>
- To: Przemyslaw Pawelczyk <przemyslaw at pawelczyk dot it>
- Cc: systemtap at sourceware dot org
- Date: Sat, 20 Jun 2009 01:57:21 -0400 (EDT)
- Subject: Re: [PATCH v2.5][DRAFT] Add test for target_set tapset.
----- "Przemyslaw Pawelczyk" <przemyslaw@pawelczyk.it> wrote:
> +probe nd_syscall.nanosleep
> +{
> + if (target_set_pid(pid()) && @cast(req_uaddr, "timespec",
> "kernel<linux/time.h>")->tv_sec == $1)
> + target_set_report()
> +}
> +
> +%( arch == "x86_64" || arch == "ppc64" || arch == "ia64" %?
> +probe nd_syscall.compat_nanosleep
> +{
> + if (target_set_pid(pid()) && @cast(req_uaddr, "compat_timespec",
> "kernel<linux/compat.h>")->tv_sec == $1)
> + target_set_report()
> +}
> +%)
I just realized that this gets a LOT easier with the syscall tapset instead:
probe syscall.nanosleep, syscall.compat_nanosleep ?
{
if (target_set_pid(pid()) && $rqtp->tv_sec == $1)
target_set_report()
}
We generally assume that debuginfo is installed for running the testsuite, so let's not focus anymore on problems that aren't related to the thing we're trying to test...
Josh