Remove verbose debug messages from busy poll loops
These are extremely noisy as they are called from busy polling loops, and don't really display any internal state, just that the loop is looping.master
parent
7355b6fb3e
commit
cebc6854fa
|
@ -79,7 +79,6 @@ class ConcurrentQueue
|
|||
(ownerName.empty() ? "<owner not set>" : ownerName.c_str()),
|
||||
maxEntries-pushSemaphore.getCount());
|
||||
if (!popSemaphore.wait()) {
|
||||
DPRINTF_INFO("(%s) failed to pop element, program is being shut down?", ownerName.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -102,11 +101,9 @@ class ConcurrentQueue
|
|||
// of the timeout has been reached, res will be set to NULL and false will be returned
|
||||
inline bool pop(long timeout_ms, T *res)
|
||||
{
|
||||
DPRINTF_DEBUG( "(%s) trying to pop element (%d elements in queue)", ownerName.c_str(), count);
|
||||
// try to get an item from the queue
|
||||
if(!popSemaphore.wait(timeout_ms)) {
|
||||
// timeout occured
|
||||
DPRINTF_DEBUG( "(%s) timeout", ownerName.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -129,8 +126,6 @@ class ConcurrentQueue
|
|||
// use this instead of the above, makes things easier!
|
||||
inline bool popAbs(const struct timespec& timeout, T *res)
|
||||
{
|
||||
DPRINTF_DEBUG( "(%s) trying to pop element (%d elements in queue)", ownerName.c_str(), count);
|
||||
|
||||
if (popSemaphore.waitAbs(timeout)) {
|
||||
// popSemaphore.wait() succeeded, now pop the frontmost element
|
||||
lock.lock();
|
||||
|
@ -148,7 +143,6 @@ class ConcurrentQueue
|
|||
}
|
||||
else {
|
||||
// timeout occured
|
||||
DPRINTF_DEBUG( "(%s) timeout or program shutdown", ownerName.c_str());
|
||||
*res = 0;
|
||||
|
||||
return false;
|
||||
|
|
|
@ -106,8 +106,6 @@ public:
|
|||
return false;
|
||||
break;
|
||||
default:
|
||||
// semaphore could not be aquired because of several reasons, but none are fatal
|
||||
DPRINTF_DEBUG( "timedwait (<0) returned with %d (%s)", errno, strerror(errno));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -120,7 +118,6 @@ public:
|
|||
retval = sem_timedwait(sem, &timeout);
|
||||
#endif
|
||||
if (retval != 0 && errno != ETIMEDOUT) {
|
||||
DPRINTF_DEBUG( "timedwait (>=0) returned with %d: %s", errno, strerror(errno));
|
||||
switch (errno) {
|
||||
case EINVAL:
|
||||
/*
|
||||
|
@ -141,8 +138,7 @@ public:
|
|||
return false;
|
||||
break;
|
||||
default:
|
||||
// semaphore could not be aquired because of several reasons, but none are fatal
|
||||
DPRINTF_DEBUG( "timedwait (>=0) returned with %d", errno);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (errno == ETIMEDOUT) {
|
||||
|
@ -201,9 +197,6 @@ public:
|
|||
return false;
|
||||
break;
|
||||
default:
|
||||
// semaphore not acquired for non-fatal reasons
|
||||
DPRINTF_DEBUG( "timedwait returned with %s",
|
||||
strerror(errno));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -239,12 +239,10 @@ private:
|
|||
struct timespec nexttimeout;
|
||||
if (!processTimeouts(nexttimeout)) {
|
||||
if (!queue.pop(&element)) {
|
||||
DPRINTF_INFO("queue.pop failed - timeout?");
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
if (!queue.popAbs(nexttimeout, &element)) {
|
||||
DPRINTF_INFO("queue.pop failed - timeout?");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -171,15 +171,12 @@ void BaseAggregator::exporterThread()
|
|||
}
|
||||
|
||||
gettimeofday(&curtime, 0);
|
||||
DPRINTF_DEBUG("Aggregator: starting Export");
|
||||
for (size_t i = 0; i < rules->count; i++) {
|
||||
rules->rule[i]->hashtable->expireFlows();
|
||||
}
|
||||
struct timeval endtime;
|
||||
gettimeofday(&endtime, 0);
|
||||
timeval_subtract(&difftime, &endtime, &curtime);
|
||||
|
||||
DPRINTF_DEBUG("Aggregator: export took %.03f secs", (float)difftime.tv_usec/1000000+difftime.tv_sec);
|
||||
}
|
||||
|
||||
if (getShutdownProperly()) {
|
||||
|
|
Loading…
Reference in New Issue