Re: DTrace probe patch for OS X Leopard - Mailing list pgsql-patches

From Robert Lor
Subject Re: DTrace probe patch for OS X Leopard
Date
Msg-id 47C8191B.5020606@sun.com
Whole thread Raw
In response to Re: DTrace probe patch for OS X Leopard  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: DTrace probe patch for OS X Leopard
List pgsql-patches
Alvaro Herrera wrote:
> Robert Lor wrote:
>
>
>> My concern is that when we start adding more probes (not just the
>> backend), we will have to add the following 5 lines in .c files that use
>> the Dtrace macros. This seems intrusive and messy to me instead of in a
>> centralized place like c.h. What are the disadvantages for keeping the
>> way it is now?
>>
>> #ifdef ENABLE_DTRACE
>> #include "utils/probes.h"
>> #else
>> #include "utils/probes_null.h"
>> #endif
>>
>
> Why can't this block be centralized in probes.h?
>
probes.h is auto generated and it can certainly be massaged to include
the above logic, but I'd like to avoid doing that if possible.

The thinking initially was to make this tracing feature more like a
"framework" and make it as simple as possible to add new probes and as
un-intrusive as possible, that's why I thought and still think that
putting the includes in c.h makes sense, unless there are obvious
disadvantages I'm not aware of.

Regards,
-Robert




pgsql-patches by date:

Previous
From: Alvaro Herrera
Date:
Subject: remove TCL_ARRAYS
Next
From: Alvaro Herrera
Date:
Subject: Re: DTrace probe patch for OS X Leopard