PERFORCE change 102003 for review
Howard Su
howardsu at FreeBSD.org
Thu Jul 20 15:47:34 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=102003
Change 102003 by howardsu at su_vm on 2006/07/20 15:47:22
Add more probes for 'proc' probe that align with Solaris' name.
Affected files ...
.. //depot/projects/dtrace/src/sys/kern/kern_exec.c#6 edit
.. //depot/projects/dtrace/src/sys/kern/kern_exit.c#5 edit
.. //depot/projects/dtrace/src/sys/kern/kern_fork.c#4 edit
Differences ...
==== //depot/projects/dtrace/src/sys/kern/kern_exec.c#6 (text+ko) ====
@@ -790,6 +790,12 @@
VFS_UNLOCK_GIANT(vfslocked);
exec_free_args(args);
+ if (error == 0) {
+ DTRACE_PROBE1(__proc_exec__success, proc *, p);
+ }
+ else {
+ DTRACE_PROBE1(__proc_exec__failure, int, error);
+ }
if (error && imgp->vmspace_destroyed) {
/* sorry, no more process anymore. exit gracefully */
exit1(td, W_EXITCODE(0, SIGABRT));
==== //depot/projects/dtrace/src/sys/kern/kern_exit.c#5 (text+ko) ====
@@ -59,6 +59,7 @@
#include <sys/sbuf.h>
#include <sys/signalvar.h>
#include <sys/sched.h>
+#include <sys/sdt.h>
#include <sys/sx.h>
#include <sys/syscallsubr.h>
#include <sys/syslog.h>
@@ -91,7 +92,6 @@
/*
* exit --
* Death of process.
- *
* MPSAFE
*/
void
@@ -236,6 +236,8 @@
*/
EVENTHANDLER_INVOKE(process_exit, p);
+ DTRACE_PROBE1(__proc_exit, int, WTERMSIG(rv));
+
MALLOC(p->p_ru, struct rusage *, sizeof(struct rusage),
M_ZOMBIE, M_WAITOK);
/*
==== //depot/projects/dtrace/src/sys/kern/kern_fork.c#4 (text+ko) ====
@@ -65,7 +65,7 @@
#include <sys/unistd.h>
#include <sys/sx.h>
#include <sys/signalvar.h>
-
+#include <sys/sdt.h>
#include <security/audit/audit.h>
#include <vm/vm.h>
@@ -698,6 +698,7 @@
mtx_lock_spin(&sched_lock);
p2->p_state = PRS_NORMAL;
+ DTRACE_PROBE1(__proc_create, proc *, p2);
/*
* If RFSTOPPED not requested, make child runnable and add to
* run queue.
More information about the p4-projects
mailing list