disable buffer pool logging by default

master
Andre Puschmann 6 years ago
parent 3ebf4792de
commit 93d17fed3e

@ -204,9 +204,17 @@ public:
b->reset(); b->reset();
if (!pool->deallocate(b)) { if (!pool->deallocate(b)) {
if (log) { if (log) {
#ifdef SRSLTE_BUFFER_POOL_LOG_ENABLED
log->error("Deallocating PDU: Addr=0x%lx, name=%s not found in pool\n", (uint64_t) b, b->debug_name); log->error("Deallocating PDU: Addr=0x%lx, name=%s not found in pool\n", (uint64_t) b, b->debug_name);
#else
log->error("Deallocating PDU: Addr=0x%lx\n", (uint64_t) b);
#endif
} else { } else {
#ifdef SRSLTE_BUFFER_POOL_LOG_ENABLED
printf("Error deallocating PDU: Addr=0x%lx, name=%s not found in pool\n", (uint64_t) b, b->debug_name); printf("Error deallocating PDU: Addr=0x%lx, name=%s not found in pool\n", (uint64_t) b, b->debug_name);
#else
printf("Error deallocating PDU: Addr=0x%lx\n", (uint64_t) b);
#endif
} }
} }
b = NULL; b = NULL;

@ -65,7 +65,7 @@
#define SRSLTE_MAX_BUFFER_SIZE_BYTES (SRSLTE_MAX_BUFFER_SIZE_BITS/8) #define SRSLTE_MAX_BUFFER_SIZE_BYTES (SRSLTE_MAX_BUFFER_SIZE_BITS/8)
#define SRSLTE_BUFFER_HEADER_OFFSET 1020 #define SRSLTE_BUFFER_HEADER_OFFSET 1020
#define SRSLTE_BUFFER_POOL_LOG_ENABLED //#define SRSLTE_BUFFER_POOL_LOG_ENABLED
#ifdef SRSLTE_BUFFER_POOL_LOG_ENABLED #ifdef SRSLTE_BUFFER_POOL_LOG_ENABLED
#define pool_allocate (pool->allocate(__PRETTY_FUNCTION__)) #define pool_allocate (pool->allocate(__PRETTY_FUNCTION__))
@ -73,6 +73,7 @@
#define SRSLTE_BUFFER_POOL_LOG_NAME_LEN 128 #define SRSLTE_BUFFER_POOL_LOG_NAME_LEN 128
#else #else
#define pool_allocate (pool->allocate()) #define pool_allocate (pool->allocate())
#define pool_allocate_blocking (pool->allocate(NULL, true))
#endif #endif
#define ZERO_OBJECT(x) memset(&(x), 0x0, sizeof((x))) #define ZERO_OBJECT(x) memset(&(x), 0x0, sizeof((x)))

@ -73,7 +73,6 @@ private:
cf_t samples[sf_buffer_sz]; cf_t samples[sf_buffer_sz];
uint32_t nof_samples; uint32_t nof_samples;
uint32_t tti; uint32_t tti;
char debug_name[SRSLTE_BUFFER_POOL_LOG_NAME_LEN];
}; };
srslte::buffer_pool<sf_buffer> buffer_pool; srslte::buffer_pool<sf_buffer> buffer_pool;
srslte::block_queue<sf_buffer*> pending_buffers; srslte::block_queue<sf_buffer*> pending_buffers;

Loading…
Cancel
Save