mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
More fixes for 8.4 DTrace probes. Remove useless BUFFER_HIT/BUFFER_MISS
probes --- the BUFFER_READ_DONE probe provides the same information and more besides. Expand the LOCK_WAIT_START/DONE probe arguments so that there's actually some chance of telling what is being waited for. Update and clean up the documentation.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.248 2009/03/22 22:39:05 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.249 2009/03/23 01:52:38 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -272,14 +272,7 @@ ReadBuffer_common(SMgrRelation smgr, bool isLocalBuf, ForkNumber forkNum,
|
||||
ReadLocalBufferCount++;
|
||||
bufHdr = LocalBufferAlloc(smgr, forkNum, blockNum, &found);
|
||||
if (found)
|
||||
{
|
||||
LocalBufferHitCount++;
|
||||
TRACE_POSTGRESQL_BUFFER_HIT(true); /* true = local buffer */
|
||||
}
|
||||
else
|
||||
{
|
||||
TRACE_POSTGRESQL_BUFFER_MISS(true); /* ditto */
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -291,14 +284,7 @@ ReadBuffer_common(SMgrRelation smgr, bool isLocalBuf, ForkNumber forkNum,
|
||||
*/
|
||||
bufHdr = BufferAlloc(smgr, forkNum, blockNum, strategy, &found);
|
||||
if (found)
|
||||
{
|
||||
BufferHitCount++;
|
||||
TRACE_POSTGRESQL_BUFFER_HIT(false); /* false = shared buffer */
|
||||
}
|
||||
else
|
||||
{
|
||||
TRACE_POSTGRESQL_BUFFER_MISS(false); /* ditto */
|
||||
}
|
||||
}
|
||||
|
||||
/* At this point we do NOT hold any locks. */
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/storage/lmgr/lock.c,v 1.186 2009/01/01 17:23:47 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/storage/lmgr/lock.c,v 1.187 2009/03/23 01:52:38 tgl Exp $
|
||||
*
|
||||
* NOTES
|
||||
* A lock table is a shared memory hash table. When
|
||||
@ -787,11 +787,21 @@ LockAcquire(const LOCKTAG *locktag,
|
||||
* Sleep till someone wakes me up.
|
||||
*/
|
||||
|
||||
TRACE_POSTGRESQL_LOCK_WAIT_START(locktag->locktag_field2, lockmode);
|
||||
TRACE_POSTGRESQL_LOCK_WAIT_START(locktag->locktag_field1,
|
||||
locktag->locktag_field2,
|
||||
locktag->locktag_field3,
|
||||
locktag->locktag_field4,
|
||||
locktag->locktag_type,
|
||||
lockmode);
|
||||
|
||||
WaitOnLock(locallock, owner);
|
||||
|
||||
TRACE_POSTGRESQL_LOCK_WAIT_DONE(locktag->locktag_field2, lockmode);
|
||||
TRACE_POSTGRESQL_LOCK_WAIT_DONE(locktag->locktag_field1,
|
||||
locktag->locktag_field2,
|
||||
locktag->locktag_field3,
|
||||
locktag->locktag_field4,
|
||||
locktag->locktag_type,
|
||||
lockmode);
|
||||
|
||||
/*
|
||||
* NOTE: do not do any material change of state between here and
|
||||
|
Reference in New Issue
Block a user