4 * Linux Trace Toolkit Control Library Header File
6 * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
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.
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.
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.
27 #include <uuid/uuid.h>
29 /* Default unix group name for tracing. */
30 #define LTTNG_DEFAULT_TRACING_GROUP "tracing"
32 /* Environment variable to set session daemon binary path. */
33 #define LTTNG_SESSIOND_PATH_ENV "LTTNG_SESSIOND_PATH"
36 * Trace type for lttng_trace.
38 enum lttng_trace_type
{
44 * Basic trace information exposed.
48 pid_t pid
; /* Only useful for user-space trace */
49 enum lttng_trace_type type
;
53 * Basic session information exposed.
55 struct lttng_session
{
61 * Session daemon control
63 extern int lttng_connect_sessiond(void);
64 extern int lttng_create_session(char *name
);
65 extern int lttng_destroy_session(uuid_t
*uuid
);
66 extern int lttng_disconnect_sessiond(void);
67 /* Return an allocated array of lttng_session */
68 extern int lttng_list_sessions(struct lttng_session
**sessions
);
69 /* Return an allocated array of lttng_traces */
70 extern int lttng_list_traces(uuid_t
*uuid
, struct lttng_trace
**traces
);
71 extern int lttng_session_daemon_alive(void);
72 /* Set tracing group for the current execution */
73 extern int lttng_set_tracing_group(const char *name
);
74 /* Set session uuid for the current execution */
75 extern void lttng_set_current_session_uuid(uuid_t
*uuid
);
76 extern const char *lttng_get_readable_code(int code
);
79 * User-space tracer control
81 extern int lttng_ust_create_trace(pid_t pid
);
82 /* Return an allocated array of pids */
83 extern int lttng_ust_list_apps(pid_t
**pids
);
84 extern int lttng_ust_start_trace(pid_t pid
);
85 extern int lttng_ust_stop_trace(pid_t pid
);
88 * Kernel tracer control
90 extern int lttng_kernel_create_channel(void);
91 extern int lttng_kernel_create_session(void);
92 extern int lttng_kernel_create_stream(void);
93 extern int lttng_kernel_disable_event(char *event_name
);
94 extern int lttng_kernel_enable_event(char *event_name
);
95 extern int lttng_kernel_list_events(char **event_list
);
96 extern int lttng_kernel_open_metadata(void);
97 extern int lttng_kernel_start_tracing(void);
98 extern int lttng_kernel_stop_tracing(void);
100 #endif /* _LTTNG_H */
This page took 0.033148 seconds and 5 git commands to generate.