summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-06-04 10:24:10 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-06-04 10:24:10 +0300
commiteba2d10ac53d1d2f975027ba2b2ca39d9c9b98ad (patch)
tree7389791492884dd232c5ddc84e53e70a0a725770 /include
parentad2bf1129cfa85c00072b46e0355fe14bf69ee54 (diff)
downloadmariadb-git-eba2d10ac53d1d2f975027ba2b2ca39d9c9b98ad.tar.gz
MDEV-22721 Remove bloat caused by InnoDB logger class
Introduce a new ATTRIBUTE_NOINLINE to ib::logger member functions, and add UNIV_UNLIKELY hints to callers. Also, remove some crash reporting output. If needed, the information will be available using debugging tools. Furthermore, remove some fts_enable_diag_print output that included indexed words in raw form. The code seemed to assume that words are NUL-terminated byte strings. It is not clear whether a NUL terminator is always guaranteed to be present. Also, UCS2 or UTF-16 strings would typically contain many NUL bytes.
Diffstat (limited to 'include')
-rw-r--r--include/my_compiler.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/my_compiler.h b/include/my_compiler.h
index 12e6c1a087c..faffd852b5d 100644
--- a/include/my_compiler.h
+++ b/include/my_compiler.h
@@ -2,6 +2,7 @@
#define MY_COMPILER_INCLUDED
/* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2017, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -150,6 +151,7 @@ struct my_aligned_storage
#ifdef __GNUC__
# define ATTRIBUTE_NORETURN __attribute__((noreturn))
+# define ATTRIBUTE_NOINLINE __attribute__((noinline))
# if MY_GNUC_PREREQ(4,3)
/** Starting with GCC 4.3, the "cold" attribute is used to inform the
compiler that a function is unlikely executed. The function is
@@ -163,8 +165,10 @@ rarely invoked function for size instead for speed. */
# endif
#elif defined _MSC_VER
# define ATTRIBUTE_NORETURN __declspec(noreturn)
+# define ATTRIBUTE_NOINLINE __declspec(noinline)
#else
# define ATTRIBUTE_NORETURN /* empty */
+# define ATTRIBUTE_NOINLINE /* empty */
#endif
#ifndef ATTRIBUTE_COLD