SoW-2019-0002: Dynamic Snapshot
[lttng-tools.git] / src / bin / lttng-sessiond / globals.c
1 /*
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>
5 *
6 * SPDX-License-Identifier: GPL-2.0-only
7 *
8 */
9
10 #include "lttng-sessiond.h"
11 #include <common/uuid.h>
12
13 lttng_uuid sessiond_uuid;
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 pthread_mutex_t notification_trigger_tokens_ht_lock = PTHREAD_MUTEX_INITIALIZER;
24
25 struct lttng_ht *agent_apps_ht_by_sock = NULL;
26 struct lttng_ht *trigger_agents_ht_by_domain = NULL;
27
28 struct lttng_ht *registered_ust_event_rule = NULL;
29
30 struct lttng_kernel_tracer_version kernel_tracer_version;
31 struct lttng_kernel_tracer_abi_version kernel_tracer_abi_version;
32
33 int kernel_poll_pipe[2] = { -1, -1 };
34
35 pid_t ppid;
36 pid_t child_ppid;
37
38 struct sessiond_config config;
39
40 struct consumer_data kconsumer_data = {
41 .type = LTTNG_CONSUMER_KERNEL,
42 .err_sock = -1,
43 .cmd_sock = -1,
44 .channel_monitor_pipe = -1,
45 .pid_mutex = PTHREAD_MUTEX_INITIALIZER,
46 .lock = PTHREAD_MUTEX_INITIALIZER,
47 };
48
49 struct consumer_data ustconsumer64_data = {
50 .type = LTTNG_CONSUMER64_UST,
51 .err_sock = -1,
52 .cmd_sock = -1,
53 .channel_monitor_pipe = -1,
54 .pid_mutex = PTHREAD_MUTEX_INITIALIZER,
55 .lock = PTHREAD_MUTEX_INITIALIZER,
56 };
57
58 struct consumer_data ustconsumer32_data = {
59 .type = LTTNG_CONSUMER32_UST,
60 .err_sock = -1,
61 .cmd_sock = -1,
62 .channel_monitor_pipe = -1,
63 .pid_mutex = PTHREAD_MUTEX_INITIALIZER,
64 .lock = PTHREAD_MUTEX_INITIALIZER,
65 };
66
67 enum consumerd_state ust_consumerd_state;
68 enum consumerd_state kernel_consumerd_state;
69
70 static void __attribute__((constructor)) init_sessiond_uuid(void)
71 {
72 if (lttng_uuid_generate(sessiond_uuid)) {
73 ERR("Failed to generate a session daemon UUID");
74 abort();
75 }
76 }
This page took 0.044089 seconds and 5 git commands to generate.