/usr/share/systemtap/tapset/bpf
NameSizeModeActions
aux_syscalls.stp9090644editdlrm
compatdefs.stp2030644editdlrm
context.stp60390644editdlrm
conversions.stp47270644editdlrm
exit.stp25830644editdlrm
logging.stp14630644editdlrm
syscalls.stpm2130644editdlrm
syscall_any.stp15690644editdlrm
syscall_num_arm.stp385880644editdlrm
syscall_num_arm64.stp865960644editdlrm
syscall_num_mips.stp1105340644editdlrm
syscall_num_powerpc.stp710860644editdlrm
syscall_num_riscv.stp484220644editdlrm
syscall_num_s390.stp680680644editdlrm
syscall_num_x86_64.stp656580644editdlrm
syscall_table.stp14910644editdlrm
target.stp14030644editdlrm
task.stp5830644editdlrm
time.stp5390644editdlrm
timestamp_gtod.stp21780644editdlrm
uconversions.stp80140644editdlrm
Edit: /usr/share/systemtap/tapset/bpf/syscall_table.stp (1491B)
# This is syscall_table tapset providing namely syscall_name() and syscall_num() # functions. It uses architecture specific data contained in other arch # specific tapsets. Helper scripts/dump-syscalls.sh is used to generate those. function syscall_name(num) { //%( CONFIG_COMPAT == "y" %? // if (@__compat_task) // return __syscall_32_num2name[num] //%) %( CONFIG_64BIT == "y" %? return __syscall_64_num2name[num] %: return __syscall_32_num2name[num] %) } # Systemtap is benevolent when an associative array is being queried for an # unexisting key. If we call e.g. __syscall_64_name2num["unexisting_syscall"], # the result is zero. But at the same time zero is a valid syscall number, so # we really need to return some other value in this case to indicate that # syscall with given name doesn't exist. Let's use following # @return_sanitized macro. # # The other way round, when evaluating e.g. __syscall_64_num2name[-123], stap # is benevolent too - we'll get an empty string. But that is sufficiently # unique, so we are good at this front. @define return_sanitized(indexable, key) %( if (@key in @indexable) return @indexable[@key] else return -1 %) function syscall_num(name) { %( CONFIG_COMPAT == "y" %? if (@__compat_task) @return_sanitized(__syscall_32_name2num, name) %) %( CONFIG_64BIT == "y" %? @return_sanitized(__syscall_64_name2num, name) %: @return_sanitized(__syscall_32_name2num, name) %) }