Commit adcb90a0 authored by marko's avatar marko

Minor cleanup related to Bug #20877.

btr_print_recursive(): Replace tree->tree_indexes with tree->index.
This should have been done in r453.

univ.i: Add UNIV_BTR_PRINT.

rw_lock_t: Reduce writer_is_wait_ex to a bit and move it close to
other bitfields.  Change the types to unsigned, in case ulint or ibool
bitfields will not work.
parent 5df36be6
...@@ -2393,7 +2393,7 @@ btr_print_recursive( ...@@ -2393,7 +2393,7 @@ btr_print_recursive(
(ulong) btr_page_get_level(page, mtr), (ulong) btr_page_get_level(page, mtr),
(ulong) buf_frame_get_page_no(page)); (ulong) buf_frame_get_page_no(page));
index = UT_LIST_GET_FIRST(tree->tree_indexes); index = tree->tree_index;
page_print(page, index, width, width); page_print(page, index, width, width);
n_recs = page_get_n_recs(page); n_recs = page_get_n_recs(page);
......
...@@ -426,13 +426,6 @@ struct rw_lock_struct { ...@@ -426,13 +426,6 @@ struct rw_lock_struct {
waiters (readers or writers) in the global waiters (readers or writers) in the global
wait array, waiting for this rw_lock. wait array, waiting for this rw_lock.
Otherwise, == 0. */ Otherwise, == 0. */
ibool writer_is_wait_ex;
/* This is TRUE if the writer field is
RW_LOCK_WAIT_EX; this field is located far
from the memory update hotspot fields which
are at the start of this struct, thus we can
peek this field without causing much memory
bus traffic */
UT_LIST_NODE_T(rw_lock_t) list; UT_LIST_NODE_T(rw_lock_t) list;
/* All allocated rw locks are put into a /* All allocated rw locks are put into a
list */ list */
...@@ -443,11 +436,18 @@ struct rw_lock_struct { ...@@ -443,11 +436,18 @@ struct rw_lock_struct {
ulint level; /* Level in the global latching order. */ ulint level; /* Level in the global latching order. */
#endif /* UNIV_SYNC_DEBUG */ #endif /* UNIV_SYNC_DEBUG */
const char* cfile_name;/* File name where lock created */ const char* cfile_name;/* File name where lock created */
ulint cline:14; /* Line where created */
const char* last_s_file_name;/* File name where last s-locked */ const char* last_s_file_name;/* File name where last s-locked */
const char* last_x_file_name;/* File name where last x-locked */ const char* last_x_file_name;/* File name where last x-locked */
ulint last_s_line:14; /* Line number where last time s-locked */ unsigned writer_is_wait_ex:1;
ulint last_x_line:14; /* Line number where last time x-locked */ /* This is TRUE if the writer field is
RW_LOCK_WAIT_EX; this field is located far
from the memory update hotspot fields which
are at the start of this struct, thus we can
peek this field without causing much memory
bus traffic */
unsigned cline:14; /* Line where created */
unsigned last_s_line:14; /* Line number where last time s-locked */
unsigned last_x_line:14; /* Line number where last time x-locked */
ulint magic_n; ulint magic_n;
}; };
......
...@@ -91,6 +91,7 @@ memory is read outside the allocated blocks. */ ...@@ -91,6 +91,7 @@ memory is read outside the allocated blocks. */
#define UNIV_SYNC_PERF_STAT #define UNIV_SYNC_PERF_STAT
#define UNIV_SEARCH_PERF_STAT #define UNIV_SEARCH_PERF_STAT
#define UNIV_SRV_PRINT_LATCH_WAITS #define UNIV_SRV_PRINT_LATCH_WAITS
#define UNIV_BTR_PRINT
#endif #endif
#define UNIV_BTR_DEBUG #define UNIV_BTR_DEBUG
......
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