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