diff options
Diffstat (limited to 'innobase/buf/buf0lru.c')
-rw-r--r-- | innobase/buf/buf0lru.c | 54 |
1 files changed, 24 insertions, 30 deletions
diff --git a/innobase/buf/buf0lru.c b/innobase/buf/buf0lru.c index 0128ee87871..0ced7e23abe 100644 --- a/innobase/buf/buf0lru.c +++ b/innobase/buf/buf0lru.c @@ -126,7 +126,7 @@ buf_LRU_search_and_free_block( if (buf_flush_ready_for_replace(block)) { if (buf_debug_prints) { - printf( + fprintf(stderr, "Putting space %lu page %lu to free list\n", block->space, block->offset); } @@ -301,26 +301,20 @@ loop: fprintf(stderr, "InnoDB: Warning: difficult to find free blocks from\n" "InnoDB: the buffer pool (%lu search iterations)! Consider\n" - "InnoDB: increasing the buffer pool size.\n", - n_iterations); - fprintf(stderr, + "InnoDB: increasing the buffer pool size.\n" "InnoDB: It is also possible that in your Unix version\n" "InnoDB: fsync is very slow, or completely frozen inside\n" "InnoDB: the OS kernel. Then upgrading to a newer version\n" "InnoDB: of your operating system may help. Look at the\n" - "InnoDB: number of fsyncs in diagnostic info below.\n"); - - fprintf(stderr, - "InnoDB: Pending flushes (fsync) log: %lu; buffer pool: %lu\n", - fil_n_pending_log_flushes, - fil_n_pending_tablespace_flushes); - fprintf(stderr, - "InnoDB: %lu OS file reads, %lu OS file writes, %lu OS fsyncs\n", - os_n_file_reads, os_n_file_writes, os_n_fsyncs); - - fprintf(stderr, + "InnoDB: number of fsyncs in diagnostic info below.\n" + "InnoDB: Pending flushes (fsync) log: %lu; buffer pool: %lu\n" + "InnoDB: %lu OS file reads, %lu OS file writes, %lu OS fsyncs\n" "InnoDB: Starting InnoDB Monitor to print further\n" - "InnoDB: diagnostics to the standard output.\n"); + "InnoDB: diagnostics to the standard output.\n", + n_iterations, + fil_n_pending_log_flushes, + fil_n_pending_tablespace_flushes, + os_n_file_reads, os_n_file_writes, os_n_fsyncs); mon_value_was = srv_print_innodb_monitor; started_monitor = TRUE; @@ -797,7 +791,7 @@ buf_LRU_print(void) ut_ad(buf_pool); mutex_enter(&(buf_pool->mutex)); - printf("Pool ulint clock %lu\n", buf_pool->ulint_clock); + fprintf(stderr, "Pool ulint clock %lu\n", buf_pool->ulint_clock); block = UT_LIST_GET_FIRST(buf_pool->LRU); @@ -805,37 +799,37 @@ buf_LRU_print(void) while (block != NULL) { - printf("BLOCK %lu ", block->offset); + fprintf(stderr, "BLOCK %lu ", block->offset); if (block->old) { - printf("old "); + fputs("old ", stderr); } if (block->buf_fix_count) { - printf("buffix count %lu ", block->buf_fix_count); + fprintf(stderr, "buffix count %lu ", + block->buf_fix_count); } if (block->io_fix) { - printf("io_fix %lu ", block->io_fix); + fprintf(stderr, "io_fix %lu ", block->io_fix); } if (ut_dulint_cmp(block->oldest_modification, ut_dulint_zero) > 0) { - printf("modif. "); + fputs("modif. ", stderr); } - printf("LRU pos %lu ", block->LRU_position); - frame = buf_block_get_frame(block); - printf("type %lu ", fil_page_get_type(frame)); - printf("index id %lu ", ut_dulint_get_low( - btr_page_get_index_id(frame))); + fprintf(stderr, "LRU pos %lu type %lu index id %lu ", + block->LRU_position, + fil_page_get_type(frame), + ut_dulint_get_low(btr_page_get_index_id(frame))); block = UT_LIST_GET_NEXT(LRU, block); - len++; - if (len % 10 == 0) { - printf("\n"); + if (++len == 10) { + len = 0; + putc('\n', stderr); } } |