Fix: mi: Pass const session to mi_lttng_session
[lttng-tools.git] / src / bin / lttng / utils.hpp
... / ...
CommitLineData
1/*
2 * Copyright (C) 2011 EfficiOS Inc.
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 */
7
8#ifndef _LTTNG_UTILS_H
9#define _LTTNG_UTILS_H
10
11#include <common/argpar/argpar.h>
12#include <common/dynamic-array.hpp>
13
14#include <lttng/lttng.h>
15
16#include <popt.h>
17
18extern char *opt_relayd_path;
19extern int opt_no_sessiond;
20extern char *opt_sessiond_path;
21extern pid_t sessiond_pid;
22
23struct cmd_struct;
24
25char *get_session_name(void);
26char *get_session_name_quiet(void);
27void list_commands(struct cmd_struct *commands, FILE *ofp);
28void list_cmd_options(FILE *ofp, struct poptOption *options);
29void list_cmd_options_argpar(FILE *ofp, const struct argpar_opt_descr *options);
30
31/*
32 * Return the minimum order for which x <= (1UL << order).
33 * Return -1 if x is 0.
34 */
35int get_count_order_u32(uint32_t x);
36
37/*
38 * Return the minimum order for which x <= (1UL << order).
39 * Return -1 if x is 0.
40 */
41int get_count_order_u64(uint64_t x);
42
43/*
44 * Return the minimum order for which x <= (1UL << order).
45 * Return -1 if x is 0.
46 */
47int get_count_order_ulong(unsigned long x);
48
49const char *get_event_type_str(enum lttng_event_type event_type);
50
51int print_missing_or_multiple_domains(unsigned int domain_count, bool include_agent_domains);
52
53int spawn_relayd(const char *pathname, int port);
54int check_relayd(void);
55void print_session_stats(const char *session_name);
56int get_session_stats_str(const char *session_name, char **str);
57int show_cmd_help(const char *cmd_name, const char *help_msg);
58
59int print_trace_archive_location(const struct lttng_trace_archive_location *location,
60 const char *session_name);
61
62int validate_exclusion_list(const char *event_name,
63 const struct lttng_dynamic_pointer_array *exclusions);
64
65#endif /* _LTTNG_UTILS_H */
This page took 0.046198 seconds and 4 git commands to generate.