#include <common/uri.hpp>
int relayd_live_create(struct lttng_uri *live_uri);
-int relayd_live_stop(void);
-int relayd_live_join(void);
+int relayd_live_stop();
+int relayd_live_join();
#endif /* LTTNG_RELAYD_LIVE_H */
extern struct fd_tracker *the_fd_tracker;
-void lttng_relay_notify_ready(void);
-int lttng_relay_stop_threads(void);
+void lttng_relay_notify_ready();
+int lttng_relay_stop_threads();
-int relayd_init_thread_quit_pipe(void);
-int relayd_notify_thread_quit_pipe(void);
-void relayd_close_thread_quit_pipe(void);
+int relayd_init_thread_quit_pipe();
+int relayd_notify_thread_quit_pipe();
+void relayd_close_thread_quit_pipe();
bool relayd_is_thread_quit_pipe(const int fd);
int create_named_thread_poll_set(struct lttng_poll_event *events, int size, const char *name);
bool session_has_ongoing_rotation(const struct relay_session *session);
-void print_sessions(void);
+void print_sessions();
#endif /* _SESSION_H */
*/
struct sessiond_trace_chunk_registry;
-struct sessiond_trace_chunk_registry *sessiond_trace_chunk_registry_create(void);
+struct sessiond_trace_chunk_registry *sessiond_trace_chunk_registry_create();
void sessiond_trace_chunk_registry_destroy(struct sessiond_trace_chunk_registry *sessiond_registry);
int stream_add_index(struct relay_stream *stream, const struct lttcomm_relayd_index *index_info);
int stream_reset_file(struct relay_stream *stream);
-void print_relay_streams(void);
+void print_relay_streams();
#endif /* _STREAM_H */
struct lttng_trace_chunk *current_trace_chunk;
};
-struct relay_viewer_session *viewer_session_create(void);
+struct relay_viewer_session *viewer_session_create();
void viewer_session_destroy(struct relay_viewer_session *vsession);
void viewer_session_close(struct relay_viewer_session *vsession);
void viewer_stream_put(struct relay_viewer_stream *vstream);
int viewer_stream_rotate(struct relay_viewer_stream *vstream);
bool viewer_stream_is_tracefile_seq_readable(struct relay_viewer_stream *vstream, uint64_t seq);
-void print_viewer_streams(void);
+void print_viewer_streams();
void viewer_stream_close_files(struct relay_viewer_stream *vstream);
void viewer_stream_sync_tracefile_array_tail(struct relay_viewer_stream *vstream);
#ifdef HAVE_LIBLTTNG_UST_CTL
-bool launch_agent_management_thread(void);
-bool agent_tracing_is_enabled(void);
+bool launch_agent_management_thread();
+bool agent_tracing_is_enabled();
#else /* HAVE_LIBLTTNG_UST_CTL */
struct lttng_event_exclusion *exclusion;
};
-#define AGENT_EVENT_IS_ENABLED(agent_event) (!!agent_event->enabled_count)
+#define AGENT_EVENT_IS_ENABLED(agent_event) (!!(agent_event)->enabled_count)
/*
* Agent object containing events enabled/disabled for a given domain in a
};
/* Allocate agent apps hash table */
-int agent_app_ht_alloc(void);
+int agent_app_ht_alloc();
/* Clean-up agent apps hash table */
-void agent_app_ht_clean(void);
+void agent_app_ht_clean();
/* Initialize an already allocated agent domain. */
int agent_init(struct agent *agt);
/* Global event notifier per-domain agents. */
struct agent *agent_find_by_event_notifier_domain(enum lttng_domain_type domain_type);
-void agent_by_event_notifier_domain_ht_destroy(void);
-int agent_by_event_notifier_domain_ht_create(void);
+void agent_by_event_notifier_domain_ht_destroy();
+int agent_by_event_notifier_domain_ht_create();
#endif /* LTTNG_SESSIOND_AGENT_H */
};
/* Buffer registry per UID. */
-void buffer_reg_init_uid_registry(void);
+void buffer_reg_init_uid_registry();
int buffer_reg_uid_create(uint64_t session_id,
uint32_t bits_per_long,
uid_t uid,
void buffer_reg_uid_destroy(struct buffer_reg_uid *regp, struct consumer_output *consumer);
/* Buffer registry per PID. */
-void buffer_reg_init_pid_registry(void);
+void buffer_reg_init_pid_registry();
int buffer_reg_pid_create(uint64_t session_id,
struct buffer_reg_pid **regp,
const char *root_shm_path,
void buffer_reg_stream_destroy(struct buffer_reg_stream *regp, enum lttng_domain_type domain);
/* Global registry. */
-void buffer_reg_destroy_registries(void);
+void buffer_reg_destroy_registries();
int buffer_reg_uid_consumer_channel_key(struct cds_list_head *buffer_reg_uid_list,
uint64_t chan_key,
#include "thread.hpp"
-struct lttng_thread *launch_client_thread(void);
+struct lttng_thread *launch_client_thread();
#endif /* CLIENT_SESSIOND_H */
* Init the command subsystem. Must be called before using any of the functions
* above. This is called in the main() of the session daemon.
*/
-void cmd_init(void);
+void cmd_init();
/* Session commands */
enum lttng_error_code cmd_create_session(struct command_ctx *cmd_ctx,
enum lttng_rotation_schedule_type schedule_type,
uint64_t value);
-const struct cmd_completion_handler *cmd_pop_completion_handler(void);
+const struct cmd_completion_handler *cmd_pop_completion_handler();
int start_kernel_session(struct ltt_kernel_session *ksess);
int stop_kernel_session(struct ltt_kernel_session *ksess);
class trace_class_visitor : public lttng::sessiond::trace::trace_class_visitor {
public:
- trace_class_visitor(append_metadata_fragment_function append_metadata);
+ explicit trace_class_visitor(append_metadata_fragment_function append_metadata);
- virtual void visit(const lttng::sessiond::trace::trace_class& trace_class) override final;
- virtual void visit(const lttng::sessiond::trace::clock_class& clock_class) override final;
- virtual void visit(const lttng::sessiond::trace::stream_class& stream_class) override final;
- virtual void visit(const lttng::sessiond::trace::event_class& event_class) override final;
+ void visit(const lttng::sessiond::trace::trace_class& trace_class) final;
+ void visit(const lttng::sessiond::trace::clock_class& clock_class) final;
+ void visit(const lttng::sessiond::trace::stream_class& stream_class) final;
+ void visit(const lttng::sessiond::trace::event_class& event_class) final;
private:
void append_metadata_fragment(const nlohmann::json& fragment) const;
void event_notifier_error_accounting_unregister_event_notifier(const struct lttng_trigger *trigger);
-void event_notifier_error_accounting_fini(void);
+void event_notifier_error_accounting_fini();
#endif /* _EVENT_NOTIFIER_ERROR_ACCOUNTING_H */
int lttng_fd_get(enum lttng_fd_type type, unsigned int nr);
void lttng_fd_put(enum lttng_fd_type type, unsigned int nr);
-void lttng_fd_init(void);
+void lttng_fd_init();
#endif /* _LTTNG_FD_LIMIT_H */
int kernel_start_session(struct ltt_kernel_session *session);
int kernel_stop_session(struct ltt_kernel_session *session);
ssize_t kernel_list_events(struct lttng_event **event_list);
-void kernel_wait_quiescent(void);
+void kernel_wait_quiescent();
int kernel_validate_version(struct lttng_kernel_abi_tracer_version *kernel_tracer_version,
struct lttng_kernel_abi_tracer_abi_version *kernel_tracer_abi_version);
void kernel_destroy_session(struct ltt_kernel_session *ksess);
enum lttng_error_code kernel_rotate_session(struct ltt_session *session);
enum lttng_error_code kernel_clear_session(struct ltt_session *session);
-int init_kernel_workarounds(void);
-int kernel_supports_ring_buffer_snapshot_sample_positions(void);
-int kernel_supports_ring_buffer_packet_sequence_number(void);
-int kernel_supports_event_notifiers(void);
-enum lttng_kernel_tracer_status get_kernel_tracer_status(void);
+int init_kernel_workarounds();
+int kernel_supports_ring_buffer_snapshot_sample_positions();
+int kernel_supports_ring_buffer_packet_sequence_number();
+int kernel_supports_event_notifiers();
+enum lttng_kernel_tracer_status get_kernel_tracer_status();
void set_kernel_tracer_status_from_modules_ret(int);
-int init_kernel_tracer(void);
-void cleanup_kernel_tracer(void);
-bool kernel_tracer_is_initialized(void);
+int init_kernel_tracer();
+void cleanup_kernel_tracer();
+bool kernel_tracer_is_initialized();
enum lttng_error_code kernel_create_channel_subdirectories(const struct ltt_kernel_session *ksess);
const struct lttng_credentials *cmd_creds);
enum lttng_error_code kernel_unregister_event_notifier(const struct lttng_trigger *trigger);
-int kernel_get_notification_fd(void);
+int kernel_get_notification_fd();
#endif /* _LTT_KERNEL_CTL_H */
extern struct consumer_data the_ustconsumer64_data;
extern struct consumer_data the_kconsumer_data;
-int sessiond_init_main_quit_pipe(void);
+int sessiond_init_main_quit_pipe();
int sessiond_wait_for_main_quit_pipe(int timeout_ms);
-int sessiond_notify_main_quit_pipe(void);
-void sessiond_close_main_quit_pipe(void);
+int sessiond_notify_main_quit_pipe();
+void sessiond_close_main_quit_pipe();
int sessiond_set_thread_pollset(struct lttng_poll_event *events, size_t size);
-void sessiond_signal_parents(void);
+void sessiond_signal_parents();
void sessiond_set_client_thread_state(bool running);
-void sessiond_wait_client_thread_stopped(void);
+void sessiond_wait_client_thread_stopped();
void *thread_manage_consumer(void *data);
#ifndef _MODPROBE_H
#define _MODPROBE_H
-void modprobe_remove_lttng_all(void);
-void modprobe_remove_lttng_control(void);
-void modprobe_remove_lttng_data(void);
-int modprobe_lttng_control(void);
-int modprobe_lttng_data(void);
+void modprobe_remove_lttng_all();
+void modprobe_remove_lttng_control();
+void modprobe_remove_lttng_data();
+int modprobe_lttng_control();
+int modprobe_lttng_data();
#endif /* _MODPROBE_H */
lttng_poll_event _events;
};
-struct rotation_thread_timer_queue *rotation_thread_timer_queue_create(void);
+struct rotation_thread_timer_queue *rotation_thread_timer_queue_create();
void rotation_thread_timer_queue_destroy(struct rotation_thread_timer_queue *queue);
void rotation_thread_enqueue_job(struct rotation_thread_timer_queue *queue,
enum rotation_thread_job_type job_type,
lttng::sessiond::rotation_thread_timer_queue *rotation_thread_job_queue;
};
-int timer_signal_init(void);
+int timer_signal_init();
/* Start a session's rotation pending check timer (one-shot mode). */
int timer_session_rotation_pending_check_start(struct ltt_session *session,
trace_class_visitor(const lttng::sessiond::trace::abi& trace_abi,
append_metadata_fragment_function append_metadata);
- virtual void visit(const lttng::sessiond::trace::trace_class& trace_class) override final;
- virtual void visit(const lttng::sessiond::trace::clock_class& clock_class) override final;
- virtual void visit(const lttng::sessiond::trace::stream_class& stream_class) override final;
- virtual void visit(const lttng::sessiond::trace::event_class& event_class) override final;
+ void visit(const lttng::sessiond::trace::trace_class& trace_class) final;
+ void visit(const lttng::sessiond::trace::clock_class& clock_class) final;
+ void visit(const lttng::sessiond::trace::stream_class& stream_class) final;
+ void visit(const lttng::sessiond::trace::event_class& event_class) final;
private:
/* Coherent (parseable) fragments must be appended. */
struct lttng_ust_ctl_consumer_stream;
struct lttng_ust_ctl_consumer_channel_attr;
-int lttng_ust_ctl_get_nr_stream_per_channel(void);
+int lttng_ust_ctl_get_nr_stream_per_channel();
struct lttng_ust_ctl_consumer_channel *lttng_ust_ctl_create_channel(
struct lttng_ust_ctl_consumer_channel_attr *attr, const int *stream_fds, int nr_stream_fds);
int lttng_ust_ctl_get_current_timestamp(struct lttng_ust_ctl_consumer_stream *stream, uint64_t *ts);
/* returns whether UST has perf counters support. */
-int lttng_ust_ctl_has_perf_counters(void);
+int lttng_ust_ctl_has_perf_counters();
/* Regenerate the statedump. */
int lttng_ust_ctl_regenerate_statedump(int sock, int handle);
struct lttng_ust_ctl_daemon_counter;
-int lttng_ust_ctl_get_nr_cpu_per_counter(void);
+int lttng_ust_ctl_get_nr_cpu_per_counter();
struct lttng_ust_ctl_counter_dimension {
uint64_t size;
gid_t egid,
uint64_t tracing_id);
- 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;
+ lttng_buffer_type buffering_scheme() const noexcept final;
+ void accept(lttng::sessiond::trace::trace_class_environment_visitor& environment_visitor)
+ const final;
private:
const unsigned int _tracer_patch_level_version;
uint64_t tracing_id,
uid_t tracing_uid);
- 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;
+ lttng_buffer_type buffering_scheme() const noexcept final;
+ void accept(lttng::sessiond::trace::trace_class_environment_visitor& environment_visitor)
+ const final;
private:
const uid_t _tracing_uid;
struct ltt_session;
struct consumer_output;
-const char *get_home_dir(void);
+const char *get_home_dir();
int notify_thread_pipe(int wpipe);
int loglevels_match(int a_loglevel_type,
int a_loglevel_value,
#define CONFIG_FILENAME ".lttngrc"
void config_destroy(const char *path);
-void config_destroy_default(void);
+void config_destroy_default();
int config_exists(const char *path);
int config_init(const char *path);
int config_add_session_name(const char *path, const char *name);
{
}
- session_storage(session_storage&& original) :
+ session_storage(session_storage&& original) noexcept :
_array(std::move(original._array)), _count(original._count)
{
}
{
}
- session_list(session_list&& original) :
+ session_list(session_list&& original) noexcept :
lttng::utils::random_access_container_wrapper<details::session_storage,
lttng_session&,
details::session_list_operations>(
} /* namespace cli */
} /* namespace lttng */
-char *get_session_name(void);
-char *get_session_name_quiet(void);
+char *get_session_name();
+char *get_session_name_quiet();
void list_commands(struct cmd_struct *commands, FILE *ofp);
void list_cmd_options(FILE *ofp, struct poptOption *options);
void list_cmd_options_argpar(FILE *ofp, const struct argpar_opt_descr *options);
int print_missing_or_multiple_domains(unsigned int domain_count, bool include_agent_domains);
int spawn_relayd(const char *pathname, int port);
-int check_relayd(void);
+int check_relayd();
void print_session_stats(const char *session_name);
int get_session_stats_str(const char *session_name, char **str);
int show_cmd_help(const char *cmd_name, const char *help_msg);
void lttng_unlinked_file_pool_destroy(struct lttng_unlinked_file_pool *pool);
/* The inode registry is protected by the fd-tracker's lock. */
-struct lttng_inode_registry *lttng_inode_registry_create(void);
+struct lttng_inode_registry *lttng_inode_registry_create();
struct lttng_inode *lttng_inode_registry_get_inode(struct lttng_inode_registry *registry,
struct lttng_directory_handle *handle,
void **user_payload_buf)
{
return lttng_ctl_ask_sessiond_fds_varlen(
- lsm, NULL, 0, vardata, vardata_len, user_payload_buf, NULL, NULL);
+ lsm, nullptr, 0, vardata, vardata_len, user_payload_buf, nullptr, nullptr);
}
/*
size_t nb_fd,
void **buf __attribute__((unused)))
{
- return lttng_ctl_ask_sessiond_fds_varlen(lsm, fds, nb_fd, NULL, 0, NULL, NULL, NULL);
+ return lttng_ctl_ask_sessiond_fds_varlen(
+ lsm, fds, nb_fd, nullptr, 0, nullptr, nullptr, nullptr);
}
/*
* Use this if no variable length data needs to be sent.
*/
static inline int lttng_ctl_ask_sessiond(struct lttcomm_session_msg *lsm, void **buf)
{
- return lttng_ctl_ask_sessiond_varlen_no_cmd_header(lsm, NULL, 0, buf);
+ return lttng_ctl_ask_sessiond_varlen_no_cmd_header(lsm, nullptr, 0, buf);
}
-int lttng_check_tracing_group(void);
+int lttng_check_tracing_group();
-int connect_sessiond(void);
+int connect_sessiond();
#endif /* LTTNG_CTL_HELPER_H */