Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jul 2013 22:28:25 -0400
From:      markj@freebsd.org
To:        Mikolaj Golub <trociny@FreeBSD.org>
Cc:        freebsd-dtrace@freebsd.org
Subject:   Re: [RFC] reworking FreeBSD's SDT implementation
Message-ID:  <20130722022811.GA14288@raichu>
In-Reply-To: <20130714075634.GC2832@gmail.com>
References:  <20130703041023.GA82673@raichu> <20130711024500.GA67976@raichu> <20130711210215.GB7506@gmail.com> <20130713234200.GA40803@raichu> <20130714075634.GC2832@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jul 14, 2013 at 10:56:34AM +0300, Mikolaj Golub wrote:
> On Sat, Jul 13, 2013 at 07:42:00PM -0400, Mark Johnston wrote:
> 
> > Thanks for pointing this out - I've fixed these problems in the
> > following diff:
> > 
> > http://people.freebsd.org/~markj/patches/sdt-module-info/20130713-sdt-module-info.diff
> > 
> > It turns out that we typedef modctl_t to struct linker_file, so I don't
> > need to have separate cases for defined(sun) and !defined(sun) in a few
> > places.
> 
> Then in dtrace.h: 
> 
>   -extern void (*dtrace_modload)(modctl_t *);
>   -extern void (*dtrace_modunload)(modctl_t *);
>   +extern void (*dtrace_modload)(struct linker_file *);
>   +extern int (*dtrace_modunload)(struct linker_file *);
> 
> you might also want to return modctl_t back? I suppose
> dtrace_modunload also requires '#if defined(sun)' here.
> 
> Also, is there some reason you choose to return 1 on modunload
> failure? Usually we return -1 on error, it would be nice to follow the
> convention.
> 
> In sdt_disable(), before decreasing nenabled, it might be useful to
> add an assertion that nenabled is not going to reach negative value.

Thanks for the comments, and sorry for the slow reply. I uploaded a new
patch containing changes for all the suggestions above:

http://people.freebsd.org/~markj/patches/sdt-module-info/20130721-sdt-module-info.diff

-Mark



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130722022811.GA14288>