Commit a0b11b90 authored by Daniel Black's avatar Daniel Black

Remove btr_search_n_succ and btr_search_n_hash_fail counters

parent 54332b27
...@@ -50,13 +50,6 @@ UNIV_INTERN char btr_search_enabled = TRUE; ...@@ -50,13 +50,6 @@ UNIV_INTERN char btr_search_enabled = TRUE;
/** A dummy variable to fool the compiler */ /** A dummy variable to fool the compiler */
UNIV_INTERN ulint btr_search_this_is_zero = 0; UNIV_INTERN ulint btr_search_this_is_zero = 0;
#ifdef UNIV_SEARCH_PERF_STAT
/** Number of successful adaptive hash index lookups */
UNIV_INTERN ulint btr_search_n_succ = 0;
/** Number of failed adaptive hash index lookups */
UNIV_INTERN ulint btr_search_n_hash_fail = 0;
#endif /* UNIV_SEARCH_PERF_STAT */
/** padding to prevent other memory update /** padding to prevent other memory update
hotspots from residing on the same memory hotspots from residing on the same memory
cache line as btr_search_latch */ cache line as btr_search_latch */
...@@ -651,10 +644,6 @@ btr_search_info_update_slow( ...@@ -651,10 +644,6 @@ btr_search_info_update_slow(
if (cursor->flag == BTR_CUR_HASH_FAIL) { if (cursor->flag == BTR_CUR_HASH_FAIL) {
/* Update the hash node reference, if appropriate */ /* Update the hash node reference, if appropriate */
#ifdef UNIV_SEARCH_PERF_STAT
btr_search_n_hash_fail++;
#endif /* UNIV_SEARCH_PERF_STAT */
rw_lock_x_lock(&btr_search_latch); rw_lock_x_lock(&btr_search_latch);
btr_search_update_hash_ref(info, block, cursor); btr_search_update_hash_ref(info, block, cursor);
...@@ -1010,9 +999,6 @@ btr_search_guess_on_hash( ...@@ -1010,9 +999,6 @@ btr_search_guess_on_hash(
#endif #endif
info->last_hash_succ = TRUE; info->last_hash_succ = TRUE;
#ifdef UNIV_SEARCH_PERF_STAT
btr_search_n_succ++;
#endif
if (UNIV_LIKELY(!has_search_latch) if (UNIV_LIKELY(!has_search_latch)
&& buf_page_peek_if_too_old(&block->page)) { && buf_page_peek_if_too_old(&block->page)) {
......
...@@ -256,13 +256,6 @@ struct btr_search_sys_t{ ...@@ -256,13 +256,6 @@ struct btr_search_sys_t{
/** The adaptive hash index */ /** The adaptive hash index */
extern btr_search_sys_t* btr_search_sys; extern btr_search_sys_t* btr_search_sys;
#ifdef UNIV_SEARCH_PERF_STAT
/** Number of successful adaptive hash index lookups */
extern ulint btr_search_n_succ;
/** Number of failed adaptive hash index lookups */
extern ulint btr_search_n_hash_fail;
#endif /* UNIV_SEARCH_PERF_STAT */
/** After change in n_fields or n_bytes in info, this many rounds are waited /** After change in n_fields or n_bytes in info, this many rounds are waited
before starting the hash analysis again: this is to save CPU time when there before starting the hash analysis again: this is to save CPU time when there
is no hope in building a hash index. */ is no hope in building a hash index. */
......
...@@ -53,13 +53,6 @@ UNIV_INTERN ulint btr_search_index_num; ...@@ -53,13 +53,6 @@ UNIV_INTERN ulint btr_search_index_num;
/** A dummy variable to fool the compiler */ /** A dummy variable to fool the compiler */
UNIV_INTERN ulint btr_search_this_is_zero = 0; UNIV_INTERN ulint btr_search_this_is_zero = 0;
#ifdef UNIV_SEARCH_PERF_STAT
/** Number of successful adaptive hash index lookups */
UNIV_INTERN ulint btr_search_n_succ = 0;
/** Number of failed adaptive hash index lookups */
UNIV_INTERN ulint btr_search_n_hash_fail = 0;
#endif /* UNIV_SEARCH_PERF_STAT */
/** padding to prevent other memory update /** padding to prevent other memory update
hotspots from residing on the same memory hotspots from residing on the same memory
cache line as btr_search_latch */ cache line as btr_search_latch */
...@@ -698,10 +691,6 @@ btr_search_info_update_slow( ...@@ -698,10 +691,6 @@ btr_search_info_update_slow(
if (cursor->flag == BTR_CUR_HASH_FAIL) { if (cursor->flag == BTR_CUR_HASH_FAIL) {
/* Update the hash node reference, if appropriate */ /* Update the hash node reference, if appropriate */
#ifdef UNIV_SEARCH_PERF_STAT
btr_search_n_hash_fail++;
#endif /* UNIV_SEARCH_PERF_STAT */
rw_lock_x_lock(btr_search_get_latch(cursor->index)); rw_lock_x_lock(btr_search_get_latch(cursor->index));
btr_search_update_hash_ref(info, block, cursor); btr_search_update_hash_ref(info, block, cursor);
...@@ -1059,7 +1048,6 @@ btr_search_guess_on_hash( ...@@ -1059,7 +1048,6 @@ btr_search_guess_on_hash(
info->last_hash_succ = TRUE; info->last_hash_succ = TRUE;
#ifdef UNIV_SEARCH_PERF_STAT #ifdef UNIV_SEARCH_PERF_STAT
btr_search_n_succ++;
#endif #endif
if (UNIV_LIKELY(!has_search_latch) if (UNIV_LIKELY(!has_search_latch)
&& buf_page_peek_if_too_old(&block->page)) { && buf_page_peek_if_too_old(&block->page)) {
......
...@@ -332,13 +332,6 @@ struct btr_search_sys_t{ ...@@ -332,13 +332,6 @@ struct btr_search_sys_t{
/** The adaptive hash index */ /** The adaptive hash index */
extern btr_search_sys_t* btr_search_sys; extern btr_search_sys_t* btr_search_sys;
#ifdef UNIV_SEARCH_PERF_STAT
/** Number of successful adaptive hash index lookups */
extern ulint btr_search_n_succ;
/** Number of failed adaptive hash index lookups */
extern ulint btr_search_n_hash_fail;
#endif /* UNIV_SEARCH_PERF_STAT */
/** After change in n_fields or n_bytes in info, this many rounds are waited /** After change in n_fields or n_bytes in info, this many rounds are waited
before starting the hash analysis again: this is to save CPU time when there before starting the hash analysis again: this is to save CPU time when there
is no hope in building a hash index. */ is no hope in building a hash index. */
......
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