summaryrefslogtreecommitdiff
path: root/innobase/buf
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2004-06-16 13:41:14 +0300
committerunknown <marko@hundin.mysql.fi>2004-06-16 13:41:14 +0300
commitd587a36aa131b74d75da6d456ce297f8f8c893e3 (patch)
treedf8a781b0b9fee71976881b14f7cbd640b3068ba /innobase/buf
parente4042c25ef4c7162046e953198dfd56bc80db1f8 (diff)
downloadmariadb-git-d587a36aa131b74d75da6d456ce297f8f8c893e3.tar.gz
InnoDB: Revert most of ChangeSet@1.1772, as the debug functions may
be needed when testing production releases innobase/btr/btr0btr.c: Remove #ifdef UNIV_DEBUG around debug code innobase/buf/buf0buf.c: Remove #ifdef UNIV_DEBUG around debug code innobase/buf/buf0flu.c: Remove #ifdef UNIV_DEBUG around debug code innobase/buf/buf0lru.c: Remove #ifdef UNIV_DEBUG around debug code innobase/buf/buf0rea.c: Remove #ifdef UNIV_DEBUG around debug code innobase/data/data0type.c: Remove #ifdef UNIV_DEBUG around debug code innobase/dict/dict0dict.c: Remove #ifdef UNIV_DEBUG around debug code innobase/fsp/fsp0fsp.c: Remove #ifdef UNIV_DEBUG around debug code innobase/fut/fut0lst.c: Remove #ifdef UNIV_DEBUG around debug code innobase/ibuf/ibuf0ibuf.c: Remove #ifdef UNIV_DEBUG around debug code innobase/include/btr0btr.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/buf0buf.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/buf0buf.ic: Remove #ifdef UNIV_DEBUG around debug code innobase/include/buf0flu.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/buf0lru.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/data0type.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/dict0dict.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/fsp0fsp.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/fut0lst.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/lock0lock.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/mem0dbg.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/mem0dbg.ic: Remove #ifdef UNIV_DEBUG around debug code innobase/include/mem0pool.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/mtr0mtr.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/pars0opt.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/sync0rw.h: Remove #ifdef UNIV_DEBUG around debug code innobase/include/sync0sync.h: Remove #ifdef UNIV_DEBUG around debug code innobase/lock/lock0lock.c: Remove #ifdef UNIV_DEBUG around debug code innobase/mem/mem0dbg.c: Remove #ifdef UNIV_DEBUG around debug code innobase/mem/mem0pool.c: Remove #ifdef UNIV_DEBUG around debug code innobase/mtr/mtr0mtr.c: Remove #ifdef UNIV_DEBUG around debug code innobase/pars/pars0opt.c: Remove #ifdef UNIV_DEBUG around debug code innobase/srv/srv0start.c: Remove #ifdef UNIV_DEBUG around debug code innobase/sync/sync0rw.c: Remove #ifdef UNIV_DEBUG around debug code innobase/sync/sync0sync.c: Remove #ifdef UNIV_DEBUG around debug code innobase/trx/trx0roll.c: Remove #ifdef UNIV_DEBUG around debug code
Diffstat (limited to 'innobase/buf')
-rw-r--r--innobase/buf/buf0buf.c14
-rw-r--r--innobase/buf/buf0flu.c10
-rw-r--r--innobase/buf/buf0lru.c4
-rw-r--r--innobase/buf/buf0rea.c10
4 files changed, 1 insertions, 37 deletions
diff --git a/innobase/buf/buf0buf.c b/innobase/buf/buf0buf.c
index a7bf9cf1d2f..b744430a76e 100644
--- a/innobase/buf/buf0buf.c
+++ b/innobase/buf/buf0buf.c
@@ -201,14 +201,12 @@ the read requests for the whole area. */
buf_pool_t* buf_pool = NULL; /* The buffer buf_pool of the database */
-#ifdef UNIV_DEBUG
-static ulint buf_dbg_counter = 0; /* This is used to insert validation
+ulint buf_dbg_counter = 0; /* This is used to insert validation
operations in excution in the
debug version */
ibool buf_debug_prints = FALSE; /* If this is set TRUE,
the program prints info whenever
read-ahead or flush occurs */
-#endif /* UNIV_DEBUG */
/************************************************************************
Calculates a page checksum which is stored to the page when it is written
@@ -1457,12 +1455,10 @@ buf_page_create(
/* If we get here, the page was not in buf_pool: init it there */
-#ifdef UNIV_DEBUG
if (buf_debug_prints) {
fprintf(stderr, "Creating space %lu page %lu to buffer\n",
space, offset);
}
-#endif /* UNIV_DEBUG */
block = free_block;
@@ -1613,11 +1609,9 @@ buf_page_io_complete(
rw_lock_x_unlock_gen(&(block->lock), BUF_IO_READ);
rw_lock_x_unlock_gen(&(block->read_lock), BUF_IO_READ);
-#ifdef UNIV_DEBUG
if (buf_debug_prints) {
fputs("Has read ", stderr);
}
-#endif /* UNIV_DEBUG */
} else {
ut_ad(io_type == BUF_IO_WRITE);
@@ -1630,21 +1624,17 @@ buf_page_io_complete(
buf_pool->n_pages_written++;
-#ifdef UNIV_DEBUG
if (buf_debug_prints) {
fputs("Has written ", stderr);
}
-#endif /* UNIV_DEBUG */
}
mutex_exit(&(buf_pool->mutex));
-#ifdef UNIV_DEBUG
if (buf_debug_prints) {
fprintf(stderr, "page space %lu page no %lu\n",
block->space, block->offset);
}
-#endif /* UNIV_DEBUG */
}
/*************************************************************************
@@ -1673,7 +1663,6 @@ buf_pool_invalidate(void)
mutex_exit(&(buf_pool->mutex));
}
-#ifdef UNIV_DEBUG
/*************************************************************************
Validates the buffer buf_pool data structure. */
@@ -1872,7 +1861,6 @@ buf_print(void)
ut_a(buf_validate());
}
-#endif /* UNIV_DEBUG */
/*************************************************************************
Returns the number of pending buf pool ios. */
diff --git a/innobase/buf/buf0flu.c b/innobase/buf/buf0flu.c
index 8a4ae2ff369..7456e5d6f61 100644
--- a/innobase/buf/buf0flu.c
+++ b/innobase/buf/buf0flu.c
@@ -31,7 +31,6 @@ flushed along with the original page. */
#define BUF_FLUSH_AREA ut_min(BUF_READ_AHEAD_AREA,\
buf_pool->curr_size / 16)
-#ifdef UNIV_DEBUG
/**********************************************************************
Validates the flush list. */
static
@@ -39,7 +38,6 @@ ibool
buf_flush_validate_low(void);
/*========================*/
/* out: TRUE if ok */
-#endif /* UNIV_DEBUG */
/************************************************************************
Inserts a modified block into the flush list. */
@@ -490,13 +488,11 @@ buf_flush_try_page(
rw_lock_s_lock_gen(&(block->lock), BUF_IO_WRITE);
}
-#ifdef UNIV_DEBUG
if (buf_debug_prints) {
fprintf(stderr,
"Flushing page space %lu, page no %lu \n",
block->space, block->offset);
}
-#endif /* UNIV_DEBUG */
buf_flush_write_block_low(block);
@@ -552,13 +548,11 @@ buf_flush_try_page(
rw_lock_s_lock_gen(&(block->lock), BUF_IO_WRITE);
-#ifdef UNIV_DEBUG
if (buf_debug_prints) {
fprintf(stderr,
"Flushing single page space %lu, page no %lu \n",
block->space, block->offset);
}
-#endif /* UNIV_DEBUG */
buf_flush_write_block_low(block);
@@ -785,7 +779,6 @@ buf_flush_batch(
buf_flush_buffered_writes();
-#ifdef UNIV_DEBUG
if (buf_debug_prints && page_count > 0) {
ut_a(flush_type == BUF_FLUSH_LRU
|| flush_type == BUF_FLUSH_LIST);
@@ -794,7 +787,6 @@ buf_flush_batch(
: "Flushed %lu pages in flush list flush\n",
page_count);
}
-#endif /* UNIV_DEBUG */
return(page_count);
}
@@ -886,7 +878,6 @@ buf_flush_free_margin(void)
}
}
-#ifdef UNIV_DEBUG
/**********************************************************************
Validates the flush list. */
static
@@ -936,4 +927,3 @@ buf_flush_validate(void)
return(ret);
}
-#endif /* UNIV_DEBUG */
diff --git a/innobase/buf/buf0lru.c b/innobase/buf/buf0lru.c
index 8ad47487607..0ced7e23abe 100644
--- a/innobase/buf/buf0lru.c
+++ b/innobase/buf/buf0lru.c
@@ -125,13 +125,11 @@ buf_LRU_search_and_free_block(
if (buf_flush_ready_for_replace(block)) {
-#ifdef UNIV_DEBUG
if (buf_debug_prints) {
fprintf(stderr,
"Putting space %lu page %lu to free list\n",
block->space, block->offset);
}
-#endif /* UNIV_DEBUG */
buf_LRU_block_remove_hashed_page(block);
@@ -707,7 +705,6 @@ buf_LRU_block_free_hashed_page(
buf_LRU_block_free_non_file_page(block);
}
-#ifdef UNIV_DEBUG
/**************************************************************************
Validates the LRU list. */
@@ -838,4 +835,3 @@ buf_LRU_print(void)
mutex_exit(&(buf_pool->mutex));
}
-#endif /* UNIV_DEBUG */
diff --git a/innobase/buf/buf0rea.c b/innobase/buf/buf0rea.c
index 7de778a5956..83397c9c7fa 100644
--- a/innobase/buf/buf0rea.c
+++ b/innobase/buf/buf0rea.c
@@ -101,13 +101,11 @@ buf_read_page_low(
block = buf_page_init_for_read(mode, space, offset);
if (block != NULL) {
-#ifdef UNIV_DEBUG
if (buf_debug_prints) {
fprintf(stderr,
"Posting read request for page %lu, sync %lu\n",
offset, sync);
}
-#endif /* UNIV_DEBUG */
fil_io(OS_FILE_READ | wake_later,
sync, space, offset, 0, UNIV_PAGE_SIZE,
@@ -244,13 +242,11 @@ buf_read_ahead_random(
os_aio_simulated_wake_handler_threads();
-#ifdef UNIV_DEBUG
if (buf_debug_prints && (count > 0)) {
fprintf(stderr,
"Random read-ahead space %lu offset %lu pages %lu\n",
space, offset, count);
}
-#endif /* UNIV_DEBUG */
return(count);
}
@@ -504,13 +500,11 @@ buf_read_ahead_linear(
/* Flush pages from the end of the LRU list if necessary */
buf_flush_free_margin();
-#ifdef UNIV_DEBUG
if (buf_debug_prints && (count > 0)) {
fprintf(stderr,
"LINEAR read-ahead space %lu offset %lu pages %lu\n",
space, offset, count);
}
-#endif /* UNIV_DEBUG */
return(count);
}
@@ -555,13 +549,11 @@ buf_read_ibuf_merge_pages(
/* Flush pages from the end of the LRU list if necessary */
buf_flush_free_margin();
-#ifdef UNIV_DEBUG
if (buf_debug_prints) {
fprintf(stderr,
"Ibuf merge read-ahead space %lu pages %lu\n",
space, n_stored);
}
-#endif /* UNIV_DEBUG */
}
/************************************************************************
@@ -621,10 +613,8 @@ buf_read_recv_pages(
/* Flush pages from the end of the LRU list if necessary */
buf_flush_free_margin();
-#ifdef UNIV_DEBUG
if (buf_debug_prints) {
fprintf(stderr,
"Recovery applies read-ahead pages %lu\n", n_stored);
}
-#endif /* UNIV_DEBUG */
}