Re: DTrace probes broken in HEAD on Solaris?

From: Greg Stark <stark(at)enterprisedb(dot)com>
To: Robert Lor <Robert(dot)Lor(at)sun(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Zdenek Kotala <Zdenek(dot)Kotala(at)sun(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: DTrace probes broken in HEAD on Solaris?
Date: 2009-03-24 21:49:50
Message-ID: 4136ffa0903241449l2dc20420nf4b380490fe928c6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 24, 2009 at 9:31 PM, Robert Lor <Robert(dot)Lor(at)sun(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2009-03-24 22:12:09 Re: DTrace probes broken in HEAD on Solaris?
Previous Message Robert Lor 2009-03-24 21:45:03 Re: The BUFFER_HIT and BUFFER_MISS probes seem pretty darn redundant