mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
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.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user