From owner-svn-src-stable@FreeBSD.ORG Fri Jan 17 10:50:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D99BF9C2; Fri, 17 Jan 2014 10:50:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C4E9C15D1; Fri, 17 Jan 2014 10:50:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0HAokE0028284; Fri, 17 Jan 2014 10:50:46 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0HAokPv028282; Fri, 17 Jan 2014 10:50:46 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201401171050.s0HAokPv028282@svn.freebsd.org> From: Andriy Gapon Date: Fri, 17 Jan 2014 10:50:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260816 - in stable/9/sys: kern modules/dtrace/dtio modules/dtrace/dtraceall X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jan 2014 10:50:47 -0000 Author: avg Date: Fri Jan 17 10:50:46 2014 New Revision: 260816 URL: http://svnweb.freebsd.org/changeset/base/260816 Log: MFC r257037: Redefine the io provider using the SDT(9) macros MFC slacker: markj Deleted: stable/9/sys/kern/dtio_kdtrace.c stable/9/sys/modules/dtrace/dtio/ Modified: stable/9/sys/kern/subr_devstat.c stable/9/sys/modules/dtrace/dtraceall/dtraceall.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/kern/subr_devstat.c ============================================================================== --- stable/9/sys/kern/subr_devstat.c Fri Jan 17 10:48:44 2014 (r260815) +++ stable/9/sys/kern/subr_devstat.c Fri Jan 17 10:50:46 2014 (r260816) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -46,57 +47,21 @@ __FBSDID("$FreeBSD$"); #include -#ifdef KDTRACE_HOOKS -#include +SDT_PROVIDER_DEFINE(io); -dtrace_io_start_probe_func_t dtrace_io_start_probe; -dtrace_io_done_probe_func_t dtrace_io_done_probe; -dtrace_io_wait_start_probe_func_t dtrace_io_wait_start_probe; -dtrace_io_wait_done_probe_func_t dtrace_io_wait_done_probe; - -uint32_t dtio_start_id; -uint32_t dtio_done_id; -uint32_t dtio_wait_start_id; -uint32_t dtio_wait_done_id; - -#define DTRACE_DEVSTAT_START() \ - if (dtrace_io_start_probe != NULL) \ - (*dtrace_io_start_probe)(dtio_start_id, NULL, ds); - -#define DTRACE_DEVSTAT_BIO_START() \ - if (dtrace_io_start_probe != NULL) \ - (*dtrace_io_start_probe)(dtio_start_id, bp, ds); - -#define DTRACE_DEVSTAT_DONE() \ - if (dtrace_io_done_probe != NULL) \ - (*dtrace_io_done_probe)(dtio_done_id, NULL, ds); - -#define DTRACE_DEVSTAT_BIO_DONE() \ - if (dtrace_io_done_probe != NULL) \ - (*dtrace_io_done_probe)(dtio_done_id, bp, ds); - -#define DTRACE_DEVSTAT_WAIT_START() \ - if (dtrace_io_wait_start_probe != NULL) \ - (*dtrace_io_wait_start_probe)(dtio_wait_start_id, NULL, ds); - -#define DTRACE_DEVSTAT_WAIT_DONE() \ - if (dtrace_io_wait_done_probe != NULL) \ - (*dtrace_io_wait_done_probe)(dtio_wait_done_id, NULL, ds); - -#else /* ! KDTRACE_HOOKS */ - -#define DTRACE_DEVSTAT_START() - -#define DTRACE_DEVSTAT_BIO_START() - -#define DTRACE_DEVSTAT_DONE() - -#define DTRACE_DEVSTAT_BIO_DONE() - -#define DTRACE_DEVSTAT_WAIT_START() - -#define DTRACE_DEVSTAT_WAIT_DONE() -#endif /* KDTRACE_HOOKS */ +SDT_PROBE_DEFINE2(io, , , start, start, "struct bio *", "struct devstat *"); +SDT_PROBE_DEFINE2(io, , , done, done, "struct bio *", "struct devstat *"); +SDT_PROBE_DEFINE2(io, , , wait_start, wait-start, "struct bio *", + "struct devstat *"); +SDT_PROBE_DEFINE2(io, , , wait_done, wait-done, "struct bio *", + "struct devstat *"); + +#define DTRACE_DEVSTAT_START() SDT_PROBE2(io, , , start, NULL, ds) +#define DTRACE_DEVSTAT_BIO_START() SDT_PROBE2(io, , , start, bp, ds) +#define DTRACE_DEVSTAT_DONE() SDT_PROBE2(io, , , done, NULL, ds) +#define DTRACE_DEVSTAT_BIO_DONE() SDT_PROBE2(io, , , done, bp, ds) +#define DTRACE_DEVSTAT_WAIT_START() SDT_PROBE2(io, , , wait_start, NULL, ds) +#define DTRACE_DEVSTAT_WAIT_DONE() SDT_PROBE2(io, , , wait_done, NULL, ds) static int devstat_num_devs; static long devstat_generation = 1; Modified: stable/9/sys/modules/dtrace/dtraceall/dtraceall.c ============================================================================== --- stable/9/sys/modules/dtrace/dtraceall/dtraceall.c Fri Jan 17 10:48:44 2014 (r260815) +++ stable/9/sys/modules/dtrace/dtraceall/dtraceall.c Fri Jan 17 10:50:46 2014 (r260816) @@ -65,7 +65,6 @@ MODULE_VERSION(dtraceall, 1); MODULE_DEPEND(dtraceall, cyclic, 1, 1, 1); MODULE_DEPEND(dtraceall, opensolaris, 1, 1, 1); MODULE_DEPEND(dtraceall, dtrace, 1, 1, 1); -MODULE_DEPEND(dtraceall, dtio, 1, 1, 1); MODULE_DEPEND(dtraceall, dtmalloc, 1, 1, 1); MODULE_DEPEND(dtraceall, dtnfscl, 1, 1, 1); MODULE_DEPEND(dtraceall, dtnfsclient, 1, 1, 1);