|
Server : Apache System : Linux server.mata-lashes.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64 User : matalashes ( 1004) PHP Version : 8.1.29 Disable Function : NONE Directory : /usr/share/systemtap/tapset/dyninst/ |
Upload File : |
// NB: functionally equivalent to linux/target_set.stp
@__private30 global _target_set # map: target-set-pid -> ancestor-pid
function target_set_pid (pid)
{
return ([pid] in _target_set)
}
probe init
{
if (target())
_target_set[target()] = stp_pid()
}
probe process.begin
{
// NB: by definition, every process we see in stapdyn is part of the
// target set, so we don't need to filter like linux/target_set.stp.
_target_set[pid()] = ppid()
}
probe process.end
{
delete _target_set[pid()]
}
function target_set_report ()
{
printf("target set:\n")
foreach (pid in _target_set+)
printf("%d begat %d\n", _target_set[pid], pid)
}