Use case-scope error labels when handling LTTNG_CONSUMER_GET_CHANNEL
[lttng-tools.git] / src / bin / lttng / utils.h
CommitLineData
f3ed775e
DG
1/*
2 * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
3 *
d14d33bf
AM
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License, version 2 only,
6 * as published by the Free Software Foundation.
f3ed775e
DG
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
d14d33bf
AM
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
f3ed775e
DG
16 */
17
18#ifndef _LTTNG_UTILS_H
19#define _LTTNG_UTILS_H
20
679b4943
SM
21#include <popt.h>
22
b9dfb167
DG
23#include <lttng/lttng.h>
24
8960e9cd 25extern char *opt_relayd_path;
92360082
JG
26extern int opt_no_sessiond;
27extern char * opt_sessiond_path;
92360082 28extern pid_t sessiond_pid;
8960e9cd 29
3c9bd23c
SM
30struct cmd_struct;
31
f3ed775e 32char *get_session_name(void);
1dac0189 33char *get_session_name_quiet(void);
3c9bd23c 34void list_commands(struct cmd_struct *commands, FILE *ofp);
679b4943 35void list_cmd_options(FILE *ofp, struct poptOption *options);
f3ed775e 36
8ce58bad
MD
37/*
38 * Return the minimum order for which x <= (1UL << order).
39 * Return -1 if x is 0.
40 */
41int get_count_order_u32(uint32_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_u64(uint64_t x);
48
49/*
50 * Return the minimum order for which x <= (1UL << order).
51 * Return -1 if x is 0.
52 */
53int get_count_order_ulong(unsigned long x);
54
b9dfb167 55const char *get_domain_str(enum lttng_domain_type domain);
4fd2697f 56const char *get_event_type_str(enum lttng_event_type event_type);
b9dfb167 57
3ecec76a 58int print_missing_or_multiple_domains(unsigned int sum);
b9dfb167 59
8960e9cd
DG
60int spawn_relayd(const char *pathname, int port);
61int check_relayd(void);
20fb9e02 62void print_session_stats(const char *session_name);
4fc83d94 63int show_cmd_help(const char *cmd_name, const char *help_msg);
8960e9cd 64
bbbfd849
JG
65int print_trace_archive_location(
66 const struct lttng_trace_archive_location *location,
67 const char *session_name);
68
f3ed775e 69#endif /* _LTTNG_UTILS_H */
This page took 0.052989 seconds and 4 git commands to generate.