2 * DTrace probes for PostgreSQL backend
4 * Copyright (c) 2006-2024, PostgreSQL Global Development Group
6 * src/backend/utils/probes.d
12 * Typedefs used in PostgreSQL probes.
14 * NOTE: Do not use system-provided typedefs (e.g. uintptr_t, uint32_t, etc)
15 * in probe definitions, as they cause compilation errors on macOS.
17 #define LocalTransactionId unsigned
int
18 #define LWLockMode
int
20 #define BlockNumber unsigned
int
21 #define Oid unsigned
int
22 #define ForkNumber
int
23 #define
bool unsigned
char
27 probe
transaction__start(LocalTransactionId
);
28 probe
transaction__commit(LocalTransactionId
);
29 probe
transaction__abort(LocalTransactionId
);
31 probe
lwlock__acquire(const char *, LWLockMode
);
32 probe
lwlock__release(const char *);
33 probe
lwlock__wait__start(const char *, LWLockMode
);
34 probe
lwlock__wait__done(const char *, LWLockMode
);
35 probe
lwlock__condacquire(const char *, LWLockMode
);
36 probe
lwlock__condacquire__fail(const char *, LWLockMode
);
37 probe
lwlock__acquire__or__wait(const char *, LWLockMode
);
38 probe
lwlock__acquire__or__wait__fail(const char *, LWLockMode
);
40 probe
lock__wait__start(unsigned
int, unsigned
int, unsigned
int, unsigned
int, unsigned
int, LOCKMODE
);
41 probe
lock__wait__done(unsigned
int, unsigned
int, unsigned
int, unsigned
int, unsigned
int, LOCKMODE
);
43 probe
query__parse__start(const char *);
44 probe
query__parse__done(const char *);
45 probe
query__rewrite__start(const char *);
46 probe
query__rewrite__done(const char *);
47 probe
query__plan__start();
48 probe
query__plan__done();
49 probe
query__execute__start();
50 probe
query__execute__done();
51 probe
query__start(const char *);
52 probe
query__done(const char *);
53 probe
statement__status(const char *);
55 probe
sort__start(int, bool, int, int, bool, int);
56 probe
sort__done(bool, long);
58 probe
buffer__read__start(ForkNumber
, BlockNumber
, Oid
, Oid
, Oid
, int);
59 probe
buffer__read__done(ForkNumber
, BlockNumber
, Oid
, Oid
, Oid
, int, bool);
60 probe
buffer__flush__start(ForkNumber
, BlockNumber
, Oid
, Oid
, Oid
);
61 probe
buffer__flush__done(ForkNumber
, BlockNumber
, Oid
, Oid
, Oid
);
62 probe
buffer__extend__start(ForkNumber
, Oid
, Oid
, Oid
, int, unsigned
int);
63 probe
buffer__extend__done(ForkNumber
, Oid
, Oid
, Oid
, int, unsigned
int, BlockNumber
);
65 probe
buffer__checkpoint__start(int);
66 probe
buffer__checkpoint__sync__start();
67 probe
buffer__checkpoint__done();
68 probe
buffer__sync__start(int, int);
69 probe
buffer__sync__written(int);
70 probe
buffer__sync__done(int, int, int);
72 probe
deadlock__found();
74 probe
checkpoint__start(int);
75 probe
checkpoint__done(int, int, int, int, int);
76 probe
clog__checkpoint__start(bool);
77 probe
clog__checkpoint__done(bool);
78 probe
subtrans__checkpoint__start(bool);
79 probe
subtrans__checkpoint__done(bool);
80 probe
multixact__checkpoint__start(bool);
81 probe
multixact__checkpoint__done(bool);
82 probe
twophase__checkpoint__start();
83 probe
twophase__checkpoint__done();
85 probe
smgr__md__read__start(ForkNumber
, BlockNumber
, Oid
, Oid
, Oid
, int);
86 probe
smgr__md__read__done(ForkNumber
, BlockNumber
, Oid
, Oid
, Oid
, int, int, int);
87 probe
smgr__md__write__start(ForkNumber
, BlockNumber
, Oid
, Oid
, Oid
, int);
88 probe
smgr__md__write__done(ForkNumber
, BlockNumber
, Oid
, Oid
, Oid
, int, int, int);
90 probe
wal__insert(unsigned
char, unsigned
char);
92 probe
wal__buffer__write__dirty__start();
93 probe
wal__buffer__write__dirty__done();