Fix errors due to lttng.h cleanup
[lttng-tools.git] / include / lttng / lttng.h
CommitLineData
826d496d 1/*
b7384347
DG
2 * lttng.h
3 *
4 * Linux Trace Toolkit Control Library Header File
5 *
826d496d 6 * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
fac6795d
DG
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
fac6795d
DG
21 */
22
b7384347
DG
23#ifndef _LTTNG_H
24#define _LTTNG_H
fac6795d 25
57167058 26#include <limits.h>
8028d920 27#include <uuid/uuid.h>
57167058 28
b7384347
DG
29/* Default unix group name for tracing. */
30#define LTTNG_DEFAULT_TRACING_GROUP "tracing"
fac6795d 31
b7384347 32/* Environment variable to set session daemon binary path. */
5b8719f5
DG
33#define LTTNG_SESSIOND_PATH_ENV "LTTNG_SESSIOND_PATH"
34
b7384347
DG
35/*
36 * Trace type for lttng_trace.
1657e9bb
DG
37 */
38enum lttng_trace_type {
b7384347
DG
39 KERNEL,
40 USERSPACE,
1657e9bb
DG
41};
42
b7384347
DG
43/*
44 * Basic trace information exposed.
57167058 45 */
b7384347 46struct lttng_trace {
57167058 47 char name[NAME_MAX];
b7384347
DG
48 pid_t pid; /* Only useful for user-space trace */
49 enum lttng_trace_type type;
57167058
DG
50};
51
b7384347
DG
52/*
53 * Basic session information exposed.
1657e9bb 54 */
b7384347 55struct lttng_session {
1657e9bb 56 char name[NAME_MAX];
b7384347 57 uuid_t uuid;
1657e9bb
DG
58};
59
b7384347
DG
60/*
61 * Session daemon control
62 */
63extern int lttng_check_session_daemon(void);
64extern int lttng_connect_sessiond(void);
894be886 65extern int lttng_create_session(char *name);
8028d920 66extern int lttng_destroy_session(uuid_t *uuid);
87378cf5 67extern int lttng_disconnect_sessiond(void);
b7384347 68/* Return an allocated array of lttng_session */
ca95a216 69extern int lttng_list_sessions(struct lttng_session **sessions);
b7384347 70/* Return an allocated array of lttng_traces */
1657e9bb 71extern int lttng_list_traces(uuid_t *uuid, struct lttng_trace **traces);
b7384347
DG
72/* Set tracing group for the current execution */
73extern int lttng_set_tracing_group(const char *name);
74/* Set session uuid for the current execution */
96243366 75extern void lttng_set_current_session_uuid(uuid_t *uuid);
b7384347
DG
76extern const char *lttng_get_readable_code(int code);
77
78/*
79 * User-space tracer control
80 */
df0da139 81extern int lttng_ust_create_trace(pid_t pid);
b7384347
DG
82/* Return an allocated array of pids */
83extern int lttng_ust_list_apps(pid_t **pids);
ce3d728c 84extern int lttng_ust_start_trace(pid_t pid);
520ff687 85extern int lttng_ust_stop_trace(pid_t pid);
fac6795d 86
1df4dedd
DG
87/*
88 * Kernel tracer control
89 */
20fe2104 90extern int lttng_kernel_create_channel(void);
b7384347 91extern int lttng_kernel_create_session(void);
8c0faa1d 92extern int lttng_kernel_create_stream(void);
b7384347
DG
93extern int lttng_kernel_disable_event(char *event_name);
94extern int lttng_kernel_enable_event(char *event_name);
a5c5a2bd 95extern int lttng_kernel_open_metadata(void);
b7384347
DG
96extern int lttng_kernel_start_tracing(void);
97extern int lttng_kernel_stop_tracing(void);
1df4dedd 98
b7384347 99#endif /* _LTTNG_H */
This page took 0.038315 seconds and 4 git commands to generate.