50 if (UNIV_UNLIKELY(!(ulint)(EXPR))) { \ 51 ut_dbg_assertion_failed(#EXPR, __FILE__, (ulint)__LINE__); \ 56 #define ut_error ut_dbg_assertion_failed(0, __FILE__, (ulint)__LINE__) 60 #define ut_ad(EXPR) ut_a(EXPR) 62 #define ut_d(EXPR) EXPR 72 #define DBUG_INJECT_CRASH(prefix, count) \ 75 snprintf(buf, sizeof buf, prefix "_%u", count); \ 76 DBUG_EXECUTE_IF(buf, DBUG_SUICIDE();); \ 79 #define DBUG_INJECT_CRASH(prefix, count) 84 #define UT_NOT_USED(A) A = A 86 #if defined(HAVE_SYS_TIME_H) && defined(HAVE_SYS_RESOURCE_H) 88 #define HAVE_UT_CHRONO_T 90 #include <sys/resource.h> 92 #include <sys/types.h> 104 ut_chrono_t(
const char *
name) : m_name(name), m_show_from_destructor(
true) {
110 gettimeofday(&m_tv,
NULL);
118 struct timeval tv_now;
119 struct timeval tv_diff;
123 gettimeofday(&tv_now,
NULL);
126 #define timersub(a, b, r) \ 128 (r)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ 129 (r)->tv_usec = (a)->tv_usec - (b)->tv_usec; \ 130 if ((r)->tv_usec < 0) { \ 132 (r)->tv_usec += 1000000; \ 137 #define CHRONO_PRINT(type, tvp) \ 138 fprintf(stderr, "%s: %s% 5ld.%06ld sec\n", m_name, type, \ 139 static_cast<long>((tvp)->tv_sec), static_cast<long>((tvp)->tv_usec)) 152 void end() { m_show_from_destructor =
false; }
156 if (m_show_from_destructor) {
166 bool m_show_from_destructor;
#define timersub(a, b, r)
const string name("\ame\)
The interface to the operating system process and thread control primitives.
#define RUSAGE_SELF
Definition: win32.h:40
Sergei Dialog Client Authentication NULL
Definition: dialog.cc:352
struct timeval ru_stime
Definition: win32.h:64
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:191
int getrusage(int who, struct rusage *rusage)
Definition: win32.c:225
struct timeval ru_utime
Definition: win32.h:62
#define CHRONO_PRINT(type, tvp)
void ut_dbg_assertion_failed(const char *expr, const char *file, ulint line)
Report a failed assertion.
Definition: ut0dbg.cc:45