remove useless logInfo
parent
556b7337c4
commit
dc43f8254a
|
|
@ -25,7 +25,8 @@ static struct fast_allocator_info malloc_allocator;
|
|||
(allocator)->pooled = _pooled; \
|
||||
acontext->allocator_array.allocators[ \
|
||||
acontext->allocator_array.count++] = allocator; \
|
||||
/* logInfo("count: %d, magic_number: %d", acontext->allocator_array.count, (allocator)->magic_number); */\
|
||||
/* logInfo("count: %d, magic_number: %d", acontext->allocator_array.count, \
|
||||
(allocator)->magic_number); */ \
|
||||
} while (0)
|
||||
|
||||
|
||||
|
|
@ -388,8 +389,10 @@ int fast_allocator_retry_reclaim(struct fast_allocator_context *acontext,
|
|||
|
||||
acontext->allocator_array.last_reclaim_time = get_current_time();
|
||||
malloc_bytes = acontext->allocator_array.malloc_bytes;
|
||||
logInfo("malloc_bytes: %"PRId64", ratio: %f", malloc_bytes, (double)acontext->alloc_bytes /
|
||||
(double)malloc_bytes);
|
||||
/*
|
||||
logInfo("malloc_bytes: %"PRId64", ratio: %f", malloc_bytes,
|
||||
(double)acontext->alloc_bytes / (double)malloc_bytes);
|
||||
*/
|
||||
|
||||
if (malloc_bytes == 0 || (double)acontext->alloc_bytes /
|
||||
(double)malloc_bytes >= acontext->allocator_array.expect_usage_ratio)
|
||||
|
|
@ -402,7 +405,7 @@ int fast_allocator_retry_reclaim(struct fast_allocator_context *acontext,
|
|||
if (fast_mblock_reclaim(&acontext->allocator_array.
|
||||
allocators[i]->mblock, 0, &reclaim_count, NULL) == 0)
|
||||
{
|
||||
logInfo("reclaim_count: %d", reclaim_count);
|
||||
//logInfo("reclaim_count: %d", reclaim_count);
|
||||
*total_reclaim_bytes += reclaim_count *
|
||||
acontext->allocator_array.allocators[i]->
|
||||
mblock.info.trunk_size;
|
||||
|
|
@ -440,7 +443,7 @@ void *fast_allocator_alloc(struct fast_allocator_context *acontext,
|
|||
{
|
||||
return NULL;
|
||||
}
|
||||
logInfo("reclaimed bytes: %"PRId64, total_reclaim_bytes);
|
||||
//logInfo("reclaimed bytes: %"PRId64, total_reclaim_bytes);
|
||||
if (total_reclaim_bytes < allocator_info->mblock.info.trunk_size)
|
||||
{
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -116,8 +116,9 @@ static void delete_from_mblock_list(struct fast_mblock_man *mblock)
|
|||
pStat->trunk_total_count += current->info.trunk_total_count; \
|
||||
pStat->trunk_used_count += current->info.trunk_used_count; \
|
||||
pStat->instance_count += current->info.instance_count; \
|
||||
/* logInfo("name: %s, element_size: %d, total_count: %d, used_count: %d", */ \
|
||||
/* pStat->name, pStat->element_size, pStat->element_total_count, pStat->element_used_count); */\
|
||||
/* logInfo("name: %s, element_size: %d, total_count: %d, " \
|
||||
"used_count: %d", pStat->name, pStat->element_size, \
|
||||
pStat->element_total_count, pStat->element_used_count); */ \
|
||||
} while (0)
|
||||
|
||||
int fast_mblock_manager_stat(struct fast_mblock_info *stats,
|
||||
|
|
|
|||
|
|
@ -29,11 +29,16 @@ extern "C" {
|
|||
#define LOG_COMPRESS_FLAGS_ENABLED 1
|
||||
#define LOG_COMPRESS_FLAGS_NEW_THREAD 2
|
||||
|
||||
#define LOG_NOTHING (LOG_DEBUG + 10)
|
||||
|
||||
struct log_context;
|
||||
|
||||
//log header line callback
|
||||
typedef void (*LogHeaderCallback)(struct log_context *pContext);
|
||||
|
||||
#define FC_LOG_BY_LEVEL(level) \
|
||||
(level <= g_log_context.log_level)
|
||||
|
||||
typedef struct log_context
|
||||
{
|
||||
/* log level value please see: sys/syslog.h
|
||||
|
|
|
|||
|
|
@ -60,8 +60,10 @@ static inline void shared_buffer_hold(SharedBuffer *buffer)
|
|||
static inline void shared_buffer_release(SharedBuffer *buffer)
|
||||
{
|
||||
if (__sync_sub_and_fetch(&buffer->reffer_count, 1) == 0) {
|
||||
logInfo("file: "__FILE__", line: %d, "
|
||||
/*
|
||||
logDebug("file: "__FILE__", line: %d, "
|
||||
"free shared buffer: %p", __LINE__, buffer);
|
||||
*/
|
||||
fast_mblock_free_object(&buffer->ctx->allocator, buffer);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ static void *thread_entrance(void *arg)
|
|||
|
||||
PTHREAD_MUTEX_LOCK(&pool->lock);
|
||||
pool->thread_counts.running++;
|
||||
logInfo("thread pool: %s, index: %d start, running count: %d",
|
||||
logDebug("thread pool: %s, index: %d start, running count: %d",
|
||||
pool->name, thread->index, pool->thread_counts.running);
|
||||
PTHREAD_MUTEX_UNLOCK(&pool->lock);
|
||||
|
||||
|
|
@ -100,7 +100,7 @@ static void *thread_entrance(void *arg)
|
|||
}
|
||||
|
||||
PTHREAD_MUTEX_LOCK(&pool->lock);
|
||||
logInfo("thread pool: %s, index: %d exit, running count: %d",
|
||||
logDebug("thread pool: %s, index: %d exit, running count: %d",
|
||||
pool->name, thread->index, pool->thread_counts.running);
|
||||
PTHREAD_MUTEX_UNLOCK(&pool->lock);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue