cc6a6ba155ced9e26b6cec7b5f9f4e24a54bb968
[lttng-tools.git] / ltt-sessiond / ltt-sessiond.h
1 /*
2 * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; only version 2
7 * of the License.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18
19 #ifndef _LTT_SESSIOND_H
20 #define _LTT_SESSIOND_H
21
22 #define _LGPL_SOURCE
23 #include <urcu/wfqueue.h>
24
25 #include "traceable-app.h"
26
27 #define DEFAULT_HOME_DIR "/tmp"
28 #define DEFAULT_UST_SOCK_DIR DEFAULT_HOME_DIR "/ust-app-socks"
29 #define DEFAULT_GLOBAL_APPS_PIPE DEFAULT_UST_SOCK_DIR "/global"
30 #define DEFAULT_TRACE_OUTPUT DEFAULT_HOME_DIR "/lttng"
31
32 struct module_param {
33 const char *name;
34 int required;
35 };
36
37 /* LTTng kernel tracer modules list */
38 const struct module_param kernel_modules_list[] = {
39 { "lttng-ftrace", 0 },
40 { "lttng-kprobes", 0 },
41 { "lttng-kretprobes", 0 },
42 { "lib-ring-buffer", 1 },
43 { "ltt-relay", 1 },
44 { "ltt-ring-buffer-client-discard", 1 },
45 { "ltt-ring-buffer-client-overwrite", 1 },
46 { "ltt-ring-buffer-metadata-client", 1 },
47 { "ltt-ring-buffer-client-mmap-discard", 1 },
48 { "ltt-ring-buffer-client-mmap-overwrite", 1 },
49 { "ltt-ring-buffer-metadata-mmap-client", 1 },
50 { "lttng-probe-lttng", 1 },
51 { "lttng-types", 0 },
52 { "lttng-probe-block", 0 },
53 { "lttng-probe-irq", 0 },
54 { "lttng-probe-kvm", 0 },
55 { "lttng-probe-sched", 0 },
56 { "lttng-probe-syscalls", 0 },
57 };
58
59 extern const char default_home_dir[],
60 default_tracing_group[],
61 default_ust_sock_dir[],
62 default_global_apps_pipe[];
63
64 /*
65 * This contains extra data needed for processing a command received by the
66 * session daemon from the lttng client.
67 */
68 struct command_ctx {
69 int ust_sock;
70 unsigned int lttng_msg_size;
71 struct ltt_session *session;
72 struct lttcomm_lttng_msg *llm;
73 struct lttcomm_session_msg *lsm;
74 };
75
76 struct ust_command {
77 int sock;
78 struct ust_register_msg reg_msg;
79 struct cds_wfq_node node;
80 };
81
82 /*
83 * Queue used to enqueue UST registration request (ust_commant) and protected
84 * by a futex with a scheme N wakers / 1 waiters. See futex.c/.h
85 */
86 struct ust_cmd_queue {
87 int32_t futex;
88 struct cds_wfq_queue queue;
89 };
90
91 #endif /* _LTT_SESSIOND_H */
This page took 0.04091 seconds and 4 git commands to generate.