1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-06 07:49:08 +03:00

Enable probes to work with Mac OS X Leopard and other OSes that will

support DTrace in the future.

Switch from using DTRACE_PROBEn macros to the dynamically generated macros.
Use "dtrace -h" to create a header file that contains the dynamically
generated macros to be used in the source code instead of the DTRACE_PROBEn
macros.  A dummy header file is generated for builds without DTrace support.

Author: Robert Lor <Robert.Lor@sun.com>
This commit is contained in:
Peter Eisentraut
2008-03-17 19:44:41 +00:00
parent e7115a224a
commit a7b7b07af3
9 changed files with 64 additions and 62 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/storage/lmgr/lock.c,v 1.182 2008/03/04 19:54:06 tgl Exp $
* $PostgreSQL: pgsql/src/backend/storage/lmgr/lock.c,v 1.183 2008/03/17 19:44:41 petere Exp $
*
* NOTES
* A lock table is a shared memory hash table. When
@@ -40,6 +40,7 @@
#include "utils/memutils.h"
#include "utils/ps_status.h"
#include "utils/resowner.h"
#include "pg_trace.h"
/* This configuration variable is used to set the lock table size */
@@ -786,11 +787,11 @@ LockAcquire(const LOCKTAG *locktag,
* Sleep till someone wakes me up.
*/
PG_TRACE2(lock__startwait, locktag->locktag_field2, lockmode);
TRACE_POSTGRESQL_LOCK_STARTWAIT(locktag->locktag_field2, lockmode);
WaitOnLock(locallock, owner);
PG_TRACE2(lock__endwait, locktag->locktag_field2, lockmode);
TRACE_POSTGRESQL_LOCK_ENDWAIT(locktag->locktag_field2, lockmode);
/*
* NOTE: do not do any material change of state between here and