diff options
author | unknown <marko@hundin.mysql.fi> | 2005-04-21 15:27:18 +0300 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2005-04-21 15:27:18 +0300 |
commit | c546b5f3b566d3e2b0e970c0313244823cb8c9a8 (patch) | |
tree | 95a3466cc1d65218a2a4fe27570c376a7910f3a8 /innobase/include/ut0dbg.h | |
parent | 87c4f37a5009bc1b0889c7a3dfc316d47e9fb9f8 (diff) | |
download | mariadb-git-c546b5f3b566d3e2b0e970c0313244823cb8c9a8.tar.gz |
InnoDB: Make branch prediction assume that assertions do not fail.
innobase/include/ut0dbg.h:
Remove ut_dbg_zero.
Use the UNIV_UNLIKELY() macro in assertions in order to assist branch
prediction.
innobase/ut/ut0dbg.c:
Remove ut_dbg_zero.
Diffstat (limited to 'innobase/include/ut0dbg.h')
-rw-r--r-- | innobase/include/ut0dbg.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/innobase/include/ut0dbg.h b/innobase/include/ut0dbg.h index 5f30a894874..a0af0e2f0ad 100644 --- a/innobase/include/ut0dbg.h +++ b/innobase/include/ut0dbg.h @@ -13,8 +13,6 @@ Created 1/30/1994 Heikki Tuuri #include <stdlib.h> #include "os0thread.h" -extern ulint ut_dbg_zero; /* This is used to eliminate - compiler warnings */ extern ibool ut_dbg_stop_threads; extern ulint* ut_dbg_null_ptr; @@ -26,7 +24,7 @@ extern const char* ut_dbg_msg_stop; #ifdef __NETWARE__ extern ibool panic_shutdown; #define ut_a(EXPR) do {\ - if (!((ulint)(EXPR) + ut_dbg_zero)) {\ + if (UNIV_UNLIKELY(!((ulint)(EXPR)))) {\ ut_print_timestamp(stderr);\ fprintf(stderr, ut_dbg_msg_assert_fail,\ os_thread_pf(os_thread_get_curr_id()), __FILE__,\ @@ -55,7 +53,7 @@ extern ibool panic_shutdown; } while (0) #else #define ut_a(EXPR) do {\ - if (!((ulint)(EXPR) + ut_dbg_zero)) {\ + if (UNIV_UNLIKELY(!((ulint)(EXPR)))) {\ ut_print_timestamp(stderr);\ fprintf(stderr, ut_dbg_msg_assert_fail,\ os_thread_pf(os_thread_get_curr_id()), __FILE__,\ |