2 * SPDX-License-Identifier: MIT
4 * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 * Holds LTTng per-session event registry.
9 #ifndef _LTTNG_UST_EVENTS_H
10 #define _LTTNG_UST_EVENTS_H
12 #include <urcu/list.h>
13 #include <urcu/hlist.h>
16 #include <lttng/ust-abi.h>
17 #include <lttng/ust-tracer.h>
18 #include <lttng/ust-endian.h>
25 #error "LTTNG_PACKED should be defined"
32 #define LTTNG_UST_UUID_LEN 16
35 * Tracepoint provider version. Compatibility based on the major number.
36 * Older tracepoint providers can always register to newer lttng-ust
37 * library, but the opposite is rejected: a newer tracepoint provider is
38 * rejected by an older lttng-ust library.
40 #define LTTNG_UST_PROVIDER_MAJOR 2
41 #define LTTNG_UST_PROVIDER_MINOR 0
45 struct lttng_ust_lib_ring_buffer_ctx
;
46 struct lttng_ust_context_app
;
47 struct lttng_event_field
;
48 struct lttng_event_notifier
;
49 struct lttng_event_notifier_group
;
52 * Data structures used by tracepoint event declarations, and by the
53 * tracer. Those structures have padding for future extension.
57 * LTTng client type enumeration. Used by the consumer to map the
58 * callbacks from its own address space.
60 enum lttng_client_types
{
61 LTTNG_CLIENT_METADATA
= 0,
62 LTTNG_CLIENT_DISCARD
= 1,
63 LTTNG_CLIENT_OVERWRITE
= 2,
64 LTTNG_CLIENT_DISCARD_RT
= 3,
65 LTTNG_CLIENT_OVERWRITE_RT
= 4,
66 LTTNG_NR_CLIENT_TYPES
,
69 /* Type description */
71 /* Update the astract_types name table in lttng-types.c along with this enum */
72 enum lttng_abstract_types
{
74 atype_enum
, /* legacy */
75 atype_array
, /* legacy */
76 atype_sequence
, /* legacy */
80 atype_struct
, /* legacy */
83 atype_sequence_nestable
,
84 atype_struct_nestable
,
88 /* Update the string_encodings name table in lttng-types.c along with this enum */
89 enum lttng_string_encodings
{
90 lttng_encode_none
= 0,
91 lttng_encode_UTF8
= 1,
92 lttng_encode_ASCII
= 2,
96 struct lttng_enum_value
{
97 unsigned long long value
;
98 unsigned int signedness
:1;
101 enum lttng_enum_entry_options
{
102 LTTNG_ENUM_ENTRY_OPTION_IS_AUTO
= 1U << 0,
105 #define LTTNG_UST_ENUM_ENTRY_PADDING 16
106 struct lttng_enum_entry
{
107 struct lttng_enum_value start
, end
; /* start and end are inclusive */
111 unsigned int options
;
112 } LTTNG_PACKED extra
;
113 char padding
[LTTNG_UST_ENUM_ENTRY_PADDING
];
117 #define __type_integer(_type, _byte_order, _base, _encoding) \
119 .atype = atype_integer, \
124 .size = sizeof(_type) * CHAR_BIT, \
125 .alignment = lttng_alignof(_type) * CHAR_BIT, \
126 .signedness = lttng_is_signed_type(_type), \
127 .reverse_byte_order = _byte_order != BYTE_ORDER, \
129 .encoding = lttng_encode_##_encoding, \
134 #define LTTNG_UST_INTEGER_TYPE_PADDING 24
135 struct lttng_integer_type
{
136 unsigned int size
; /* in bits */
137 unsigned short alignment
; /* in bits */
138 unsigned int signedness
:1;
139 unsigned int reverse_byte_order
:1;
140 unsigned int base
; /* 2, 8, 10, 16, for pretty print */
141 enum lttng_string_encodings encoding
;
142 char padding
[LTTNG_UST_INTEGER_TYPE_PADDING
];
146 * Only float and double are supported. long double is not supported at
149 #define _float_mant_dig(_type) \
150 (sizeof(_type) == sizeof(float) ? FLT_MANT_DIG \
151 : (sizeof(_type) == sizeof(double) ? DBL_MANT_DIG \
154 #define __type_float(_type) \
156 .atype = atype_float, \
161 .exp_dig = sizeof(_type) * CHAR_BIT \
162 - _float_mant_dig(_type), \
163 .mant_dig = _float_mant_dig(_type), \
164 .alignment = lttng_alignof(_type) * CHAR_BIT, \
165 .reverse_byte_order = BYTE_ORDER != FLOAT_WORD_ORDER, \
170 #define LTTNG_UST_FLOAT_TYPE_PADDING 24
171 struct lttng_float_type
{
172 unsigned int exp_dig
; /* exponent digits, in bits */
173 unsigned int mant_dig
; /* mantissa digits, in bits */
174 unsigned short alignment
; /* in bits */
175 unsigned int reverse_byte_order
:1;
176 char padding
[LTTNG_UST_FLOAT_TYPE_PADDING
];
180 #define LTTNG_UST_BASIC_TYPE_PADDING 128
181 union _lttng_basic_type
{
182 struct lttng_integer_type integer
; /* legacy */
184 const struct lttng_enum_desc
*desc
; /* Enumeration mapping */
185 struct lttng_integer_type container_type
;
186 } enumeration
; /* legacy */
188 enum lttng_string_encodings encoding
;
189 } string
; /* legacy */
190 struct lttng_float_type _float
; /* legacy */
191 char padding
[LTTNG_UST_BASIC_TYPE_PADDING
];
195 struct lttng_basic_type
{
196 enum lttng_abstract_types atype
;
198 union _lttng_basic_type basic
;
202 #define LTTNG_UST_TYPE_PADDING 128
204 enum lttng_abstract_types atype
;
206 /* provider ABI 2.0 */
207 struct lttng_integer_type integer
;
208 struct lttng_float_type _float
;
210 enum lttng_string_encodings encoding
;
213 const struct lttng_enum_desc
*desc
; /* Enumeration mapping */
214 struct lttng_type
*container_type
;
217 const struct lttng_type
*elem_type
;
218 unsigned int length
; /* Num. elems. */
219 unsigned int alignment
;
222 const char *length_name
; /* Length field name. */
223 const struct lttng_type
*elem_type
;
224 unsigned int alignment
; /* Alignment before elements. */
227 unsigned int nr_fields
;
228 const struct lttng_event_field
*fields
; /* Array of fields. */
229 unsigned int alignment
;
233 /* legacy provider ABI 1.0 */
234 union _lttng_basic_type basic
; /* legacy */
236 struct lttng_basic_type elem_type
;
237 unsigned int length
; /* Num. elems. */
238 } array
; /* legacy */
240 struct lttng_basic_type length_type
;
241 struct lttng_basic_type elem_type
;
242 } sequence
; /* legacy */
244 unsigned int nr_fields
;
245 struct lttng_event_field
*fields
; /* Array of fields. */
246 } _struct
; /* legacy */
248 char padding
[LTTNG_UST_TYPE_PADDING
];
252 #define LTTNG_UST_ENUM_TYPE_PADDING 24
253 struct lttng_enum_desc
{
255 const struct lttng_enum_entry
*entries
;
256 unsigned int nr_entries
;
257 char padding
[LTTNG_UST_ENUM_TYPE_PADDING
];
261 * Event field description
263 * IMPORTANT: this structure is part of the ABI between the probe and
264 * UST. Fields need to be only added at the end, never reordered, never
268 #define LTTNG_UST_EVENT_FIELD_PADDING 28
269 struct lttng_event_field
{
271 struct lttng_type type
;
272 unsigned int nowrite
; /* do not write into trace */
275 unsigned int nofilter
:1; /* do not consider for filter */
277 char padding
[LTTNG_UST_EVENT_FIELD_PADDING
];
281 enum lttng_ust_dynamic_type
{
282 LTTNG_UST_DYNAMIC_TYPE_NONE
,
283 LTTNG_UST_DYNAMIC_TYPE_S8
,
284 LTTNG_UST_DYNAMIC_TYPE_S16
,
285 LTTNG_UST_DYNAMIC_TYPE_S32
,
286 LTTNG_UST_DYNAMIC_TYPE_S64
,
287 LTTNG_UST_DYNAMIC_TYPE_U8
,
288 LTTNG_UST_DYNAMIC_TYPE_U16
,
289 LTTNG_UST_DYNAMIC_TYPE_U32
,
290 LTTNG_UST_DYNAMIC_TYPE_U64
,
291 LTTNG_UST_DYNAMIC_TYPE_FLOAT
,
292 LTTNG_UST_DYNAMIC_TYPE_DOUBLE
,
293 LTTNG_UST_DYNAMIC_TYPE_STRING
,
294 _NR_LTTNG_UST_DYNAMIC_TYPES
,
297 struct lttng_ctx_value
{
298 enum lttng_ust_dynamic_type sel
;
307 struct lttng_perf_counter_field
;
309 #define LTTNG_UST_CTX_FIELD_PADDING 40
310 struct lttng_ctx_field
{
311 struct lttng_event_field event_field
;
312 size_t (*get_size
)(struct lttng_ctx_field
*field
, size_t offset
);
313 void (*record
)(struct lttng_ctx_field
*field
,
314 struct lttng_ust_lib_ring_buffer_ctx
*ctx
,
315 struct lttng_channel
*chan
);
316 void (*get_value
)(struct lttng_ctx_field
*field
,
317 struct lttng_ctx_value
*value
);
319 struct lttng_perf_counter_field
*perf_counter
;
320 char padding
[LTTNG_UST_CTX_FIELD_PADDING
];
322 void (*destroy
)(struct lttng_ctx_field
*field
);
323 char *field_name
; /* Has ownership, dynamically allocated. */
326 #define LTTNG_UST_CTX_PADDING 20
328 struct lttng_ctx_field
*fields
;
329 unsigned int nr_fields
;
330 unsigned int allocated_fields
;
331 unsigned int largest_align
;
332 char padding
[LTTNG_UST_CTX_PADDING
];
335 #define LTTNG_UST_EVENT_DESC_PADDING 40
336 struct lttng_event_desc
{
338 void (*probe_callback
)(void);
339 const struct lttng_event_ctx
*ctx
; /* context */
340 const struct lttng_event_field
*fields
; /* event payload */
341 unsigned int nr_fields
;
342 const int **loglevel
;
343 const char *signature
; /* Argument types/names received */
346 const char **model_emf_uri
;
347 void (*event_notifier_callback
)(void);
349 char padding
[LTTNG_UST_EVENT_DESC_PADDING
];
353 #define LTTNG_UST_PROBE_DESC_PADDING 12
354 struct lttng_probe_desc
{
355 const char *provider
;
356 const struct lttng_event_desc
**event_desc
;
357 unsigned int nr_events
;
358 struct cds_list_head head
; /* chain registered probes */
359 struct cds_list_head lazy_init_head
;
360 int lazy
; /* lazy registration */
363 char padding
[LTTNG_UST_PROBE_DESC_PADDING
];
366 /* Data structures used by the tracer. */
368 enum lttng_enabler_format_type
{
369 LTTNG_ENABLER_FORMAT_STAR_GLOB
,
370 LTTNG_ENABLER_FORMAT_EVENT
,
374 * Enabler field, within whatever object is enabling an event. Target of
375 * backward reference.
377 struct lttng_enabler
{
378 enum lttng_enabler_format_type format_type
;
380 /* head list of struct lttng_ust_filter_bytecode_node */
381 struct cds_list_head filter_bytecode_head
;
382 /* head list of struct lttng_ust_excluder_node */
383 struct cds_list_head excluder_head
;
385 struct lttng_ust_event event_param
;
386 unsigned int enabled
:1;
389 struct tp_list_entry
{
390 struct lttng_ust_tracepoint_iter tp
;
391 struct cds_list_head head
;
394 struct lttng_ust_tracepoint_list
{
395 struct tp_list_entry
*iter
;
396 struct cds_list_head head
;
399 struct tp_field_list_entry
{
400 struct lttng_ust_field_iter field
;
401 struct cds_list_head head
;
404 struct lttng_ust_field_list
{
405 struct tp_field_list_entry
*iter
;
406 struct cds_list_head head
;
409 struct ust_pending_probe
;
413 * Bytecode interpreter return value masks.
415 enum lttng_bytecode_interpreter_ret
{
416 LTTNG_INTERPRETER_DISCARD
= 0,
417 LTTNG_INTERPRETER_RECORD_FLAG
= (1ULL << 0),
418 /* Other bits are kept for future use. */
421 struct lttng_interpreter_output
;
424 * This structure is used in the probes. More specifically, the `filter` and
425 * `node` fields are explicity used in the probes. When modifying this
426 * structure we must not change the layout of these two fields as it is
429 struct lttng_bytecode_runtime
{
430 /* Associated bytecode */
431 struct lttng_ust_bytecode_node
*bc
;
433 uint64_t (*filter
)(void *interpreter_data
,
434 const char *interpreter_stack_data
);
435 uint64_t (*capture
)(void *interpreter_data
,
436 const char *interpreter_stack_data
,
437 struct lttng_interpreter_output
*interpreter_output
);
440 struct cds_list_head node
; /* list of bytecode runtime in event */
442 * Pointer to a URCU-protected pointer owned by an `struct
443 * lttng_session`or `struct lttng_event_notifier_group`.
445 struct lttng_ctx
**pctx
;
449 * Objects in a linked-list of enablers, owned by an event or event_notifier.
450 * This is used because an event (or a event_notifier) can be enabled by more
451 * than one enabler and we want a quick way to iterate over all enablers of an
454 * For example, event rules "my_app:a*" and "my_app:ab*" will both match the
455 * event with the name "my_app:abc".
457 struct lttng_enabler_ref
{
458 struct cds_list_head node
; /* enabler ref list */
459 struct lttng_enabler
*ref
; /* backward ref */
463 * lttng_event structure is referred to by the tracing fast path. It
464 * must be kept small.
466 * IMPORTANT: this structure is part of the ABI between the probe and
467 * UST. Fields need to be only added at the end, never reordered, never
472 struct lttng_channel
*chan
;
474 const struct lttng_event_desc
*desc
;
475 struct lttng_ctx
*ctx
;
476 enum lttng_ust_instrumentation instrumentation
;
477 struct cds_list_head node
; /* Event list in session */
479 /* list of struct lttng_bytecode_runtime, sorted by seqnum */
480 struct cds_list_head filter_bytecode_runtime_head
;
481 int has_enablers_without_bytecode
;
482 /* Backward references: list of lttng_enabler_ref (ref to enablers) */
483 struct cds_list_head enablers_ref_head
;
484 struct cds_hlist_node hlist
; /* session ht of events */
485 int registered
; /* has reg'd tracepoint probe */
488 struct lttng_event_notifier
{
490 uint64_t error_counter_index
;
492 int registered
; /* has reg'd tracepoint probe */
493 size_t num_captures
; /* Needed to allocate the msgpack array. */
494 void (*notification_send
)(struct lttng_event_notifier
*event_notifier
,
495 const char *stack_data
);
496 struct cds_list_head filter_bytecode_runtime_head
;
497 struct cds_list_head capture_bytecode_runtime_head
;
498 int has_enablers_without_bytecode
;
499 struct cds_list_head enablers_ref_head
;
500 const struct lttng_event_desc
*desc
;
501 struct cds_hlist_node hlist
; /* hashtable of event_notifiers */
502 struct cds_list_head node
; /* event_notifier list in session */
503 struct lttng_event_notifier_group
*group
; /* weak ref */
507 const struct lttng_enum_desc
*desc
;
508 struct lttng_session
*session
;
509 struct cds_list_head node
; /* Enum list in session */
510 struct cds_hlist_node hlist
; /* Session ht of enums */
511 uint64_t id
; /* Enumeration ID in sessiond */
515 struct lttng_ust_shm_handle
;
518 * IMPORTANT: this structure is part of the ABI between the probe and
519 * UST. Fields need to be only added at the end, never reordered, never
522 struct lttng_channel_ops
{
523 struct lttng_channel
*(*channel_create
)(const char *name
,
525 size_t subbuf_size
, size_t num_subbuf
,
526 unsigned int switch_timer_interval
,
527 unsigned int read_timer_interval
,
530 const int *stream_fds
, int nr_stream_fds
,
531 int64_t blocking_timeout
);
532 void (*channel_destroy
)(struct lttng_channel
*chan
);
533 int (*event_reserve
)(struct lttng_ust_lib_ring_buffer_ctx
*ctx
,
535 void (*event_commit
)(struct lttng_ust_lib_ring_buffer_ctx
*ctx
);
536 void (*event_write
)(struct lttng_ust_lib_ring_buffer_ctx
*ctx
,
537 const void *src
, size_t len
);
539 * packet_avail_size returns the available size in the current
540 * packet. Note that the size returned is only a hint, since it
541 * may change due to concurrent writes.
543 size_t (*packet_avail_size
)(struct channel
*chan
,
544 struct lttng_ust_shm_handle
*handle
);
545 int (*is_finalized
)(struct channel
*chan
);
546 int (*is_disabled
)(struct channel
*chan
);
547 int (*flush_buffer
)(struct channel
*chan
, struct lttng_ust_shm_handle
*handle
);
548 void (*event_strcpy
)(struct lttng_ust_lib_ring_buffer_ctx
*ctx
,
549 const char *src
, size_t len
);
553 * IMPORTANT: this structure is part of the ABI between the probe and
554 * UST. Fields need to be only added at the end, never reordered, never
557 struct lttng_channel
{
559 * The pointers located in this private data are NOT safe to be
560 * dereferenced by the consumer. The only operations the
561 * consumer process is designed to be allowed to do is to read
562 * and perform subbuffer flush.
564 struct channel
*chan
; /* Channel buffers */
566 struct lttng_ctx
*ctx
;
567 /* Event ID management */
568 struct lttng_session
*session
;
569 int objd
; /* Object associated to channel */
570 struct cds_list_head node
; /* Channel list in session */
571 const struct lttng_channel_ops
*ops
;
572 int header_type
; /* 0: unset, 1: compact, 2: large */
573 struct lttng_ust_shm_handle
*handle
; /* shared-memory handle */
577 enum lttng_ust_chan_type type
;
578 unsigned char uuid
[LTTNG_UST_UUID_LEN
]; /* Trace session unique ID */
579 int tstate
:1; /* Transient enable state */
582 #define LTTNG_COUNTER_DIMENSION_MAX 8
584 struct lttng_counter_dimension
{
586 uint64_t underflow_index
;
587 uint64_t overflow_index
;
588 uint8_t has_underflow
;
589 uint8_t has_overflow
;
592 struct lttng_counter_ops
{
593 struct lib_counter
*(*counter_create
)(size_t nr_dimensions
,
594 const struct lttng_counter_dimension
*dimensions
,
595 int64_t global_sum_step
,
596 int global_counter_fd
,
597 int nr_counter_cpu_fds
,
598 const int *counter_cpu_fds
,
600 void (*counter_destroy
)(struct lib_counter
*counter
);
601 int (*counter_add
)(struct lib_counter
*counter
,
602 const size_t *dimension_indexes
, int64_t v
);
603 int (*counter_read
)(struct lib_counter
*counter
,
604 const size_t *dimension_indexes
, int cpu
,
605 int64_t *value
, bool *overflow
, bool *underflow
);
606 int (*counter_aggregate
)(struct lib_counter
*counter
,
607 const size_t *dimension_indexes
, int64_t *value
,
608 bool *overflow
, bool *underflow
);
609 int (*counter_clear
)(struct lib_counter
*counter
, const size_t *dimension_indexes
);
612 #define LTTNG_UST_STACK_CTX_PADDING 32
613 struct lttng_stack_ctx
{
614 struct lttng_event
*event
;
615 struct lttng_ctx
*chan_ctx
; /* RCU dereferenced. */
616 struct lttng_ctx
*event_ctx
; /* RCU dereferenced. */
617 char padding
[LTTNG_UST_STACK_CTX_PADDING
];
620 #define LTTNG_UST_EVENT_HT_BITS 12
621 #define LTTNG_UST_EVENT_HT_SIZE (1U << LTTNG_UST_EVENT_HT_BITS)
623 struct lttng_ust_event_ht
{
624 struct cds_hlist_head table
[LTTNG_UST_EVENT_HT_SIZE
];
627 #define LTTNG_UST_EVENT_NOTIFIER_HT_BITS 12
628 #define LTTNG_UST_EVENT_NOTIFIER_HT_SIZE (1U << LTTNG_UST_EVENT_NOTIFIER_HT_BITS)
629 struct lttng_ust_event_notifier_ht
{
630 struct cds_hlist_head table
[LTTNG_UST_EVENT_NOTIFIER_HT_SIZE
];
633 #define LTTNG_UST_ENUM_HT_BITS 12
634 #define LTTNG_UST_ENUM_HT_SIZE (1U << LTTNG_UST_ENUM_HT_BITS)
636 struct lttng_ust_enum_ht
{
637 struct cds_hlist_head table
[LTTNG_UST_ENUM_HT_SIZE
];
641 * IMPORTANT: this structure is part of the ABI between the probe and
642 * UST. Fields need to be only added at the end, never reordered, never
645 struct lttng_session
{
646 int active
; /* Is trace session active ? */
647 int been_active
; /* Been active ? */
648 int objd
; /* Object associated */
649 struct cds_list_head chan_head
; /* Channel list head */
650 struct cds_list_head events_head
; /* list of events */
651 struct cds_list_head node
; /* Session list */
654 /* List of enablers */
655 struct cds_list_head enablers_head
;
656 struct lttng_ust_event_ht events_ht
; /* ht of events */
657 void *owner
; /* object owner */
658 int tstate
:1; /* Transient enable state */
661 int statedump_pending
:1;
664 struct lttng_ust_enum_ht enums_ht
; /* ht of enumerations */
665 struct cds_list_head enums_head
;
666 struct lttng_ctx
*ctx
; /* contexts for filters. */
669 struct lttng_counter
{
671 struct lttng_event_notifier_group
*event_notifier_group
; /* owner */
672 struct lttng_counter_transport
*transport
;
673 struct lib_counter
*counter
;
674 struct lttng_counter_ops
*ops
;
677 struct lttng_event_notifier_group
{
681 struct cds_list_head node
; /* Event notifier group handle list */
682 struct cds_list_head enablers_head
;
683 struct cds_list_head event_notifiers_head
; /* list of event_notifiers */
684 struct lttng_ust_event_notifier_ht event_notifiers_ht
; /* hashtable of event_notifiers */
685 struct lttng_ctx
*ctx
; /* contexts for filters. */
687 struct lttng_counter
*error_counter
;
688 size_t error_counter_len
;
691 struct lttng_transport
{
693 struct cds_list_head node
;
694 struct lttng_channel_ops ops
;
695 const struct lttng_ust_lib_ring_buffer_config
*client_config
;
698 struct lttng_counter_transport
{
700 struct cds_list_head node
;
701 struct lttng_counter_ops ops
;
702 const struct lib_counter_config
*client_config
;
705 struct lttng_session
*lttng_session_create(void);
706 int lttng_session_enable(struct lttng_session
*session
);
707 int lttng_session_disable(struct lttng_session
*session
);
708 int lttng_session_statedump(struct lttng_session
*session
);
709 void lttng_session_destroy(struct lttng_session
*session
);
711 struct lttng_channel
*lttng_channel_create(struct lttng_session
*session
,
712 const char *transport_name
,
714 size_t subbuf_size
, size_t num_subbuf
,
715 unsigned int switch_timer_interval
,
716 unsigned int read_timer_interval
,
717 int **shm_fd
, int **wait_fd
,
718 uint64_t **memory_map_size
,
719 struct lttng_channel
*chan_priv_init
);
721 int lttng_channel_enable(struct lttng_channel
*channel
);
722 int lttng_channel_disable(struct lttng_channel
*channel
);
724 int lttng_attach_context(struct lttng_ust_context
*context_param
,
725 union ust_args
*uargs
,
726 struct lttng_ctx
**ctx
, struct lttng_session
*session
);
727 void lttng_transport_register(struct lttng_transport
*transport
);
728 void lttng_transport_unregister(struct lttng_transport
*transport
);
730 int lttng_probe_register(struct lttng_probe_desc
*desc
);
731 void lttng_probe_unregister(struct lttng_probe_desc
*desc
);
732 void lttng_probe_provider_unregister_events(struct lttng_probe_desc
*desc
);
733 int lttng_fix_pending_events(void);
734 int lttng_probes_init(void);
735 void lttng_probes_exit(void);
736 int lttng_find_context(struct lttng_ctx
*ctx
, const char *name
);
737 int lttng_get_context_index(struct lttng_ctx
*ctx
, const char *name
);
738 struct lttng_ctx_field
*lttng_append_context(struct lttng_ctx
**ctx_p
);
739 void lttng_context_update(struct lttng_ctx
*ctx
);
740 void lttng_remove_context_field(struct lttng_ctx
**ctx_p
,
741 struct lttng_ctx_field
*field
);
742 void lttng_destroy_context(struct lttng_ctx
*ctx
);
743 int lttng_add_vtid_to_ctx(struct lttng_ctx
**ctx
);
744 int lttng_add_vpid_to_ctx(struct lttng_ctx
**ctx
);
745 int lttng_add_pthread_id_to_ctx(struct lttng_ctx
**ctx
);
746 int lttng_add_procname_to_ctx(struct lttng_ctx
**ctx
);
747 int lttng_add_ip_to_ctx(struct lttng_ctx
**ctx
);
748 int lttng_add_cpu_id_to_ctx(struct lttng_ctx
**ctx
);
749 int lttng_add_dyntest_to_ctx(struct lttng_ctx
**ctx
);
750 int lttng_add_cgroup_ns_to_ctx(struct lttng_ctx
**ctx
);
751 int lttng_add_ipc_ns_to_ctx(struct lttng_ctx
**ctx
);
752 int lttng_add_mnt_ns_to_ctx(struct lttng_ctx
**ctx
);
753 int lttng_add_net_ns_to_ctx(struct lttng_ctx
**ctx
);
754 int lttng_add_pid_ns_to_ctx(struct lttng_ctx
**ctx
);
755 int lttng_add_user_ns_to_ctx(struct lttng_ctx
**ctx
);
756 int lttng_add_uts_ns_to_ctx(struct lttng_ctx
**ctx
);
757 int lttng_add_vuid_to_ctx(struct lttng_ctx
**ctx
);
758 int lttng_add_veuid_to_ctx(struct lttng_ctx
**ctx
);
759 int lttng_add_vsuid_to_ctx(struct lttng_ctx
**ctx
);
760 int lttng_add_vgid_to_ctx(struct lttng_ctx
**ctx
);
761 int lttng_add_vegid_to_ctx(struct lttng_ctx
**ctx
);
762 int lttng_add_vsgid_to_ctx(struct lttng_ctx
**ctx
);
763 void lttng_context_vtid_reset(void);
764 void lttng_context_vpid_reset(void);
765 void lttng_context_procname_reset(void);
766 void lttng_context_cgroup_ns_reset(void);
767 void lttng_context_ipc_ns_reset(void);
768 void lttng_context_mnt_ns_reset(void);
769 void lttng_context_net_ns_reset(void);
770 void lttng_context_pid_ns_reset(void);
771 void lttng_context_user_ns_reset(void);
772 void lttng_context_uts_ns_reset(void);
773 void lttng_context_vuid_reset(void);
774 void lttng_context_veuid_reset(void);
775 void lttng_context_vsuid_reset(void);
776 void lttng_context_vgid_reset(void);
777 void lttng_context_vegid_reset(void);
778 void lttng_context_vsgid_reset(void);
781 struct lttng_transport
*lttng_transport_find(const char *name
);
783 int lttng_probes_get_event_list(struct lttng_ust_tracepoint_list
*list
);
784 void lttng_probes_prune_event_list(struct lttng_ust_tracepoint_list
*list
);
785 struct lttng_ust_tracepoint_iter
*
786 lttng_ust_tracepoint_list_get_iter_next(struct lttng_ust_tracepoint_list
*list
);
787 int lttng_probes_get_field_list(struct lttng_ust_field_list
*list
);
788 void lttng_probes_prune_field_list(struct lttng_ust_field_list
*list
);
789 struct lttng_ust_field_iter
*
790 lttng_ust_field_list_get_iter_next(struct lttng_ust_field_list
*list
);
792 void lttng_free_event_filter_runtime(struct lttng_event
*event
);
794 struct cds_list_head
*lttng_get_probe_list_head(void);
795 int lttng_session_active(void);
797 typedef int (*t_statedump_func_ptr
)(struct lttng_session
*session
);
798 void lttng_handle_pending_statedump(void *owner
);
799 struct cds_list_head
*_lttng_get_sessions(void);
801 struct lttng_enum
*lttng_ust_enum_get_from_desc(struct lttng_session
*session
,
802 const struct lttng_enum_desc
*enum_desc
);
804 void lttng_ust_dl_update(void *ip
);
810 #endif /* _LTTNG_UST_EVENTS_H */