diff options
author | Bruce Momjian | 2008-12-17 01:39:04 +0000 |
---|---|---|
committer | Bruce Momjian | 2008-12-17 01:39:04 +0000 |
commit | 5a90bc1fbe829e04d319388b54b76c7a0fe36b58 (patch) | |
tree | e4b6cfa7cf021194a02cb601bc0ea006cf14336e /src/backend/utils | |
parent | 5434e469868a198824df6198733e4fc57f72ce12 (diff) |
The attached patch contains a couple of fixes in the existing probes and
includes a few new ones.
- Fixed compilation errors on OS X for probes that use typedefs
- Fixed a number of probes to pass ForkNumber per the relation forks
patch
- The new probes are those that were taken out from the previous
submitted patch and required simple fixes. Will submit the other probes
that may require more discussion in a separate patch.
Robert Lor
Diffstat (limited to 'src/backend/utils')
-rw-r--r-- | src/backend/utils/Gen_dummy_probes.sed | 4 | ||||
-rw-r--r-- | src/backend/utils/probes.d | 53 |
2 files changed, 31 insertions, 26 deletions
diff --git a/src/backend/utils/Gen_dummy_probes.sed b/src/backend/utils/Gen_dummy_probes.sed index 42b2eeb5407..3844c5dcdb7 100644 --- a/src/backend/utils/Gen_dummy_probes.sed +++ b/src/backend/utils/Gen_dummy_probes.sed @@ -3,7 +3,7 @@ # # Copyright (c) 2008, PostgreSQL Global Development Group # -# $PostgreSQL: pgsql/src/backend/utils/Gen_dummy_probes.sed,v 1.2 2008/08/01 13:16:09 alvherre Exp $ +# $PostgreSQL: pgsql/src/backend/utils/Gen_dummy_probes.sed,v 1.3 2008/12/17 01:39:04 momjian Exp $ #------------------------------------------------------------------------- /^[ ]*probe /!d @@ -17,5 +17,7 @@ s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3)/ s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4)/ s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5)/ s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5, INT6)/ +s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5, INT6, INT7)/ +s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5, INT6, INT7, INT8)/ P s/(.*$/_ENABLED() (0)/ diff --git a/src/backend/utils/probes.d b/src/backend/utils/probes.d index b87a234bb35..e03154c5144 100644 --- a/src/backend/utils/probes.d +++ b/src/backend/utils/probes.d @@ -3,26 +3,25 @@ * * Copyright (c) 2006-2008, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/backend/utils/probes.d,v 1.3 2008/08/01 13:16:09 alvherre Exp $ + * $PostgreSQL: pgsql/src/backend/utils/probes.d,v 1.4 2008/12/17 01:39:04 momjian Exp $ * ---------- */ /* typedefs used in PostgreSQL */ -typedef unsigned int LocalTransactionId; -typedef int LWLockId; -typedef int LWLockMode; -typedef int LOCKMODE; -typedef unsigned int BlockNumber; -typedef unsigned int Oid; - +#define LocalTransactionId unsigned int +#define LWLockId int +#define LWLockMode int +#define LOCKMODE int +#define BlockNumber unsigned int +#define Oid unsigned int +#define ForkNumber int #define bool char provider postgresql { /* - * Due to a bug in Mac OS X 10.5, using built-in typedefs (e.g. uintptr_t, - * uint32_t, etc.) cause compilation errors. + * Note: Do not use built-in typedefs (e.g. uintptr_t, uint32_t, etc) * as they cause compilation errors in Mac OS X 10.5. */ probe transaction__start(LocalTransactionId); @@ -36,13 +35,8 @@ provider postgresql { probe lwlock__condacquire(LWLockId, LWLockMode); probe lwlock__condacquire__fail(LWLockId, LWLockMode); - /* The following probe declarations cause compilation errors - * on Mac OS X but not on Solaris. Need further investigation. - * probe lock__wait__start(unsigned int, LOCKMODE); - * probe lock__wait__done(unsigned int, LOCKMODE); - */ - probe lock__wait__start(unsigned int, int); - probe lock__wait__done(unsigned int, int); + probe lock__wait__start(unsigned int, LOCKMODE); + probe lock__wait__done(unsigned int, LOCKMODE); probe query__parse__start(const char *); probe query__parse__done(const char *); @@ -59,27 +53,26 @@ provider postgresql { probe sort__start(int, bool, int, int, bool); probe sort__done(unsigned long, long); - /* The following probe declarations cause compilation errors - * on Mac OS X but not on Solaris. Need further investigation. - * probe buffer__read__start(BlockNumber, Oid, Oid, Oid, bool); - * probe buffer__read__done(BlockNumber, Oid, Oid, Oid, bool, bool); - */ - probe buffer__read__start(unsigned int, unsigned int, unsigned int, unsigned int, bool); - probe buffer__read__done(unsigned int, unsigned int, unsigned int, unsigned int, bool, bool); - + probe buffer__read__start(ForkNumber, BlockNumber, Oid, Oid, Oid, bool); + probe buffer__read__done(ForkNumber, BlockNumber, Oid, Oid, Oid, bool, bool); probe buffer__flush__start(Oid, Oid, Oid); probe buffer__flush__done(Oid, Oid, Oid); probe buffer__hit(bool); probe buffer__miss(bool); probe buffer__checkpoint__start(int); + probe buffer__checkpoint__sync__start(); probe buffer__checkpoint__done(); probe buffer__sync__start(int, int); probe buffer__sync__written(int); probe buffer__sync__done(int, int, int); + probe buffer__write__dirty__start(ForkNumber, BlockNumber, Oid, Oid, Oid); + probe buffer__write__dirty__done(ForkNumber, BlockNumber, Oid, Oid, Oid); probe deadlock__found(); + probe checkpoint__start(int); + probe checkpoint__done(int, int, int, int, int); probe clog__checkpoint__start(bool); probe clog__checkpoint__done(bool); probe subtrans__checkpoint__start(bool); @@ -88,4 +81,14 @@ provider postgresql { probe multixact__checkpoint__done(bool); probe twophase__checkpoint__start(); probe twophase__checkpoint__done(); + + probe smgr__md__read__start(ForkNumber, BlockNumber, Oid, Oid, Oid); + probe smgr__md__read__done(ForkNumber, BlockNumber, Oid, Oid, Oid, const char *, int, int); + probe smgr__md__write__start(ForkNumber, BlockNumber, Oid, Oid, Oid); + probe smgr__md__write__done(ForkNumber, BlockNumber, Oid, Oid, Oid, const char *, int, int); + + probe xlog__insert(unsigned char, unsigned char); + probe xlog__switch(); + probe wal__buffer__write__start(); + probe wal__buffer__write__done(); }; |