![]() |
LTTng control library C API
|
Recording event rule descriptor. More...
#include <event.h>

Data Fields | |
| union lttng_event_attr_u | attr |
| int32_t | enabled |
| unsigned char | exclusion |
| unsigned char | filter |
| enum lttng_event_flag | flags |
| int | loglevel |
| enum lttng_loglevel_type | loglevel_type |
| char | name [LTTNG_SYMBOL_NAME_LEN] |
| pid_t | pid |
| enum lttng_event_type | type |
Recording event rule descriptor.
Such a structure describes a recording event rule. More specifically, it describes the conditions of a recording event rule.
lttng_list_events() sets a pointer to an array of all the recording event rule descriptors of a given channel.
lttng_enable_event(), lttng_enable_event_with_filter(), and lttng_enable_event_with_exclusions() expect such a structure to create or enable a recording event rule.
Most properties are members of the structure itself, but the following ones have their own dedicated accessors:
Create an empty recording event rule descriptor with lttng_event_create().
A valid lttng_event structure satisfies the following constraints:
Destroy a recording event rule descriptor with lttng_event_destroy().
| union lttng_event_attr_u lttng_event::attr |
Linux kprobe/kretprobe recording event rule configuration.
Only valid when the lttng_event::type member is LTTNG_EVENT_PROBE or LTTNG_EVENT_FUNCTION.
| int32_t lttng_event::enabled |
1 if this recording event rule is enabled, or 0 otherwise.
This is a read-only member.
| unsigned char lttng_event::exclusion |
1 if the recording event rule described by this has event name exclusion patterns (part of the event name condition), or 0 otherwise.
This is a read-only member: use the event_name_exclusion_count and event_name_exclusions parameters of lttng_enable_event_with_exclusions() when you create a recording event rule to set event name exclusion patterns.
If this member is 1, then get the actual event name exclusion patterns with lttng_event_get_exclusion_name_count() and lttng_event_get_exclusion_name().
| unsigned char lttng_event::filter |
1 if the recording event rule described by this has an event payload and context filter expression, or 0 otherwise.
This is a read-only member: use the filter_expr parameter of lttng_enable_event_with_filter() or lttng_enable_event_with_exclusions() when you create a recording event rule to set an event payload and context filter expression.
If this member is 1, then get the actual filter expression string with lttng_event_get_filter_expression().
| enum lttng_event_flag lttng_event::flags |
Not applicable.
| int lttng_event::loglevel |
Value of the instrumentation point log level condition.
This member must be one of the enumerators of lttng_loglevel, lttng_loglevel_jul, lttng_loglevel_log4j, lttng_loglevel_log4j2, or lttng_loglevel_python, depending on the tracing domain when you call lttng_enable_event(), lttng_enable_event_with_filter(), or lttng_enable_event_with_exclusions().
LTTNG_UST_TRACEPOINT_LOGLEVEL() (see lttng-ust(3)). | enum lttng_loglevel_type lttng_event::loglevel_type |
Operand of the instrumentation point log level condition.
| char lttng_event::name[LTTNG_SYMBOL_NAME_LEN] |
Event name pattern condition.
If empty, lttng_enable_event(), lttng_enable_event_with_filter(), and lttng_enable_event_with_exclusions() use * (match events with any name).
If the lttng_event::type member is LTTNG_EVENT_PROBE, LTTNG_EVENT_FUNCTION, or LTTNG_EVENT_USERSPACE_PROBE, then this member is actually the name of the created Linux kprobe/kretprobe/user space probe instrumentation point (future event name).
| pid_t lttng_event::pid |
Not applicable.
| enum lttng_event_type lttng_event::type |