From eba2d10ac53d1d2f975027ba2b2ca39d9c9b98ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 4 Jun 2020 10:24:10 +0300 Subject: 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. --- include/my_compiler.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') 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 -- cgit v1.2.1