[Bug tapsets/14690] the syscall tapsets could be written to prefer the 'syscalls' tracepoints

fche at redhat dot com sourceware-bugzilla@sourceware.org
Wed Jun 20 19:26:00 GMT 2018


https://sourceware.org/bugzilla/show_bug.cgi?id=14690

Frank Ch. Eigler <fche at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fche at redhat dot com

--- Comment #2 from Frank Ch. Eigler <fche at redhat dot com> ---
This little toy script checks whether the _stp_syscall_nr() function provides a
good-enough substitute for the missing $id parameter from the sys_exit
tracepoint.  It turns out that generally yes, at least on x86_64.


global i% 

probe kernel.trace("sys_enter") { __set_usermode_pt_regs($regs) x=$id
y=_stp_syscall_nr(); i[tid()]=x; if (x!=y) println("entry ", x, " ", y) } 

probe kernel.trace("sys_exit") { __set_usermode_pt_regs($regs) y =
_stp_syscall_nr(); x=i[tid()]; delete i[tid()] ; if(x!=y) println("exit ", x, "
", y) }

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Systemtap mailing list