}
};
+/*
+ Class debug_point is a helper intended for inserting debug tracepoints
+ in a least intrusive way.
+ The intention is to minimize both visual and code footprints.
+
+ In code, it should look like:
+ debug_async_compact(1);
+
+ Which should translate to:
+ if (debug_async_compact) debug_async_compact(1);
+
+ And in release builds be eliminated completely.
+*/
+template <class T>
+class debug_point_t {
+public:
+ debug_point_t() : m_func(nullptr) {};
+ debug_point_t(T&& func)
+ : m_func(func) {}
+ template<typename... Arg>
+ void operator()(Arg... arg) { if (m_func) m_func(std::forward<Arg...>(arg...)); }
+ void operator=(T&& func) { m_func = std::move(func);}
+ void operator=(T& func) { m_func = func;}
+private:
+ T m_func;
+};
+
+
+
class BlueFS {
public:
CephContext* cct;