reduce debug logging

This commit is contained in:
Heikki Hannikainen 2012-11-20 08:35:10 +02:00
parent a454f2332f
commit 9575119bc3
3 changed files with 7 additions and 8 deletions

View File

@ -814,11 +814,11 @@ static void dupecheck_thread(void)
if (n == 0) {
#ifdef USE_EVENTFD
int p = poll(&dupecheck_eventfd_poll, 1, 1000);
hlog(LOG_DEBUG, "dupecheck: poll returned %d", p);
//hlog(LOG_DEBUG, "dupecheck: poll returned %d", p);
if (p > 0) {
uint64_t u;
p = read(dupecheck_eventfd, &u, sizeof(uint64_t));
hlog(LOG_DEBUG, "dupecheck: eventfd read %d: %lu", p, u);
//hlog(LOG_DEBUG, "dupecheck: eventfd read %d: %lu", p, u);
}
#else
poll(NULL, 0, 20); // 20 ms

View File

@ -398,12 +398,11 @@ void incoming_flush(struct worker_t *self)
self->pbuf_incoming_count += self->pbuf_incoming_local_count;
pthread_mutex_unlock(&self->pbuf_incoming_mutex);
hlog( LOG_DEBUG, "incoming_flush() sent out %d packets",
self->pbuf_incoming_local_count );
//hlog( LOG_DEBUG, "incoming_flush() sent out %d packets", self->pbuf_incoming_local_count );
#ifdef USE_EVENTFD
/* wake up dupecheck from sleep */
uint64_t u = 1;
uint64_t u = 1; // could set to pbuf_incoming_local_count, but it wouldn't be used for anything.
int i = write(dupecheck_eventfd, &u, sizeof(uint64_t));
if (i != sizeof(uint64_t)) {
hlog(LOG_ERR, "incoming_flush() failed to write to dupecheck_eventfd: %s", strerror(errno));

View File

@ -108,7 +108,7 @@ struct portaccount_t *port_accounter_alloc(void)
p->refcount = 1;
pthread_mutex_init( & p->mutex, NULL );
hlog(LOG_DEBUG, "new port_accounter %p", p);
//hlog(LOG_DEBUG, "new port_accounter %p", p);
return p;
}
@ -141,7 +141,7 @@ static void port_accounter_add(struct portaccount_t *p)
return;
}
hlog(LOG_DEBUG, "port_accounter_add %p", p);
//hlog(LOG_DEBUG, "port_accounter_add %p", p);
++ p->refcount;
++ p->counter;
@ -176,7 +176,7 @@ void port_accounter_drop(struct portaccount_t *p)
return;
}
hlog(LOG_DEBUG, "port_accounter_drop(%p) refcount=%d", p, r);
//hlog(LOG_DEBUG, "port_accounter_drop(%p) refcount=%d", p, r);
if (r == 0) {
/* Last reference is being destroyed */