Move to kernel style SPDX license identifiers
[lttng-tools.git] / src / bin / lttng / utils.h
1 /*
2 * Copyright (C) 2011 David Goulet <david.goulet@polymtl.ca>
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 <popt.h>
12
13 #include <lttng/lttng.h>
14
15 extern char *opt_relayd_path;
16 extern int opt_no_sessiond;
17 extern char * opt_sessiond_path;
18 extern pid_t sessiond_pid;
19
20 struct cmd_struct;
21
22 char *get_session_name(void);
23 char *get_session_name_quiet(void);
24 void list_commands(struct cmd_struct *commands, FILE *ofp);
25 void list_cmd_options(FILE *ofp, struct poptOption *options);
26
27 /*
28 * Return the minimum order for which x <= (1UL << order).
29 * Return -1 if x is 0.
30 */
31 int get_count_order_u32(uint32_t x);
32
33 /*
34 * Return the minimum order for which x <= (1UL << order).
35 * Return -1 if x is 0.
36 */
37 int get_count_order_u64(uint64_t x);
38
39 /*
40 * Return the minimum order for which x <= (1UL << order).
41 * Return -1 if x is 0.
42 */
43 int get_count_order_ulong(unsigned long x);
44
45 const char *get_domain_str(enum lttng_domain_type domain);
46 const char *get_event_type_str(enum lttng_event_type event_type);
47
48 int print_missing_or_multiple_domains(unsigned int sum);
49
50 int spawn_relayd(const char *pathname, int port);
51 int check_relayd(void);
52 void print_session_stats(const char *session_name);
53 int show_cmd_help(const char *cmd_name, const char *help_msg);
54
55 int print_trace_archive_location(
56 const struct lttng_trace_archive_location *location,
57 const char *session_name);
58
59 #endif /* _LTTNG_UTILS_H */
This page took 0.031781 seconds and 5 git commands to generate.