Commit fcd34fa2 authored by marko's avatar marko

branches/zip: buf_pool_t: Add n_pend_unzip. Display it in buf_print().

parent d7deb7fc
...@@ -1846,6 +1846,7 @@ wait_until_unfixed: ...@@ -1846,6 +1846,7 @@ wait_until_unfixed:
block->page.state = BUF_BLOCK_FILE_PAGE; block->page.state = BUF_BLOCK_FILE_PAGE;
block->page.buf_fix_count = 1; block->page.buf_fix_count = 1;
buf_block_set_io_fix(block, BUF_IO_READ); buf_block_set_io_fix(block, BUF_IO_READ);
buf_pool->n_pend_unzip++;
rw_lock_x_lock(&block->lock); rw_lock_x_lock(&block->lock);
mutex_exit(&block->mutex); mutex_exit(&block->mutex);
mutex_exit(&buf_pool->zip_mutex); mutex_exit(&buf_pool->zip_mutex);
...@@ -1863,6 +1864,7 @@ wait_until_unfixed: ...@@ -1863,6 +1864,7 @@ wait_until_unfixed:
/* Unfix and unlatch the block. */ /* Unfix and unlatch the block. */
mutex_enter(&buf_pool->mutex); mutex_enter(&buf_pool->mutex);
mutex_enter(&block->mutex); mutex_enter(&block->mutex);
buf_pool->n_pend_unzip--;
block->page.buf_fix_count--; block->page.buf_fix_count--;
buf_block_set_io_fix(block, BUF_IO_NONE); buf_block_set_io_fix(block, BUF_IO_NONE);
mutex_exit(&block->mutex); mutex_exit(&block->mutex);
...@@ -2731,12 +2733,15 @@ buf_page_io_complete( ...@@ -2731,12 +2733,15 @@ buf_page_io_complete(
if (buf_page_get_zip_size(bpage)) { if (buf_page_get_zip_size(bpage)) {
frame = bpage->zip.data; frame = bpage->zip.data;
buf_pool->n_pend_unzip++;
if (uncompressed if (uncompressed
&& !buf_zip_decompress((buf_block_t*) bpage, && !buf_zip_decompress((buf_block_t*) bpage,
FALSE)) { FALSE)) {
buf_pool->n_pend_unzip--;
goto corrupt; goto corrupt;
} }
buf_pool->n_pend_unzip--;
} else { } else {
ut_a(uncompressed); ut_a(uncompressed);
frame = ((buf_block_t*) bpage)->frame; frame = ((buf_block_t*) bpage)->frame;
...@@ -3191,6 +3196,7 @@ buf_print(void) ...@@ -3191,6 +3196,7 @@ buf_print(void)
"database pages %lu\n" "database pages %lu\n"
"free pages %lu\n" "free pages %lu\n"
"modified database pages %lu\n" "modified database pages %lu\n"
"n pending decompressions %lu\n"
"n pending reads %lu\n" "n pending reads %lu\n"
"n pending flush LRU %lu list %lu single page %lu\n" "n pending flush LRU %lu list %lu single page %lu\n"
"pages read %lu, created %lu, written %lu\n", "pages read %lu, created %lu, written %lu\n",
...@@ -3198,6 +3204,7 @@ buf_print(void) ...@@ -3198,6 +3204,7 @@ buf_print(void)
(ulong) UT_LIST_GET_LEN(buf_pool->LRU), (ulong) UT_LIST_GET_LEN(buf_pool->LRU),
(ulong) UT_LIST_GET_LEN(buf_pool->free), (ulong) UT_LIST_GET_LEN(buf_pool->free),
(ulong) UT_LIST_GET_LEN(buf_pool->flush_list), (ulong) UT_LIST_GET_LEN(buf_pool->flush_list),
(ulong) buf_pool->n_pend_unzip,
(ulong) buf_pool->n_pend_reads, (ulong) buf_pool->n_pend_reads,
(ulong) buf_pool->n_flush[BUF_FLUSH_LRU], (ulong) buf_pool->n_flush[BUF_FLUSH_LRU],
(ulong) buf_pool->n_flush[BUF_FLUSH_LIST], (ulong) buf_pool->n_flush[BUF_FLUSH_LIST],
......
...@@ -1205,6 +1205,7 @@ struct buf_pool_struct{ ...@@ -1205,6 +1205,7 @@ struct buf_pool_struct{
zip buddy system, zip buddy system,
indexed by block->frame */ indexed by block->frame */
ulint n_pend_reads; /* number of pending read operations */ ulint n_pend_reads; /* number of pending read operations */
ulint n_pend_unzip; /* number of pending decompressions */
time_t last_printout_time; /* when buf_print was last time time_t last_printout_time; /* when buf_print was last time
called */ called */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment