summaryrefslogtreecommitdiff
path: root/innobase/include/trx0rseg.ic
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2005-04-22 14:04:18 +0300
committerunknown <marko@hundin.mysql.fi>2005-04-22 14:04:18 +0300
commit98dc4142b206ea3fcf1d7b4bd127baef1aeac2d4 (patch)
treee0d005c35a0eef1e1ffe58afae9a7cc2b6e1777f /innobase/include/trx0rseg.ic
parentf2c13c3f4fa493e4054e9d6c34a82d80af2bbafc (diff)
downloadmariadb-git-98dc4142b206ea3fcf1d7b4bd127baef1aeac2d4.tar.gz
InnoDB: Some low-level optimizations made based on OProfile results.
innobase/dict/dict0mem.c: dict_mem_table_create(): Add a debug assertion. innobase/include/btr0btr.ic: btr_node_ptr_get_child_page_no(): Add a UNIV_UNLIKELY hint. Remove a buf_frame_align() call. innobase/include/btr0cur.ic: btr_cur_get_page(): Add a debug assertion. innobase/include/buf0buf.ic: buf_block_peek_if_too_old(): Replace if() with return(). buf_block_align(), buf_frame_align(): Add UNIV_UNLIKELY hints. innobase/include/data0type.ic: dtype_get_fixed_size(): Add UNIV_UNLIKELY hints. innobase/include/mem0mem.ic: Remove signedness warning in debug assertion. innobase/include/read0read.ic: read_view_sees_trx_id(): Eliminate a comparison inside loop. innobase/include/row0sel.ic: open_step(): Add UNIV_EXPECT hint. innobase/include/row0upd.ic: upd_field_set_field_no(): Add a UNIV_UNLIKELY hint. innobase/include/sync0rw.ic: Add UNIV_LIKELY and UNIV_UNLIKELY hints. rw_lock_x_lock_func_nowait(): Eliminate a function call. Replace ut_a() assertions with ut_ad(). innobase/include/trx0rseg.ic: Add UNIV_UNLIKELY hints. innobase/include/ut0rnd.ic: ut_fold_binary(): Eliminate a loop variable to avoid register spilling on x86.
Diffstat (limited to 'innobase/include/trx0rseg.ic')
-rw-r--r--innobase/include/trx0rseg.ic4
1 files changed, 2 insertions, 2 deletions
diff --git a/innobase/include/trx0rseg.ic b/innobase/include/trx0rseg.ic
index 35e927f5e79..c9ac50ebf16 100644
--- a/innobase/include/trx0rseg.ic
+++ b/innobase/include/trx0rseg.ic
@@ -65,7 +65,7 @@ trx_rsegf_get_nth_undo(
ulint n, /* in: index of slot */
mtr_t* mtr) /* in: mtr */
{
- if (n >= TRX_RSEG_N_SLOTS) {
+ if (UNIV_UNLIKELY(n >= TRX_RSEG_N_SLOTS)) {
fprintf(stderr,
"InnoDB: Error: trying to get slot %lu of rseg\n", (unsigned long) n);
ut_error;
@@ -86,7 +86,7 @@ trx_rsegf_set_nth_undo(
ulint page_no,/* in: page number of the undo log segment */
mtr_t* mtr) /* in: mtr */
{
- if (n >= TRX_RSEG_N_SLOTS) {
+ if (UNIV_UNLIKELY(n >= TRX_RSEG_N_SLOTS)) {
fprintf(stderr,
"InnoDB: Error: trying to set slot %lu of rseg\n", (unsigned long) n);
ut_error;