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]

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


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