From owner-freebsd-current@FreeBSD.ORG Sun Jun 11 18:38:12 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9391F16A41F for ; Sun, 11 Jun 2006 18:38:12 +0000 (UTC) (envelope-from jb@what-creek.com) Received: from what-creek.com (what-creek.com [66.111.37.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id 53A3B43D48 for ; Sun, 11 Jun 2006 18:38:12 +0000 (GMT) (envelope-from jb@what-creek.com) Received: by what-creek.com (Postfix, from userid 102) id 089C478C1D; Sun, 11 Jun 2006 18:38:10 +0000 (GMT) Date: Sun, 11 Jun 2006 18:38:09 +0000 From: John Birrell To: current@freebsd.org Message-ID: <20060611183809.GA60353@what-creek.com> References: <20060611145351.221ec001@sol.hackerzberg.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060611145351.221ec001@sol.hackerzberg.local> User-Agent: Mutt/1.4.2.1i Cc: Subject: Re: DTrace SDT Provider not working? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jun 2006 18:38:12 -0000 [ I forgot to copy current@ ] On Sun, Jun 11, 2006 at 02:53:51PM +0200, Marius Nuennerich wrote: > > I tried to add the SDT Hooks for callout(9), see attached patch. > > # dtrace -l -f callout > > ID PROVIDER MODULE FUNCTION NAME > > 6 sdt kernel callout entry > > 7 sdt kernel callout return > > however, a simple > > > # dtrace -n 'sdt:kernel:callout:entry{printf("1");}' > > prints that a probe is matched but nothing else, same for > sdt:kernel:linker_load_module:entry and kldload'ing a module. > > I use the snapshot code you provided. > > Any idea where to look next? Are you sure that the function is actually being called? The version of code you have has the fbt provider restricted to just a few probes. You could try changing the filter in that to allow it to look at more functions. Be warned though that there are some that aren't safe to instrument. I'm still tracking those down, so enabling all probes with fbt::: is very unwise if you remove the filter I have in there. Using fbt you will be able to see what functions are being called more easily. This might explain what is happening with the sdt code you've added (which looks like it should work). -- John Birrell