SoW-2019-0002: Dynamic Snapshot
[lttng-tools.git] / src / bin / lttng / utils.h
CommitLineData
f3ed775e 1/*
ab5be9fa 2 * Copyright (C) 2011 David Goulet <david.goulet@polymtl.ca>
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>
1831ae68 12#include "common/argpar/argpar.h"
679b4943 13
b9dfb167
DG
14#include <lttng/lttng.h>
15
8960e9cd 16extern char *opt_relayd_path;
92360082
JG
17extern int opt_no_sessiond;
18extern char * opt_sessiond_path;
92360082 19extern pid_t sessiond_pid;
8960e9cd 20
3c9bd23c
SM
21struct cmd_struct;
22
f3ed775e 23char *get_session_name(void);
1dac0189 24char *get_session_name_quiet(void);
3c9bd23c 25void list_commands(struct cmd_struct *commands, FILE *ofp);
679b4943 26void list_cmd_options(FILE *ofp, struct poptOption *options);
1831ae68 27void list_cmd_options_argpar(FILE *ofp, const struct argpar_opt_descr *options);
f3ed775e 28
8ce58bad
MD
29/*
30 * Return the minimum order for which x <= (1UL << order).
31 * Return -1 if x is 0.
32 */
33int get_count_order_u32(uint32_t x);
34
35/*
36 * Return the minimum order for which x <= (1UL << order).
37 * Return -1 if x is 0.
38 */
39int get_count_order_u64(uint64_t x);
40
41/*
42 * Return the minimum order for which x <= (1UL << order).
43 * Return -1 if x is 0.
44 */
45int get_count_order_ulong(unsigned long x);
46
b9dfb167 47const char *get_domain_str(enum lttng_domain_type domain);
4fd2697f 48const char *get_event_type_str(enum lttng_event_type event_type);
b9dfb167 49
3ecec76a 50int print_missing_or_multiple_domains(unsigned int sum);
b9dfb167 51
8960e9cd
DG
52int spawn_relayd(const char *pathname, int port);
53int check_relayd(void);
20fb9e02 54void print_session_stats(const char *session_name);
4fc83d94 55int show_cmd_help(const char *cmd_name, const char *help_msg);
8960e9cd 56
bbbfd849
JG
57int print_trace_archive_location(
58 const struct lttng_trace_archive_location *location,
59 const char *session_name);
60
f3ed775e 61#endif /* _LTTNG_UTILS_H */
This page took 0.109524 seconds and 5 git commands to generate.