From owner-freebsd-dtrace@FreeBSD.ORG Thu Jul 11 21:02:21 2013 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 84F4870B; Thu, 11 Jul 2013 21:02:21 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-ee0-x235.google.com (mail-ee0-x235.google.com [IPv6:2a00:1450:4013:c00::235]) by mx1.freebsd.org (Postfix) with ESMTP id D5A8B15EC; Thu, 11 Jul 2013 21:02:20 +0000 (UTC) Received: by mail-ee0-f53.google.com with SMTP id c41so5858433eek.40 for ; Thu, 11 Jul 2013 14:02:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=jV7IwiR+GrfGLCAUNGj/V6RI/MP1wM7RUtoPMc918Ik=; b=L6WX8JztxxLfR0ZTdhPDbjaKKYeRbcFavkGf7CcNXtXzyvyf44kzovQVl+x3ihtCBJ MDxBbo9pWcHtR9uE0seJ8A2O/kx3iV85lKZFt1cZKr7SxBOkmAsQ4Gj2Ds6k9pGUTLbJ W0rKCFxiv0lTyeSvwoJ25RCcU6wFRR5/iCrFcehvCgAAphfvlvX7jfu1clZQiECI7KPN Lb3s1nM10tENhjiLnt+7FqO7b3MHajhfhmi3xQMmqTIf22T0uGDZYtsAHgt29xH8u1NY f2ni3ISsFRL/YMzRdnOTlKPRETLGzmz4LbnBM3ld4Y2VlhHkdXzltcULgKKaQltTpTJn 4cCA== X-Received: by 10.14.126.72 with SMTP id a48mr43189454eei.34.1373576539657; Thu, 11 Jul 2013 14:02:19 -0700 (PDT) Received: from localhost ([178.150.115.244]) by mx.google.com with ESMTPSA id a4sm72357715eez.0.2013.07.11.14.02.17 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 11 Jul 2013 14:02:18 -0700 (PDT) Sender: Mikolaj Golub Date: Fri, 12 Jul 2013 00:02:16 +0300 From: Mikolaj Golub To: Mark Johnston Subject: Re: [RFC] reworking FreeBSD's SDT implementation Message-ID: <20130711210215.GB7506@gmail.com> References: <20130703041023.GA82673@raichu> <20130711024500.GA67976@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130711024500.GA67976@raichu> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-dtrace@freebsd.org X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jul 2013 21:02:21 -0000 Hi Mark, On Wed, Jul 10, 2013 at 10:45:08PM -0400, Mark Johnston wrote: > The final draft of my patch is here: > http://people.freebsd.org/~markj/patches/sdt-module-info/20130710-sdt-module-info.diff > > I've committed the mod_lock stuff and man page separately. If no one has > any objections, I'll commit the patch sometime this weekend. > Review and comments are still very welcome! One thing noticed. I don't think '#if defined(sun)' directives in dtrace.c are correct now: > -#if defined(sun) > /* > * DTrace Hook Functions > */ > static void > -dtrace_module_loaded(modctl_t *ctl) > +dtrace_module_loaded(struct linker_file *lf) ctl is unconditionally removed > { > dtrace_provider_t *prv; > > @@ -15166,14 +15150,16 @@ dtrace_module_loaded(modctl_t *ctl) > mutex_enter(&mod_lock); > #endif > > +#if defined(sun) > ASSERT(ctl->mod_busy); > +#endif while here it is used if sun is defined. > > /* > * We're going to call each providers per-module provide operation > * specifying only this module. > */ > for (prv = dtrace_provider; prv != NULL; prv = prv->dtpv_next) > - prv->dtpv_pops.dtps_provide_module(prv->dtpv_arg, ctl); > + prv->dtpv_pops.dtps_provide_module(prv->dtpv_arg, lf); And this looks wrong for sun case. The same issues are in dtrace_module_unloaded(). -- Mikolaj Golub