Re: DTrace probes broken in HEAD on Solaris?

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Robert Lor <Robert(dot)Lor(at)Sun(dot)COM>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: DTrace probes broken in HEAD on Solaris?
Date: 2009-03-25 12:54:05
Message-ID: 49CA296D.20102@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dne 24.03.09 22:31, Robert Lor napsal(a):

> I think the is-enabled test will address the issues you encountered. I
> see a few alternative to fixing this:
>
> 1) Only use if (foo_ENABLED()) test for probes with expensive function
> call/computation in arguments. This will keep the code clean, and we can
> document this in the "Definine New Probes" section in the online doc.
>
> 2) Add the if(foo_ENABLED()) test to all probes manually and make this a
> requirement for all future probes. This makes the check explicit and
> avoid confusion.
>
> 3) Post-process probes.h so if(foo_ENABLED()) test is added to every
> probe. We're doing some post-processing now by pre-pending TRACE_ to the
> macros with a sed script. Personally, I don't like doing complex
> post-processing of output from another tool because the script can break
> if for some reason DTrace's output is changed.
>
> I prefer option 1 the most and 3 the least.

I prefer also option 1. In many cases if(foo_ENABLED) has same or bigger
performance penalty like disabled probe itself.

Zdenek

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2009-03-25 13:04:59 Re: SSL over Unix-domain sockets
Previous Message Sam Mason 2009-03-25 12:44:08 Re: Matching dimensions in arrays