DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_INVALID_OFFSETOF
lsu::registry_channel *chan =
- caa_container_of(head, lsu::registry_channel, _rcu_head);
+ lttng::utils::container_of(head, &lsu::registry_channel::_rcu_head);
DIAGNOSTIC_POP
delete chan;
* Destroy every element of the registry and free the memory. This does NOT
* free the registry pointer since it might not have been allocated before so
* it's the caller responsability.
+ *
+ * Called from ~registry_session(), must not throw.
*/
-void destroy_channel(lsu::registry_channel *chan, bool notify)
+void destroy_channel(lsu::registry_channel *chan, bool notify) noexcept
{
struct lttng_ht_iter iter;
lttng::sessiond::ust::registry_event *event;
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_INVALID_OFFSETOF
cds_lfht_for_each_entry(
- chan->_events->ht, &iter.iter, event, _node.node) {
+ chan->_events->ht, &iter.iter, event, _node) {
/* Delete the node from the ht and free it. */
ust_registry_channel_destroy_event(chan, event);
}
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_INVALID_OFFSETOF
lsu::registry_enum *reg_enum =
- caa_container_of(head, lsu::registry_enum, rcu_head);
+ lttng::utils::container_of(head, &lsu::registry_enum::rcu_head);
DIAGNOSTIC_POP
destroy_enum(reg_enum);
_gid{egid},
_app_tracer_version{.major = major, .minor = minor},
_tracing_id{tracing_id},
+ _clock{lttng::make_unique<lsu::clock_class>()},
_metadata_generating_visitor{lttng::make_unique<ls::tsdl::trace_class_visitor>(abi,
[this](const std::string& fragment) {
_append_metadata_fragment(fragment);
/*
* For a given enumeration in a registry, delete the entry and destroy
* the enumeration.
+ *
+ * Note that this is used by ~registry_session() and must not throw.
*/
-void lsu::registry_session::_destroy_enum(lsu::registry_enum *reg_enum)
+void lsu::registry_session::_destroy_enum(lsu::registry_enum *reg_enum) noexcept
{
int ret;
lttng::urcu::read_lock_guard read_lock_guard;
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_INVALID_OFFSETOF
- auto chan = caa_container_of(node, lsu::registry_channel, _node);
+ auto chan = lttng::utils::container_of(node, &lsu::registry_channel::_node);
DIAGNOSTIC_POP
return *chan;
}
void lsu::registry_session::_accept_on_clock_classes(lst::trace_class_visitor& visitor) const
{
ASSERT_LOCKED(_lock);
- _clock.accept(visitor);
+ _clock->accept(visitor);
}
void lsu::registry_session::_accept_on_stream_classes(lst::trace_class_visitor& visitor) const
{
lttng::pthread::lock_guard registry_lock(_lock);
+ /* Resample the clock */
+ _clock = lttng::make_unique<lsu::clock_class>();
+
_metadata_version++;
_reset_metadata();
_generate_metadata();
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_INVALID_OFFSETOF
- reg_enum = caa_container_of(node, lsu::registry_enum, node);
+ reg_enum = lttng::utils::container_of(node, &lsu::registry_enum::node);
DIAGNOSTIC_POP
return lsu::registry_enum::const_rcu_protected_reference{*reg_enum, std::move(rcu_lock)};
DIAGNOSTIC_PUSH
DIAGNOSTIC_IGNORE_INVALID_OFFSETOF
- reg_enum = caa_container_of(node, lsu::registry_enum, node);
+ reg_enum = lttng::utils::container_of(node, &lsu::registry_enum::node);
DIAGNOSTIC_POP
end:
DBG("UST registry reply with enum %s with id %" PRIu64 " in sess_objd: %u",
enum_name, reg_enum->id, session_objd);
*enum_id = reg_enum->id;
-}
\ No newline at end of file
+}