SoW-2020-0002: Trace Hit Counters
[lttng-tools.git] / src / bin / lttng-sessiond / ust-app.h
CommitLineData
91d76f53 1/*
ab5be9fa
MJ
2 * Copyright (C) 2011 David Goulet <david.goulet@polymtl.ca>
3 * Copyright (C) 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
91d76f53 4 *
ab5be9fa 5 * SPDX-License-Identifier: GPL-2.0-only
91d76f53 6 *
91d76f53
DG
7 */
8
2106efa0 9#ifndef _LTT_UST_APP_H
f6a9efaa 10#define _LTT_UST_APP_H
91d76f53 11
099e26bd 12#include <stdint.h>
1e307fab 13
c3e68e71 14#include <common/index-allocator.h>
c70636a7 15#include <common/uuid.h>
c3e68e71 16#include <lttng/map/map.h>
f20baf8e 17
44d3bd01 18#include "trace-ust.h"
d0b96690 19#include "ust-registry.h"
5c408ad8 20#include "session.h"
44d3bd01 21
b551a063
DG
22#define UST_APP_EVENT_LIST_SIZE 32
23
d88aee68
DG
24/* Process name (short). */
25#define UST_APP_PROCNAME_LEN 16
d0b96690 26
2b00d462 27struct lttng_bytecode;
53a80697
MD
28struct lttng_ust_filter_bytecode;
29
7753dea8 30extern int ust_consumerd64_fd, ust_consumerd32_fd;
ba5d816e 31
d88aee68
DG
32/*
33 * Object used to close the notify socket in a call_rcu(). Since the
34 * application might not be found, we need an independant object containing the
35 * notify socket fd.
36 */
37struct ust_app_notify_sock_obj {
38 int fd;
39 struct rcu_head head;
40};
41
18eace3b
DG
42struct ust_app_ht_key {
43 const char *name;
2b00d462 44 const struct lttng_bytecode *filter;
2106efa0 45 enum lttng_ust_loglevel_type loglevel_type;
51755dc8 46 const struct lttng_event_exclusion *exclusion;
c3e68e71 47 uint64_t tracer_token;
18eace3b
DG
48};
49
099e26bd
DG
50/*
51 * Application registration data structure.
52 */
53struct ust_register_msg {
d0b96690 54 enum ustctl_socket_type type;
099e26bd
DG
55 uint32_t major;
56 uint32_t minor;
d0b96690
DG
57 uint32_t abi_major;
58 uint32_t abi_minor;
099e26bd
DG
59 pid_t pid;
60 pid_t ppid;
61 uid_t uid;
62 gid_t gid;
0df502fd 63 uint32_t bits_per_long;
d0b96690
DG
64 uint32_t uint8_t_alignment;
65 uint32_t uint16_t_alignment;
66 uint32_t uint32_t_alignment;
67 uint32_t uint64_t_alignment;
68 uint32_t long_alignment;
69 int byte_order; /* BIG_ENDIAN or LITTLE_ENDIAN */
70 char name[LTTNG_UST_ABI_PROCNAME_LEN];
099e26bd
DG
71};
72
48842b30 73/*
852d0037
DG
74 * Global applications HT used by the session daemon. This table is indexed by
75 * PID using the pid_n node and pid value of an ust_app.
48842b30 76 */
44cdb3a2 77extern struct lttng_ht *ust_app_ht;
f6a9efaa 78
852d0037
DG
79/*
80 * Global applications HT used by the session daemon. This table is indexed by
81 * socket using the sock_n node and sock value of an ust_app.
12e22e8d
JG
82 *
83 * The 'sock' in question here is the 'command' socket.
852d0037 84 */
44cdb3a2 85extern struct lttng_ht *ust_app_ht_by_sock;
91d76f53 86
d0b96690
DG
87/*
88 * Global applications HT used by the session daemon. This table is indexed by
89 * socket using the notify_sock_n node and notify_sock value of an ust_app.
90 */
44cdb3a2 91extern struct lttng_ht *ust_app_ht_by_notify_sock;
d0b96690 92
030a66fa
DG
93/* Stream list containing ust_app_stream. */
94struct ust_app_stream_list {
95 unsigned int count;
96 struct cds_list_head head;
97};
98
c3e68e71
JR
99/* counter list containing ust_app_counter. */
100struct ust_app_counter_list {
101 unsigned int count;
102 struct cds_list_head head;
103};
104
55cc08a6
DG
105struct ust_app_ctx {
106 int handle;
bdf64013 107 struct lttng_ust_context_attr ctx;
55cc08a6 108 struct lttng_ust_object_data *obj;
bec39940 109 struct lttng_ht_node_ulong node;
31746f93 110 struct cds_list_head list;
55cc08a6
DG
111};
112
48842b30
DG
113struct ust_app_event {
114 int enabled;
115 int handle;
13161846 116 struct lttng_ust_object_data *obj;
284d8f55 117 struct lttng_ust_event attr;
48842b30 118 char name[LTTNG_UST_SYM_NAME_LEN];
bec39940 119 struct lttng_ht_node_str node;
2b00d462 120 struct lttng_bytecode *filter;
51755dc8 121 struct lttng_event_exclusion *exclusion;
48842b30
DG
122};
123
993578ff
JR
124struct ust_app_event_notifier_rule {
125 int enabled;
c3e68e71 126 uint64_t error_counter_index;
993578ff
JR
127 int handle;
128 struct lttng_ust_object_data *obj;
129 /* Holds a strong reference. */
267d66aa 130 struct lttng_trigger *trigger;
993578ff
JR
131 /* Unique ID returned by the tracer to identify this event notifier. */
132 uint64_t token;
133 struct lttng_ht_node_u64 node;
267d66aa 134 /* The trigger object owns the filter. */
2b00d462 135 const struct lttng_bytecode *filter;
993578ff
JR
136 /* Owned by this. */
137 struct lttng_event_exclusion *exclusion;
138 /* For delayed reclaim. */
139 struct rcu_head rcu_head;
140};
141
030a66fa
DG
142struct ust_app_stream {
143 int handle;
144 char pathname[PATH_MAX];
145 /* Format is %s_%d respectively channel name and CPU number. */
146 char name[DEFAULT_STREAM_NAME_LEN];
147 struct lttng_ust_object_data *obj;
148 /* Using a list of streams to keep order. */
149 struct cds_list_head list;
150};
151
c3e68e71
JR
152struct ust_app_map_counter {
153 int handle;
154 struct lttng_ust_object_data *obj;
155 /* Using a list of counters to keep order. */
156 struct cds_list_head list;
157};
158
48842b30
DG
159struct ust_app_channel {
160 int enabled;
161 int handle;
ffe60014
DG
162 /* Channel and streams were sent to the UST tracer. */
163 int is_sent;
dda154b8
JG
164 /*
165 * Unique key used to identify the channel on the consumer side.
166 * 0 is a reserved 'invalid' value used to indicate that the consumer
a9577b76 167 * does not know about this channel (i.e. an error occurred).
dda154b8 168 */
d88aee68 169 uint64_t key;
7972aab2
DG
170 /* Id of the tracing channel set on creation. */
171 uint64_t tracing_channel_id;
ffe60014
DG
172 /* Number of stream that this channel is expected to receive. */
173 unsigned int expected_stream_count;
48842b30 174 char name[LTTNG_UST_SYM_NAME_LEN];
13161846 175 struct lttng_ust_object_data *obj;
ffe60014 176 struct ustctl_consumer_channel_attr attr;
030a66fa 177 struct ust_app_stream_list streams;
d0b96690
DG
178 /* Session pointer that owns this object. */
179 struct ust_app_session *session;
31746f93
DG
180 /*
181 * Contexts are kept in a hash table for fast lookup and in an ordered list
182 * so we are able to enable them on the tracer side in the same order the
183 * user added them.
184 */
bec39940 185 struct lttng_ht *ctx;
31746f93
DG
186 struct cds_list_head ctx_list;
187
bec39940 188 struct lttng_ht *events;
1624d5b7
JD
189 uint64_t tracefile_size;
190 uint64_t tracefile_count;
e9404c27 191 uint64_t monitor_timer_interval;
d0b96690
DG
192 /*
193 * Node indexed by channel name in the channels' hash table of a session.
194 */
bec39940 195 struct lttng_ht_node_str node;
d0b96690
DG
196 /*
197 * Node indexed by UST channel object descriptor (handle). Stored in the
198 * ust_objd hash table in the ust_app object.
199 */
200 struct lttng_ht_node_ulong ust_objd_node;
36b588ed
MD
201 /* For delayed reclaim */
202 struct rcu_head rcu_head;
48842b30
DG
203};
204
c3e68e71
JR
205struct ust_app_map {
206 int enabled;
207 int handle;
208 /* Counters were sent to the UST tracer. */
209 int is_sent;
210 /*
211 * FIXME frdeso: what is difference between key and tracing_map_id
212 * Unique key used to identify the map.
213 */
214 uint64_t key;
215 /* Id of the tracing map set on creation. */
216 uint64_t tracing_map_id;
217 bool coalesce_hits;
218 enum lttng_map_bitness bitness;
219 char name[LTTNG_UST_SYM_NAME_LEN];
220 struct lttng_ust_object_data *obj;
221 struct ust_app_counter_list counters;
222 /* Session pointer that owns this object. */
223 struct ust_app_session *session;
224 struct lttng_ht *events;
225 struct ltt_ust_map_dead_pid_kv_values *dead_app_kv_values;
226
227 size_t bucket_count;
228 struct ustctl_daemon_counter *map_handle;
229 /*
230 * Node indexed by channel name in the channels' hash table of a session.
231 */
232 struct lttng_ht_node_str node;
233 /*
234 * Node indexed by UST channel object descriptor (handle). Stored in the
235 * ust_objd hash table in the ust_app object.
236 */
237 struct lttng_ht_node_ulong ust_objd_node;
238 /* For delayed reclaim */
239 struct rcu_head rcu_head;
240};
241
48842b30 242struct ust_app_session {
d0b96690
DG
243 /*
244 * Lock protecting this session's ust app interaction. Held
245 * across command send/recv to/from app. Never nests within the
246 * session registry lock.
247 */
248 pthread_mutex_t lock;
249
48842b30 250 int enabled;
8be98f9a
MD
251 /* started: has the session been in started state at any time ? */
252 int started; /* allows detection of start vs restart. */
a991f516 253 int handle; /* used has unique identifier for app session */
7972aab2 254
b161602a
MD
255 bool deleted; /* Session deleted flag. Check with lock held. */
256
7972aab2
DG
257 /*
258 * Tracing session ID. Multiple ust app session can have the same tracing
259 * session id making this value NOT unique to the object.
260 */
d9bf3ca4 261 uint64_t tracing_id;
7972aab2 262 uint64_t id; /* Unique session identifier */
bec39940 263 struct lttng_ht *channels; /* Registered channels */
c3e68e71 264 struct lttng_ht *maps; /* Registered maps */
d9bf3ca4 265 struct lttng_ht_node_u64 node;
10b56aef
MD
266 /*
267 * Node indexed by UST session object descriptor (handle). Stored in the
268 * ust_sessions_objd hash table in the ust_app object.
269 */
270 struct lttng_ht_node_ulong ust_objd_node;
d2956687 271 /* Starts with 'ust'; no leading slash. */
bec39940 272 char path[PATH_MAX];
7972aab2 273 /* UID/GID of the application owning the session */
470cc211 274 struct lttng_credentials real_credentials;
7972aab2 275 /* Effective UID and GID. Same as the tracing session. */
470cc211 276 struct lttng_credentials effective_credentials;
d42f20df 277 struct cds_list_head teardown_node;
d88aee68
DG
278 /*
279 * Once at least *one* session is created onto the application, the
280 * corresponding consumer is set so we can use it on unregistration.
281 */
282 struct consumer_output *consumer;
7972aab2
DG
283 enum lttng_buffer_type buffer_type;
284 /* ABI of the session. Same value as the application. */
285 uint32_t bits_per_long;
36b588ed
MD
286 /* For delayed reclaim */
287 struct rcu_head rcu_head;
2bba9e53
DG
288 /* If the channel's streams have to be outputed or not. */
289 unsigned int output_traces;
ecc48a90 290 unsigned int live_timer_interval; /* usec */
ad7a9107
DG
291
292 /* Metadata channel attributes. */
293 struct ustctl_consumer_channel_attr metadata_attr;
d7ba1388 294
3d071855 295 char root_shm_path[PATH_MAX];
d7ba1388 296 char shm_path[PATH_MAX];
48842b30
DG
297};
298
f6a9efaa
DG
299/*
300 * Registered traceable applications. Libust registers to the session daemon
050349bb 301 * and a linked list is kept of all running traceable app.
91d76f53 302 */
56fff090 303struct ust_app {
852d0037 304 int sock;
fb45065e
MD
305 pthread_mutex_t sock_lock; /* Protects sock protocol. */
306
d0b96690 307 int notify_sock;
852d0037 308 pid_t pid;
099e26bd
DG
309 pid_t ppid;
310 uid_t uid; /* User ID that owns the apps */
aea829b3 311 gid_t gid; /* Group ID that owns the apps */
d0b96690
DG
312
313 /* App ABI */
314 uint32_t bits_per_long;
315 uint32_t uint8_t_alignment;
316 uint32_t uint16_t_alignment;
317 uint32_t uint32_t_alignment;
318 uint32_t uint64_t_alignment;
319 uint32_t long_alignment;
320 int byte_order; /* BIG_ENDIAN or LITTLE_ENDIAN */
321
e0c7ec2b
DG
322 int compatible; /* If the lttng-ust tracer version does not match the
323 supported version of the session daemon, this flag is
324 set to 0 (NOT compatible) else 1. */
325 struct lttng_ust_tracer_version version;
d0b96690
DG
326 uint32_t v_major; /* Version major number */
327 uint32_t v_minor; /* Version minor number */
d88aee68
DG
328 /* Extra for the NULL byte. */
329 char name[UST_APP_PROCNAME_LEN + 1];
7972aab2
DG
330 /* Type of buffer this application uses. */
331 enum lttng_buffer_type buffer_type;
bec39940 332 struct lttng_ht *sessions;
852d0037
DG
333 struct lttng_ht_node_ulong pid_n;
334 struct lttng_ht_node_ulong sock_n;
d0b96690 335 struct lttng_ht_node_ulong notify_sock_n;
d42f20df
DG
336 /*
337 * This is a list of ust app session that, once the app is going into
338 * teardown mode, in the RCU call, each node in this list is removed and
339 * deleted.
340 *
341 * Element of the list are added when an application unregisters after each
342 * ht_del of ust_app_session associated to this app. This list is NOT used
343 * when a session is destroyed.
344 */
345 struct cds_list_head teardown_head;
d0b96690
DG
346 /*
347 * Hash table containing ust_app_channel indexed by channel objd.
348 */
c3e68e71
JR
349 struct lttng_ht *ust_chan_objd;
350 /*
351 * Hash table containing ust_app_map indexed by map objd.
352 */
353 struct lttng_ht *ust_map_objd;
10b56aef
MD
354 /*
355 * Hash table containing ust_app_session indexed by objd.
356 */
357 struct lttng_ht *ust_sessions_objd;
022d91ba 358
f20baf8e 359 /*
022d91ba
DG
360 * If this application is of the agent domain and this is non negative then
361 * a lookup MUST be done to acquire a read side reference to the
362 * corresponding agent app object. If the lookup fails, this should be set
363 * to a negative value indicating that the agent application is gone.
f20baf8e 364 */
022d91ba 365 int agent_app_sock;
940c4592
JR
366 /*
367 * Time at which the app is registred.
368 * Used for path creation
369 */
370 time_t registration_time;
da873412
JR
371 /*
372 * Event notifier
373 */
374 struct {
375 /*
376 * Handle to the lttng_ust object representing the event
377 * notifier group.
378 */
379 struct lttng_ust_object_data *object;
380 struct lttng_pipe *event_pipe;
c3e68e71
JR
381 struct lttng_ust_object_data *counter;
382 struct lttng_ust_object_data **counter_cpu;
383 int nr_counter_cpu;
da873412 384 } event_notifier_group;
993578ff
JR
385 /*
386 * Hashtable indexing the application's event notifier rule's
387 * (ust_app_event_notifier_rule) by their token's value.
388 */
389 struct lttng_ht *token_to_event_notifier_rule_ht;
91d76f53
DG
390};
391
74d0b642 392#ifdef HAVE_LIBLTTNG_UST_CTL
3bd1e081 393
56fff090 394int ust_app_register(struct ust_register_msg *msg, int sock);
fb45065e 395int ust_app_register_done(struct ust_app *app);
d0b96690 396int ust_app_version(struct ust_app *app);
56fff090 397void ust_app_unregister(int sock);
421cb601 398int ust_app_start_trace_all(struct ltt_ust_session *usess);
8be98f9a 399int ust_app_stop_trace_all(struct ltt_ust_session *usess);
84cd17c6 400int ust_app_destroy_trace_all(struct ltt_ust_session *usess);
b551a063 401int ust_app_list_events(struct lttng_event **events);
f37d259d 402int ust_app_list_event_fields(struct lttng_event_field **fields);
c3e68e71 403int ust_app_create_channel_event_glb(struct ltt_ust_session *usess,
35a9059d
DG
404 struct ltt_ust_channel *uchan, struct ltt_ust_event *uevent);
405int ust_app_disable_channel_glb(struct ltt_ust_session *usess,
78f0bacd 406 struct ltt_ust_channel *uchan);
35a9059d 407int ust_app_enable_channel_glb(struct ltt_ust_session *usess,
78f0bacd 408 struct ltt_ust_channel *uchan);
c3e68e71 409int ust_app_enable_channel_event_glb(struct ltt_ust_session *usess,
edb67388 410 struct ltt_ust_channel *uchan, struct ltt_ust_event *uevent);
c3e68e71 411int ust_app_disable_channel_event_glb(struct ltt_ust_session *usess,
35a9059d 412 struct ltt_ust_channel *uchan, struct ltt_ust_event *uevent);
c3e68e71
JR
413int ust_app_map_list_values(const struct ltt_ust_session *usess,
414 struct ltt_ust_map *umap,
415 const struct lttng_map_query *query,
416 struct lttng_map_content **map_content);
417int ust_app_enable_map_glb(struct ltt_ust_session *usess,
418 struct ltt_ust_map *umap);
419int ust_app_disable_map_glb(struct ltt_ust_session *usess,
420 struct ltt_ust_map *umap);
421int ust_app_create_map_event_glb(struct ltt_ust_session *usess,
422 struct ltt_ust_map *umap, struct ltt_ust_event *uevent);
423int ust_app_enable_map_event_glb(struct ltt_ust_session *usess,
424 struct ltt_ust_map *umap, struct ltt_ust_event *uevent);
425int ust_app_disable_map_event_glb(struct ltt_ust_session *usess,
426 struct ltt_ust_map *umap, struct ltt_ust_event *uevent);
427
55cc08a6
DG
428int ust_app_add_ctx_channel_glb(struct ltt_ust_session *usess,
429 struct ltt_ust_channel *uchan, struct ltt_ust_context *uctx);
a9ad0c8f
MD
430void ust_app_global_update(struct ltt_ust_session *usess, struct ust_app *app);
431void ust_app_global_update_all(struct ltt_ust_session *usess);
993578ff
JR
432void ust_app_global_update_event_notifier_rules(struct ust_app *app);
433void ust_app_global_update_all_event_notifier_rules(void);
91d76f53 434
c3e68e71
JR
435void ust_app_update_event_notifier_error_count(struct lttng_trigger *trigger);
436
56fff090 437void ust_app_clean_list(void);
57703f6e 438int ust_app_ht_alloc(void);
f6a9efaa 439struct ust_app *ust_app_find_by_pid(pid_t pid);
ffe60014 440struct ust_app_stream *ust_app_alloc_stream(void);
c3e68e71 441struct ust_app_map_counter *ust_app_alloc_map_counter(void);
d0b96690
DG
442int ust_app_recv_registration(int sock, struct ust_register_msg *msg);
443int ust_app_recv_notify(int sock);
444void ust_app_add(struct ust_app *app);
445struct ust_app *ust_app_create(struct ust_register_msg *msg, int sock);
d88aee68 446void ust_app_notify_sock_unregister(int sock);
331744e3
JD
447ssize_t ust_app_push_metadata(struct ust_registry_session *registry,
448 struct consumer_socket *socket, int send_zero_data);
f45e313d 449void ust_app_destroy(struct ust_app *app);
fb9a95c4
JG
450enum lttng_error_code ust_app_snapshot_record(
451 const struct ltt_ust_session *usess,
348a81dc 452 const struct consumer_output *output, int wait,
d07ceecd 453 uint64_t nb_packets_per_stream);
16f35901 454uint64_t ust_app_get_size_one_more_packet_per_stream(
fb9a95c4 455 const struct ltt_ust_session *usess, uint64_t cur_nr_packets);
f20baf8e 456struct ust_app *ust_app_find_by_sock(int sock);
fb83fe64
JD
457int ust_app_uid_get_channel_runtime_stats(uint64_t ust_session_id,
458 struct cds_list_head *buffer_reg_uid_list,
459 struct consumer_output *consumer, uint64_t uchan_id,
460 int overwrite, uint64_t *discarded, uint64_t *lost);
461int ust_app_pid_get_channel_runtime_stats(struct ltt_ust_session *usess,
462 struct ltt_ust_channel *uchan,
463 struct consumer_output *consumer,
464 int overwrite, uint64_t *discarded, uint64_t *lost);
c2561365 465int ust_app_regenerate_statedump_all(struct ltt_ust_session *usess);
6f6d3b69 466enum lttng_error_code ust_app_rotate_session(struct ltt_session *session);
d2956687
JG
467enum lttng_error_code ust_app_create_channel_subdirectories(
468 const struct ltt_ust_session *session);
75018ab6
JG
469int ust_app_release_object(struct ust_app *app,
470 struct lttng_ust_object_data *data);
4a9b9759 471enum lttng_error_code ust_app_clear_session(struct ltt_session *session);
04ed9e10 472enum lttng_error_code ust_app_open_packets(struct ltt_session *session);
44d3bd01 473
da873412
JR
474int ust_app_setup_event_notifier_group(struct ust_app *app);
475
b51ec5b4
MD
476static inline
477int ust_app_supported(void)
478{
479 return 1;
480}
481
74d0b642 482#else /* HAVE_LIBLTTNG_UST_CTL */
3bd1e081 483
cc920def
DG
484static inline
485int ust_app_destroy_trace_all(struct ltt_ust_session *usess)
486{
487 return 0;
488}
d974f197 489static inline
421cb601
DG
490int ust_app_start_trace(struct ltt_ust_session *usess, struct ust_app *app)
491{
492 return 0;
493}
494static inline
495int ust_app_start_trace_all(struct ltt_ust_session *usess)
d974f197 496{
5cf5d0e7 497 return 0;
d974f197 498}
3bd1e081 499static inline
cc920def
DG
500int ust_app_stop_trace_all(struct ltt_ust_session *usess)
501{
502 return 0;
503}
504static inline
b551a063
DG
505int ust_app_list_events(struct lttng_event **events)
506{
db7c0497 507 return -ENOSYS;
b551a063
DG
508}
509static inline
da0bdb87
MD
510int ust_app_list_event_fields(struct lttng_event_field **fields)
511{
512 return -ENOSYS;
513}
514static inline
3bd1e081
MD
515int ust_app_register(struct ust_register_msg *msg, int sock)
516{
517 return -ENOSYS;
518}
519static inline
fb45065e 520int ust_app_register_done(struct ust_app *app)
f2ca2e25
GF
521{
522 return -ENOSYS;
523}
524static inline
d0b96690
DG
525int ust_app_version(struct ust_app *app)
526{
527 return -ENOSYS;
528}
529static inline
3bd1e081
MD
530void ust_app_unregister(int sock)
531{
532}
533static inline
3bd1e081
MD
534void ust_app_lock_list(void)
535{
536}
537static inline
538void ust_app_unlock_list(void)
539{
540}
541static inline
542void ust_app_clean_list(void)
543{
544}
545static inline
546struct ust_app_list *ust_app_get_list(void)
547{
548 return NULL;
549}
550static inline
551struct ust_app *ust_app_get_by_pid(pid_t pid)
552{
553 return NULL;
554}
48842b30 555static inline
12a84043
JG
556int ust_app_ht_alloc(void)
557{
558 return 0;
559}
cc920def 560static inline
3646a051 561void ust_app_global_update(struct ltt_ust_session *usess, struct ust_app *app)
cc920def
DG
562{}
563static inline
993578ff
JR
564void ust_app_global_update_event_notifier_rules(struct ust_app *app)
565{}
566static inline
567void ust_app_global_update_all_event_notifier_rules(void)
da873412
JR
568{}
569static inline
570int ust_app_setup_event_notifier_group(struct ust_app *app)
571{
572 return 0;
573}
574static inline
35a9059d 575int ust_app_disable_channel_glb(struct ltt_ust_session *usess,
cc920def 576 struct ltt_ust_channel *uchan)
d974f197 577{
cc920def 578 return 0;
d974f197 579}
487cf67c 580static inline
35a9059d 581int ust_app_enable_channel_glb(struct ltt_ust_session *usess,
cc920def 582 struct ltt_ust_channel *uchan)
487cf67c 583{
cc920def
DG
584 return 0;
585}
586static inline
c3e68e71 587int ust_app_create_channel_event_glb(struct ltt_ust_session *usess,
35a9059d
DG
588 struct ltt_ust_channel *uchan, struct ltt_ust_event *uevent)
589{
590 return 0;
591}
592static inline
c3e68e71 593int ust_app_disable_channel_event_glb(struct ltt_ust_session *usess,
cc920def
DG
594 struct ltt_ust_channel *uchan, struct ltt_ust_event *uevent)
595{
596 return 0;
487cf67c 597}
edb67388 598static inline
c3e68e71 599int ust_app_enable_channel_event_glb(struct ltt_ust_session *usess,
edb67388
DG
600 struct ltt_ust_channel *uchan, struct ltt_ust_event *uevent)
601{
602 return 0;
603}
55cc08a6 604static inline
c3e68e71
JR
605int ust_app_disable_map_glb(struct ltt_ust_session *usess,
606 struct ltt_ust_map *umap)
607{
608 return 0;
609}
610static inline
611int ust_app_map_list_values(const struct ltt_ust_session *usess,
612 struct ltt_ust_map *umap,
613 const struct lttng_map_query *query,
614 struct lttng_map_content **map_content)
615{
616 return 0;
617}
618static inline
619int ust_app_enable_map_glb(struct ltt_ust_session *usess,
620 struct ltt_ust_map *umap)
621{
622 return 0;
623}
624static inline
625int ust_app_create_map_event_glb(struct ltt_ust_session *usess,
626 struct ltt_ust_map *umap, struct ltt_ust_event *uevent)
627{
628 return 0;
629}
630static inline
631int ust_app_disable_map_event_glb(struct ltt_ust_session *usess,
632 struct ltt_ust_map *umap, struct ltt_ust_event *uevent)
633{
634 return 0;
635}
636static inline
637int ust_app_enable_map_event_glb(struct ltt_ust_session *usess,
638 struct ltt_ust_map *umap, struct ltt_ust_event *uevent)
639{
640 return 0;
641}
642static inline
55cc08a6
DG
643int ust_app_add_ctx_channel_glb(struct ltt_ust_session *usess,
644 struct ltt_ust_channel *uchan, struct ltt_ust_context *uctx)
645{
646 return 0;
647}
76d45b40
DG
648static inline
649int ust_app_enable_event_pid(struct ltt_ust_session *usess,
650 struct ltt_ust_channel *uchan, struct ltt_ust_event *uevent,
651 pid_t pid)
652{
653 return 0;
654}
7f79d3a1 655static inline
d0b96690
DG
656int ust_app_recv_registration(int sock, struct ust_register_msg *msg)
657{
658 return 0;
659}
660static inline
661int ust_app_recv_notify(int sock)
4466912f
DG
662{
663 return 0;
664}
d0b96690
DG
665static inline
666struct ust_app *ust_app_create(struct ust_register_msg *msg, int sock)
667{
668 return NULL;
669}
670static inline
671void ust_app_add(struct ust_app *app)
672{
673}
d88aee68
DG
674static inline
675void ust_app_notify_sock_unregister(int sock)
676{
677}
331744e3
JD
678static inline
679ssize_t ust_app_push_metadata(struct ust_registry_session *registry,
680 struct consumer_socket *socket, int send_zero_data)
681{
682 return 0;
683}
f45e313d
DG
684static inline
685void ust_app_destroy(struct ust_app *app)
686{
687 return;
688}
6dc3064a 689static inline
9a654598 690enum lttng_error_code ust_app_snapshot_record(struct ltt_ust_session *usess,
3637639a 691 const struct consumer_output *output, int wait, uint64_t max_stream_size)
5c786ded
JD
692{
693 return 0;
694}
695static inline
696unsigned int ust_app_get_nb_stream(struct ltt_ust_session *usess)
6dc3064a
DG
697{
698 return 0;
699}
c3e68e71
JR
700static inline
701void ust_app_update_event_notifier_error_count(
702 struct lttng_trigger *lttng_trigger)
703{
704 return;
705}
b51ec5b4
MD
706static inline
707int ust_app_supported(void)
708{
709 return 0;
710}
f20baf8e
DG
711static inline
712struct ust_app *ust_app_find_by_sock(int sock)
713{
714 return NULL;
715}
95b1d17c
DG
716static inline
717struct ust_app *ust_app_find_by_pid(pid_t pid)
718{
719 return NULL;
720}
16f35901
JG
721static inline
722uint64_t ust_app_get_size_one_more_packet_per_stream(
1f4fc770 723 const struct ltt_ust_session *usess, uint64_t cur_nr_packets) {
16f35901
JG
724 return 0;
725}
fb83fe64
JD
726static inline
727int ust_app_uid_get_channel_runtime_stats(uint64_t ust_session_id,
728 struct cds_list_head *buffer_reg_uid_list,
729 struct consumer_output *consumer, int overwrite,
730 uint64_t uchan_id, uint64_t *discarded, uint64_t *lost)
731{
732 return 0;
733}
734
735static inline
736int ust_app_pid_get_channel_runtime_stats(struct ltt_ust_session *usess,
737 struct ltt_ust_channel *uchan,
738 struct consumer_output *consumer,
739 int overwrite, uint64_t *discarded, uint64_t *lost)
740{
741 return 0;
742}
b51ec5b4 743
6f698634
JG
744static inline
745int ust_app_regenerate_statedump_all(struct ltt_ust_session *usess)
746{
747 return 0;
748}
749
5c408ad8 750static inline
d5a1b7aa 751enum lttng_error_code ust_app_rotate_session(struct ltt_session *session)
5c408ad8
JD
752{
753 return 0;
754}
755
d2956687
JG
756static inline
757enum lttng_error_code ust_app_create_channel_subdirectories(
758 const struct ltt_ust_session *session)
759{
760 return 0;
761}
762
75018ab6
JG
763static inline
764int ust_app_release_object(struct ust_app *app, struct lttng_ust_object_data *data)
765{
766 return 0;
767}
768
4a9b9759
MD
769static inline
770enum lttng_error_code ust_app_clear_session(struct ltt_session *session)
771{
772 return 0;
773}
774
04ed9e10
JG
775static inline
776enum lttng_error_code ust_app_open_packets(struct ltt_session *session)
777{
778 return 0;
779}
780
74d0b642 781#endif /* HAVE_LIBLTTNG_UST_CTL */
3bd1e081 782
f6a9efaa 783#endif /* _LTT_UST_APP_H */
This page took 0.131305 seconds and 5 git commands to generate.