logging: use G_UNLIKELY in BT_LOG_ON macros
[babeltrace.git] / src / logging / log.h
index 25136ab7d99ce67114bf94e6834a9d9aabce686c..41370963d68c9638c382702298588b6c367b26a8 100644 (file)
@@ -644,9 +644,9 @@ bt_log_spec;
  * See BT_LOG_OUTPUT_LEVEL for details.
  */
 #define BT_LOG_ON_CUR_LVL(lvl, cur_lvl) \
-               (BT_LOG_ENABLED((lvl)) && (lvl) >= (cur_lvl))
+               G_UNLIKELY(BT_LOG_ENABLED((lvl)) && (lvl) >= (cur_lvl))
 #define BT_LOG_ON(lvl) \
-               (BT_LOG_ENABLED((lvl)) && (lvl) >= _BT_LOG_OUTPUT_LEVEL)
+               G_UNLIKELY(BT_LOG_ENABLED((lvl)) && (lvl) >= _BT_LOG_OUTPUT_LEVEL)
 #define BT_LOG_ON_TRACE     BT_LOG_ON(BT_LOG_TRACE)
 #define BT_LOG_ON_DEBUG     BT_LOG_ON(BT_LOG_DEBUG)
 #define BT_LOG_ON_INFO      BT_LOG_ON(BT_LOG_INFO)
This page took 0.024192 seconds and 4 git commands to generate.