This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Duplicate events for 32-bit compatible syscall probes
- From: David Smith <dsmith at redhat dot com>
- To: Aryeh Weinreb <weinrea at gmail dot com>
- Cc: systemtap at sourceware dot org
- Date: Thu, 25 Apr 2013 08:12:44 -0500
- Subject: Re: Duplicate events for 32-bit compatible syscall probes
- References: <CAE5ibEkN66WM4a1YD8r3xAqBb519iJNOThL3ek5otXcBJSaJwA at mail dot gmail dot com>
On 04/24/2013 04:47 AM, Aryeh Weinreb wrote:
> Hi,
>
> While using some syscall.mq_* probes on 32bit on x86_64 I am getting
> duplicate events.
>
> Looking into ipc/compat_mq.c it seems that the compat_sys_mq calls are
> just wrappers for the sys_mq ones.
> Although, sometimes the compat calls can return EFAULT without calling
> the non-compat versions.
>
> It would be nice to only get one event for each system call without
> missing any calls.
>
> I am using an RHEL 6 build of systemtap version 1.8.
If you just want to trace the "real" 64-bit syscalls, I'd do something
like the following to reject the 32-bit-on-64-bit syscalls. Note that
this is untested, but should work.
=====
function is_compat_task:long () %{
STAP_RETVALUE = _stp_is_compat_task();
%}
probe syscall.mq_getsetattr
{
if { is_compat_task() } next;
# ... your real code here
}
=====
--
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)