From owner-freebsd-geom@FreeBSD.ORG Thu Dec 4 20:41:19 2008 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F6DF1065673 for ; Thu, 4 Dec 2008 20:41:19 +0000 (UTC) (envelope-from marius@nuenneri.ch) Received: from rn-out-0910.google.com (rn-out-0910.google.com [64.233.170.191]) by mx1.freebsd.org (Postfix) with ESMTP id EA52F8FC12 for ; Thu, 4 Dec 2008 20:41:18 +0000 (UTC) (envelope-from marius@nuenneri.ch) Received: by rn-out-0910.google.com with SMTP id j71so3916780rne.12 for ; Thu, 04 Dec 2008 12:41:18 -0800 (PST) Received: by 10.90.103.13 with SMTP id a13mr8245193agc.69.1228423277602; Thu, 04 Dec 2008 12:41:17 -0800 (PST) Received: by 10.90.73.15 with HTTP; Thu, 4 Dec 2008 12:41:17 -0800 (PST) Message-ID: Date: Thu, 4 Dec 2008 21:41:17 +0100 From: "=?ISO-8859-1?Q?Marius_N=FCnnerich?=" To: freebsd-geom@freebsd.org, phk@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: DTrace probes for geom_kern, geom_io and geom_event X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Dec 2008 20:41:19 -0000 Hi, I wrote a bunch of DTrace probes for the core geom files mentioned in the subject. The patch for current is available at http://nuenneri.ch/freebsd/geom_probes.patch Anyone interested in testing them? Just apply the patch, add options KDTRACE_HOOKS to your kernel and build it like this: # make WITH_CTF=1 KERNCONF=YOURKERNEL buildkernel installkernel After reboot you can # kldload dtraceall and see the new probes with # dtrace -lP geom A sample script: #!/usr/sbin/dtrace -s #pragma D option quiet geom::: { @geom[execname, probemod, probefunc, probename] = count(); @geom_all[execname, probemod, probefunc, probename] = count(); } tick-10sec { normalize(@geom, 10) printa("%@8u %@8u %12s %s:%s:%s\n", @geom_all, @geom); printf("\n"); clear(@geom); } This is hand copied. You can chmod 755 and run it. I'm not sure how to handle the opt_kdtrace.h case in geom.h, see patch line 842. Any comments on the patch? @phk: Are you interested in committing this when there are no complaints? Are you interested in more probes? Kind regards Marius