2006-07-24 18:32:45 +02:00
|
|
|
/* ----------
|
|
|
|
* DTrace probes for PostgreSQL backend
|
|
|
|
*
|
2017-01-03 19:48:53 +01:00
|
|
|
* Copyright (c) 2006-2017, PostgreSQL Global Development Group
|
2006-07-24 18:32:45 +02:00
|
|
|
*
|
2010-09-20 22:08:53 +02:00
|
|
|
* src/backend/utils/probes.d
|
2006-07-24 18:32:45 +02:00
|
|
|
* ----------
|
|
|
|
*/
|
|
|
|
|
2008-08-01 15:16:09 +02:00
|
|
|
|
2009-03-12 00:19:25 +01:00
|
|
|
/*
|
|
|
|
* Typedefs used in PostgreSQL.
|
|
|
|
*
|
|
|
|
* NOTE: Do not use system-provided typedefs (e.g. uintptr_t, uint32_t, etc)
|
Refer to OS X as "macOS", except for the port name which is still "darwin".
We weren't terribly consistent about whether to call Apple's OS "OS X"
or "Mac OS X", and the former is probably confusing to people who aren't
Apple users. Now that Apple has rebranded it "macOS", follow their lead
to establish a consistent naming pattern. Also, avoid the use of the
ancient project name "Darwin", except as the port code name which does not
seem desirable to change. (In short, this patch touches documentation and
comments, but no actual code.)
I didn't touch contrib/start-scripts/osx/, either. I suspect those are
obsolete and due for a rewrite, anyway.
I dithered about whether to apply this edit to old release notes, but
those were responsible for quite a lot of the inconsistencies, so I ended
up changing them too. Anyway, Apple's being ahistorical about this,
so why shouldn't we be?
2016-09-25 21:40:57 +02:00
|
|
|
* in probe definitions, as they cause compilation errors on macOS 10.5.
|
2009-03-12 00:19:25 +01:00
|
|
|
*/
|
2008-12-17 02:39:04 +01:00
|
|
|
#define LocalTransactionId unsigned int
|
|
|
|
#define LWLockMode int
|
|
|
|
#define LOCKMODE int
|
|
|
|
#define BlockNumber unsigned int
|
|
|
|
#define Oid unsigned int
|
|
|
|
#define ForkNumber int
|
2008-08-01 15:16:09 +02:00
|
|
|
#define bool char
|
|
|
|
|
2006-07-24 18:32:45 +02:00
|
|
|
provider postgresql {
|
|
|
|
|
2008-08-01 15:16:09 +02:00
|
|
|
probe transaction__start(LocalTransactionId);
|
|
|
|
probe transaction__commit(LocalTransactionId);
|
|
|
|
probe transaction__abort(LocalTransactionId);
|
|
|
|
|
2016-12-16 17:29:23 +01:00
|
|
|
probe lwlock__acquire(const char *, LWLockMode);
|
|
|
|
probe lwlock__release(const char *);
|
|
|
|
probe lwlock__wait__start(const char *, LWLockMode);
|
|
|
|
probe lwlock__wait__done(const char *, LWLockMode);
|
|
|
|
probe lwlock__condacquire(const char *, LWLockMode);
|
|
|
|
probe lwlock__condacquire__fail(const char *, LWLockMode);
|
|
|
|
probe lwlock__acquire__or__wait(const char *, LWLockMode);
|
|
|
|
probe lwlock__acquire__or__wait__fail(const char *, LWLockMode);
|
2008-08-01 15:16:09 +02:00
|
|
|
|
2009-03-23 02:52:38 +01:00
|
|
|
probe lock__wait__start(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, LOCKMODE);
|
|
|
|
probe lock__wait__done(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, LOCKMODE);
|
2008-08-01 15:16:09 +02:00
|
|
|
|
|
|
|
probe query__parse__start(const char *);
|
|
|
|
probe query__parse__done(const char *);
|
|
|
|
probe query__rewrite__start(const char *);
|
|
|
|
probe query__rewrite__done(const char *);
|
|
|
|
probe query__plan__start();
|
|
|
|
probe query__plan__done();
|
|
|
|
probe query__execute__start();
|
|
|
|
probe query__execute__done();
|
|
|
|
probe query__start(const char *);
|
|
|
|
probe query__done(const char *);
|
|
|
|
probe statement__status(const char *);
|
|
|
|
|
|
|
|
probe sort__start(int, bool, int, int, bool);
|
2009-03-12 00:19:25 +01:00
|
|
|
probe sort__done(bool, long);
|
2008-08-01 15:16:09 +02:00
|
|
|
|
2010-08-14 00:54:17 +02:00
|
|
|
probe buffer__read__start(ForkNumber, BlockNumber, Oid, Oid, Oid, int, bool);
|
2010-08-13 22:10:54 +02:00
|
|
|
probe buffer__read__done(ForkNumber, BlockNumber, Oid, Oid, Oid, int, bool, bool);
|
2010-08-14 04:22:10 +02:00
|
|
|
probe buffer__flush__start(ForkNumber, BlockNumber, Oid, Oid, Oid);
|
|
|
|
probe buffer__flush__done(ForkNumber, BlockNumber, Oid, Oid, Oid);
|
2008-08-01 15:16:09 +02:00
|
|
|
|
|
|
|
probe buffer__checkpoint__start(int);
|
2008-12-17 02:39:04 +01:00
|
|
|
probe buffer__checkpoint__sync__start();
|
2008-08-01 15:16:09 +02:00
|
|
|
probe buffer__checkpoint__done();
|
|
|
|
probe buffer__sync__start(int, int);
|
|
|
|
probe buffer__sync__written(int);
|
|
|
|
probe buffer__sync__done(int, int, int);
|
2008-12-17 02:39:04 +01:00
|
|
|
probe buffer__write__dirty__start(ForkNumber, BlockNumber, Oid, Oid, Oid);
|
|
|
|
probe buffer__write__dirty__done(ForkNumber, BlockNumber, Oid, Oid, Oid);
|
2008-08-01 15:16:09 +02:00
|
|
|
|
|
|
|
probe deadlock__found();
|
2006-07-24 18:32:45 +02:00
|
|
|
|
2008-12-17 02:39:04 +01:00
|
|
|
probe checkpoint__start(int);
|
|
|
|
probe checkpoint__done(int, int, int, int, int);
|
2008-08-01 15:16:09 +02:00
|
|
|
probe clog__checkpoint__start(bool);
|
|
|
|
probe clog__checkpoint__done(bool);
|
|
|
|
probe subtrans__checkpoint__start(bool);
|
|
|
|
probe subtrans__checkpoint__done(bool);
|
|
|
|
probe multixact__checkpoint__start(bool);
|
|
|
|
probe multixact__checkpoint__done(bool);
|
|
|
|
probe twophase__checkpoint__start();
|
|
|
|
probe twophase__checkpoint__done();
|
2008-12-17 02:39:04 +01:00
|
|
|
|
2010-08-13 22:10:54 +02:00
|
|
|
probe smgr__md__read__start(ForkNumber, BlockNumber, Oid, Oid, Oid, int);
|
|
|
|
probe smgr__md__read__done(ForkNumber, BlockNumber, Oid, Oid, Oid, int, int, int);
|
|
|
|
probe smgr__md__write__start(ForkNumber, BlockNumber, Oid, Oid, Oid, int);
|
|
|
|
probe smgr__md__write__done(ForkNumber, BlockNumber, Oid, Oid, Oid, int, int, int);
|
2008-12-17 02:39:04 +01:00
|
|
|
|
|
|
|
probe xlog__insert(unsigned char, unsigned char);
|
|
|
|
probe xlog__switch();
|
2008-12-24 21:41:29 +01:00
|
|
|
probe wal__buffer__write__dirty__start();
|
|
|
|
probe wal__buffer__write__dirty__done();
|
2006-07-24 18:32:45 +02:00
|
|
|
};
|