Re: [PATCHES] DTrace not working after SUBSYS.o reorg

2008-02-26 Thread Peter Eisentraut
Am Dienstag, 26. Februar 2008 schrieb Magne Mæhre:
> I noticed that the dtrace code wouldn't build after the recent SUBSYS.o
> reorganization.

Fixed.

Is there no buildfarm coverage of dtrace?

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [PATCHES] DTrace not working after SUBSYS.o reorg

2008-02-26 Thread Magne Mæhre

Magne Mæhre wrote:


I noticed that the dtrace code wouldn't build after the recent SUBSYS.o
reorganization.

Attached is a small patch that expands the files..

--Magne



Oooops... wrong patch file


The correct one is attached

Sorry

--Magne
Index: src/backend/Makefile
===
RCS file: /projects/cvsroot/pgsql/src/backend/Makefile,v
retrieving revision 1.126
diff -u -r1.126 Makefile
--- src/backend/Makefile	25 Feb 2008 17:55:42 -	1.126
+++ src/backend/Makefile	26 Feb 2008 13:42:45 -
@@ -137,7 +137,8 @@
 
 
 utils/probes.o: utils/probes.d $(SUBDIROBJS)
-	$(DTRACE) $(DTRACEFLAGS) -G -s $^ -o $@
+	$(DTRACE) $(DTRACEFLAGS) -G -s $(srcdir)/utils/probes.d -o $@ $(call expand_subsys,$(SUBDIROBJS))
+
 
 

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


[PATCHES] DTrace not working after SUBSYS.o reorg

2008-02-26 Thread Magne Mæhre


I noticed that the dtrace code wouldn't build after the recent SUBSYS.o
reorganization.

Attached is a small patch that expands the files..

--Magne
? src/include/probes.h
? src/include/probes_null.h
Index: src/Makefile
===
RCS file: /projects/cvsroot/pgsql/src/Makefile,v
retrieving revision 1.42
diff -c -r1.42 Makefile
*** src/Makefile	21 Aug 2007 01:11:12 -	1.42
--- src/Makefile	22 Feb 2008 18:33:58 -
***
*** 14,19 
--- 14,22 
  
  
  all install installdirs uninstall distprep:
+ ifeq ($(enable_dtrace), yes)
+ 	$(DTRACE) -h -s $(top_builddir)/src/backend/utils/probes.d -o $(top_builddir)/src/include/probes.h
+ endif
  	$(MAKE) -C port $@
  	$(MAKE) -C timezone $@
  	$(MAKE) -C backend $@
Index: src/backend/Makefile
===
RCS file: /projects/cvsroot/pgsql/src/backend/Makefile,v
retrieving revision 1.125
diff -c -r1.125 Makefile
*** src/backend/Makefile	1 Jan 2008 19:45:45 -	1.125
--- src/backend/Makefile	22 Feb 2008 18:33:58 -
***
*** 20,28 
--- 20,30 
  
  SUBSYSOBJS = $(DIRS:%=%/SUBSYS.o)
  
+ ifeq ($(PORTNAME), solaris)
  ifeq ($(enable_dtrace), yes)
  LOCALOBJS += utils/probes.o
  endif
+ endif
  
  OBJS = $(SUBSYSOBJS) $(LOCALOBJS) $(top_builddir)/src/port/libpgport_srv.a
  
***
*** 141,148 
--- 143,152 
  	$(LN_S) ../../../$(subdir)/utils/fmgroids.h .
  
  
+ ifeq ($(PORTNAME), solaris)
  utils/probes.o: utils/probes.d $(SUBSYSOBJS)
  	$(DTRACE) $(DTRACEFLAGS) -G -s $^ -o $@
+ endif
  
  
  ##
Index: src/backend/access/transam/xact.c
===
RCS file: /projects/cvsroot/pgsql/src/backend/access/transam/xact.c,v
retrieving revision 1.257
diff -c -r1.257 xact.c
*** src/backend/access/transam/xact.c	15 Jan 2008 18:56:59 -	1.257
--- src/backend/access/transam/xact.c	22 Feb 2008 18:33:58 -
***
*** 1479,1485 
  	Assert(MyProc->backendId == vxid.backendId);
  	MyProc->lxid = vxid.localTransactionId;
  
! 	PG_TRACE1(transaction__start, vxid.localTransactionId);
  
  	/*
  	 * set transaction_timestamp() (a/k/a now()).  We want this to be the same
--- 1479,1485 
  	Assert(MyProc->backendId == vxid.backendId);
  	MyProc->lxid = vxid.localTransactionId;
  
! 	DATABASE_TRANSACTION_START(vxid.localTransactionId);
  
  	/*
  	 * set transaction_timestamp() (a/k/a now()).  We want this to be the same
***
*** 1604,1610 
  	 */
  	latestXid = RecordTransactionCommit();
  
! 	PG_TRACE1(transaction__commit, MyProc->lxid);
  
  	/*
  	 * Let others know about no transaction in progress by me. Note that this
--- 1604,1610 
  	 */
  	latestXid = RecordTransactionCommit();
  
! 	DATABASE_TRANSACTION_COMMIT(MyProc->lxid);
  
  	/*
  	 * Let others know about no transaction in progress by me. Note that this
***
*** 1990,1996 
  	 */
  	latestXid = RecordTransactionAbort(false);
  
! 	PG_TRACE1(transaction__abort, MyProc->lxid);
  
  	/*
  	 * Let others know about no transaction in progress by me. Note that this
--- 1990,1996 
  	 */
  	latestXid = RecordTransactionAbort(false);
  
! 	DATABASE_TRANSACTION_ABORT(MyProc->lxid);
  
  	/*
  	 * Let others know about no transaction in progress by me. Note that this
Index: src/backend/storage/lmgr/lock.c
===
RCS file: /projects/cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v
retrieving revision 1.181
diff -c -r1.181 lock.c
*** src/backend/storage/lmgr/lock.c	2 Feb 2008 22:26:17 -	1.181
--- src/backend/storage/lmgr/lock.c	22 Feb 2008 18:33:59 -
***
*** 787,797 
  		 * Sleep till someone wakes me up.
  		 */
  
! 		PG_TRACE2(lock__startwait, locktag->locktag_field2, lockmode);
  
  		WaitOnLock(locallock, owner);
  
! 		PG_TRACE2(lock__endwait, locktag->locktag_field2, lockmode);
  
  		/*
  		 * NOTE: do not do any material change of state between here and
--- 787,797 
  		 * Sleep till someone wakes me up.
  		 */
  
! 		POSTGRESQL_LOCK_STARTWAIT(locktag->locktag_field2, lockmode);
  
  		WaitOnLock(locallock, owner);
  
! 		POSTGRESQL_LOCK_ENDWAIT(locktag->locktag_field2, lockmode);
  
  		/*
  		 * NOTE: do not do any material change of state between here and
Index: src/backend/storage/lmgr/lwlock.c
===
RCS file: /projects/cvsroot/pgsql/src/backend/storage/lmgr/lwlock.c,v
retrieving revision 1.50
diff -c -r1.50 lwlock.c
*** src/backend/storage/lmgr/lwlock.c	1 Jan 2008 19:45:52 -	1.50
--- src/backend/storage/lmgr/lwlock.c	22 Feb 2008 18:33:59 -
***
*** 447,453 
  		block_counts[lockid]++;
  #endif
  
! 		PG_TRACE2(lwlock__startwait, lockid, mode);
  
  		for (;;)
  		{
--- 447,453 
  		block_counts[