From 3f5acb4a9b9febf6d216487cd3f35bec4ea62458 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Tue, 26 Apr 2016 11:18:09 -0400 Subject: [PATCH 1/2] add conditional DEVEL --- Makefile | 8 ++++++-- common/pvahelper.h | 2 ++ configure/CONFIG_SITE | 4 ++++ p2pApp/Makefile | 4 ++++ p2pApp/server.cpp | 6 ++++++ testApp/Makefile | 3 +++ 6 files changed, 25 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ff7d3d8..ac52cd2 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,12 @@ include $(TOP)/configure/CONFIG # Directories to build, any order DIRS += configure -DIRS += $(wildcard *App) -DIRS += $(wildcard iocBoot) +DIRS += p2pApp +ifeq ($(DEVEL),YES) +DIRS += pdbApp +endif +DIRS += testApp +#DIRS += $(wildcard iocBoot) # iocBoot depends on all *App dirs iocBoot_DEPEND_DIRS += $(filter %App,$(DIRS)) diff --git a/common/pvahelper.h b/common/pvahelper.h index 6102292..4eed90d 100644 --- a/common/pvahelper.h +++ b/common/pvahelper.h @@ -400,6 +400,7 @@ private: self->requestUpdate(); // may result in post() } public: +#ifdef DEVEL virtual void getStats(Stats& s) const { guard_t G(lock); @@ -407,6 +408,7 @@ public: s.nfilled = inuse.size(); s.noutstanding = nbuffers - s.nempty - s.nfilled; } +#endif }; template diff --git a/configure/CONFIG_SITE b/configure/CONFIG_SITE index 208aa7e..7cf5798 100644 --- a/configure/CONFIG_SITE +++ b/configure/CONFIG_SITE @@ -34,3 +34,7 @@ CHECK_RELEASE = YES # or CROSS_OPT settings from base/configure/CONFIG_SITE #HOST_OPT = NO #CROSS_OPT = NO + +# enable features which depend on unmerged/unreleased +# features of dependencies. +DEVEL = NO diff --git a/p2pApp/Makefile b/p2pApp/Makefile index 1640de1..8052e6b 100644 --- a/p2pApp/Makefile +++ b/p2pApp/Makefile @@ -5,6 +5,10 @@ include $(TOP)/configure/CONFIG # ADD MACRO DEFINITIONS AFTER THIS LINE #============================= +ifeq ($(DEVEL),YES) +USR_CPPFLAGS += -DDEVEL +endif + PROD_HOST = p2p p2p_SRCS += main.cpp diff --git a/p2pApp/server.cpp b/p2pApp/server.cpp index 275a98a..c63c7e9 100644 --- a/p2pApp/server.cpp +++ b/p2pApp/server.cpp @@ -315,7 +315,9 @@ void statusServer(int lvl, const char *chanexpr) MonitorCacheEntry::interested_t::vector_type usrs; size_t nsrvmon; +#ifdef DEVEL pvd::Monitor::Stats mstats; +#endif bool hastype, hasdata, isdone; { Guard G(ME.mutex()); @@ -325,8 +327,10 @@ void statusServer(int lvl, const char *chanexpr) hasdata = !!ME.lastelem; isdone = ME.done; +#ifdef DEVEL if(ME.mon) ME.mon->getStats(mstats); +#endif if(lvl>2) usrs = ME.interested.lock_vector(); @@ -339,10 +343,12 @@ void statusServer(int lvl, const char *chanexpr) <<"recv'd some data, Has "<<(isdone?"":"not ")<<"finalized\n" " "<< epicsAtomicGetSizeT(&ME.nwakeups)<<" wakeups " < Date: Tue, 26 Apr 2016 11:21:51 -0400 Subject: [PATCH 2/2] reduce noise --- p2pApp/server.cpp | 5 ----- pdbApp/pvif.cpp | 2 +- testApp/utilities.cpp | 3 --- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/p2pApp/server.cpp b/p2pApp/server.cpp index c63c7e9..74eac05 100644 --- a/p2pApp/server.cpp +++ b/p2pApp/server.cpp @@ -99,11 +99,9 @@ GWServerChannelProvider::createChannel(std::string const & channelName, } if(!ret) { - std::cerr<<"GWServer refusing channel "<channelCreated(S, ret); } else { - std::cerr<<"GWServer connecting channel "<channelCreated(pvd::Status::Ok, ret); channelRequester->channelStateChange(ret, pva::Channel::CONNECTED); } @@ -117,17 +115,14 @@ void GWServerChannelProvider::configure(epics::pvData::PVStructure::shared_point void GWServerChannelProvider::destroy() { - std::cout<<"GWServer destory request\n"; } GWServerChannelProvider::GWServerChannelProvider(const pva::ChannelProvider::shared_pointer& prov) :cache(prov) { - std::cout<<"GW Server ctor\n"; } GWServerChannelProvider::~GWServerChannelProvider() { - std::cout<<"GW Server dtor\n"; } namespace { diff --git a/pdbApp/pvif.cpp b/pdbApp/pvif.cpp index e128f66..33cb8a3 100644 --- a/pdbApp/pvif.cpp +++ b/pdbApp/pvif.cpp @@ -401,7 +401,7 @@ struct PVIFScalarNumeric : public PVIF try{ pvmeta.nsecMask = epics::pvData::castUnsafe(std::string(&UT[5])); }catch(std::exception& e){ - std::cerr<name<<" : pdbUserTag nslsb requires a number not '"<name<<" : pdbUserTag nslsb requires a number not '"<0 && pvmeta.nsecMask<=32) { diff --git a/testApp/utilities.cpp b/testApp/utilities.cpp index a8b2ec8..21db9d9 100644 --- a/testApp/utilities.cpp +++ b/testApp/utilities.cpp @@ -361,9 +361,6 @@ pvd::MonitorElementPtr TestPVMonitor::poll() buffer.pop_front(); } testDiag("TestPVMonitor::poll %p %p", this, ret.get()); - if(ret) - std::cerr<<"# XXXZ "<<*ret->changedBitSet<<" " - <<*ret->overrunBitSet<<"\n"; return ret; }