SoW-2020-0002: Trace Hit Counters: trigger error reporting integration
[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_kernel_tracer_version kernel_tracer_version;
29 struct lttng_kernel_tracer_abi_version kernel_tracer_abi_version;
30
31 int kernel_poll_pipe[2] = { -1, -1 };
32
33 pid_t ppid;
34 pid_t child_ppid;
35
36 struct sessiond_config config;
37
38 struct consumer_data kconsumer_data = {
39 .type = LTTNG_CONSUMER_KERNEL,
40 .err_sock = -1,
41 .cmd_sock = -1,
42 .channel_monitor_pipe = -1,
43 .pid_mutex = PTHREAD_MUTEX_INITIALIZER,
44 .lock = PTHREAD_MUTEX_INITIALIZER,
45 };
46
47 struct consumer_data ustconsumer64_data = {
48 .type = LTTNG_CONSUMER64_UST,
49 .err_sock = -1,
50 .cmd_sock = -1,
51 .channel_monitor_pipe = -1,
52 .pid_mutex = PTHREAD_MUTEX_INITIALIZER,
53 .lock = PTHREAD_MUTEX_INITIALIZER,
54 };
55
56 struct consumer_data ustconsumer32_data = {
57 .type = LTTNG_CONSUMER32_UST,
58 .err_sock = -1,
59 .cmd_sock = -1,
60 .channel_monitor_pipe = -1,
61 .pid_mutex = PTHREAD_MUTEX_INITIALIZER,
62 .lock = PTHREAD_MUTEX_INITIALIZER,
63 };
64
65 enum consumerd_state ust_consumerd_state;
66 enum consumerd_state kernel_consumerd_state;
67
68 static void __attribute__((constructor)) init_sessiond_uuid(void)
69 {
70 if (lttng_uuid_generate(sessiond_uuid)) {
71 ERR("Failed to generate a session daemon UUID");
72 abort();
73 }
74 }
This page took 0.032701 seconds and 6 git commands to generate.