From owner-freebsd-arch@FreeBSD.ORG Thu May 31 16:23:27 2012 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FC86106564A for ; Thu, 31 May 2012 16:23:27 +0000 (UTC) (envelope-from gnn@freebsd.org) Received: from vps.hungerhost.com (vps.hungerhost.com [216.38.53.176]) by mx1.freebsd.org (Postfix) with ESMTP id 117A78FC0C for ; Thu, 31 May 2012 16:23:27 +0000 (UTC) Received: from [209.249.190.124] (port=55088 helo=[10.2.212.229]) by vps.hungerhost.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.77) (envelope-from ) id 1Sa89g-0004dH-F6; Thu, 31 May 2012 12:23:23 -0400 Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: George Neville-Neil In-Reply-To: <20120528190300.3a43fc8d@fabiankeil.de> Date: Thu, 31 May 2012 12:23:22 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <86wr40tfhf.wl%gnn@neville-neil.com> <20120528190300.3a43fc8d@fabiankeil.de> To: Fabian Keil X-Mailer: Apple Mail (2.1278) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - freebsd.org Cc: arch@freebsd.org Subject: Re: RFC: A trial io provider for DTrace... X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 May 2012 16:23:27 -0000 On May 28, 2012, at 13:03 , Fabian Keil wrote: > Worked for me when applying with -p0. >=20 Great! >> The arguments are not exactly the same as in Solaris, for instance I >> don't yet support the fileinfo_t, but, you can get to the devstat and >> bio structures via args[0] and args[1] respectively. >>=20 >> Here is an example of it working: >>=20 >> dtrace -n 'io:::start /args[0] !=3D 0/{ trace(args[0]->bio_bcount)}' >>=20 >> Remember you need to be root to use DTrace. >=20 > Do you intent to eventually commit your patch to get dtrace working > with sudo? I've been using it since you posted it last October and > haven't seen any issues. > = http://lists.freebsd.org/pipermail/freebsd-current/2011-October/028120.htm= l >=20 Sorry, what I meant was that you needed root privilege to run DTrace, sudo will give you that. > I got: >=20 > clang -c -O2 -pipe -fno-strict-aliasing -std=3Dc99 -g -Wall = -Wredundant-decls -Wnested-externs -Wstrict-prototypes = -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual > /usr/src/sys/kern/subr_devstat.c:390:2: error: use of undeclared = identifier 'bs' > DTRACE_DEVSTAT_BIO_DONE(); > ^ > /usr/src/sys/kern/subr_devstat.c:76:41: note: expanded from macro = 'DTRACE_DEVSTAT_BIO_DONE' > (*dtrace_io_done_probe)(dtio_done_id, bs, ds); > ^ > 1 error generated. > *** Error code 1 >=20 > Stop in /usr/obj/usr/src/sys/ZOEY. > *** Error code 1 >=20 > Stop in /usr/src. > *** [buildkernel] Error code 1 >=20 > and used the following patch to get it to compile: >=20 > diff --git a/sys/kern/subr_devstat.c b/sys/kern/subr_devstat.c > index e2b6d21..732bf9c 100644 > --- a/sys/kern/subr_devstat.c > +++ b/sys/kern/subr_devstat.c > @@ -73,7 +73,7 @@ uint32_t dtio_wait_done_id; >=20 > #define DTRACE_DEVSTAT_BIO_DONE() \ > if (dtrace_io_done_probe !=3D NULL) \ > - (*dtrace_io_done_probe)(dtio_done_id, bs, ds); > + (*dtrace_io_done_probe)(dtio_done_id, bp, ds); >=20 > Other than that the provider seems to work fine so far. OK, let me get that fixed up and put up a newer patch. Thanks for testing and replying! Best, George