Below is the list of changes that have just been committed into a local
5.0 repository of marko. When marko does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1857 05/04/21 15:27:18 marko@stripped +2 -0
InnoDB: Make branch prediction assume that assertions do not fail.
innobase/ut/ut0dbg.c
1.8 05/04/21 15:27:10 marko@stripped +0 -3
Remove ut_dbg_zero.
innobase/include/ut0dbg.h
1.16 05/04/21 15:27:10 marko@stripped +2 -4
Remove ut_dbg_zero.
Use the UNIV_UNLIKELY() macro in assertions in order to assist branch
prediction.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: marko
# Host: hundin.mysql.fi
# Root: /home/marko/mysql-5.0
--- 1.15/innobase/include/ut0dbg.h Wed Aug 18 16:50:27 2004
+++ 1.16/innobase/include/ut0dbg.h Thu Apr 21 15:27:10 2005
@@ -13,8 +13,6 @@
#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 @@
#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 @@
} 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__,\
--- 1.7/innobase/ut/ut0dbg.c Wed Oct 6 15:09:38 2004
+++ 1.8/innobase/ut/ut0dbg.c Thu Apr 21 15:27:10 2005
@@ -8,9 +8,6 @@
#include "univ.i"
-/* This is used to eliminate compiler warnings */
-ulint ut_dbg_zero = 0;
-
/* If this is set to TRUE all threads will stop into the next assertion
and assert */
ibool ut_dbg_stop_threads = FALSE;
| Thread |
|---|
| • bk commit into 5.0 tree (marko:1.1857) | Marko Mäkelä | 21 Apr |