From owner-p4-projects@FreeBSD.ORG Thu Jul 20 15:47:34 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1C90516A4E7; Thu, 20 Jul 2006 15:47:34 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D0B5116A4E1 for ; Thu, 20 Jul 2006 15:47:33 +0000 (UTC) (envelope-from howardsu@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E161643D80 for ; Thu, 20 Jul 2006 15:47:27 +0000 (GMT) (envelope-from howardsu@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k6KFlRuK014167 for ; Thu, 20 Jul 2006 15:47:27 GMT (envelope-from howardsu@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6KFlQxG014161 for perforce@freebsd.org; Thu, 20 Jul 2006 15:47:26 GMT (envelope-from howardsu@FreeBSD.org) Date: Thu, 20 Jul 2006 15:47:26 GMT Message-Id: <200607201547.k6KFlQxG014161@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to howardsu@FreeBSD.org using -f From: Howard Su To: Perforce Change Reviews Cc: Subject: PERFORCE change 102003 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2006 15:47:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=102003 Change 102003 by howardsu@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 #include #include +#include #include #include #include @@ -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 #include #include - +#include #include #include @@ -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.