Header And Logo

PostgreSQL
| The world's most advanced open source database.

probes.d

Go to the documentation of this file.
00001 /* ----------
00002  *  DTrace probes for PostgreSQL backend
00003  *
00004  *  Copyright (c) 2006-2013, PostgreSQL Global Development Group
00005  *
00006  *  src/backend/utils/probes.d
00007  * ----------
00008  */
00009 
00010 
00011 /*
00012  * Typedefs used in PostgreSQL.
00013  *
00014  * NOTE: Do not use system-provided typedefs (e.g. uintptr_t, uint32_t, etc)
00015  * in probe definitions, as they cause compilation errors on Mac OS X 10.5.
00016  */
00017 #define LocalTransactionId unsigned int
00018 #define LWLockId int
00019 #define LWLockMode int
00020 #define LOCKMODE int
00021 #define BlockNumber unsigned int
00022 #define Oid unsigned int
00023 #define ForkNumber int
00024 #define bool char
00025 
00026 provider postgresql {
00027 
00028     probe transaction__start(LocalTransactionId);
00029     probe transaction__commit(LocalTransactionId);
00030     probe transaction__abort(LocalTransactionId);
00031 
00032     probe lwlock__acquire(LWLockId, LWLockMode);
00033     probe lwlock__release(LWLockId);
00034     probe lwlock__wait__start(LWLockId, LWLockMode);
00035     probe lwlock__wait__done(LWLockId, LWLockMode);
00036     probe lwlock__condacquire(LWLockId, LWLockMode);
00037     probe lwlock__condacquire__fail(LWLockId, LWLockMode);
00038     probe lwlock__wait__until__free(LWLockId, LWLockMode);
00039     probe lwlock__wait__until__free__fail(LWLockId, LWLockMode);
00040 
00041     probe lock__wait__start(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, LOCKMODE);
00042     probe lock__wait__done(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, LOCKMODE);
00043 
00044     probe query__parse__start(const char *);
00045     probe query__parse__done(const char *);
00046     probe query__rewrite__start(const char *);
00047     probe query__rewrite__done(const char *);
00048     probe query__plan__start();
00049     probe query__plan__done();
00050     probe query__execute__start();
00051     probe query__execute__done();
00052     probe query__start(const char *);
00053     probe query__done(const char *);
00054     probe statement__status(const char *);
00055 
00056     probe sort__start(int, bool, int, int, bool);
00057     probe sort__done(bool, long);
00058 
00059     probe buffer__read__start(ForkNumber, BlockNumber, Oid, Oid, Oid, int, bool);
00060     probe buffer__read__done(ForkNumber, BlockNumber, Oid, Oid, Oid, int, bool, bool);
00061     probe buffer__flush__start(ForkNumber, BlockNumber, Oid, Oid, Oid);
00062     probe buffer__flush__done(ForkNumber, BlockNumber, Oid, Oid, Oid);
00063 
00064     probe buffer__checkpoint__start(int);
00065     probe buffer__checkpoint__sync__start();
00066     probe buffer__checkpoint__done();
00067     probe buffer__sync__start(int, int);
00068     probe buffer__sync__written(int);
00069     probe buffer__sync__done(int, int, int);
00070     probe buffer__write__dirty__start(ForkNumber, BlockNumber, Oid, Oid, Oid);
00071     probe buffer__write__dirty__done(ForkNumber, BlockNumber, Oid, Oid, Oid);
00072 
00073     probe deadlock__found();
00074 
00075     probe checkpoint__start(int);
00076     probe checkpoint__done(int, int, int, int, int);
00077     probe clog__checkpoint__start(bool);
00078     probe clog__checkpoint__done(bool);
00079     probe subtrans__checkpoint__start(bool);
00080     probe subtrans__checkpoint__done(bool);
00081     probe multixact__checkpoint__start(bool);
00082     probe multixact__checkpoint__done(bool);
00083     probe twophase__checkpoint__start();
00084     probe twophase__checkpoint__done();
00085 
00086     probe smgr__md__read__start(ForkNumber, BlockNumber, Oid, Oid, Oid, int);
00087     probe smgr__md__read__done(ForkNumber, BlockNumber, Oid, Oid, Oid, int, int, int);
00088     probe smgr__md__write__start(ForkNumber, BlockNumber, Oid, Oid, Oid, int);
00089     probe smgr__md__write__done(ForkNumber, BlockNumber, Oid, Oid, Oid, int, int, int);
00090 
00091     probe xlog__insert(unsigned char, unsigned char);
00092     probe xlog__switch();
00093     probe wal__buffer__write__dirty__start();
00094     probe wal__buffer__write__dirty__done();
00095 };