trace_class.accept(environment_visitor);
trace_class_fragment["environment"] = environment_visitor.move_fragment();
- const auto packet_header = trace_class.get_packet_header();
+ const auto packet_header = trace_class.packet_header();
if (packet_header) {
::ctf2::field_visitor field_visitor;
*stream_class.default_clock_class_name;
}
- const auto packet_context = stream_class.get_packet_context();
+ const auto packet_context = stream_class.packet_context();
if (packet_context) {
::ctf2::field_visitor visitor;
stream_class_fragment["packet-context-field-class"] = visitor.move_fragment();
}
- const auto event_header = stream_class.get_event_header();
+ const auto event_header = stream_class.event_header();
if (event_header) {
::ctf2::field_visitor visitor;
visitor.move_fragment();
}
- const auto event_context = stream_class.get_event_context();
+ const auto event_context = stream_class.event_context();
if (event_context) {
::ctf2::field_visitor visitor;
_accept_on_event_classes(visitor);
}
-const lttng::sessiond::trace::type *lst::stream_class::get_packet_context() const
+const lttng::sessiond::trace::type *lst::stream_class::packet_context() const
{
return _packet_context.get();
}
-const lttng::sessiond::trace::type *lst::stream_class::get_event_header() const
+const lttng::sessiond::trace::type *lst::stream_class::event_header() const
{
return _event_header.get();
}
-const lttng::sessiond::trace::type *lst::stream_class::get_event_context() const
+const lttng::sessiond::trace::type *lst::stream_class::event_context() const
{
return _event_context.get();
}
void accept(trace_class_visitor& visitor) const;
virtual ~stream_class() = default;
- virtual const type* get_packet_context() const;
- virtual const type* get_event_header() const;
- virtual const type* get_event_context() const;
+ virtual const type* packet_context() const;
+ virtual const type* event_header() const;
+ virtual const type* event_context() const;
const unsigned int id;
/*
*/
virtual void accept(trace_class_visitor& trace_class_visitor) const;
virtual void accept(trace_class_environment_visitor& environment_visitor) const = 0;
- virtual const lttng::sessiond::trace::type *get_packet_header() const noexcept = 0;
+ virtual const lttng::sessiond::trace::type *packet_header() const noexcept = 0;
const struct abi abi;
const lttng_uuid uuid;
tsdl_field_visitor packet_header_visitor{trace_class.abi, 1, _sanitized_types_overrides};
- trace_class.get_packet_header()->accept(packet_header_visitor);
+ trace_class.packet_header()->accept(packet_header_visitor);
/* Declare type aliases, trace class, and packet header. */
auto trace_class_tsdl = fmt::format(
return _lookup_field_type(location);
});
- const auto *event_header = stream_class.get_event_header();
+ const auto *event_header = stream_class.event_header();
if (event_header) {
tsdl_field_visitor event_header_visitor{_trace_abi, 1, _sanitized_types_overrides,
stream_class.default_clock_class_name};
event_header_visitor.move_description());
}
- const auto *packet_context = stream_class.get_packet_context();
+ const auto *packet_context = stream_class.packet_context();
if (packet_context) {
tsdl_field_visitor packet_context_visitor{_trace_abi, 1, _sanitized_types_overrides,
stream_class.default_clock_class_name};
packet_context_visitor.move_description());
}
- const auto *event_context = stream_class.get_event_context();
+ const auto *event_context = stream_class.event_context();
if (event_context) {
tsdl_field_visitor event_context_visitor{_trace_abi, 1, _sanitized_types_overrides};
switch (location.root_) {
case lst::field_location::root::PACKET_HEADER:
return lookup_type_from_root_type(
- *_current_trace_class->get_packet_header(), location);
+ *_current_trace_class->packet_header(), location);
case lst::field_location::root::PACKET_CONTEXT:
return lookup_type_from_root_type(
- *_current_stream_class->get_packet_context(), location);
+ *_current_stream_class->packet_context(), location);
case lst::field_location::root::EVENT_RECORD_HEADER:
return lookup_type_from_root_type(
- *_current_stream_class->get_event_header(), location);
+ *_current_stream_class->event_header(), location);
case lst::field_location::root::EVENT_RECORD_COMMON_CONTEXT:
return lookup_type_from_root_type(
- *_current_stream_class->get_event_context(), location);
+ *_current_stream_class->event_context(), location);
case lst::field_location::root::EVENT_RECORD_PAYLOAD:
return lookup_type_from_root_type(
*_current_event_class->payload, location);
{
auto locked_registry = reg_uid->registry->reg.ust->lock();
- auto& ust_reg_chan = locked_registry->get_channel(ua_chan->tracing_channel_id);
+ auto& ust_reg_chan = locked_registry->channel(ua_chan->tracing_channel_id);
ust_reg_chan._consumer_key = ua_chan->key;
}
{
auto locked_registry = registry->lock();
- auto& ust_reg_chan = locked_registry->get_channel(chan_reg_key);
+ auto& ust_reg_chan = locked_registry->channel(chan_reg_key);
ust_reg_chan._consumer_key = ua_chan->key;
}
chan_reg_key = ua_chan->key;
}
- auto& ust_reg_chan = locked_registry_session->get_channel(chan_reg_key);
+ auto& ust_reg_chan = locked_registry_session->channel(chan_reg_key);
/* Channel id is set during the object creation. */
chan_id = ust_reg_chan.id;
0, std::move(app_context_fields)) :
nullptr;
- ust_reg_chan.set_event_context(std::move(event_context));
+ ust_reg_chan.event_context(std::move(event_context));
} else {
/*
* Validate that the context fields match between
* registry and newcoming application.
*/
bool context_fields_match;
- const auto *previous_event_context = ust_reg_chan.get_event_context();
+ const auto *previous_event_context = ust_reg_chan.event_context();
if (!previous_event_context) {
context_fields_match = app_context_fields.size() == 0;
* These three variables MUST NOT be read/write after this.
*/
try {
- auto& channel = locked_registry->get_channel(chan_reg_key);
+ auto& channel = locked_registry->channel(chan_reg_key);
/* event_id is set on success. */
channel.add_event(sobjd, cobjd, name, signature.get(),
} else {
{
auto locked_registry = registry->lock();
- auto& ust_reg_chan = registry->get_channel(chan_reg_key);
+ auto& ust_reg_chan = registry->channel(chan_reg_key);
chan_id = ust_reg_chan.id;
}
const auto trace_native_byte_order = session.abi.byte_order;
const session_attributes session_attributes{
[&session](const char *enum_name, uint64_t enum_id) {
- return session.get_enumeration(enum_name, enum_id);
+ return session.enumeration(enum_name, enum_id);
},
trace_native_byte_order};
/* Location of field being created. */
lttng_ht_destroy(_events);
}
-const lttng::sessiond::trace::type* lsu::registry_channel::get_event_context() const
+const lttng::sessiond::trace::type* lsu::registry_channel::event_context() const
{
LTTNG_ASSERT(_is_registered);
- return lst::stream_class::get_event_context();
+ return lst::stream_class::event_context();
}
-void lsu::registry_channel::set_event_context(lttng::sessiond::trace::type::cuptr context)
+void lsu::registry_channel::event_context(lttng::sessiond::trace::type::cuptr context)
{
/* Must only be set once, on the first channel registration provided by an application. */
LTTNG_ASSERT(!_event_context);
uint32_t& out_event_id);
virtual ~registry_channel();
- virtual const lttng::sessiond::trace::type *get_event_context() const override final;
- void set_event_context(lttng::sessiond::trace::type::cuptr context);
+ virtual const lttng::sessiond::trace::type *event_context() const override final;
+ void event_context(lttng::sessiond::trace::type::cuptr context);
/* Channel was registered to at least one application. */
bool is_registered() const;
_generate_metadata();
}
-lttng_buffer_type lsu::registry_session_per_pid::get_buffering_scheme() const noexcept
+lttng_buffer_type lsu::registry_session_per_pid::buffering_scheme() const noexcept
{
return LTTNG_BUFFER_PER_PID;
}
gid_t egid,
uint64_t tracing_id);
- virtual lttng_buffer_type get_buffering_scheme() const noexcept override final;
+ virtual lttng_buffer_type buffering_scheme() const noexcept override final;
virtual void accept(lttng::sessiond::trace::trace_class_environment_visitor&
environment_visitor) const override final;
_generate_metadata();
}
-lttng_buffer_type lsu::registry_session_per_uid::get_buffering_scheme() const noexcept
+lttng_buffer_type lsu::registry_session_per_uid::buffering_scheme() const noexcept
{
return LTTNG_BUFFER_PER_UID;
}
uint64_t tracing_id,
uid_t tracing_uid);
- virtual lttng_buffer_type get_buffering_scheme() const noexcept override final;
+ virtual lttng_buffer_type buffering_scheme() const noexcept override final;
virtual void accept(lttng::sessiond::trace::trace_class_environment_visitor&
environment_visitor) const override final;
return lttng::make_unique<lst::structure_type>(0, std::move(packet_header_fields));
}
-const lst::type *lsu::registry_session::get_packet_header() const noexcept
+const lst::type *lsu::registry_session::packet_header() const noexcept
{
return _packet_header.get();
}
lttng_ht_add_unique_u64(_channels.get(), &chan->_node);
}
-lttng::sessiond::ust::registry_channel& lsu::registry_session::get_channel(
+lttng::sessiond::ust::registry_channel& lsu::registry_session::channel(
uint64_t channel_key) const
{
lttng::urcu::read_lock_guard read_lock_guard;
lttng::urcu::read_lock_guard read_lock_guard;
ASSERT_LOCKED(_lock);
- auto& channel = get_channel(channel_key);
+ auto& channel_to_remove = channel(channel_key);
- iter.iter.node = &channel._node.node;
+ iter.iter.node = &channel_to_remove._node.node;
ret = lttng_ht_del(_channels.get(), &iter);
LTTNG_ASSERT(!ret);
- destroy_channel(&channel, notify);
+ destroy_channel(&channel_to_remove, notify);
}
void lsu::registry_session::accept(
visitor.visit(lst::environment_field<int64_t>("tracer_major", _app_tracer_version.major));
visitor.visit(lst::environment_field<int64_t>("tracer_minor", _app_tracer_version.minor));
visitor.visit(lst::environment_field<const char *>("tracer_buffering_scheme",
- get_buffering_scheme() == LTTNG_BUFFER_PER_PID ? "pid" : "uid"));
+ buffering_scheme() == LTTNG_BUFFER_PER_PID ? "pid" : "uid"));
visitor.visit(lst::environment_field<int64_t>("architecture_bit_width", abi.bits_per_long));
{
* disposes of the object.
*/
lsu::registry_enum::const_rcu_protected_reference
-lsu::registry_session::get_enumeration(const char *enum_name, uint64_t enum_id) const
+lsu::registry_session::enumeration(const char *enum_name, uint64_t enum_id) const
{
lsu::registry_enum *reg_enum = NULL;
struct lttng_ht_node_str *node;
details::locked_registry_session_release>::
deleter>;
- virtual lttng_buffer_type get_buffering_scheme() const noexcept = 0;
+ virtual lttng_buffer_type buffering_scheme() const noexcept = 0;
locked_ptr lock() noexcept;
void add_channel(uint64_t channel_key);
/* A channel is protected by its parent registry session's lock. */
- lttng::sessiond::ust::registry_channel& get_channel(uint64_t channel_key) const;
+ lttng::sessiond::ust::registry_channel& channel(uint64_t channel_key) const;
void remove_channel(uint64_t channel_key, bool notify);
struct lttng_ust_ctl_enum_entry *raw_entries,
size_t nr_entries,
uint64_t *enum_id);
- registry_enum::const_rcu_protected_reference get_enumeration(
+ registry_enum::const_rcu_protected_reference enumeration(
const char *enum_name, uint64_t enum_id) const;
void regenerate_metadata();
virtual ~registry_session();
- virtual const lttng::sessiond::trace::type *get_packet_header() const noexcept override;
+ virtual const lttng::sessiond::trace::type *packet_header() const noexcept override;
/*
* With multiple writers and readers, use this lock to access