]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/common: DONOT call crimson::get_logger() if NDEBUG is defined
authorXuehan Xu <xxhdx1985126@gmail.com>
Tue, 7 Dec 2021 06:55:51 +0000 (14:55 +0800)
committerXuehan Xu <xxhdx1985126@gmail.com>
Tue, 14 Dec 2021 06:55:21 +0000 (14:55 +0800)
Avoid debug related perf degredation

Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
src/crimson/common/interruptible_future.h

index 9ae71a9c2893a30d10ef7e01909f489718178dd4..f5b73a35cf654e565cde0ddfe24a85dbb5477777 100644 (file)
 
 #include "crimson/common/log.h"
 #include "crimson/common/errorator.h"
-
+#ifndef NDEBUG
 #define INTR_FUT_DEBUG(FMT_MSG, ...) crimson::get_logger(ceph_subsys_).trace(FMT_MSG, ##__VA_ARGS__)
+#else
+#define INTR_FUT_DEBUG(FMT_MSG, ...)
+#endif
 
 // The interrupt condition generally works this way:
 //