[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] conga/ricci common/Logger.cpp common/Makefile ...



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe sourceware org	2007-09-07 19:07:23

Modified files:
	ricci/common   : Logger.cpp Makefile 
	ricci/include  : String.h counting_auto_ptr.cpp 
	ricci/modules/cluster: Makefile 
	ricci/modules/cluster/clumon/src/cim-provider: Makefile 
	ricci/modules/cluster/clumon/src/common: Makefile 
	ricci/modules/cluster/clumon/src/daemon: Makefile 
	ricci/modules/cluster/clumon/src/snmp-agent: Makefile 
	ricci/modules/log: Makefile 
	ricci/modules/rpm: Makefile 
	ricci/modules/service: Makefile 
	ricci/modules/storage: Makefile 
	ricci/ricci    : Makefile 

Log message:
	Only use the string shredding class where it's needed. it consumes a ridiculous amount of cpu time to be using it without a good reason to be.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/common/Logger.cpp.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/common/Makefile.diff?cvsroot=cluster&r1=1.10&r2=1.11
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/include/String.h.diff?cvsroot=cluster&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/include/counting_auto_ptr.cpp.diff?cvsroot=cluster&r1=1.5&r2=1.6
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/Makefile.diff?cvsroot=cluster&r1=1.16&r2=1.17
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/clumon/src/cim-provider/Makefile.diff?cvsroot=cluster&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/clumon/src/common/Makefile.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/clumon/src/daemon/Makefile.diff?cvsroot=cluster&r1=1.6&r2=1.7
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/clumon/src/snmp-agent/Makefile.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/log/Makefile.diff?cvsroot=cluster&r1=1.6&r2=1.7
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/rpm/Makefile.diff?cvsroot=cluster&r1=1.7&r2=1.8
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/service/Makefile.diff?cvsroot=cluster&r1=1.8&r2=1.9
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/storage/Makefile.diff?cvsroot=cluster&r1=1.13&r2=1.14
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/ricci/Makefile.diff?cvsroot=cluster&r1=1.21&r2=1.22

--- conga/ricci/common/Logger.cpp	2007/08/31 04:57:37	1.3
+++ conga/ricci/common/Logger.cpp	2007/09/07 19:07:21	1.4
@@ -169,7 +169,7 @@
 }
 
 void
-log_sigsafe(const char* msg, LogLevel level)
+log_sigsafe(const char *msg, LogLevel level)
 {
 	logger->log_sigsafe(msg, level);
 }
--- conga/ricci/common/Makefile	2007/08/31 04:57:37	1.10
+++ conga/ricci/common/Makefile	2007/09/07 19:07:21	1.11
@@ -14,7 +14,6 @@
 
 include ${top_srcdir}/make/defines.mk
 
-
 #TARGET = main
 
 OBJECTS = \
@@ -39,21 +38,34 @@
 
 INCLUDE += 
 CXXFLAGS +=
+CXXFLAGS_PARANOIA = -DPARANOIA=1
+CFLAGS_PARANOIA = -DPARANOIA=1
 CFLAGS += 
 LDFLAGS += 
 
-all: $(OBJECTS) 
+all: prep compile
+
+compile: $(OBJECTS)
 
-*.o: ../include/*.h
+.cpp.o:
+	$(CXX) $(INCLUDE) $(CPPFLAGS) $(CXXFLAGS) -c $<
+	$(CXX) $(INCLUDE) $(CPPFLAGS) $(CXXFLAGS) $(CXXFLAGS_PARANOIA) -c $< -o ${top_srcdir}/common/paranoid/$@
 
+.c.o:
+	$(CC) $(INCLUDE) $(CPPFLAGS) $(CFLAGS) -c $<
+	$(CC) $(INCLUDE) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_PARANOIA) -c $< -o ${top_srcdir}/common/paranoid/$@
 
 install: 
 
 uninstall: 
 
 clean:
+	rm -rf ${top_srcdir}/common/paranoid/
 	rm -f $(OBJECTS)
 
+prep:
+	@mkdir ${top_srcdir}/common/paranoid/ 2>/dev/null ||:
+
 check: 
 
 rebuild: clean all
--- conga/ricci/include/String.h	2007/08/31 13:32:36	1.2
+++ conga/ricci/include/String.h	2007/09/07 19:07:22	1.3
@@ -2,10 +2,19 @@
 #define __CONGA_STRING_H
 
 #include <string>
+
 #include "shred_allocator.h"
 
+#if PARANOIA > 0
+
 typedef std::basic_string<char,
 			std::char_traits<char>,
 			shred_allocator<char> > String;
 
+#else
+
+typedef std::basic_string<char> String;
+
+#endif
+
 #endif
--- conga/ricci/include/counting_auto_ptr.cpp	2007/09/04 21:28:05	1.5
+++ conga/ricci/include/counting_auto_ptr.cpp	2007/09/07 19:07:22	1.6
@@ -89,11 +89,8 @@
 
 	if (last) {
 		delete _counter;
-		_counter = NULL;
 		delete _ptr;
-		_ptr = NULL;
 		delete _mutex;
-		_mutex = NULL;
 	}
 };
 
@@ -102,9 +99,6 @@
 X&
 counting_auto_ptr<X>::operator*() const
 {
-#ifdef DEBUG
-	assert(_ptr != NULL);
-#endif
 	return *_ptr;
 };
 
@@ -112,9 +106,6 @@
 X*
 counting_auto_ptr<X>::operator->() const
 {
-#ifdef DEBUG
-	assert(_ptr != NULL);
-#endif
 	return _ptr;
 };
 
--- conga/ricci/modules/cluster/Makefile	2007/07/17 22:30:45	1.16
+++ conga/ricci/modules/cluster/Makefile	2007/09/07 19:07:22	1.17
@@ -24,11 +24,15 @@
 	Fence.o \
 	Virt.o
 
-
+PARANOID=0
 INCLUDE    += -I${top_srcdir}/common/
-CXXFLAGS   +=
-LDFLAGS    += 
+CXXFLAGS   += -DPARANOIA=$(PARANOID)
 
+ifeq ($(PARANOID), 1)
+	LDFLAGS += ${top_srcdir}/common/paranoid/*.o
+else
+	LDFLAGS += ${top_srcdir}/common/*.o
+endif
 
 all: ${TARGET}
 	make -C clumon all
--- conga/ricci/modules/cluster/clumon/src/cim-provider/Makefile	2006/06/30 22:26:12	1.4
+++ conga/ricci/modules/cluster/clumon/src/cim-provider/Makefile	2007/09/07 19:07:22	1.5
@@ -53,9 +53,14 @@
 
 
 INCLUDE      += -I ../include 
-CXXFLAGS     += $(PEGASUS_CXXFLAGS)
-LDFLAGS      += -shared -ldl -lcrypt ../common/*.o
+CXXFLAGS     += $(PEGASUS_CXXFLAGS) -DPARANOIA=$(PARANOID)
+LDFLAGS      += -shared -ldl -lcrypt
 
+ifeq ($(PARANOID), 1)
+	LDFLAGS += ${top_srcdir}/common/paranoid/*.o
+else
+	LDFLAGS += ${top_srcdir}/common/*.o
+endif
 
 OBJECTS = ClusterProviderMain.o ClusterProvider.o
 
--- conga/ricci/modules/cluster/clumon/src/common/Makefile	2006/06/16 20:44:16	1.3
+++ conga/ricci/modules/cluster/clumon/src/common/Makefile	2007/09/07 19:07:22	1.4
@@ -18,10 +18,8 @@
 
 OBJECTS = Cluster.o Node.o Service.o ClusterMonitor.o
 
-
 INCLUDE     += -I ../include 
-CXXFLAGS    += 
-
+CXXFLAGS    += -DPARANOIA=$(PARANOID)
 
 all: ${TARGET}
 
--- conga/ricci/modules/cluster/clumon/src/daemon/Makefile	2006/08/15 00:12:33	1.6
+++ conga/ricci/modules/cluster/clumon/src/daemon/Makefile	2007/09/07 19:07:22	1.7
@@ -18,11 +18,15 @@
 OBJECTS = main.o \
 	Monitor.o Peer.o Communicator.o
 
-
 INCLUDE     += -I ../include 
-CXXFLAGS    += 
+CXXFLAGS    += -DPARANOIA=$(PARANOID)
 LDFLAGS     += ../common/*.o
 
+ifeq ($(PARANOID), 1)
+	LDFLAGS += ${top_srcdir}/common/paranoid/*.o
+else
+	LDFLAGS += ${top_srcdir}/common/*.o
+endif
 
 all: ${TARGET}
 
--- conga/ricci/modules/cluster/clumon/src/snmp-agent/Makefile	2006/06/30 22:26:13	1.3
+++ conga/ricci/modules/cluster/clumon/src/snmp-agent/Makefile	2007/09/07 19:07:22	1.4
@@ -18,11 +18,15 @@
 SNMP_LDLAGS = `net-snmp-config --libs`
 
 INCLUDE     += -I ../include
-CFLAGS      += $(SNMP_CFLAGS)
-CXXFLAGS    += $(SNMP_CFLAGS)
-LDFLAGS     += -shared ../common/*.o $(SNMP_LDLAGS)
-
-
+CFLAGS      += $(SNMP_CFLAGS) -DPARANOIA=$(PARANOID)
+CXXFLAGS    += $(SNMP_CFLAGS) -DPARANOIA=$(PARANOID)
+LDFLAGS     += -shared $(SNMP_LDLAGS)
+
+ifeq ($(PARANOID), 1)
+	LDFLAGS += ${top_srcdir}/common/paranoid/*.o
+else
+	LDFLAGS += ${top_srcdir}/common/*.o
+endif
 
 OBJECTS = clusterMonitorSnmp.o \
 	clusterMIB.o \
--- conga/ricci/modules/log/Makefile	2006/08/16 06:34:19	1.6
+++ conga/ricci/modules/log/Makefile	2007/09/07 19:07:22	1.7
@@ -22,8 +22,14 @@
 
 
 INCLUDE     += 
-CXXFLAGS    += 
-LDFLAGS     += 
+CXXFLAGS    += -DPARANOIA=$(PARANOID)
+
+ifeq ($(PARANOID), 1)
+	LDFLAGS += ${top_srcdir}/common/paranoid/*.o
+else
+	LDFLAGS += ${top_srcdir}/common/*.o
+endif
+
 
 all: ${TARGET}
 
--- conga/ricci/modules/rpm/Makefile	2006/08/16 06:34:20	1.7
+++ conga/ricci/modules/rpm/Makefile	2007/09/07 19:07:23	1.8
@@ -22,8 +22,13 @@
 
 
 INCLUDE        += 
-CXXFLAGS       += 
-LDFLAGS        += 
+CXXFLAGS       += -DPARANOIA=$(PARANOID)
+
+ifeq ($(PARANOID), 1)
+	LDFLAGS += ${top_srcdir}/common/paranoid/*.o
+else
+	LDFLAGS += ${top_srcdir}/common/*.o
+endif
 
 
 all: ${TARGET}
--- conga/ricci/modules/service/Makefile	2006/08/16 06:34:20	1.8
+++ conga/ricci/modules/service/Makefile	2007/09/07 19:07:23	1.9
@@ -22,8 +22,13 @@
 
 
 INCLUDE     += 
-CXXFLAGS    += 
-LDFLAGS     += 
+CXXFLAGS    += -DPARANOIA=$(PARANOID)
+
+ifeq ($(PARANOID), 1)
+	LDFLAGS += ${top_srcdir}/common/paranoid/*.o
+else
+	LDFLAGS += ${top_srcdir}/common/*.o
+endif
 
 all: ${TARGET}
 
--- conga/ricci/modules/storage/Makefile	2007/06/27 08:14:23	1.13
+++ conga/ricci/modules/storage/Makefile	2007/09/07 19:07:23	1.14
@@ -55,9 +55,15 @@
 
 
 INCLUDE    += 
-CXXFLAGS   += 
+CXXFLAGS   += -DPARANOIA=$(PARANOID)
 LDFLAGS    += -lgroup -lmagic
 
+ifeq ($(PARANOID), 1)
+	LDFLAGS += ${top_srcdir}/common/paranoid/*.o
+else
+	LDFLAGS += ${top_srcdir}/common/*.o
+endif
+
 all: ${TARGET}
 
 *.o: *.h
--- conga/ricci/ricci/Makefile	2007/08/30 17:08:44	1.21
+++ conga/ricci/ricci/Makefile	2007/09/07 19:07:23	1.22
@@ -34,12 +34,18 @@
 #OBJECTS = dbus_test.o
 #OBJECTS = ssl_test.o
 
+PARANOID=1
 
 INCLUDE += `pkg-config --cflags dbus-1`
 CFLAGS +=
-CXXFLAGS += -DDBUS_MAJOR_VERSION="${dbus_major_version}" -DDBUS_MINOR_VERSION="${dbus_minor_version}"
+CXXFLAGS += -DDBUS_MAJOR_VERSION="${dbus_major_version}" -DDBUS_MINOR_VERSION="${dbus_minor_version}" -DPARANOIA=$(PARANOID)
 LDFLAGS += `pkg-config --libs dbus-1`
 
+ifeq ($(PARANOID), 1)
+	LDFLAGS += ${top_srcdir}/common/paranoid/*.o
+else
+	LDFLAGS += ${top_srcdir}/common/*.o
+endif
 
 all: ${TARGET} ${TARGET_WORKER}
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]