MySQL 8.0.39
Source Code Documentation
|
Debug utilities for Innobase. More...
#include "my_compiler.h"
#include <cstdio>
#include <functional>
#include <sys/resource.h>
#include <sys/time.h>
#include <sys/types.h>
Go to the source code of this file.
Classes | |
class | ut_chrono_t |
A "chronometer" used to clock snippets of code. More... | |
Macros | |
#define | ut_a(EXPR) |
Abort execution if EXPR does not evaluate to nonzero. More... | |
#define | ut_error ut_dbg_assertion_failed(0, __FILE__, __LINE__) |
Abort execution. More... | |
#define | ut_ad(EXPR) ut_a(EXPR) |
Debug assertion. More... | |
#define | ut_d(EXPR) EXPR |
Debug statement. More... | |
#define | ut_o(EXPR) |
Opposite of ut_d(). More... | |
#define | DBUG_INJECT_CRASH(prefix, count) |
Debug crash point. More... | |
#define | DBUG_INJECT_CRASH_WITH_LOG_FLUSH(prefix, count) |
#define | UT_NOT_USED(A) std::ignore = A |
Silence warnings about an unused variable by doing a null assignment. More... | |
#define | HAVE_UT_CHRONO_T |
#define | timersub(a, b, r) |
#define | CHRONO_PRINT(type, tvp) |
Functions | |
void | ut_set_assert_callback (std::function< void()> &callback) |
Set a callback function to be called before exiting. More... | |
void | ut_dbg_assertion_failed (const char *expr, const char *file, uint64_t line) |
Report a failed assertion. More... | |
Debug utilities for Innobase.
Created 1/30/1994 Heikki Tuuri
#define CHRONO_PRINT | ( | type, | |
tvp | |||
) |
#define DBUG_INJECT_CRASH | ( | prefix, | |
count | |||
) |
Debug crash point.
#define DBUG_INJECT_CRASH_WITH_LOG_FLUSH | ( | prefix, | |
count | |||
) |
#define HAVE_UT_CHRONO_T |
#define timersub | ( | a, | |
b, | |||
r | |||
) |
#define ut_a | ( | EXPR | ) |
Abort execution if EXPR does not evaluate to nonzero.
EXPR | assertion expression that should hold |
#define ut_ad | ( | EXPR | ) | ut_a(EXPR) |
Debug assertion.
Does nothing unless UNIV_DEBUG is defined.
#define ut_d | ( | EXPR | ) | EXPR |
Debug statement.
Does nothing unless UNIV_DEBUG is defined.
#define ut_error ut_dbg_assertion_failed(0, __FILE__, __LINE__) |
Abort execution.
#define UT_NOT_USED | ( | A | ) | std::ignore = A |
Silence warnings about an unused variable by doing a null assignment.
A | the unused variable |
#define ut_o | ( | EXPR | ) |
Opposite of ut_d().
Does nothing if UNIV_DEBUG is defined.
void ut_dbg_assertion_failed | ( | const char * | expr, |
const char * | file, | ||
uint64_t | line | ||
) |
Report a failed assertion.
[in] | expr | The failed assertion |
[in] | file | Source file containing the assertion |
[in] | line | Line number of the assertion |
void ut_set_assert_callback | ( | std::function< void()> & | callback | ) |
Set a callback function to be called before exiting.
[in] | callback | user callback function |