From owner-p4-projects@FreeBSD.ORG Tue Aug 15 01:45:43 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 CBE1A16A4DF; Tue, 15 Aug 2006 01:45:42 +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 8F31416A4DE for ; Tue, 15 Aug 2006 01:45:42 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 15AF043D4C for ; Tue, 15 Aug 2006 01:45:42 +0000 (GMT) (envelope-from jb@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 k7F1jf68079668 for ; Tue, 15 Aug 2006 01:45:41 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7F1jfR9079665 for perforce@freebsd.org; Tue, 15 Aug 2006 01:45:41 GMT (envelope-from jb@freebsd.org) Date: Tue, 15 Aug 2006 01:45:41 GMT Message-Id: <200608150145.k7F1jfR9079665@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 103933 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: Tue, 15 Aug 2006 01:45:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=103933 Change 103933 by jb@jb_freebsd2 on 2006/08/15 01:45:38 Conditional compilation based on the KDTRACE kernel option. Affected files ... .. //depot/projects/dtrace/src/sys/kern/kern_exec.c#9 edit .. //depot/projects/dtrace/src/sys/kern/kern_exit.c#7 edit .. //depot/projects/dtrace/src/sys/kern/kern_fork.c#6 edit Differences ... ==== //depot/projects/dtrace/src/sys/kern/kern_exec.c#9 (text+ko) ==== @@ -54,7 +54,9 @@ #include #include #include +#ifdef KDTRACE #include +#endif #include #include #include @@ -346,7 +348,9 @@ if (error) goto exec_fail; #endif +#ifdef KDTRACE DTRACE_PROBE1(__proc_exec, char *, imgp->interpreter_name); +#endif imgp->image_header = NULL; @@ -787,12 +791,14 @@ VFS_UNLOCK_GIANT(vfslocked); exec_free_args(args); +#ifdef KDTRACE if (error == 0) { DTRACE_PROBE1(__proc_exec__success, proc *, p); } else { DTRACE_PROBE1(__proc_exec__failure, int, error); } +#endif 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#7 (text+ko) ==== @@ -59,7 +59,9 @@ #include #include #include +#ifdef KDTRACE #include +#endif #include #include #include @@ -236,7 +238,9 @@ */ EVENTHANDLER_INVOKE(process_exit, p); +#ifdef KDTRACE DTRACE_PROBE1(__proc_exit, int, WTERMSIG(rv)); +#endif MALLOC(p->p_ru, struct rusage *, sizeof(struct rusage), M_ZOMBIE, M_WAITOK); ==== //depot/projects/dtrace/src/sys/kern/kern_fork.c#6 (text+ko) ==== @@ -65,7 +65,9 @@ #include #include #include +#ifdef KDTRACE #include +#endif #include #include @@ -694,7 +696,10 @@ mtx_lock_spin(&sched_lock); p2->p_state = PRS_NORMAL; +#ifdef KDTRACE DTRACE_PROBE1(__proc_create, proc *, p2); +#endif + /* * If RFSTOPPED not requested, make child runnable and add to * run queue.