Re: [PATCH] fix signals instrumentation
Mathieu Desnoyers <[email protected]> Thu, 1 Nov 2007 22:33:55 -0400
| Newsgroups | gmane.linux.kernel.tracing |
|---|---|
| Message-ID | <20071102023355.GD29356@Krystal> |
Folded in lttng-instrumentation-kernel.patch. * Pierre-Marc Fournier ([email protected]) wrote: > The kernel_send_signal marker could not catch all the signals that were sent > to processes due to its location, in specific_send_sig_info(), which is not > visited by all signal dispaching paths. Most notably, signals arriving through > sys_kill() could not be traced. Moving the marker in send_signal() ensures > that all signals are recorded. > > Also rename the marker to kernel_send_signal to match the function name. > > Signed-off-by: Pierre-Marc Fournier <[email protected]> > --- > kernel/signal.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/kernel/signal.c b/kernel/signal.c > index 6130be7..f700cb6 100644 > --- a/kernel/signal.c > +++ b/kernel/signal.c > @@ -664,6 +664,8 @@ static int send_signal(int sig, struct siginfo *info, struct task_struct *t, > struct sigqueue * q = NULL; > int ret = 0; > > + trace_mark(kernel_send_signal, "pid %d signal %d", t->pid, sig); > + > /* > * Deliver the signal to listening signalfds. This must be called > * with the sighand lock held. > @@ -770,8 +772,6 @@ specific_send_sig_info(int sig, struct siginfo *info, struct task_struct *t) > if (sig_ignored(t, sig)) > goto out; > > - trace_mark(kernel_process_signal, "pid %d signal %d", t->pid, sig); > - > /* Support queueing exactly one non-rt signal, so that we > can get more detailed information about the cause of > the signal. */ > -- > 1.5.3.4 > -- Mathieu Desnoyers Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68