Commit | Line | Data |
---|---|---|
a7333da7 | 1 | /* |
ab5be9fa MJ |
2 | * Copyright (C) 2011 David Goulet <david.goulet@polymtl.ca> |
3 | * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
4 | * Copyright (C) 2013 Jérémie Galarneau <jeremie.galarneau@efficios.com> | |
a7333da7 | 5 | * |
ab5be9fa | 6 | * SPDX-License-Identifier: GPL-2.0-only |
a7333da7 | 7 | * |
a7333da7 JG |
8 | */ |
9 | ||
10 | #include "lttng-sessiond.h" | |
c70636a7 | 11 | #include <common/uuid.h> |
52a0e931 JG |
12 | |
13 | lttng_uuid sessiond_uuid; | |
a7333da7 JG |
14 | |
15 | int ust_consumerd64_fd = -1; | |
16 | int ust_consumerd32_fd = -1; | |
17 | ||
18 | long page_size; | |
19 | ||
20 | struct health_app *health_sessiond; | |
21 | ||
22 | struct notification_thread_handle *notification_thread_handle; | |
23 | ||
24 | struct lttng_ht *agent_apps_ht_by_sock = NULL; | |
25 | ||
917a718d JG |
26 | struct lttng_kernel_tracer_version kernel_tracer_version; |
27 | struct lttng_kernel_tracer_abi_version kernel_tracer_abi_version; | |
a7333da7 | 28 | |
e32d7f27 | 29 | int kernel_poll_pipe[2] = { -1, -1 }; |
a7333da7 JG |
30 | |
31 | pid_t ppid; | |
32 | pid_t child_ppid; | |
33 | ||
34 | struct sessiond_config config; | |
917a718d JG |
35 | |
36 | struct consumer_data kconsumer_data = { | |
37 | .type = LTTNG_CONSUMER_KERNEL, | |
38 | .err_sock = -1, | |
39 | .cmd_sock = -1, | |
40 | .channel_monitor_pipe = -1, | |
41 | .pid_mutex = PTHREAD_MUTEX_INITIALIZER, | |
42 | .lock = PTHREAD_MUTEX_INITIALIZER, | |
917a718d JG |
43 | }; |
44 | ||
45 | struct consumer_data ustconsumer64_data = { | |
46 | .type = LTTNG_CONSUMER64_UST, | |
47 | .err_sock = -1, | |
48 | .cmd_sock = -1, | |
49 | .channel_monitor_pipe = -1, | |
50 | .pid_mutex = PTHREAD_MUTEX_INITIALIZER, | |
51 | .lock = PTHREAD_MUTEX_INITIALIZER, | |
917a718d JG |
52 | }; |
53 | ||
54 | struct consumer_data ustconsumer32_data = { | |
55 | .type = LTTNG_CONSUMER32_UST, | |
56 | .err_sock = -1, | |
57 | .cmd_sock = -1, | |
58 | .channel_monitor_pipe = -1, | |
59 | .pid_mutex = PTHREAD_MUTEX_INITIALIZER, | |
60 | .lock = PTHREAD_MUTEX_INITIALIZER, | |
917a718d JG |
61 | }; |
62 | ||
63 | enum consumerd_state ust_consumerd_state; | |
64 | enum consumerd_state kernel_consumerd_state; | |
52a0e931 JG |
65 | |
66 | static void __attribute__((constructor)) init_sessiond_uuid(void) | |
67 | { | |
68 | if (lttng_uuid_generate(sessiond_uuid)) { | |
69 | ERR("Failed to generate a session daemon UUID"); | |
70 | abort(); | |
71 | } | |
72 | } |