X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-registry-event.hpp;h=b38b09553c18d432f96b98a9a49eb254fdf2a4f3;hb=31375c424ac115fc0373237207fed795849e26ba;hp=08b18a5c7504da8cfa5c3efd10ac021f64a1d35f;hpb=d7bfb9b0fa35679d3e728b9165699d9faf905539;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/ust-registry-event.hpp b/src/bin/lttng-sessiond/ust-registry-event.hpp index 08b18a5c7..b38b09553 100644 --- a/src/bin/lttng-sessiond/ust-registry-event.hpp +++ b/src/bin/lttng-sessiond/ust-registry-event.hpp @@ -36,7 +36,7 @@ public: std::vector fields, int loglevel_value, nonstd::optional model_emf_uri); - virtual ~registry_event() = default; + ~registry_event() override = default; /* Both objd are set by the tracer. */ const int session_objd; @@ -53,7 +53,8 @@ public: * Node in the ust-registry hash table. The event name is used to * initialize the node and the event_name/signature for the match function. */ - struct lttng_ht_node_u64 _node; + struct cds_lfht_node _node; + struct rcu_head _head; }; void registry_event_destroy(registry_event *event); @@ -62,17 +63,23 @@ void registry_event_destroy(registry_event *event); } /* namespace sessiond */ } /* namespace lttng */ +/* + * Due to a bug in g++ < 7.1, this specialization must be enclosed in the fmt namespace, + * see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480. + */ +namespace fmt { template <> -struct fmt::formatter : fmt::formatter { - template - typename FormatCtx::iterator format( - const lttng::sessiond::ust::registry_event& event, FormatCtx& ctx) +struct formatter : formatter { + template + typename FormatContextType::iterator format( + const lttng::sessiond::ust::registry_event& event, FormatContextType& ctx) { - return fmt::format_to(ctx.out(), + return format_to(ctx.out(), "{{ name = `{}`, signature = `{}`, id = {}, session objd = {}, channel objd = {} }}", event.name, event.signature, event.id, event.session_objd, event.channel_objd); } }; +} /* namespace fmt */ #endif /* LTTNG_UST_REGISTRY_EVENT_H */