Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
4c8b65db
Commit
4c8b65db
authored
Sep 19, 2022
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup: Remove INNODB_COMPILER_HINTS
There should be no point to disable branch prediction hints or prefetch.
parent
c22dff21
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
18 deletions
+5
-18
storage/innobase/include/univ.i
storage/innobase/include/univ.i
+5
-10
storage/innobase/innodb.cmake
storage/innobase/innodb.cmake
+0
-8
No files found.
storage/innobase/include/univ.i
View file @
4c8b65db
...
...
@@ -504,7 +504,7 @@ contains the sum of the following flag and the locally stored len. */
#
endif
/* CHECK FOR GCC VER_GT_2 */
/* Some macros to improve branch prediction and reduce cache misses */
#
if
defined
(
COMPILER_HINTS
)
&
&
defined(__GNUC__)
#
if
def
__GNUC__
/* Tell the compiler that 'expr' probably evaluates to 'constant'. */
#
define
UNIV_EXPECT
(
expr
,
constant
)
__builtin_expect
(
expr
,
constant
)
/* Tell the compiler that a pointer is likely to be NULL */
...
...
@@ -524,16 +524,11 @@ it is read or written. */
#
define
UNIV_EXPECT
(
expr
,
value
)
(
expr
)
#
define
UNIV_LIKELY_NULL
(
expr
)
(
expr
)
#
if
defined
(
COMPILER_HINTS
)
//# define UNIV_PREFETCH_R(addr) sun_prefetch_read_many((void*) addr)
#
define
UNIV_PREFETCH_R
(
addr
)
((
void
)
0
)
#
define
UNIV_PREFETCH_RW
(
addr
)
sun_prefetch_write_many
(
addr
)
#
else
#
define
UNIV_PREFETCH_R
(
addr
)
((
void
)
0
)
#
define
UNIV_PREFETCH_RW
(
addr
)
((
void
)
0
)
#
endif
/* COMPILER_HINTS */
#
elif
defined
__WIN__
&
&
defined
COMPILER_HINTS
#
define
UNIV_PREFETCH_R
(
addr
)
((
void
)
0
)
#
define
UNIV_PREFETCH_RW
(
addr
)
sun_prefetch_write_many
(
addr
)
#
elif
defined
__WIN__
#
include
<
xmmintrin
.
h
>
#
define
UNIV_EXPECT
(
expr
,
value
)
(
expr
)
#
define
UNIV_LIKELY_NULL
(
expr
)
(
expr
)
...
...
storage/innobase/innodb.cmake
View file @
4c8b65db
...
...
@@ -70,14 +70,6 @@ IF(UNIX)
ENDIF
()
ENDIF
()
OPTION
(
INNODB_COMPILER_HINTS
"Compile InnoDB with compiler hints"
ON
)
MARK_AS_ADVANCED
(
INNODB_COMPILER_HINTS
)
IF
(
INNODB_COMPILER_HINTS
)
ADD_DEFINITIONS
(
"-DCOMPILER_HINTS"
)
ENDIF
()
ADD_FEATURE_INFO
(
INNODB_COMPILER_HINTS INNODB_COMPILER_HINTS
"InnoDB compiled with compiler hints"
)
SET
(
MUTEXTYPE
"event"
CACHE STRING
"Mutex type: event, sys or futex"
)
IF
(
CMAKE_CXX_COMPILER_ID MATCHES
"GNU"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment