This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Issues with current systemtap and example scripts
- From: "Frank Ch. Eigler" <fche at redhat dot com>
- To: William Cohen <wcohen at redhat dot com>
- Cc: systemtap <systemtap at sourceware dot org>, Jafeer Uddin <juddin at redhat dot com>
- Date: Sun, 9 Sep 2018 20:10:27 -0400
- Subject: Re: Issues with current systemtap and example scripts
- References: <13f085c9-7ae4-9276-5669-ac275d589626@redhat.com>
Hi -
> Looking at "perf list" there are individual syscalls:sys_entry_* and
> syscalls:sys_exit_* tracepoints that might be more efficent to use
> [...]
No, they aren't what they appear. They are simply demultiplexed
(after-the-fact $id filtered) virtual tracepoints built upon the
same two enter/exit pair we use.
> [...]
> [wcohen@paketa systemtap]$ stap -e 'probe tp_syscall.open.return{ printf("tp %x %x %d %d\n", __tracepoint_arg_regs, $regs, _stp_syscall_nr(), returnval()); exit() }'
> ERROR: returnval() not defined in this context
> [...]
This is improved in error.stp.
> Newly added syscalls in recent kernels might be missing
>
> Generating the syscalls tapsets is a manual process. Occassionally
> new syscalls are added to the kernel. [...]
> cd tapset
> ausyscall --dump|awk '{print $2}'|sort > ksyscalls
> find -type f|egrep -E "\.(/x86_64)?/sysc_([_0-9a-zA-Z]+)"| sed "s/x86_64\///g"| sed "s/\.\/sysc_//g" |sed "s/\.stp//g" |sort > ssyscalls
> diff -y ssyscalls ksyscalls
This sort of thing could go under scripts/. See also dump-syscalls.sh
and tracepoint-diff there.
> Strive for context variable consistency between the syscall implementations
>
> For example would like to have returnval() function working for
> nd_syscall.*.return, tp_syscall.*.return, and dw_syscall.*.return,
> since syscall.*.return may use any one of those implementations.
> [...]
More ideally, the tapset .return aliases could supply a variable like
retval, just as they supply retstr.
- FChE