From 3b9e05f8d63fcd7408b7fa411642cf90bfa69cc9 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 28 Apr 2009 12:54:02 -0700 Subject: [PATCH] assert: turn off tls in assert macro About 3% cpu time --- src/include/assert.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/include/assert.h b/src/include/assert.h index fcf55dbb619a7..c20903216d5dc 100644 --- a/src/include/assert.h +++ b/src/include/assert.h @@ -28,7 +28,7 @@ extern void __ceph_assert_fail(const char *assertion, const char *file, int line, const char *function) __attribute__ ((__noreturn__)); extern void __ceph_assert_warn(const char *assertion, const char *file, int line, const char *function); -#if 0 +#if 1 #define assert(expr) \ ((expr) \ ? __CEPH_ASSERT_VOID_CAST (0) \ @@ -46,6 +46,7 @@ extern void __ceph_assert_warn(const char *assertion, const char *file, int line ? __CEPH_ASSERT_VOID_CAST (0) \ : __ceph_assert_fail (__STRING(expr), __FILE__, __LINE__, __ASSERT_FUNCTION)); \ } while (0) +#endif #define assert_warn(expr) \ ((expr) \ @@ -54,6 +55,7 @@ extern void __ceph_assert_warn(const char *assertion, const char *file, int line #define assert_protocol(expr) assert(expr) #define assert_disk(expr) assert(expr) -#endif + #endif + -- 2.39.5