From owner-p4-projects@FreeBSD.ORG Fri May 19 02:08:33 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 6CD9C16A422; Fri, 19 May 2006 02:08:33 +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 F40B816A41F for ; Fri, 19 May 2006 02:08:32 +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 2C35043D45 for ; Fri, 19 May 2006 02:08:32 +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 k4J285TB043633 for ; Fri, 19 May 2006 02:08:05 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k4J284Xc043630 for perforce@freebsd.org; Fri, 19 May 2006 02:08:04 GMT (envelope-from jb@freebsd.org) Date: Fri, 19 May 2006 02:08:04 GMT Message-Id: <200605190208.k4J284Xc043630@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 97440 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: Fri, 19 May 2006 02:08:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=97440 Change 97440 by jb@jb_freebsd2 on 2006/05/19 02:07:44 One of the entertaining things about Statically Defined Tracing (SDT) is that you can actually use it to trace parts of DTrace. As long as it's in the client side. Obviously trying to trace things that are called during probes would get anal-retentive very quickly. In this case, just as an example, add SDT probes to the prototype provider. This proves that they are (a) simple to code; and (b) work. 8-) Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/prototype.c#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/prototype.c#2 (text+ko) ==== @@ -59,6 +59,7 @@ #include #include +#include static d_open_t prototype_open; static int prototype_load(void); @@ -102,6 +103,10 @@ static void prototype_provide(void *arg, dtrace_probedesc_t *desc) { + SDT_PROBE(prototype, provide, entry, arg, desc, 0, 0, 0); + + + SDT_PROBE(prototype, provide, return, arg, desc, 0, 0, 0); } /* ARGSUSED */ @@ -176,6 +181,7 @@ break; } + return (error); }