conga/ricci common/Logger.cpp common/Makefile ...
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at 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
ricci/common/Logger.cpp +1 -1
@@ -169,7 +169,7 @@ } void -log_sigsafe(const char* msg, LogLevel level) +log_sigsafe(const char *msg, LogLevel level) { logger->log_sigsafe(msg, level); }
ricci/common/Makefile +15 -3
@@ -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
ricci/include/String.h +9 -0
@@ -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
ricci/include/counting_auto_ptr.cpp +0 -9
@@ -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; };
ricci/modules/cluster/Makefile +7 -3
@@ -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
ricci/modules/cluster/clumon/src/cim-provider/Makefile +7 -2
@@ -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
ricci/modules/cluster/clumon/src/common/Makefile +1 -3
@@ -18,10 +18,8 @@ OBJECTS = Cluster.o Node.o Service.o ClusterMonitor.o - INCLUDE += -I ../include -CXXFLAGS += - +CXXFLAGS += -DPARANOIA=$(PARANOID) all: ${TARGET}
ricci/modules/cluster/clumon/src/daemon/Makefile +6 -2
@@ -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}
ricci/modules/cluster/clumon/src/snmp-agent/Makefile +9 -5
@@ -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 \
ricci/modules/log/Makefile +8 -2
@@ -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}
ricci/modules/rpm/Makefile +7 -2
@@ -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}
ricci/modules/service/Makefile +7 -2
@@ -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}
ricci/modules/storage/Makefile +7 -1
@@ -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
ricci/ricci/Makefile +7 -1
@@ -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}