Loading innobase/buf/buf0buf.c +24 −0 Original line number Diff line number Diff line Loading @@ -2136,6 +2136,30 @@ buf_print(void) ut_a(buf_validate()); } /************************************************************************* Returns the number of latched pages in the buffer pool. */ ulint buf_get_latched_pages_number(void) { buf_block_t* block; ulint i; ulint fixed_pages_number = 0; mutex_enter(&(buf_pool->mutex)); for (i = 0; i < buf_pool->curr_size; i++) { block = buf_pool_get_nth_block(buf_pool, i); if ((block->buf_fix_count != 0) || (block->io_fix != 0)) fixed_pages_number++; } mutex_exit(&(buf_pool->mutex)); return fixed_pages_number; } /************************************************************************* Returns the number of pending buf pool ios. */ Loading innobase/buf/buf0flu.c +7 −0 Original line number Diff line number Diff line Loading @@ -273,6 +273,10 @@ buf_flush_buffered_writes(void) } } /* increment the doublewrite flushed pages counter */ srv_dblwr_pages_written+= trx_doublewrite->first_free; srv_dblwr_writes++; if (trx_doublewrite->first_free > TRX_SYS_DOUBLEWRITE_BLOCK_SIZE) { len = TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * UNIV_PAGE_SIZE; } else { Loading Loading @@ -901,6 +905,9 @@ buf_flush_batch( (ulong) page_count); } if (page_count != ULINT_UNDEFINED) srv_buf_pool_flushed+= page_count; return(page_count); } Loading innobase/buf/buf0lru.c +1 −0 Original line number Diff line number Diff line Loading @@ -432,6 +432,7 @@ buf_LRU_get_free_block(void) /* No free block was found: try to flush the LRU list */ buf_flush_free_margin(); ++srv_buf_pool_wait_free; os_aio_simulated_wake_handler_threads(); Loading innobase/buf/buf0rea.c +7 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,10 @@ Created 11/5/1995 Heikki Tuuri #include "os0file.h" #include "srv0start.h" extern ulint srv_read_ahead_rnd; extern ulint srv_read_ahead_seq; extern ulint srv_buf_pool_reads; /* The size in blocks of the area where the random read-ahead algorithm counts the accessed pages when deciding whether to read-ahead */ #define BUF_READ_AHEAD_RANDOM_AREA BUF_READ_AHEAD_AREA Loading Loading @@ -291,6 +295,7 @@ buf_read_ahead_random( (ulong) count); } ++srv_read_ahead_rnd; return(count); } Loading Loading @@ -323,6 +328,7 @@ buf_read_page( count2 = buf_read_page_low(&err, TRUE, BUF_READ_ANY_PAGE, space, tablespace_version, offset); srv_buf_pool_reads+= count2; if (err == DB_TABLESPACE_DELETED) { ut_print_timestamp(stderr); fprintf(stderr, Loading Loading @@ -575,6 +581,7 @@ buf_read_ahead_linear( (ulong) space, (ulong) offset, (ulong) count); } ++srv_read_ahead_seq; return(count); } Loading innobase/fil/fil0fil.c +10 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,9 @@ but in the MySQL Embedded Server Library and ibbackup it is not the default directory, and we must set the base file path explicitly */ const char* fil_path_to_mysql_datadir = "."; /* The number of fsyncs done to the log */ ulint fil_n_log_flushes = 0; ulint fil_n_pending_log_flushes = 0; ulint fil_n_pending_tablespace_flushes = 0; Loading Loading @@ -3671,6 +3674,12 @@ fil_io( mode = OS_AIO_NORMAL; } if (type == OS_FILE_READ) { srv_data_read+= len; } else if (type == OS_FILE_WRITE) { srv_data_written+= len; } /* Reserve the fil_system mutex and make sure that we can open at least one file while holding it, if the file is not already open */ Loading Loading @@ -3956,6 +3965,7 @@ fil_flush( fil_n_pending_tablespace_flushes++; } else { fil_n_pending_log_flushes++; fil_n_log_flushes++; } #ifdef __WIN__ if (node->is_raw_disk) { Loading Loading
innobase/buf/buf0buf.c +24 −0 Original line number Diff line number Diff line Loading @@ -2136,6 +2136,30 @@ buf_print(void) ut_a(buf_validate()); } /************************************************************************* Returns the number of latched pages in the buffer pool. */ ulint buf_get_latched_pages_number(void) { buf_block_t* block; ulint i; ulint fixed_pages_number = 0; mutex_enter(&(buf_pool->mutex)); for (i = 0; i < buf_pool->curr_size; i++) { block = buf_pool_get_nth_block(buf_pool, i); if ((block->buf_fix_count != 0) || (block->io_fix != 0)) fixed_pages_number++; } mutex_exit(&(buf_pool->mutex)); return fixed_pages_number; } /************************************************************************* Returns the number of pending buf pool ios. */ Loading
innobase/buf/buf0flu.c +7 −0 Original line number Diff line number Diff line Loading @@ -273,6 +273,10 @@ buf_flush_buffered_writes(void) } } /* increment the doublewrite flushed pages counter */ srv_dblwr_pages_written+= trx_doublewrite->first_free; srv_dblwr_writes++; if (trx_doublewrite->first_free > TRX_SYS_DOUBLEWRITE_BLOCK_SIZE) { len = TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * UNIV_PAGE_SIZE; } else { Loading Loading @@ -901,6 +905,9 @@ buf_flush_batch( (ulong) page_count); } if (page_count != ULINT_UNDEFINED) srv_buf_pool_flushed+= page_count; return(page_count); } Loading
innobase/buf/buf0lru.c +1 −0 Original line number Diff line number Diff line Loading @@ -432,6 +432,7 @@ buf_LRU_get_free_block(void) /* No free block was found: try to flush the LRU list */ buf_flush_free_margin(); ++srv_buf_pool_wait_free; os_aio_simulated_wake_handler_threads(); Loading
innobase/buf/buf0rea.c +7 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,10 @@ Created 11/5/1995 Heikki Tuuri #include "os0file.h" #include "srv0start.h" extern ulint srv_read_ahead_rnd; extern ulint srv_read_ahead_seq; extern ulint srv_buf_pool_reads; /* The size in blocks of the area where the random read-ahead algorithm counts the accessed pages when deciding whether to read-ahead */ #define BUF_READ_AHEAD_RANDOM_AREA BUF_READ_AHEAD_AREA Loading Loading @@ -291,6 +295,7 @@ buf_read_ahead_random( (ulong) count); } ++srv_read_ahead_rnd; return(count); } Loading Loading @@ -323,6 +328,7 @@ buf_read_page( count2 = buf_read_page_low(&err, TRUE, BUF_READ_ANY_PAGE, space, tablespace_version, offset); srv_buf_pool_reads+= count2; if (err == DB_TABLESPACE_DELETED) { ut_print_timestamp(stderr); fprintf(stderr, Loading Loading @@ -575,6 +581,7 @@ buf_read_ahead_linear( (ulong) space, (ulong) offset, (ulong) count); } ++srv_read_ahead_seq; return(count); } Loading
innobase/fil/fil0fil.c +10 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,9 @@ but in the MySQL Embedded Server Library and ibbackup it is not the default directory, and we must set the base file path explicitly */ const char* fil_path_to_mysql_datadir = "."; /* The number of fsyncs done to the log */ ulint fil_n_log_flushes = 0; ulint fil_n_pending_log_flushes = 0; ulint fil_n_pending_tablespace_flushes = 0; Loading Loading @@ -3671,6 +3674,12 @@ fil_io( mode = OS_AIO_NORMAL; } if (type == OS_FILE_READ) { srv_data_read+= len; } else if (type == OS_FILE_WRITE) { srv_data_written+= len; } /* Reserve the fil_system mutex and make sure that we can open at least one file while holding it, if the file is not already open */ Loading Loading @@ -3956,6 +3965,7 @@ fil_flush( fil_n_pending_tablespace_flushes++; } else { fil_n_pending_log_flushes++; fil_n_log_flushes++; } #ifdef __WIN__ if (node->is_raw_disk) { Loading