Re: DTrace probes patch - Mailing list pgsql-hackers

From Robert Lor
Subject Re: DTrace probes patch
Date
Msg-id 4947BDD7.8080705@sun.com
Whole thread Raw
In response to Re: DTrace probes patch  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: DTrace probes patch  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Peter Eisentraut wrote:
> Robert Lor wrote:
>>
>> The attached patch contains a couple of fixes in the existing probes 
>> and includes a few new ones.
>>
>> - Fixed compilation errors on OS X for probes that use typedefs
>
> Could you explain what these errors are about?  I don't see any errors 
> on my machine.
>
In the current probes.d, the following probe definitions are commented 
out because they cause compilation errors on OS X.
        * probe lock__wait__start(unsigned int, LOCKMODE);        * probe lock__wait__done(unsigned int, LOCKMODE);
  * probe buffer__read__start(BlockNumber, Oid, Oid, Oid, bool);        * probe buffer__read__done(BlockNumber, Oid,
Oid,Oid, bool, bool);
 

The problem was fixed by making the changes below.  probes.d is 
preprocessed with cpp and as such only  macros get expanded.

From:

typedef unsigned int LocalTransactionId;
typedef int LWLockId;
typedef int LWLockMode;
typedef int LOCKMODE;
typedef unsigned int BlockNumber;
typedef unsigned int Oid;
typedef int ForkNumber;


To:

#define LocalTransactionId unsigned int
#define LWLockId int
#define LWLockMode int
#define LOCKMODE int
#define BlockNumber unsigned int
#define Oid unsigned int
#define ForkNumber int






pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Coding TODO for 8.4: Synch Rep
Next
From: Tom Lane
Date:
Subject: Re: non unique value error... pgsql,,help needed.