LTTng control library C API
Loading...
Searching...
No Matches
lttng_event_context Struct Reference

Context field descriptor. More...

#include <event.h>

Collaboration diagram for lttng_event_context:

Data Fields

enum lttng_event_context_type ctx
 Context field type.
 
union lttng_event_context_u u
 perf counter or application-specific context field descriptor.
 

Detailed Description

Context field descriptor.

Such a structure describes a context field to be recorded within all the event records of a given event record channel (see lttng_add_context()).

You must initialize such a structure to zeros before setting its members and using it, for example:

memset(&ctx, 0, sizeof(ctx));
Context field descriptor.
Definition event.h:1164
enum lttng_event_context_type ctx
Context field type.
Definition event.h:1183

Field Documentation

◆ ctx

enum lttng_event_context_type lttng_event_context::ctx

Context field type.

Some types have a tracing domain constraint.

If this member has the value LTTNG_EVENT_CONTEXT_PERF_CPU_COUNTER or LTTNG_EVENT_CONTEXT_PERF_THREAD_COUNTER, then you must also set the lttng_event_context_u::perf_counter member of lttng_event_context::u.

If this member has the value LTTNG_EVENT_CONTEXT_APP_CONTEXT, then you must also set the lttng_event_context_u::app_ctx member of lttng_event_context::u.