From ad22a9a2289ad28fdf802253f0a630c107672c29 Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Tue, 6 Dec 2022 10:55:39 +0000 Subject: [PATCH] common: add debugs to crimson's green_condition_variable Signed-off-by: Radoslaw Zarzynski --- src/common/ceph_mutex.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/common/ceph_mutex.h b/src/common/ceph_mutex.h index 61cb650222048..8d87e605b84a5 100644 --- a/src/common/ceph_mutex.h +++ b/src/common/ceph_mutex.h @@ -17,6 +17,15 @@ #if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) #include +#include "crimson/common/log.h" +#include "include/ceph_assert.h" + +#ifndef NDEBUG +#define FUT_DEBUG(FMT_MSG, ...) crimson::get_logger(ceph_subsys_).trace(FMT_MSG, ##__VA_ARGS__) +#else +#define FUT_DEBUG(FMT_MSG, ...) +#endif + namespace ceph { // an empty class satisfying the mutex concept struct dummy_mutex { @@ -38,14 +47,18 @@ namespace ceph { struct green_condition_variable : private seastar::condition_variable { template void wait(LockT&&) { + FUT_DEBUG("green_condition_variable::{}: before blocking", __func__); seastar::condition_variable::wait().get(); + FUT_DEBUG("green_condition_variable::{}: after blocking", __func__); } void notify_one() noexcept { + FUT_DEBUG("green_condition_variable::{}", __func__); signal(); } void notify_all() noexcept { + FUT_DEBUG("green_condition_variable::{}", __func__); broadcast(); } }; -- 2.39.5