2 * Copyright (C) 2011 David Goulet <david.goulet@polymtl.ca>
4 * SPDX-License-Identifier: GPL-2.0-only
12 #include <common/argpar/argpar.h>
13 #include <common/dynamic-array.h>
15 #include <lttng/lttng.h>
17 extern char *opt_relayd_path
;
18 extern int opt_no_sessiond
;
19 extern char * opt_sessiond_path
;
20 extern pid_t sessiond_pid
;
24 char *get_session_name(void);
25 char *get_session_name_quiet(void);
26 void list_commands(struct cmd_struct
*commands
, FILE *ofp
);
27 void list_cmd_options(FILE *ofp
, struct poptOption
*options
);
28 void list_cmd_options_argpar(FILE *ofp
, const struct argpar_opt_descr
*options
);
31 * Return the minimum order for which x <= (1UL << order).
32 * Return -1 if x is 0.
34 int get_count_order_u32(uint32_t x
);
37 * Return the minimum order for which x <= (1UL << order).
38 * Return -1 if x is 0.
40 int get_count_order_u64(uint64_t x
);
43 * Return the minimum order for which x <= (1UL << order).
44 * Return -1 if x is 0.
46 int get_count_order_ulong(unsigned long x
);
48 const char *get_domain_str(enum lttng_domain_type domain
);
49 const char *get_event_type_str(enum lttng_event_type event_type
);
51 int print_missing_or_multiple_domains(unsigned int domain_count
,
52 bool include_agent_domains
);
54 int spawn_relayd(const char *pathname
, int port
);
55 int check_relayd(void);
56 void print_session_stats(const char *session_name
);
57 int get_session_stats_str(const char *session_name
, char **str
);
58 int show_cmd_help(const char *cmd_name
, const char *help_msg
);
60 int print_trace_archive_location(
61 const struct lttng_trace_archive_location
*location
,
62 const char *session_name
);
64 int validate_exclusion_list(const char *event_name
,
65 const struct lttng_dynamic_pointer_array
*exclusions
);
67 #endif /* _LTTNG_UTILS_H */