Date: Fri, 19 May 2006 02:08:04 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 97440 for review Message-ID: <200605190208.k4J284Xc043630@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <machine/stdarg.h> #include <contrib/opensolaris/uts/common/sys/dtrace_impl.h> +#include <sys/sdt.h> 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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605190208.k4J284Xc043630>