add conditional DEVEL

This commit is contained in:
Michael Davidsaver
2016-04-26 11:18:09 -04:00
parent 2af78e5ff2
commit 3f5acb4a9b
6 changed files with 25 additions and 2 deletions

View File

@@ -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))

View File

@@ -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<class CP>

View File

@@ -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

View File

@@ -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

View File

@@ -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 "
<<epicsAtomicGetSizeT(&ME.nevents)<<" events\n";
#ifdef DEVEL
if(mstats.nempty || mstats.nfilled || mstats.noutstanding)
std::cout<<" US monitor queue "<<mstats.nfilled
<<" filled, "<<mstats.noutstanding
<<" outstanding, "<<mstats.nempty<<" empty\n";
#endif
if(lvl<=2)
continue;

View File

@@ -37,6 +37,7 @@ testmon_SRCS = testmon.cpp
testmon_LIBS = testutils p2pcore pvAccess pvData Com
TESTS += testmon
ifeq ($(DEVEL),YES)
TESTPROD_HOST += testpvif
testpvif_SRCS += testpvif.cpp
@@ -50,6 +51,8 @@ testpdb_SRCS += p2pTestIoc_registerRecordDeviceDriver.cpp
testpdb_LIBS += testutils pdbcore pvAccess pvData $(EPICS_BASE_IOC_LIBS)
TESTS += testpdb
endif # DEVEL
PROD_HOST += check_consist
check_consist_SRCS += check_consist.cpp
check_consist_LIBS += testutils pvAccess pvData Com