/usr/share/systemtap/tapset/linux
NameSizeModeActions
arm/-0755rm
arm64/-0755rm
i386/-0755rm
ia64/-0755rm
mips/-0755rm
powerpc/-0755rm
riscv/-0755rm
s390/-0755rm
x86_64/-0755rm
atomic.stp15630644editdlrm
aux_syscalls.stp1517020644editdlrm
context-caller.stp31480644editdlrm
context-envvar.stp17610644editdlrm
context-symbols.stp122760644editdlrm
context-unwind.stp32830644editdlrm
context.stp190150644editdlrm
context.stpm1250644editdlrm
conversions-guru.stp58760644editdlrm
conversions.stp172730644editdlrm
ctime.stp57500644editdlrm
dentry.stp106670644editdlrm
dev.stp20740644editdlrm
endian.stp6020644editdlrm
errno.stpm570644editdlrm
guru-delay.stp12300644editdlrm
guru-signal.stp10920644editdlrm
inet.stp14560644editdlrm
inet.stpm3830644editdlrm
inet_sock.stp12820644editdlrm
ioblock.stp155970644editdlrm
ioscheduler.stp140980644editdlrm
ip.stp54830644editdlrm
ipmib-filter-default.stp9650644editdlrm
ipmib.stp129810644editdlrm
irq.stp51200644editdlrm
json.stp91940644editdlrm
json.stpm62560644editdlrm
kprocess.stp47500644editdlrm
kretprobe.stp21530644editdlrm
linuxmib-filter-default.stp8760644editdlrm
linuxmib.stp37180644editdlrm
loadavg.stp19950644editdlrm
logging.stp25850644editdlrm
memory.stp192190644editdlrm
netfilter.stp363560644editdlrm
networking.stp96560644editdlrm
nfs.stp389970644editdlrm
nfsd.stp473790644editdlrm
nfsderrno.stp119790644editdlrm
nfs_proc.stp583250644editdlrm
nfs_proc.stpm12880644editdlrm
panic.stp10920644editdlrm
perf.stp52840644editdlrm
proc_mem.stp127020644editdlrm
pstrace.stp7730644editdlrm
rcu.stp9280644editdlrm
rlimit.stp13820644editdlrm
rpc.stp385780644editdlrm
scheduler.stp116610644editdlrm
scsi.stp97210644editdlrm
signal.stp293710644editdlrm
socket.stp350240644editdlrm
syscalls.stpm146430644editdlrm
syscalls_cfg_trunc.stp1110644editdlrm
syscall_any.stp15600644editdlrm
syscall_table.stp14750644editdlrm
sysc_accept.stp78680644editdlrm
sysc_accept4.stp78640644editdlrm
sysc_access.stp29110644editdlrm
sysc_acct.stp25830644editdlrm
sysc_add_key.stp35320644editdlrm
sysc_adjtimex.stp56720644editdlrm
sysc_alarm.stp28330644editdlrm
sysc_bdflush.stp31130644editdlrm
sysc_bind.stp69650644editdlrm
sysc_bpf.stp27380644editdlrm
sysc_brk.stp26290644editdlrm
sysc_capget.stp31010644editdlrm
sysc_capset.stp31020644editdlrm
sysc_chdir.stp26160644editdlrm
sysc_chmod.stp29590644editdlrm
sysc_chown.stp37750644editdlrm
sysc_chown16.stp31150644editdlrm
sysc_chroot.stp26790644editdlrm
sysc_clock_adjtime.stp52430644editdlrm
sysc_clock_getres.stp42480644editdlrm
sysc_clock_gettime.stp40350644editdlrm
sysc_clock_nanosleep.stp80410644editdlrm
sysc_clock_settime.stp55540644editdlrm
sysc_clone.stp67080644editdlrm
sysc_close.stp27710644editdlrm
sysc_connect.stp74520644editdlrm
sysc_copy_file_range.stp37690644editdlrm
sysc_creat.stp27280644editdlrm
sysc_delete_module.stp33660644editdlrm
sysc_dup.stp23830644editdlrm
sysc_dup2.stp29910644editdlrm
sysc_dup3.stp30730644editdlrm
sysc_epoll_create.stp57420644editdlrm
sysc_epoll_ctl.stp39980644editdlrm
sysc_epoll_pwait.stp41570644editdlrm
sysc_epoll_wait.stp48500644editdlrm
sysc_eventfd.stp54110644editdlrm
sysc_execve.stp62570644editdlrm
sysc_execveat.stp69420644editdlrm
sysc_exit.stp19840644editdlrm
sysc_exit_group.stp21460644editdlrm
sysc_faccessat.stp37360644editdlrm
sysc_faccessat2.stp44340644editdlrm
sysc_fadvise64.stp86390644editdlrm
sysc_fallocate.stp39180644editdlrm
sysc_fanotify_init.stp34320644editdlrm
sysc_fanotify_mark.stp75720644editdlrm
sysc_fchdir.stp25250644editdlrm
sysc_fchmod.stp28800644editdlrm
sysc_fchmodat.stp37340644editdlrm
sysc_fchown.stp37220644editdlrm
sysc_fchown16.stp30230644editdlrm
sysc_fchownat.stp39030644editdlrm
sysc_fcntl.stp48060644editdlrm
sysc_fdatasync.stp26920644editdlrm
sysc_fgetxattr.stp37200644editdlrm
sysc_finit_module.stp33820644editdlrm
sysc_flistxattr.stp30000644editdlrm
sysc_flock.stp25790644editdlrm
sysc_fork.stp25860644editdlrm
sysc_fremovexattr.stp32290644editdlrm
sysc_fsetxattr.stp41870644editdlrm
sysc_fstat.stp61630644editdlrm
sysc_fstatat.stp57890644editdlrm
sysc_fstatfs.stp32660644editdlrm
sysc_fstatfs64.stp32400644editdlrm
sysc_fsync.stp24190644editdlrm
sysc_ftruncate.stp62120644editdlrm
sysc_futex.stp58100644editdlrm
sysc_futimesat.stp66390644editdlrm
sysc_getcpu.stp30340644editdlrm
sysc_getcwd.stp27470644editdlrm
sysc_getdents.stp56180644editdlrm
sysc_getegid.stp35420644editdlrm
sysc_geteuid.stp34840644editdlrm
sysc_getgid.stp34020644editdlrm
sysc_getgroups.stp42740644editdlrm
sysc_gethostname.stp12490644editdlrm
sysc_getitimer.stp53550644editdlrm
sysc_getpeername.stp75220644editdlrm
sysc_getpgid.stp28590644editdlrm
sysc_getpgrp.stp20900644editdlrm
sysc_getpid.stp20310644editdlrm
sysc_getppid.stp21120644editdlrm
sysc_getpriority.stp29430644editdlrm
sysc_getrandom.stp31840644editdlrm
sysc_getresgid.stp41720644editdlrm
sysc_getresuid.stp39720644editdlrm
sysc_getrlimit.stp44600644editdlrm
sysc_getrusage.stp38030644editdlrm
sysc_getsid.stp25090644editdlrm
sysc_getsockname.stp75500644editdlrm
sysc_getsockopt.stp85200644editdlrm
sysc_gettid.stp20570644editdlrm
sysc_gettimeofday.stp40780644editdlrm
sysc_getuid.stp34270644editdlrm
sysc_getxattr.stp38120644editdlrm
sysc_get_mempolicy.stp46710644editdlrm
sysc_get_robust_list.stp45720644editdlrm
sysc_init_module.stp32410644editdlrm
sysc_inotify_add_watch.stp38610644editdlrm
sysc_inotify_init.stp55480644editdlrm
sysc_inotify_rm_watch.stp32770644editdlrm
sysc_ioctl.stp35360644editdlrm
sysc_ioperm.stp28190644editdlrm
sysc_ioprio_get.stp30180644editdlrm
sysc_ioprio_set.stp32470644editdlrm
sysc_io_cancel.stp33180644editdlrm
sysc_io_destroy.stp28160644editdlrm
sysc_io_getevents.stp49940644editdlrm
sysc_io_setup.stp38380644editdlrm
sysc_io_submit.stp39830644editdlrm
sysc_kcmp.stp30070644editdlrm
sysc_kexec_file_load.stp40410644editdlrm
sysc_kexec_load.stp45130644editdlrm
sysc_keyctl.stp37220644editdlrm
sysc_kill.stp25910644editdlrm
sysc_lchown.stp38800644editdlrm
sysc_lchown16.stp31940644editdlrm
sysc_lgetxattr.stp39120644editdlrm
sysc_link.stp28850644editdlrm
sysc_linkat.stp40050644editdlrm
sysc_listen.stp66240644editdlrm
sysc_listxattr.stp33180644editdlrm
sysc_llistxattr.stp33790644editdlrm
sysc_llseek.stp33710644editdlrm
sysc_lookup_dcookie.stp40890644editdlrm
sysc_lremovexattr.stp40010644editdlrm
sysc_lseek.stp45000644editdlrm
sysc_lsetxattr.stp40970644editdlrm
sysc_lstat.stp64550644editdlrm
sysc_madvise.stp29760644editdlrm
sysc_mbind.stp43030644editdlrm
sysc_membarrier.stp30170644editdlrm
sysc_memfd_create.stp32470644editdlrm
sysc_memfd_secret.stp28150644editdlrm
sysc_migrate_pages.stp43740644editdlrm
sysc_mincore.stp29000644editdlrm
sysc_mkdir.stp28970644editdlrm
sysc_mkdirat.stp34450644editdlrm
sysc_mknod.stp29580644editdlrm
sysc_mknodat.stp36440644editdlrm
sysc_mlock.stp26180644editdlrm
sysc_mlock2.stp28820644editdlrm
sysc_mlockall.stp27710644editdlrm
sysc_mmap2.stp62290644editdlrm
sysc_modify_ldt.stp31120644editdlrm
sysc_mount.stp44990644editdlrm
sysc_move_pages.stp47250644editdlrm
sysc_mprotect.stp29660644editdlrm
sysc_mq_getsetattr.stp44600644editdlrm
sysc_mq_notify.stp39360644editdlrm
sysc_mq_open.stp53850644editdlrm
sysc_mq_timedreceive.stp61830644editdlrm
sysc_mq_timedsend.stp59280644editdlrm
sysc_mq_unlink.stp30180644editdlrm
sysc_mremap.stp35770644editdlrm
sysc_msgctl.stp82550644editdlrm
sysc_msgget.stp44230644editdlrm
sysc_msgrcv.stp106890644editdlrm
sysc_msgsnd.stp88660644editdlrm
sysc_msync.stp28510644editdlrm
sysc_munlock.stp27440644editdlrm
sysc_munlockall.stp23420644editdlrm
sysc_munmap.stp27090644editdlrm
sysc_name_to_handle_at.stp41500644editdlrm
sysc_nanosleep.stp58240644editdlrm
sysc_nfsservctl.stp22840644editdlrm
sysc_nice.stp24400644editdlrm
sysc_ni_syscall.stp14330644editdlrm
sysc_open.stp43290644editdlrm
sysc_openat.stp39160644editdlrm
sysc_open_by_handle_at.stp42980644editdlrm
sysc_pause.stp25640644editdlrm
sysc_perf_event_open.stp38080644editdlrm
sysc_personality.stp30770644editdlrm
sysc_pipe.stp105960644editdlrm
sysc_pivot_root.stp33140644editdlrm
sysc_pkey_alloc.stp30570644editdlrm
sysc_pkey_free.stp27190644editdlrm
sysc_pkey_mprotect.stp33920644editdlrm
sysc_poll.stp27690644editdlrm
sysc_ppoll.stp64930644editdlrm
sysc_prctl.stp29930644editdlrm
sysc_pread.stp54270644editdlrm
sysc_preadv.stp52830644editdlrm
sysc_preadv2.stp56670644editdlrm
sysc_prlimit64.stp34950644editdlrm
sysc_process_vm_readv.stp47750644editdlrm
sysc_process_vm_writev.stp48970644editdlrm
sysc_pselect6.stp64570644editdlrm
sysc_pselect7.stp36680644editdlrm
sysc_ptrace.stp36610644editdlrm
sysc_pwrite.stp72390644editdlrm
sysc_pwritev.stp54140644editdlrm
sysc_pwritev2.stp57740644editdlrm
sysc_quotactl.stp46910644editdlrm
sysc_read.stp37210644editdlrm
sysc_readahead.stp36010644editdlrm
sysc_readdir.stp40430644editdlrm
sysc_readlink.stp31140644editdlrm
sysc_readlinkat.stp38330644editdlrm
sysc_readv.stp35020644editdlrm
sysc_reboot.stp32530644editdlrm
sysc_recv.stp72600644editdlrm
sysc_recvfrom.stp85540644editdlrm
sysc_recvmmsg.stp64620644editdlrm
sysc_recvmsg.stp109620644editdlrm
sysc_remap_file_pages.stp39350644editdlrm
sysc_removexattr.stp33200644editdlrm
sysc_rename.stp30380644editdlrm
sysc_renameat.stp41910644editdlrm
sysc_renameat2.stp45000644editdlrm
sysc_request_key.stp41380644editdlrm
sysc_restart_syscall.stp25650644editdlrm
sysc_rmdir.stp26570644editdlrm
sysc_rt_sigaction.stp69520644editdlrm
sysc_rt_sigpending.stp47990644editdlrm
sysc_rt_sigprocmask.stp91050644editdlrm
sysc_rt_sigqueueinfo.stp47500644editdlrm
sysc_rt_sigreturn.stp16390644editdlrm
sysc_rt_sigsuspend.stp38790644editdlrm
sysc_rt_sigtimedwait.stp60240644editdlrm
sysc_rt_tgsigqueueinfo.stp44600644editdlrm
sysc_sched_getaffinity.stp41020644editdlrm
sysc_sched_getattr.stp36710644editdlrm
sysc_sched_getparam.stp32360644editdlrm
sysc_sched_getscheduler.stp32960644editdlrm
sysc_sched_get_priority_max.stp36400644editdlrm
sysc_sched_get_priority_min.stp36400644editdlrm
sysc_sched_rr_get_interval.stp48640644editdlrm
sysc_sched_setaffinity.stp39600644editdlrm
sysc_sched_setattr.stp34450644editdlrm
sysc_sched_setparam.stp32210644editdlrm
sysc_sched_setscheduler.stp36660644editdlrm
sysc_sched_yield.stp23150644editdlrm
sysc_seccomp.stp33650644editdlrm
sysc_select.stp63590644editdlrm
sysc_semctl.stp82060644editdlrm
sysc_semget.stp45960644editdlrm
sysc_semop.stp57700644editdlrm
sysc_semtimedop.stp99360644editdlrm
sysc_send.stp73690644editdlrm
sysc_sendfile.stp49120644editdlrm
sysc_sendmmsg.stp93050644editdlrm
sysc_sendmsg.stp121100644editdlrm
sysc_sendto.stp83570644editdlrm
sysc_setdomainname.stp37290644editdlrm
sysc_setfsgid.stp47960644editdlrm
sysc_setfsuid.stp48390644editdlrm
sysc_setgid.stp45730644editdlrm
sysc_setgroups.stp45190644editdlrm
sysc_sethostname.stp32740644editdlrm
sysc_setitimer.stp62860644editdlrm
sysc_setns.stp28040644editdlrm
sysc_setpgid.stp27600644editdlrm
sysc_setpriority.stp32180644editdlrm
sysc_setregid.stp66600644editdlrm
sysc_setresgid.stp70400644editdlrm
sysc_setresuid.stp70550644editdlrm
sysc_setreuid.stp66300644editdlrm
sysc_setrlimit.stp40300644editdlrm
sysc_setsid.stp21010644editdlrm
sysc_setsockopt.stp84440644editdlrm
sysc_settimeofday.stp66460644editdlrm
sysc_setuid.stp45720644editdlrm
sysc_setxattr.stp39930644editdlrm
sysc_set_mempolicy.stp41710644editdlrm
sysc_set_robust_list.stp43580644editdlrm
sysc_set_tid_address.stp31950644editdlrm
sysc_sgetmask.stp21690644editdlrm
sysc_shmat.stp67770644editdlrm
sysc_shmctl.stp81390644editdlrm
sysc_shmdt.stp39820644editdlrm
sysc_shmget.stp45010644editdlrm
sysc_shutdown.stp69090644editdlrm
sysc_sigaction.stp57820644editdlrm
sysc_sigaltstack.stp42670644editdlrm
sysc_signal.stp28670644editdlrm
sysc_signalfd.stp124640644editdlrm
sysc_sigpending.stp37120644editdlrm
sysc_sigprocmask.stp41720644editdlrm
sysc_sigreturn.stp14610644editdlrm
sysc_sigsuspend.stp45750644editdlrm
sysc_socket.stp74380644editdlrm
sysc_socketpair.stp82970644editdlrm
sysc_splice.stp33630644editdlrm
sysc_ssetmask.stp28100644editdlrm
sysc_stat.stp65350644editdlrm
sysc_statfs.stp34910644editdlrm
sysc_statfs64.stp34590644editdlrm
sysc_statx.stp41180644editdlrm
sysc_stime.stp30830644editdlrm
sysc_swapoff.stp28750644editdlrm
sysc_swapon.stp31210644editdlrm
sysc_symlink.stp30280644editdlrm
sysc_symlinkat.stp40600644editdlrm
sysc_sync.stp19250644editdlrm
sysc_syncfs.stp25710644editdlrm
sysc_sync_file_range.stp60110644editdlrm
sysc_sysctl.stp30950644editdlrm
sysc_sysfs.stp36480644editdlrm
sysc_sysinfo.stp32860644editdlrm
sysc_syslog.stp28260644editdlrm
sysc_tee.stp27430644editdlrm
sysc_tgkill.stp28830644editdlrm
sysc_time.stp35050644editdlrm
sysc_timerfd.stp18290644editdlrm
sysc_timerfd_create.stp33940644editdlrm
sysc_timerfd_gettime.stp42190644editdlrm
sysc_timerfd_settime.stp52820644editdlrm
sysc_timer_create.stp49750644editdlrm
sysc_timer_delete.stp29420644editdlrm
sysc_timer_getoverrun.stp32070644editdlrm
sysc_timer_gettime.stp46700644editdlrm
sysc_timer_settime.stp60750644editdlrm
sysc_times.stp31670644editdlrm
sysc_tkill.stp26950644editdlrm
sysc_truncate.stp70310644editdlrm
sysc_tux.stp10680644editdlrm
sysc_umask.stp25220644editdlrm
sysc_umount.stp53600644editdlrm
sysc_uname.stp51450644editdlrm
sysc_unlink.stp28660644editdlrm
sysc_unlinkat.stp33800644editdlrm
sysc_unshare.stp28140644editdlrm
sysc_uselib.stp28710644editdlrm
sysc_userfaultfd.stp30050644editdlrm
sysc_ustat.stp53330644editdlrm
sysc_utime.stp61730644editdlrm
sysc_utimensat.stp70440644editdlrm
sysc_utimes.stp63310644editdlrm
sysc_vfork.stp20290644editdlrm
sysc_vhangup.stp21280644editdlrm
sysc_vmsplice.stp63370644editdlrm
sysc_wait4.stp50970644editdlrm
sysc_waitid.stp42530644editdlrm
sysc_waitpid.stp34600644editdlrm
sysc_write.stp39390644editdlrm
sysc_writev.stp36560644editdlrm
target_set.stp17690644editdlrm
task.stp228800644editdlrm
task.stpm2530644editdlrm
task_ancestry.stp16210644editdlrm
task_time.stp78610644editdlrm
tcp.stp226420644editdlrm
tcpmib-filter-default.stp8850644editdlrm
tcpmib.stp108240644editdlrm
timestamp.stp17610644editdlrm
timestamp_gtod.stp16290644editdlrm
timestamp_monotonic.stp55890644editdlrm
tty.stp73510644editdlrm
tzinfo.stp8030644editdlrm
ucontext-symbols.stp88420644editdlrm
ucontext-unwind.stp76450644editdlrm
ucontext.stp22370644editdlrm
udp.stp60970644editdlrm
utrace.stp13630644editdlrm
vfs.stp338260644editdlrm
Edit: /usr/share/systemtap/tapset/linux/signal.stp (29371B)
// Signal tapset // Copyright (C) 2006 IBM Corp. // Copyright (C) 2006 Intel Corporation. // Copyright (C) 2008-2017 Red Hat, Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. // // // // This family of probe points is used to probe signal activities. // Since there are so many signals sent to processes at any given // point, it is advisable to filter the information according to the // requirements. For example, filter only for a particular signal // (if sig==2) or for a particular process (if pid_name==stap). // /** * probe signal.send - Signal being sent to a process * Arguments: * @sig: The number of the signal * @sig_name: A string representation of the signal * @sig_pid: The PID of the process receiving the signal * @pid_name: The name of the signal recipient * @si_code: Indicates the signal type * @task: A task handle to the signal recipient * @sinfo: The address of siginfo struct * @shared: Indicates whether the signal is shared by the thread group * @send2queue: Indicates whether the signal is sent to an existing * sigqueue (deprecated in SystemTap 2.1) * @name: The name of the function used to send out the signal * * Context: * The signal's sender. * */ probe signal.send = __signal.send.signal_generate !, __signal.send.send_sigqueue, %( kernel_v > "2.6.25" %? __signal.send.send_signal ? %: __signal.send.group_send_sig_info ?, __signal.send.send_group_sigqueue ?, __signal.send.specific_send_sig_info ? %) { sig_name = _signal_name(sig) sig_pid = task_pid(task) pid_name = task_execname(task) if (sinfo == 2) # 2 == SEND_SIG_FORCED si_code ="SIGSTOP or SIGKILL" else if (sinfo > 0) si_code="SI_KERNEL (SIGFPE, SIGSEGV, SIGTRAP, SIGCHLD, SIGPOLL)" else if (sinfo <= 0) si_code="SI_USER or SI_TIMER or SI_ASYNCIO" } probe __signal.send.signal_generate = kernel.trace("signal_generate") ? { name = "signal_generate" sig = $sig task = $task sinfo = $info shared = (@choose_defined($group, 0) == 0) ? 0 : 1 %( systemtap_v <= "2.1" %? send2queue = 0 %) } probe __signal.send.send_sigqueue = kernel.function("send_sigqueue") { name = "send_sigqueue" task = @choose_defined($t, $p) sig = @choose_defined($q->info->si_signo, $sig) sinfo = @choose_defined($q->info, 0) shared = 0 %( systemtap_v <= "2.1" %? send2queue = 1 %) } probe __signal.send.send_signal = kernel.function("__send_signal") !, kernel.function("send_signal") ? { if (@defined($group)) { name = "__send_signal" shared = ($group == 0) ? 0 : 1 } else { name = "send_signal" shared = 0 } sig = $sig task = $t sinfo = $info %( systemtap_v <= "2.1" %? send2queue = 0 %) } probe __signal.send.group_send_sig_info = kernel.function("__group_send_sig_info") { name = "__group_send_sig_info" sig = $sig task = $p sinfo = $info shared = 1 %( systemtap_v <= "2.1" %? send2queue = 0 %) } probe __signal.send.send_group_sigqueue = kernel.function("send_group_sigqueue") ? { name = "send_group_sigqueue" sig = $sig task = $p sinfo = 0 # $q->info shared = 1 %( systemtap_v <= "2.1" %? send2queue = 1 %) } probe __signal.send.specific_send_sig_info = kernel.function("specific_send_sig_info").call ? { name = "specific_send_sig_info" sig = $sig task = $t sinfo = $info shared = 0 %( systemtap_v <= "2.1" %? send2queue = 0 %) } %( systemtap_v <= "2.1" %? /** * probe signal.send.return - Signal being sent to a process completed (deprecated in SystemTap 2.1) * @retstr: The return value to either __group_send_sig_info, specific_send_sig_info, or send_sigqueue * @shared: Indicates whether the sent signal is shared by the thread group. * @send2queue: Indicates whether the sent signal was sent to an existing sigqueue * @name: The name of the function used to send out the signal * * Context: * The signal's sender. (correct?) * * Possible __group_send_sig_info and * specific_send_sig_info return values are as follows; * * 0 -- The signal is successfully sent to a process, * which means that, (1) the signal was ignored by the receiving process, * (2) this is a non-RT signal and the system already has one queued, and * (3) the signal was successfully added to the sigqueue of the receiving process. * * -EAGAIN -- The sigqueue of the receiving process is * overflowing, the signal was RT, and the signal was sent by a user using something other * than kill(). * * Possible send_group_sigqueue and * send_sigqueue return values are as follows; * * 0 -- The signal was either successfully added into the * sigqueue of the receiving process, or a SI_TIMER entry is already * queued (in which case, the overrun count will be simply incremented). * * 1 -- The signal was ignored by the receiving process. * * -1 -- (send_sigqueue only) The task was marked * exiting, allowing * posix_timer_event to redirect it to the group * leader. * */ probe signal.send.return = __signal.send.send_sigqueue.return, %( kernel_v > "2.6.25" %? __signal.send.send_signal.return ? %: __signal.send.group_send_sig_info.return ?, __signal.send.send_group_sigqueue.return ?, __signal.send.specific_send_sig_info.return ? %) { retstr = return_str(1, $return) } // - return 0 if the signal is either sucessfully added into the // sigqueue of receiving process or a SI_TIMER entry is already // queued so just increment the overrun count // // - return 1 if this signal is ignored by receiving process // // - return -1 if the task is marked exiting, so posix_timer_event // can redirect it to the group leader probe __signal.send.send_sigqueue.return = kernel.function("send_sigqueue").return ? { name = "send_sigqueue" shared = 0 send2queue = 1 } probe __signal.send.send_signal.return = kernel.function("__send_signal").return !, kernel.function("send_signal").return ? { if (@defined(@entry($group))) { name = "__send_signal" shared = (@entry($group) == 0) ? 0 : 1 } else { name = "send_signal" shared = 0 } send2queue = 0 } // Return values for "__group_send_sig_info" and "specific_send_sig_info" // // - return 0 if the signal is successfully sent to a process, // which means the following: // <1> the signal is ignored by receiving process // <2> this is a non-RT signal and we already have one queued // <3> the signal is successfully added into the sigqueue of // receiving process // // - return -EAGAIN if the sigqueue is overflow the signal was RT // and sent by user using something other than kill() probe __signal.send.group_send_sig_info.return = kernel.function("__group_send_sig_info").return { name = "__group_send_sig_info" shared = 1 send2queue = 0 } probe __signal.send.specific_send_sig_info.return = kernel.function("specific_send_sig_info").return ? { name = "specific_send_sig_info" shared = 0 send2queue = 0 } // - return 0 if the signal is either successfully added into the // sigqueue of receiving process or a SI_TIMER entry is already // queued so just increment the overrun count // // - return 1 if this signal is ignored by receiving process probe __signal.send.send_group_siggueue.return = kernel.function("send_group_sigqueue").return ? { name = "send_group_sigqueue" shared = 1 send2queue = 1 } %) /** * probe signal.checkperm - Check being performed on a sent signal * @sig: The number of the signal * @sig_name: A string representation of the signal * @sig_pid: The PID of the process receiving the signal * @pid_name: Name of the process receiving the signal * @si_code: Indicates the signal type * @task: A task handle to the signal recipient * @sinfo: The address of the siginfo structure * @name: Name of the probe point */ probe signal.checkperm = kernel.function("check_kill_permission") { sig = $sig task = $t sinfo = $info name = "checkperm" sig_name = _signal_name($sig) sig_pid = task_pid(task) pid_name = task_execname(task) if (sinfo == 2) si_code ="SIGSTOP or SIGKILL" else if (sinfo > 0) si_code="SI_KERNEL (SIGFPE, SIGSEGV, SIGTRAP, SIGCHLD, SIGPOLL)" else if (sinfo <= 0) si_code="SI_USER or SI_TIMER or SI_ASYNCIO" } /** * probe signal.checkperm.return - Check performed on a sent signal completed * @name: Name of the probe point * @retstr: Return value as a string */ probe signal.checkperm.return = kernel.function("check_kill_permission").return ? { name = "checkperm" retstr = return_str(1, $return) } /** * probe signal.wakeup - Sleeping process being wakened for signal * @sig_pid: The PID of the process to wake * @pid_name: Name of the process to wake * @resume: Indicates whether to wake up a task in a * STOPPED or TRACED state * @state_mask: A string representation indicating the mask * of task states to wake. Possible values are * TASK_INTERRUPTIBLE, TASK_STOPPED, * TASK_TRACED, TASK_WAKEKILL, and TASK_INTERRUPTIBLE. */ probe __signal.wakeup.signal_wake_up_state = kernel.function("signal_wake_up_state") { resume = ($state == 0) ? 0 : 1; if ($state & @const("__TASK_STOPPED") != 0) { state_mask .= " | TASK_STOPPED" } if ($state & @const("__TASK_TRACED") != 0) { state_mask .= " | TASK_TRACED" } if ($state & @const("TASK_WAKEKILL") != 0) { state_mask .= " | TASK_WAKEKILL" } state_mask = "TASK_INTERRUPTIBLE" . state_mask } probe __signal.wakeup.signal_wake_up = kernel.function("signal_wake_up") { resume = $resume if (resume == 0) { state_mask = "TASK_INTERRUPTIBLE" } else { state_mask = "TASK_INTERRUPTIBLE | TASK_STOPPED | TASK_TRACED" } } probe signal.wakeup = __signal.wakeup.signal_wake_up_state !, __signal.wakeup.signal_wake_up { name = "wakeup" sig_pid = $t->pid pid_name = kernel_string($t->comm) } /** * probe signal.check_ignored - Checking to see signal is ignored * @sig_pid: The PID of the process receiving the signal * @pid_name: Name of the process receiving the signal * @sig: The number of the signal * @sig_name: A string representation of the signal */ probe signal.check_ignored = kernel.function("sig_ignored") { name = "check_ignored" sig_pid = $t->pid pid_name = kernel_string($t->comm) sig = $sig sig_name = _signal_name($sig) } /** * probe signal.check_ignored.return - Check to see signal is ignored completed * @name: Name of the probe point * @retstr: Return value as a string */ /* On newer kernels, sig_ignored() is inline, so we can't do a return * probe. So, instead we'll probe prepare_signal(), which is the only * caller of sig_ignored(). */ probe __signal.check_ignored.sig_ignored.return = kernel.function("sig_ignored").return { retstr = return_str(1, $return) } probe __signal.check_ignored.prepare_signal.return = kernel.function("prepare_signal").return { /* The prepare_signal() function inverts the return value of * sig_ignored(). */ retstr = return_str(1, !$return) } probe signal.check_ignored.return = __signal.check_ignored.sig_ignored.return !, __signal.check_ignored.prepare_signal.return { name = "check_ignored" } // probe signal.handle_stop // For now, just comment it out since at the time handle_stop_signal() // is called, it doesn't know whether current signal is STOP/COUNT. // So the calling of handle_stop_signal() doesn't mean that the Kernel // is now processing the STOP/COUNT signal // /* probe signal.handle_stop = kernel.function("handle_stop_signal") { sig_pid = $p->pid pid_name = kernel_string($p->comm) sig_info = $sig sig_name = _signal_name($sig) } */ /** * probe signal.force_segv - Forcing send of SIGSEGV * @sig_pid: The PID of the process receiving the signal * @pid_name: Name of the process receiving the signal * @sig: The number of the signal * @sig_name: A string representation of the signal * @name: Name of the probe point */ probe signal.force_segv = _signal.force_segv.* { name = "force_segv" } probe _signal.force_segv.part1 = kernel.function("force_sigsegv") { sig_pid = $p->pid pid_name = kernel_string($p->comm) sig = $sig sig_name = _signal_name($sig) } probe _signal.force_segv.part2 = kernel.function("force_sigsegv_info") ? { sig_pid = pid() pid_name = execname() sig = $sig sig_name = _signal_name($sig) } /** * probe signal.force_segv.return - Forcing send of SIGSEGV complete * @name: Name of the probe point * @retstr: Return value as a string */ probe signal.force_segv.return = kernel.function("force_sigsegv").return, kernel.function("force_sigsegv_info").return ? { name = "force_segv" retstr = return_str(1, $return) } /** * probe signal.syskill - Sending kill signal to a process * @name: Name of the probe point * @sig: The specific signal sent to the process * @sig_name: A string representation of the signal * @sig_pid: The PID of the process receiving the signal * @pid_name: The name of the signal recipient * @task: A task handle to the signal recipient */ probe signal.syskill = syscall.kill { name = "syskill" sig_name = _signal_name(sig) sig_pid = pid task = pid2task(pid) pid_name = task? task_execname(task): "" } /** * probe signal.syskill.return - Sending kill signal completed */ probe signal.syskill.return = syscall.kill.return { name = "syskill" } /** * probe signal.sys_tkill - Sending a kill signal to a thread * @name: Name of the probe point * @sig_pid: The PID of the process receiving the kill signal * @pid_name: The name of the signal recipient * @sig: The specific signal sent to the process * @sig_name: A string representation of the signal * @task: A task handle to the signal recipient * * The tkill call is analogous to kill(2), * except that it also allows a process within a specific thread group to * be targeted. Such processes are targeted through their unique * thread IDs (TID). */ probe signal.systkill = syscall.tkill { name = "systkill" sig_name = _signal_name(sig) sig_pid = pid task = pid2task(pid) pid_name = task? task_execname(task): "" } /** * probe signal.systkill.return - Sending kill signal to a thread completed * @name: Name of the probe point * @retstr: The return value to either __group_send_sig_info, */ probe signal.systkill.return = syscall.tkill.return { name = "systkill" } /** * probe signal.sys_tgkill - Sending kill signal to a thread group * @name: Name of the probe point * @sig_pid: The PID of the thread receiving the kill signal * @pid_name: The name of the signal recipient * @tgid: The thread group ID of the thread receiving the kill signal * @sig: The specific kill signal sent to the process * @sig_name: A string representation of the signal * @task: A task handle to the signal recipient * * The tgkill call is similar to tkill, * except that it also allows the caller to specify the thread group ID of * the thread to be signalled. This protects against TID reuse. */ probe signal.systgkill = syscall.tgkill { name = "systgkill" sig_name = _signal_name(sig) sig_pid = pid task = pid2task(pid) pid_name = task? task_execname(task): "" } /** * probe signal.sys_tgkill.return - Sending kill signal to a thread group completed * @name: Name of the probe point * @retstr: The return value to either __group_send_sig_info, */ probe signal.systgkill.return = syscall.tgkill.return { name = "systgkill" } /** * probe signal.send_sig_queue - Queuing a signal to a process * @name: Name of the probe point * @sig: The queued signal * @sig_name: A string representation of the signal * @sig_pid: The PID of the process to which the signal is queued * @pid_name: Name of the process to which the signal is queued * @sigqueue_addr: The address of the signal queue */ probe signal.send_sig_queue = kernel.function("send_sigqueue"), kernel.function("send_group_sigqueue") ? { name = "send_sig_queue" if (! @defined($sig)) { sig = $q->info->si_signo sig_name = _signal_name($q->info->si_signo) } else { sig = $sig sig_name = _signal_name($sig) } if (@defined($t)) { sig_pid = $t->pid pid_name = kernel_string($t->comm) } else { sig_pid = $p->pid pid_name = kernel_string($p->comm) } sigqueue_addr = $q } /** * probe signal.send_sig_queue.return - Queuing a signal to a process completed * @name: Name of the probe point * @retstr: Return value as a string */ probe signal.send_sig_queue.return = kernel.function("send_sigqueue").return, kernel.function("send_group_sigqueue").return ? { name = "send_sig_queue" retstr = return_str(1, $return) } /** * probe signal.pending - Examining pending signal * @name: Name of the probe point * @sigset_add: The address of the user-space signal set * (sigset_t) * @sigset_size: The size of the user-space signal set * * This probe is used to examine a set of signals pending for delivery * to a specific thread. This normally occurs when the * do_sigpending kernel function is executed. */ probe signal.pending = kernel.function("do_sigpending").call !, kernel.function("sys_rt_sigpending").call ?, kernel.function("compat_sys_rt_sigpending").call ? { name = "pending" sigset_add=@choose_defined($set, $uset) # Note that this isn't 100% correct if $sigsetsize doesn't # exist (in the case of newer do_sigpending() calls). Instead, # we're returning the default size of a sigset_t. sigset_size=@choose_defined($sigsetsize, @cast_sizeof("sigset_t")) } /** * probe signal.pending.return - Examination of pending signal completed * @name: Name of the probe point * @retstr: Return value as a string */ probe signal.pending.return = kernel.function("do_sigpending").return !, kernel.function("sys_rt_sigpending").return ?, kernel.function("compat_sys_rt_sigpending").return ? { name = "pending" retstr = return_str(1, $return) } /** * probe signal.handle - Signal handler being invoked * @name: Name of the probe point * @sig: The signal number that invoked the signal handler * @sig_name: A string representation of the signal * @sinfo: The address of the siginfo table * @sig_code: The si_code value of the siginfo signal * @ka_addr: The address of the k_sigaction table * associated with the signal * @oldset_addr: The address of the bitmask array of blocked signals * (deprecated in SystemTap 2.1) * @regs: The address of the kernel-mode stack area (deprecated in * SystemTap 2.1) * @sig_mode: Indicates whether the signal was a user-mode or kernel-mode signal */ probe signal.handle = __signal.handle.tp !, __signal.handle.kp { name = "handle" // Check whether the signal is a User Mode or Kernel mode Signal. if (sinfo == 0 && sig_code <= 0) sig_mode = "User Mode Signal" else if (sinfo >= 1) sig_mode = "Kernel Mode Signal" } probe __signal.handle.tp = kernel.trace("signal_deliver") ? { sig = $sig sig_name = _signal_name($sig) sinfo = $info sig_code = $info->si_code ka_addr = $ka %( systemtap_v <= "2.1" %? oldset_addr = 0 regs = 0 %) } probe __signal.handle.kp = kernel.function("handle_rt_signal64") ?, kernel.function("handle_rt_signal32") ?, kernel.function("handle_signal32") !, kernel.function("handle_signal") { if (@defined($sig)) { sig = $sig sig_name = _signal_name($sig) } else { sig = $signr sig_name = _signal_name($signr) } sinfo = $info sig_code = $info->si_code ka_addr = $ka %( systemtap_v <= "2.1" %? oldset_addr = @choose_defined($oldset, @choose_defined($set, 0)) regs = $regs %) } %( systemtap_v <= "2.1" %? /** * probe signal.handle.return - Signal handler invocation completed * (deprecated in SystemTap 2.1) * @name: Name of the probe point * @retstr: Return value as a string */ probe signal.handle.return = kernel.function("handle_rt_signal64").return ?, kernel.function("handle_rt_signal32").return ?, kernel.function("handle_signal32").return !, kernel.function("handle_signal").return ? { name = "handle" retstr = return_str(1, $return) } %) /** * probe signal.do_action - Examining or changing a signal action * @name: Name of the probe point * @sig: The signal to be examined/changed * @sig_name: A string representation of the signal * @sigact_addr: The address of the new sigaction * struct associated with the signal * @oldsigact_addr: The address of the old sigaction * struct associated with the signal * @sa_handler: The new handler of the signal * @sa_mask: The new mask of the signal */ probe signal.do_action = kernel.function("do_sigaction") { name = "do_action" sig = $sig sig_name = _signal_name($sig) sigact_addr = $act oldsigact_addr = $oact if(sigact_addr != 0) { sa_handler = $act->sa->sa_handler sa_mask = __get_action_mask($act) } } /** * probe signal.do_action.return - Examining or changing a signal action completed * @name: Name of the probe point * @retstr: Return value as a string */ probe signal.do_action.return = kernel.function("do_sigaction").return { name = "do_action" retstr = return_str(1, $return) } function get_sigaction_mask:long(act:long) { return __get_action_mask(act) } @__private30 function __get_action_mask:long(act:long) %{ /* pure */ int i; struct k_sigaction *act = (struct k_sigaction *)((uintptr_t)STAP_ARG_act); sigset_t *sigset = &act->sa.sa_mask; STAP_RETVALUE = kread(&(sigset->sig[0])); for (i=1; i<_NSIG_WORDS; ++i) { uint64_t part = kread(&(sigset->sig[i])); STAP_RETVALUE |= part << (_NSIG_BPW*i); } CATCH_DEREF_FAULT(); %} /** * probe signal.procmask - Examining or changing blocked signals * @name: Name of the probe point * @how: Indicates how to change the blocked signals; possible values are * SIG_BLOCK=0 (for blocking signals), * SIG_UNBLOCK=1 (for unblocking signals), and * SIG_SETMASK=2 for setting the signal mask. * @sigset_addr: The address of the signal set (sigset_t) * to be implemented * @oldsigset_addr: The old address of the signal set * (sigset_t) * @sigset: The actual value to be set for sigset_t * (correct?) */ probe signal.procmask = kernel.function("sigprocmask") { name = "procmask" how=$how sigset_addr = $set oldsigset_addr = $oldset sigset = get_sigset($set) } function get_sigset:long(sigset:long) %{ /* pure */ int i; sigset_t *sigset = (sigset_t *)((uintptr_t)STAP_ARG_sigset); STAP_RETVALUE = kread(&(sigset->sig[0])); for (i=1; i<_NSIG_WORDS; ++i) { uint64_t part = kread(&(sigset->sig[i])); STAP_RETVALUE |= part << (_NSIG_BPW*i); } CATCH_DEREF_FAULT(); %} /** * probe signal.procmask.return - Examining or changing blocked signals completed * @name: Name of the probe point * @retstr: Return value as a string */ probe signal.procmask.return = kernel.function("sigprocmask").return { name = "procmask" retstr = return_str(1, $return) } /** * probe signal.flush - Flushing all pending signals for a task * @name: Name of the probe point * @task: The task handler of the process performing the flush * @sig_pid: The PID of the process associated with the task * performing the flush * @pid_name: The name of the process associated with the task * performing the flush */ probe signal.flush = kernel.function("flush_signals") { name = "flush" task = $t sig_pid = $t->pid pid_name = kernel_string($t->comm) } /** * sfunction get_sa_flags - Returns the numeric value of sa_flags * * @act: address of the sigaction to query. */ function get_sa_flags:long (act:long) { return @cast(act, "k_sigaction", "kernel")->sa->sa_flags } /** * sfunction get_sa_handler - Returns the numeric value of sa_handler * * @act: address of the sigaction to query. */ function get_sa_handler:long (act:long) { return @cast(act, "k_sigaction", "kernel")->sa->sa_handler } // sa_mask contains the set of signals to be blocked when executing the // signal handler. This function returns a string, delimited by ",". // // struct task_struct { // [...] // struct signal_struct//signal; // struct sighand_struct//sighand; // [...] // struct sighand_struct { // atomic_t count; // struct k_sigaction action[_NSIG]; // [...] // struct k_sigaction { // struct sigaction sa; // }; // // struct sigaction { // [...] // sigset_t sa_mask; // }; /** * sfunction sigset_mask_str - Returns the string representation of a sigset * * @mask: the sigset to convert to string. */ function sigset_mask_str:string (mask:long) %{ /* pure */ int i, len; char *str = STAP_RETVALUE, tmp[5]; str[0] = '\0'; for (i = 1; i < _NSIG; ++i, STAP_ARG_mask >>=1) if (STAP_ARG_mask & 1) { snprintf(tmp, sizeof(tmp), "%u,", i); strlcat(str, tmp, MAXSTRINGLEN); } len = strlen(str); if (len) str[len - 1] = '\0'; %} // task_struct->blocked signal mask contains the set of signals that are // currently blocked. // // struct task_struct { // [...] // sigset_t blocked, real_blocked; /** * sfunction is_sig_blocked - Returns 1 if the signal is currently blocked, or 0 if it is not * * @task: address of the task_struct to query. * @sig: the signal number to test. */ function is_sig_blocked:long (task:long, sig:long) %{ /* pure */ int i; sigset_t blocked; struct task_struct *p = (struct task_struct *)((uintptr_t)STAP_ARG_task); for (i = 0; i < _NSIG_WORDS; ++i) blocked.sig[i] = kread(&p->blocked.sig[i]); STAP_RETVALUE = sigismember(&blocked, STAP_ARG_sig); CATCH_DEREF_FAULT(); %} /** * sfunction sa_flags_str - Returns the string representation of sa_flags * * @sa_flags: the set of flags to convert to string. */ function sa_flags_str:string (sa_flags:long) %{ /* pure */ int len; char *str = STAP_RETVALUE; str[0] = '\0'; if (STAP_ARG_sa_flags & 0x00000001u) strlcat(str, "NOCLDSTOP|", MAXSTRINGLEN); if (STAP_ARG_sa_flags & 0x00000002u) strlcat(str, "NOCLDWAIT|", MAXSTRINGLEN); if (STAP_ARG_sa_flags & 0x00000004u) strlcat(str, "SIGINFO|", MAXSTRINGLEN); if (STAP_ARG_sa_flags & 0x08000000u) strlcat(str, "ONSTACK|", MAXSTRINGLEN); if (STAP_ARG_sa_flags & 0x10000000u) strlcat(str, "RESTART|", MAXSTRINGLEN); if (STAP_ARG_sa_flags & 0x40000000u) strlcat(str, "NODEFER|", MAXSTRINGLEN); if (STAP_ARG_sa_flags & 0x80000000u) strlcat(str, "RESETHAND|", MAXSTRINGLEN); if (STAP_ARG_sa_flags & 0x04000000) strlcat(str, "RESTORER|", MAXSTRINGLEN); len = strlen(str); if (len) str[len - 1] = '\0'; %} /** * sfunction sa_handler - Returns the string representation of an sa_handler * * @handler: the sa_handler to convert to string. * * Description: Returns the string representation of an sa_handler. * If it is not SIG_DFL, SIG_IGN or SIG_ERR, it will return the address * of the handler. */ function sa_handler_str(handler) { if (handler == 0) return "default"; /* SIG_DFL */ if (handler == 1) return "ignored"; /* SIG_IGN */ if (handler == -1) return "error"; /* SIG_ERR */ return sprintf("%p", handler); /* userspace address */ } // Signals start from 1 not 0. @__private30 global __sig[64] probe init { __sig[1] = "HUP" __sig[2] = "INT" __sig[3] = "QUIT" __sig[4] = "ILL" __sig[5] = "TRAP" __sig[6] = "ABRT" /* or IOT */ __sig[7] = "BUS" __sig[8] = "FPE" __sig[9] = "KILL" __sig[10] = "USR1" __sig[11] = "SEGV" __sig[12] = "USR2" __sig[13] = "PIPE" __sig[14] = "ALRM" __sig[15] = "TERM" __sig[16] = "STKFLT" __sig[17] = "CHLD" /* or CLD */ __sig[18] = "CONT" __sig[19] = "STOP" __sig[20] = "TSTP" __sig[21] = "TTIN" __sig[22] = "TTOU" __sig[23] = "URG" __sig[24] = "XCPU" __sig[25] = "XFSZ" __sig[26] = "VTALRM" __sig[27] = "PROF" __sig[28] = "WINCH" __sig[29] = "IO/POLL" __sig[30] = "PWR" __sig[31] = "SYS" /* or UNUSED */ __sig[32] = "RTMIN" __sig[33] = "RTMIN+1" __sig[34] = "RTMIN+2" __sig[35] = "RTMIN+3" __sig[36] = "RTMIN+4" __sig[37] = "RTMIN+5" __sig[38] = "RTMIN+6" __sig[39] = "RTMIN+7" __sig[40] = "RTMIN+8" __sig[41] = "RTMIN+9" __sig[42] = "RTMIN+10" __sig[43] = "RTMIN+11" __sig[44] = "RTMIN+12" __sig[45] = "RTMIN+13" __sig[46] = "RTMIN+14" __sig[47] = "RTMIN+15" __sig[48] = "RTMIN+16" __sig[49] = "RTMIN+17" __sig[50] = "RTMIN+18" __sig[51] = "RTMIN+19" __sig[52] = "RTMIN+20" __sig[53] = "RTMIN+21" __sig[54] = "RTMIN+22" __sig[55] = "RTMIN+23" __sig[56] = "RTMIN+24" __sig[57] = "RTMIN+25" __sig[58] = "RTMIN+26" __sig[59] = "RTMIN+27" __sig[60] = "RTMIN+28" __sig[61] = "RTMIN+29" __sig[62] = "RTMIN+30" __sig[63] = "RTMIN+31" __sig[64] = "RTMIN+32" } /** * sfunction signal_str - Returns the string representation of a signal number * * @num: the signal number to convert to string. */ function signal_str(num) { return __sig[num] }