2 * DTrace probes for PostgreSQL backend
4 * Copyright (c) 2006-2008, PostgreSQL Global Development Group
11 /* typedefs used in PostgreSQL */
12 typedef unsigned
int LocalTransactionId
;
14 typedef int LWLockMode
;
16 typedef unsigned
int BlockNumber
;
17 typedef unsigned
int Oid
;
24 * Due to a bug in Mac OS X 10.5, using built-in typedefs (e.g. uintptr_t,
25 * uint32_t, etc.) cause compilation errors.
28 probe
transaction__start(LocalTransactionId
);
29 probe
transaction__commit(LocalTransactionId
);
30 probe
transaction__abort(LocalTransactionId
);
32 probe
lwlock__acquire(LWLockId
, LWLockMode
);
33 probe
lwlock__release(LWLockId
);
34 probe
lwlock__wait__start(LWLockId
, LWLockMode
);
35 probe
lwlock__wait__done(LWLockId
, LWLockMode
);
36 probe
lwlock__condacquire(LWLockId
, LWLockMode
);
37 probe
lwlock__condacquire__fail(LWLockId
, LWLockMode
);
39 /* The following probe declarations cause compilation errors
40 * on Mac OS X but not on Solaris. Need further investigation.
41 * probe lock__wait__start(unsigned int, LOCKMODE);
42 * probe lock__wait__done(unsigned int, LOCKMODE);
44 probe
lock__wait__start(unsigned
int, int);
45 probe
lock__wait__done(unsigned
int, int);
47 probe
query__parse__start(const char *);
48 probe
query__parse__done(const char *);
49 probe
query__rewrite__start(const char *);
50 probe
query__rewrite__done(const char *);
51 probe
query__plan__start();
52 probe
query__plan__done();
53 probe
query__execute__start();
54 probe
query__execute__done();
55 probe
query__start(const char *);
56 probe
query__done(const char *);
57 probe
statement__status(const char *);
59 probe
sort__start(int, bool, int, int, bool);
60 probe
sort__done(unsigned
long, long);
62 /* The following probe declarations cause compilation errors
63 * on Mac OS X but not on Solaris. Need further investigation.
64 * probe buffer__read__start(BlockNumber, Oid, Oid, Oid, bool);
65 * probe buffer__read__done(BlockNumber, Oid, Oid, Oid, bool, bool);
67 probe
buffer__read__start(unsigned
int, unsigned
int, unsigned
int, unsigned
int, bool);
68 probe
buffer__read__done(unsigned
int, unsigned
int, unsigned
int, unsigned
int, bool, bool);
70 probe
buffer__flush__start(Oid
, Oid
, Oid
);
71 probe
buffer__flush__done(Oid
, Oid
, Oid
);
73 probe
buffer__hit(bool);
74 probe
buffer__miss(bool);
75 probe
buffer__checkpoint__start(int);
76 probe
buffer__checkpoint__done();
77 probe
buffer__sync__start(int, int);
78 probe
buffer__sync__written(int);
79 probe
buffer__sync__done(int, int, int);
81 probe
deadlock__found();
83 probe
clog__checkpoint__start(bool);
84 probe
clog__checkpoint__done(bool);
85 probe
subtrans__checkpoint__start(bool);
86 probe
subtrans__checkpoint__done(bool);
87 probe
multixact__checkpoint__start(bool);
88 probe
multixact__checkpoint__done(bool);
89 probe
twophase__checkpoint__start();
90 probe
twophase__checkpoint__done();