Re: DTrace probes broken in HEAD on Solaris? - Mailing list pgsql-hackers

From Greg Stark
Subject Re: DTrace probes broken in HEAD on Solaris?
Date
Msg-id 4136ffa0903241449l2dc20420nf4b380490fe928c6@mail.gmail.com
Whole thread Raw
In response to Re: DTrace probes broken in HEAD on Solaris?  (Robert Lor <Robert.Lor@Sun.COM>)
Responses Re: DTrace probes broken in HEAD on Solaris?  (Martijn van Oosterhout <kleptog@svana.org>)
Re: DTrace probes broken in HEAD on Solaris?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Mar 24, 2009 at 9:31 PM, Robert Lor <Robert.Lor@sun.com> wrote:
>
> I think the is-enabled test will address the issues you encountered. I see a
> few alternative to fixing this:


Another option is to impose a policy that all arguments to probes must
be simple local variables -- no expressions.

I'm starting to think that would be the better option and more in tune
with the dtrace way. Introducing the _ENABLED check defeats the whole
performance aim of dtrace that when it's disabled it introduces no
overhead. But using the _ENABLED macro only sparsely risks missing
some expression somewhere which looks innocuous but isn't.

I wonder if there's a gcc extension that would let us check if a macro
parameter is a simple variable or expression. That would let us
enforce the polilcy strictly at build-time.

-- 
greg


pgsql-hackers by date:

Previous
From: Robert Lor
Date:
Subject: Re: The BUFFER_HIT and BUFFER_MISS probes seem pretty darn redundant
Next
From: Martijn van Oosterhout
Date:
Subject: Re: DTrace probes broken in HEAD on Solaris?