PostgreSQL Source Code  git master
probes.d
Go to the documentation of this file.
1 /* ----------
2  * DTrace probes for PostgreSQL backend
3  *
4  * Copyright (c) 2006-2019, PostgreSQL Global Development Group
5  *
6  * src/backend/utils/probes.d
7  * ----------
8  */
9 
10 
11 /*
12  * Typedefs used in PostgreSQL.
13  *
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 10.5.
16  */
17 #define LocalTransactionId unsigned int
18 #define LWLockMode int
19 #define LOCKMODE int
20 #define BlockNumber unsigned int
21 #define Oid unsigned int
22 #define ForkNumber int
23 #define bool char
24 
26 
27  probe transaction__start(LocalTransactionId);
30 
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);
39 
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);
42 
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 *);
54 
55  probe sort__start(int, bool, int, int, bool, int);
56  probe sort__done(bool, long);
57 
58  probe buffer__read__start(ForkNumber, BlockNumber, Oid, Oid, Oid, int, bool);
59  probe buffer__read__done(ForkNumber, BlockNumber, Oid, Oid, Oid, int, bool, bool);
62 
63  probe buffer__checkpoint__start(int);
66  probe buffer__sync__start(int, int);
67  probe buffer__sync__written(int);
68  probe buffer__sync__done(int, int, int);
71 
72  probe deadlock__found();
73 
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);
84 
86  probe smgr__md__read__done(ForkNumber, BlockNumber, Oid, Oid, Oid, int, int, int);
88  probe smgr__md__write__done(ForkNumber, BlockNumber, Oid, Oid, Oid, int, int, int);
89 
90  probe wal__insert(unsigned char, unsigned char);
91  probe wal__switch();
94 };
probe checkpoint__start(int)
probe lock__wait__done(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, LOCKMODE)
probe lwlock__acquire__or__wait__fail(const char *, LWLockMode)
probe buffer__read__done(ForkNumber, BlockNumber, Oid, Oid, Oid, int, bool, bool)
probe lwlock__wait__start(const char *, LWLockMode)
probe buffer__flush__done(ForkNumber, BlockNumber, Oid, Oid, Oid)
probe wal__insert(unsigned char, unsigned char)
probe lwlock__condacquire(const char *, LWLockMode)
provider postgresql
Definition: probes.d:25
probe lwlock__acquire__or__wait(const char *, LWLockMode)
probe query__rewrite__start(const char *)
probe deadlock__found()
LWLockMode
Definition: lwlock.h:132
probe clog__checkpoint__done(bool)
probe query__parse__done(const char *)
probe lwlock__condacquire__fail(const char *, LWLockMode)
int LOCKMODE
Definition: lockdefs.h:26
probe transaction__abort(LocalTransactionId)
probe lock__wait__start(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, LOCKMODE)
uint32 BlockNumber
Definition: block.h:31
probe sort__start(int, bool, int, int, bool, int)
unsigned int Oid
Definition: postgres_ext.h:31
probe buffer__sync__done(int, int, int)
probe smgr__md__write__done(ForkNumber, BlockNumber, Oid, Oid, Oid, int, int, int)
probe buffer__checkpoint__sync__start()
probe query__rewrite__done(const char *)
probe twophase__checkpoint__start()
probe subtrans__checkpoint__done(bool)
probe clog__checkpoint__start(bool)
static JitProviderCallbacks provider
Definition: jit.c:46
probe lwlock__release(const char *)
probe buffer__write__dirty__start(ForkNumber, BlockNumber, Oid, Oid, Oid)
probe twophase__checkpoint__done()
probe wal__buffer__write__dirty__start()
uint32 LocalTransactionId
Definition: c.h:509
probe query__parse__start(const char *)
probe statement__status(const char *)
probe transaction__commit(LocalTransactionId)
ForkNumber
Definition: relpath.h:40
probe query__start(const char *)
probe query__plan__start()
probe buffer__checkpoint__start(int)
probe query__done(const char *)
probe buffer__flush__start(ForkNumber, BlockNumber, Oid, Oid, Oid)
probe checkpoint__done(int, int, int, int, int)
probe multixact__checkpoint__done(bool)
probe wal__switch()
probe lwlock__acquire(const char *, LWLockMode)
probe smgr__md__read__start(ForkNumber, BlockNumber, Oid, Oid, Oid, int)
probe buffer__checkpoint__done()
probe buffer__read__start(ForkNumber, BlockNumber, Oid, Oid, Oid, int, bool)
probe wal__buffer__write__dirty__done()
probe smgr__md__write__start(ForkNumber, BlockNumber, Oid, Oid, Oid, int)
probe buffer__sync__start(int, int)
probe query__plan__done()
probe smgr__md__read__done(ForkNumber, BlockNumber, Oid, Oid, Oid, int, int, int)
probe lwlock__wait__done(const char *, LWLockMode)
probe buffer__write__dirty__done(ForkNumber, BlockNumber, Oid, Oid, Oid)
probe subtrans__checkpoint__start(bool)
probe sort__done(bool, long)
probe multixact__checkpoint__start(bool)
probe query__execute__start()
probe query__execute__done()
probe buffer__sync__written(int)