* [PATCH] Use pid2task when passing pid to task_execname(v2)
@ 2014-04-14 5:58 Masatake YAMATO
2014-04-15 23:42 ` Josh Stone
0 siblings, 1 reply; 2+ messages in thread
From: Masatake YAMATO @ 2014-04-14 5:58 UTC (permalink / raw)
To: systemtap; +Cc: yamato
In v2 the case when pid2task returns NULL is handled.
Suggested by Josh Stone <jistone@redhat.com>.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
---
tapset/linux/signal.stp | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/tapset/linux/signal.stp b/tapset/linux/signal.stp
index 48b7f5f..b529f5f 100644
--- a/tapset/linux/signal.stp
+++ b/tapset/linux/signal.stp
@@ -464,13 +464,15 @@ probe signal.force_segv.return =
* @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
- pid_name = task_execname($pid)
+ task = pid2task($pid)
+ pid_name = task? task_execname(task): ""
}
/**
@@ -488,6 +490,7 @@ probe signal.syskill.return = syscall.kill.return
* @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
@@ -499,7 +502,8 @@ probe signal.systkill = syscall.tkill
name = "systkill"
sig_name = _signal_name($sig)
sig_pid = $pid
- pid_name = task_execname($pid)
+ task = pid2task($pid)
+ pid_name = task? task_execname(task): ""
}
/**
@@ -520,6 +524,7 @@ probe signal.systkill.return = syscall.tkill.return
* @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
@@ -530,7 +535,8 @@ probe signal.systgkill = syscall.tgkill
name = "systgkill"
sig_name = _signal_name($sig)
sig_pid = $pid
- pid_name = task_execname($pid)
+ task = pid2task($pid)
+ pid_name = task? task_execname(task): ""
}
/**
--
1.9.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Use pid2task when passing pid to task_execname(v2)
2014-04-14 5:58 [PATCH] Use pid2task when passing pid to task_execname(v2) Masatake YAMATO
@ 2014-04-15 23:42 ` Josh Stone
0 siblings, 0 replies; 2+ messages in thread
From: Josh Stone @ 2014-04-15 23:42 UTC (permalink / raw)
To: Masatake YAMATO, systemtap
On 04/13/2014 10:58 PM, Masatake YAMATO wrote:
> In v2 the case when pid2task returns NULL is handled.
> Suggested by Josh Stone <jistone@redhat.com>.
>
> Signed-off-by: Masatake YAMATO <yamato@redhat.com>
> ---
> tapset/linux/signal.stp | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
Thanks, I've committed this now.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-15 23:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-14 5:58 [PATCH] Use pid2task when passing pid to task_execname(v2) Masatake YAMATO
2014-04-15 23:42 ` Josh Stone
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).