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]

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


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.

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