Fix: sessiond: bad fd used while rotating exiting app's buffers
[lttng-tools.git] / src / bin / lttng-sessiond / ust-app.h
CommitLineData
91d76f53 1/*
90c106c6 2 * Copyright (C) 2011 EfficiOS Inc.
ab5be9fa 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>
3faa1e3d 13#include <urcu/ref.h>
1e307fab 14
533a90fb 15#include <common/index-allocator.h>
c70636a7 16#include <common/uuid.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
412d7227 30extern int the_ust_consumerd64_fd, the_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;
fc4b93fa 45 enum lttng_ust_abi_loglevel_type loglevel_type;
1083b49a 46 int loglevel_value;
51755dc8 47 const struct lttng_event_exclusion *exclusion;
18eace3b
DG
48};
49
099e26bd
DG
50/*
51 * Application registration data structure.
52 */
53struct ust_register_msg {
b623cb6a 54 enum lttng_ust_ctl_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
55cc08a6
DG
99struct ust_app_ctx {
100 int handle;
bdf64013 101 struct lttng_ust_context_attr ctx;
fc4b93fa 102 struct lttng_ust_abi_object_data *obj;
bec39940 103 struct lttng_ht_node_ulong node;
31746f93 104 struct cds_list_head list;
55cc08a6
DG
105};
106
48842b30
DG
107struct ust_app_event {
108 int enabled;
109 int handle;
fc4b93fa
MD
110 struct lttng_ust_abi_object_data *obj;
111 struct lttng_ust_abi_event attr;
112 char name[LTTNG_UST_ABI_SYM_NAME_LEN];
bec39940 113 struct lttng_ht_node_str node;
2b00d462 114 struct lttng_bytecode *filter;
51755dc8 115 struct lttng_event_exclusion *exclusion;
48842b30
DG
116};
117
993578ff
JR
118struct ust_app_event_notifier_rule {
119 int enabled;
533a90fb 120 uint64_t error_counter_index;
993578ff 121 int handle;
fc4b93fa 122 struct lttng_ust_abi_object_data *obj;
993578ff 123 /* Holds a strong reference. */
267d66aa 124 struct lttng_trigger *trigger;
993578ff
JR
125 /* Unique ID returned by the tracer to identify this event notifier. */
126 uint64_t token;
127 struct lttng_ht_node_u64 node;
267d66aa 128 /* The trigger object owns the filter. */
2b00d462 129 const struct lttng_bytecode *filter;
993578ff
JR
130 /* Owned by this. */
131 struct lttng_event_exclusion *exclusion;
132 /* For delayed reclaim. */
133 struct rcu_head rcu_head;
134};
135
030a66fa
DG
136struct ust_app_stream {
137 int handle;
138 char pathname[PATH_MAX];
139 /* Format is %s_%d respectively channel name and CPU number. */
140 char name[DEFAULT_STREAM_NAME_LEN];
fc4b93fa 141 struct lttng_ust_abi_object_data *obj;
030a66fa
DG
142 /* Using a list of streams to keep order. */
143 struct cds_list_head list;
144};
145
48842b30
DG
146struct ust_app_channel {
147 int enabled;
148 int handle;
ffe60014
DG
149 /* Channel and streams were sent to the UST tracer. */
150 int is_sent;
dda154b8
JG
151 /*
152 * Unique key used to identify the channel on the consumer side.
153 * 0 is a reserved 'invalid' value used to indicate that the consumer
a9577b76 154 * does not know about this channel (i.e. an error occurred).
dda154b8 155 */
d88aee68 156 uint64_t key;
7972aab2
DG
157 /* Id of the tracing channel set on creation. */
158 uint64_t tracing_channel_id;
ffe60014
DG
159 /* Number of stream that this channel is expected to receive. */
160 unsigned int expected_stream_count;
fc4b93fa
MD
161 char name[LTTNG_UST_ABI_SYM_NAME_LEN];
162 struct lttng_ust_abi_object_data *obj;
b623cb6a 163 struct lttng_ust_ctl_consumer_channel_attr attr;
030a66fa 164 struct ust_app_stream_list streams;
d0b96690
DG
165 /* Session pointer that owns this object. */
166 struct ust_app_session *session;
31746f93
DG
167 /*
168 * Contexts are kept in a hash table for fast lookup and in an ordered list
169 * so we are able to enable them on the tracer side in the same order the
170 * user added them.
171 */
bec39940 172 struct lttng_ht *ctx;
31746f93
DG
173 struct cds_list_head ctx_list;
174
bec39940 175 struct lttng_ht *events;
1624d5b7
JD
176 uint64_t tracefile_size;
177 uint64_t tracefile_count;
e9404c27 178 uint64_t monitor_timer_interval;
d0b96690
DG
179 /*
180 * Node indexed by channel name in the channels' hash table of a session.
181 */
bec39940 182 struct lttng_ht_node_str node;
d0b96690
DG
183 /*
184 * Node indexed by UST channel object descriptor (handle). Stored in the
185 * ust_objd hash table in the ust_app object.
186 */
187 struct lttng_ht_node_ulong ust_objd_node;
36b588ed
MD
188 /* For delayed reclaim */
189 struct rcu_head rcu_head;
48842b30
DG
190};
191
192struct ust_app_session {
d0b96690
DG
193 /*
194 * Lock protecting this session's ust app interaction. Held
195 * across command send/recv to/from app. Never nests within the
196 * session registry lock.
197 */
198 pthread_mutex_t lock;
199
48842b30 200 int enabled;
8be98f9a
MD
201 /* started: has the session been in started state at any time ? */
202 int started; /* allows detection of start vs restart. */
a991f516 203 int handle; /* used has unique identifier for app session */
7972aab2 204
b161602a
MD
205 bool deleted; /* Session deleted flag. Check with lock held. */
206
7972aab2
DG
207 /*
208 * Tracing session ID. Multiple ust app session can have the same tracing
209 * session id making this value NOT unique to the object.
210 */
d9bf3ca4 211 uint64_t tracing_id;
7972aab2 212 uint64_t id; /* Unique session identifier */
bec39940 213 struct lttng_ht *channels; /* Registered channels */
d9bf3ca4 214 struct lttng_ht_node_u64 node;
10b56aef
MD
215 /*
216 * Node indexed by UST session object descriptor (handle). Stored in the
217 * ust_sessions_objd hash table in the ust_app object.
218 */
219 struct lttng_ht_node_ulong ust_objd_node;
d2956687 220 /* Starts with 'ust'; no leading slash. */
bec39940 221 char path[PATH_MAX];
7972aab2 222 /* UID/GID of the application owning the session */
470cc211 223 struct lttng_credentials real_credentials;
7972aab2 224 /* Effective UID and GID. Same as the tracing session. */
470cc211 225 struct lttng_credentials effective_credentials;
d42f20df 226 struct cds_list_head teardown_node;
d88aee68
DG
227 /*
228 * Once at least *one* session is created onto the application, the
229 * corresponding consumer is set so we can use it on unregistration.
230 */
231 struct consumer_output *consumer;
7972aab2
DG
232 enum lttng_buffer_type buffer_type;
233 /* ABI of the session. Same value as the application. */
234 uint32_t bits_per_long;
36b588ed
MD
235 /* For delayed reclaim */
236 struct rcu_head rcu_head;
2bba9e53
DG
237 /* If the channel's streams have to be outputed or not. */
238 unsigned int output_traces;
ecc48a90 239 unsigned int live_timer_interval; /* usec */
ad7a9107
DG
240
241 /* Metadata channel attributes. */
b623cb6a 242 struct lttng_ust_ctl_consumer_channel_attr metadata_attr;
d7ba1388 243
3d071855 244 char root_shm_path[PATH_MAX];
d7ba1388 245 char shm_path[PATH_MAX];
48842b30
DG
246};
247
f6a9efaa
DG
248/*
249 * Registered traceable applications. Libust registers to the session daemon
050349bb 250 * and a linked list is kept of all running traceable app.
91d76f53 251 */
56fff090 252struct ust_app {
3faa1e3d
JG
253 /*
254 * The lifetime of 'sock' holds a reference to the application; the
255 * application management thread will release a reference to the
256 * application if the application dies.
257 */
258 struct urcu_ref ref;
852d0037 259 int sock;
fb45065e
MD
260 pthread_mutex_t sock_lock; /* Protects sock protocol. */
261
d0b96690 262 int notify_sock;
852d0037 263 pid_t pid;
099e26bd
DG
264 pid_t ppid;
265 uid_t uid; /* User ID that owns the apps */
aea829b3 266 gid_t gid; /* Group ID that owns the apps */
d0b96690
DG
267
268 /* App ABI */
269 uint32_t bits_per_long;
270 uint32_t uint8_t_alignment;
271 uint32_t uint16_t_alignment;
272 uint32_t uint32_t_alignment;
273 uint32_t uint64_t_alignment;
274 uint32_t long_alignment;
275 int byte_order; /* BIG_ENDIAN or LITTLE_ENDIAN */
276
e0c7ec2b
DG
277 int compatible; /* If the lttng-ust tracer version does not match the
278 supported version of the session daemon, this flag is
279 set to 0 (NOT compatible) else 1. */
fc4b93fa 280 struct lttng_ust_abi_tracer_version version;
d0b96690
DG
281 uint32_t v_major; /* Version major number */
282 uint32_t v_minor; /* Version minor number */
d88aee68
DG
283 /* Extra for the NULL byte. */
284 char name[UST_APP_PROCNAME_LEN + 1];
7972aab2
DG
285 /* Type of buffer this application uses. */
286 enum lttng_buffer_type buffer_type;
bec39940 287 struct lttng_ht *sessions;
852d0037
DG
288 struct lttng_ht_node_ulong pid_n;
289 struct lttng_ht_node_ulong sock_n;
d0b96690 290 struct lttng_ht_node_ulong notify_sock_n;
d42f20df
DG
291 /*
292 * This is a list of ust app session that, once the app is going into
293 * teardown mode, in the RCU call, each node in this list is removed and
294 * deleted.
295 *
296 * Element of the list are added when an application unregisters after each
297 * ht_del of ust_app_session associated to this app. This list is NOT used
298 * when a session is destroyed.
299 */
300 struct cds_list_head teardown_head;
d0b96690
DG
301 /*
302 * Hash table containing ust_app_channel indexed by channel objd.
303 */
304 struct lttng_ht *ust_objd;
10b56aef
MD
305 /*
306 * Hash table containing ust_app_session indexed by objd.
307 */
308 struct lttng_ht *ust_sessions_objd;
022d91ba 309
f20baf8e 310 /*
022d91ba
DG
311 * If this application is of the agent domain and this is non negative then
312 * a lookup MUST be done to acquire a read side reference to the
313 * corresponding agent app object. If the lookup fails, this should be set
314 * to a negative value indicating that the agent application is gone.
f20baf8e 315 */
022d91ba 316 int agent_app_sock;
940c4592
JR
317 /*
318 * Time at which the app is registred.
319 * Used for path creation
320 */
321 time_t registration_time;
da873412
JR
322 /*
323 * Event notifier
324 */
325 struct {
326 /*
327 * Handle to the lttng_ust object representing the event
328 * notifier group.
329 */
fc4b93fa 330 struct lttng_ust_abi_object_data *object;
da873412 331 struct lttng_pipe *event_pipe;
533a90fb
FD
332 struct lttng_ust_abi_object_data *counter;
333 struct lttng_ust_abi_object_data **counter_cpu;
334 int nr_counter_cpu;
da873412 335 } event_notifier_group;
993578ff
JR
336 /*
337 * Hashtable indexing the application's event notifier rule's
338 * (ust_app_event_notifier_rule) by their token's value.
339 */
340 struct lttng_ht *token_to_event_notifier_rule_ht;
91d76f53
DG
341};
342
74d0b642 343#ifdef HAVE_LIBLTTNG_UST_CTL
3bd1e081 344
56fff090 345int ust_app_register(struct ust_register_msg *msg, int sock);
fb45065e 346int ust_app_register_done(struct ust_app *app);
d0b96690 347int ust_app_version(struct ust_app *app);
3faa1e3d 348void ust_app_unregister_by_socket(int sock);
421cb601 349int ust_app_start_trace_all(struct ltt_ust_session *usess);
8be98f9a 350int ust_app_stop_trace_all(struct ltt_ust_session *usess);
84cd17c6 351int ust_app_destroy_trace_all(struct ltt_ust_session *usess);
b551a063 352int ust_app_list_events(struct lttng_event **events);
f37d259d 353int ust_app_list_event_fields(struct lttng_event_field **fields);
35a9059d
DG
354int ust_app_create_event_glb(struct ltt_ust_session *usess,
355 struct ltt_ust_channel *uchan, struct ltt_ust_event *uevent);
356int ust_app_disable_channel_glb(struct ltt_ust_session *usess,
78f0bacd 357 struct ltt_ust_channel *uchan);
35a9059d 358int ust_app_enable_channel_glb(struct ltt_ust_session *usess,
78f0bacd 359 struct ltt_ust_channel *uchan);
35a9059d 360int ust_app_enable_event_glb(struct ltt_ust_session *usess,
edb67388 361 struct ltt_ust_channel *uchan, struct ltt_ust_event *uevent);
35a9059d
DG
362int ust_app_disable_event_glb(struct ltt_ust_session *usess,
363 struct ltt_ust_channel *uchan, struct ltt_ust_event *uevent);
55cc08a6
DG
364int ust_app_add_ctx_channel_glb(struct ltt_ust_session *usess,
365 struct ltt_ust_channel *uchan, struct ltt_ust_context *uctx);
a9ad0c8f
MD
366void ust_app_global_update(struct ltt_ust_session *usess, struct ust_app *app);
367void ust_app_global_update_all(struct ltt_ust_session *usess);
993578ff
JR
368void ust_app_global_update_event_notifier_rules(struct ust_app *app);
369void ust_app_global_update_all_event_notifier_rules(void);
91d76f53 370
56fff090 371void ust_app_clean_list(void);
57703f6e 372int ust_app_ht_alloc(void);
f6a9efaa 373struct ust_app *ust_app_find_by_pid(pid_t pid);
ffe60014 374struct ust_app_stream *ust_app_alloc_stream(void);
d0b96690
DG
375int ust_app_recv_registration(int sock, struct ust_register_msg *msg);
376int ust_app_recv_notify(int sock);
377void ust_app_add(struct ust_app *app);
378struct ust_app *ust_app_create(struct ust_register_msg *msg, int sock);
d88aee68 379void ust_app_notify_sock_unregister(int sock);
331744e3
JD
380ssize_t ust_app_push_metadata(struct ust_registry_session *registry,
381 struct consumer_socket *socket, int send_zero_data);
fb9a95c4
JG
382enum lttng_error_code ust_app_snapshot_record(
383 const struct ltt_ust_session *usess,
348a81dc 384 const struct consumer_output *output, int wait,
d07ceecd 385 uint64_t nb_packets_per_stream);
16f35901 386uint64_t ust_app_get_size_one_more_packet_per_stream(
fb9a95c4 387 const struct ltt_ust_session *usess, uint64_t cur_nr_packets);
f20baf8e 388struct ust_app *ust_app_find_by_sock(int sock);
fb83fe64
JD
389int ust_app_uid_get_channel_runtime_stats(uint64_t ust_session_id,
390 struct cds_list_head *buffer_reg_uid_list,
391 struct consumer_output *consumer, uint64_t uchan_id,
392 int overwrite, uint64_t *discarded, uint64_t *lost);
393int ust_app_pid_get_channel_runtime_stats(struct ltt_ust_session *usess,
394 struct ltt_ust_channel *uchan,
395 struct consumer_output *consumer,
396 int overwrite, uint64_t *discarded, uint64_t *lost);
c2561365 397int ust_app_regenerate_statedump_all(struct ltt_ust_session *usess);
6f6d3b69 398enum lttng_error_code ust_app_rotate_session(struct ltt_session *session);
d2956687
JG
399enum lttng_error_code ust_app_create_channel_subdirectories(
400 const struct ltt_ust_session *session);
75018ab6 401int ust_app_release_object(struct ust_app *app,
fc4b93fa 402 struct lttng_ust_abi_object_data *data);
4a9b9759 403enum lttng_error_code ust_app_clear_session(struct ltt_session *session);
04ed9e10 404enum lttng_error_code ust_app_open_packets(struct ltt_session *session);
44d3bd01 405
da873412
JR
406int ust_app_setup_event_notifier_group(struct ust_app *app);
407
b51ec5b4
MD
408static inline
409int ust_app_supported(void)
410{
411 return 1;
412}
413
27a3be48
MD
414bool ust_app_supports_notifiers(const struct ust_app *app);
415bool ust_app_supports_counters(const struct ust_app *app);
416
3faa1e3d
JG
417bool ust_app_get(struct ust_app *app);
418void ust_app_put(struct ust_app *app);
419
74d0b642 420#else /* HAVE_LIBLTTNG_UST_CTL */
3bd1e081 421
cc920def
DG
422static inline
423int ust_app_destroy_trace_all(struct ltt_ust_session *usess)
424{
425 return 0;
426}
d974f197 427static inline
421cb601
DG
428int ust_app_start_trace(struct ltt_ust_session *usess, struct ust_app *app)
429{
430 return 0;
431}
432static inline
433int ust_app_start_trace_all(struct ltt_ust_session *usess)
d974f197 434{
5cf5d0e7 435 return 0;
d974f197 436}
3bd1e081 437static inline
cc920def
DG
438int ust_app_stop_trace_all(struct ltt_ust_session *usess)
439{
440 return 0;
441}
442static inline
b551a063
DG
443int ust_app_list_events(struct lttng_event **events)
444{
db7c0497 445 return -ENOSYS;
b551a063
DG
446}
447static inline
da0bdb87
MD
448int ust_app_list_event_fields(struct lttng_event_field **fields)
449{
450 return -ENOSYS;
451}
452static inline
3bd1e081
MD
453int ust_app_register(struct ust_register_msg *msg, int sock)
454{
455 return -ENOSYS;
456}
457static inline
fb45065e 458int ust_app_register_done(struct ust_app *app)
f2ca2e25
GF
459{
460 return -ENOSYS;
461}
462static inline
d0b96690
DG
463int ust_app_version(struct ust_app *app)
464{
465 return -ENOSYS;
466}
467static inline
3faa1e3d 468void ust_app_unregister_by_socket(int sock)
3bd1e081
MD
469{
470}
471static inline
3bd1e081
MD
472void ust_app_lock_list(void)
473{
474}
475static inline
476void ust_app_unlock_list(void)
477{
478}
479static inline
480void ust_app_clean_list(void)
481{
482}
483static inline
484struct ust_app_list *ust_app_get_list(void)
485{
486 return NULL;
487}
488static inline
489struct ust_app *ust_app_get_by_pid(pid_t pid)
490{
491 return NULL;
492}
48842b30 493static inline
12a84043
JG
494int ust_app_ht_alloc(void)
495{
496 return 0;
497}
cc920def 498static inline
3646a051 499void ust_app_global_update(struct ltt_ust_session *usess, struct ust_app *app)
cc920def
DG
500{}
501static inline
993578ff
JR
502void ust_app_global_update_event_notifier_rules(struct ust_app *app)
503{}
504static inline
505void ust_app_global_update_all_event_notifier_rules(void)
da873412
JR
506{}
507static inline
508int ust_app_setup_event_notifier_group(struct ust_app *app)
509{
510 return 0;
511}
512static inline
35a9059d 513int ust_app_disable_channel_glb(struct ltt_ust_session *usess,
cc920def 514 struct ltt_ust_channel *uchan)
d974f197 515{
cc920def 516 return 0;
d974f197 517}
487cf67c 518static inline
35a9059d 519int ust_app_enable_channel_glb(struct ltt_ust_session *usess,
cc920def 520 struct ltt_ust_channel *uchan)
487cf67c 521{
cc920def
DG
522 return 0;
523}
524static inline
35a9059d
DG
525int ust_app_create_event_glb(struct ltt_ust_session *usess,
526 struct ltt_ust_channel *uchan, struct ltt_ust_event *uevent)
527{
528 return 0;
529}
530static inline
531int ust_app_disable_event_glb(struct ltt_ust_session *usess,
cc920def
DG
532 struct ltt_ust_channel *uchan, struct ltt_ust_event *uevent)
533{
534 return 0;
487cf67c 535}
edb67388 536static inline
35a9059d 537int ust_app_enable_event_glb(struct ltt_ust_session *usess,
edb67388
DG
538 struct ltt_ust_channel *uchan, struct ltt_ust_event *uevent)
539{
540 return 0;
541}
55cc08a6 542static inline
55cc08a6
DG
543int ust_app_add_ctx_channel_glb(struct ltt_ust_session *usess,
544 struct ltt_ust_channel *uchan, struct ltt_ust_context *uctx)
545{
546 return 0;
547}
76d45b40
DG
548static inline
549int ust_app_enable_event_pid(struct ltt_ust_session *usess,
550 struct ltt_ust_channel *uchan, struct ltt_ust_event *uevent,
551 pid_t pid)
552{
553 return 0;
554}
7f79d3a1 555static inline
d0b96690
DG
556int ust_app_recv_registration(int sock, struct ust_register_msg *msg)
557{
558 return 0;
559}
560static inline
561int ust_app_recv_notify(int sock)
4466912f
DG
562{
563 return 0;
564}
d0b96690
DG
565static inline
566struct ust_app *ust_app_create(struct ust_register_msg *msg, int sock)
567{
568 return NULL;
569}
570static inline
571void ust_app_add(struct ust_app *app)
572{
573}
d88aee68
DG
574static inline
575void ust_app_notify_sock_unregister(int sock)
576{
577}
331744e3
JD
578static inline
579ssize_t ust_app_push_metadata(struct ust_registry_session *registry,
580 struct consumer_socket *socket, int send_zero_data)
581{
582 return 0;
583}
f45e313d 584static inline
9a654598 585enum lttng_error_code ust_app_snapshot_record(struct ltt_ust_session *usess,
3637639a 586 const struct consumer_output *output, int wait, uint64_t max_stream_size)
5c786ded
JD
587{
588 return 0;
589}
590static inline
591unsigned int ust_app_get_nb_stream(struct ltt_ust_session *usess)
6dc3064a
DG
592{
593 return 0;
594}
533a90fb
FD
595static inline
596void ust_app_update_event_notifier_error_count(
597 struct lttng_trigger *lttng_trigger)
598{
599 return;
600}
b51ec5b4
MD
601static inline
602int ust_app_supported(void)
603{
604 return 0;
605}
f20baf8e 606static inline
27a3be48
MD
607bool ust_app_supports_notifiers(const struct ust_app *app)
608{
609 return false;
610}
611static inline
612bool ust_app_supports_counters(const struct ust_app *app)
613{
614 return false;
615}
616static inline
f20baf8e
DG
617struct ust_app *ust_app_find_by_sock(int sock)
618{
619 return NULL;
620}
95b1d17c
DG
621static inline
622struct ust_app *ust_app_find_by_pid(pid_t pid)
623{
624 return NULL;
625}
16f35901
JG
626static inline
627uint64_t ust_app_get_size_one_more_packet_per_stream(
1f4fc770 628 const struct ltt_ust_session *usess, uint64_t cur_nr_packets) {
16f35901
JG
629 return 0;
630}
fb83fe64
JD
631static inline
632int ust_app_uid_get_channel_runtime_stats(uint64_t ust_session_id,
633 struct cds_list_head *buffer_reg_uid_list,
634 struct consumer_output *consumer, int overwrite,
635 uint64_t uchan_id, uint64_t *discarded, uint64_t *lost)
636{
637 return 0;
638}
639
640static inline
641int ust_app_pid_get_channel_runtime_stats(struct ltt_ust_session *usess,
642 struct ltt_ust_channel *uchan,
643 struct consumer_output *consumer,
644 int overwrite, uint64_t *discarded, uint64_t *lost)
645{
646 return 0;
647}
b51ec5b4 648
6f698634
JG
649static inline
650int ust_app_regenerate_statedump_all(struct ltt_ust_session *usess)
651{
652 return 0;
653}
654
5c408ad8 655static inline
d5a1b7aa 656enum lttng_error_code ust_app_rotate_session(struct ltt_session *session)
5c408ad8
JD
657{
658 return 0;
659}
660
d2956687
JG
661static inline
662enum lttng_error_code ust_app_create_channel_subdirectories(
663 const struct ltt_ust_session *session)
664{
665 return 0;
666}
667
75018ab6 668static inline
fc4b93fa 669int ust_app_release_object(struct ust_app *app, struct lttng_ust_abi_object_data *data)
75018ab6
JG
670{
671 return 0;
672}
673
4a9b9759
MD
674static inline
675enum lttng_error_code ust_app_clear_session(struct ltt_session *session)
676{
677 return 0;
678}
679
04ed9e10
JG
680static inline
681enum lttng_error_code ust_app_open_packets(struct ltt_session *session)
682{
683 return 0;
684}
685
3faa1e3d
JG
686static inline
687void ust_app_get(struct ust_app *app)
688{
689}
690
691static inline
692void ust_app_put(struct ust_app *app)
693{
694}
695
74d0b642 696#endif /* HAVE_LIBLTTNG_UST_CTL */
3bd1e081 697
f6a9efaa 698#endif /* _LTT_UST_APP_H */
This page took 0.11631 seconds and 4 git commands to generate.