PERFORCE change 134068 for review
John Birrell
jb at FreeBSD.org
Fri Jan 25 00:53:16 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=134068
Change 134068 by jb at jb_freebsd1 on 2008/01/25 08:52:41
Add some signal probes which are expected by the DTrace test suite.
Affected files ...
.. //depot/projects/dtrace/src/sys/kern/kern_sig.c#20 edit
Differences ...
==== //depot/projects/dtrace/src/sys/kern/kern_sig.c#20 (text+ko) ====
@@ -38,6 +38,7 @@
__FBSDID("$FreeBSD: src/sys/kern/kern_sig.c,v 1.355 2008/01/13 14:44:09 attilio Exp $");
#include "opt_compat.h"
+#include "opt_kdtrace.h"
#include "opt_ktrace.h"
#include <sys/param.h>
@@ -60,6 +61,7 @@
#include <sys/posix4.h>
#include <sys/pioctl.h>
#include <sys/resourcevar.h>
+#include <sys/sdt.h>
#include <sys/sleepqueue.h>
#include <sys/smp.h>
#include <sys/stat.h>
@@ -80,6 +82,19 @@
#include <security/audit/audit.h>
+SDT_PROVIDER_DECLARE(proc);
+SDT_PROBE_DEFINE(proc, kernel, , signal_send);
+SDT_PROBE_ARGTYPE(proc, kernel, , signal_send, 0, "struct thread *");
+SDT_PROBE_ARGTYPE(proc, kernel, , signal_send, 1, "struct proc *");
+SDT_PROBE_ARGTYPE(proc, kernel, , signal_send, 2, "int");
+SDT_PROBE_DEFINE(proc, kernel, , signal_clear);
+SDT_PROBE_ARGTYPE(proc, kernel, , signal_clear, 0, "int");
+SDT_PROBE_ARGTYPE(proc, kernel, , signal_clear, 1, "ksiginfo_t *");
+SDT_PROBE_DEFINE(proc, kernel, , signal_discard);
+SDT_PROBE_ARGTYPE(proc, kernel, , signal_discard, 0, "struct thread *");
+SDT_PROBE_ARGTYPE(proc, kernel, , signal_discard, 1, "struct proc *");
+SDT_PROBE_ARGTYPE(proc, kernel, , signal_discard, 2, "int");
+
#define ONSIG 32 /* NSIG for osig* syscalls. XXX. */
static int coredump(struct thread *);
@@ -1275,6 +1290,9 @@
ksiginfo_init(ksi);
sigqueue_get(&td->td_sigqueue, sig, ksi);
ksi->ksi_signo = sig;
+
+ SDT_PROBE(proc, kernel, , signal_clear, sig, ksi, 0, 0, 0);
+
if (ksi->ksi_code == SI_TIMER)
itimer_accept(p, ksi->ksi_timerid, ksi);
error = 0;
@@ -2023,6 +2041,7 @@
int
tdsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi)
{
+ SDT_PROBE(proc, kernel, , signal_send, td, p, sig, 0, 0 );
#ifdef KSE
sigset_t saved;
int ret;
@@ -2104,6 +2123,7 @@
*/
mtx_lock(&ps->ps_mtx);
if (SIGISMEMBER(ps->ps_sigignore, sig)) {
+ SDT_PROBE(proc, kernel, , signal_discard, ps, td, sig, 0, 0 );
mtx_unlock(&ps->ps_mtx);
if (ksi && (ksi->ksi_flags & KSI_INS))
ksiginfo_tryfree(ksi);
More information about the p4-projects
mailing list