LTTng control library C API
Loading...
Searching...
No Matches
Instrumentation point listing API

Data Structures

struct  lttng_event_field
 LTTng tracepoint field description. More...
 

Enumerations

enum  lttng_event_field_type {
  LTTNG_EVENT_FIELD_OTHER , LTTNG_EVENT_FIELD_INTEGER , LTTNG_EVENT_FIELD_ENUM , LTTNG_EVENT_FIELD_FLOAT ,
  LTTNG_EVENT_FIELD_STRING
}
 LTTng tracepoint field data type (type of the lttng_event_field::type member). More...
 
enum  lttng_event_flag { LTTNG_EVENT_FLAG_SYSCALL_32 , LTTNG_EVENT_FLAG_SYSCALL_64 }
 Instrumentation point descriptor flag (type of the lttng_event::flags member). More...
 

Functions

int lttng_list_syscalls (struct lttng_event **descrs)
 Sets *descrs to the descriptors of the available Linux system calls for the LTTNG_DOMAIN_KERNEL tracing domain.
 
int lttng_list_tracepoint_fields (struct lttng_handle *handle, struct lttng_event_field **fields)
 Sets *fields to the field descriptions of all the available LTTng tracepoints for the tracing domain of handle.
 
int lttng_list_tracepoints (struct lttng_handle *handle, struct lttng_event **descrs)
 Sets *descrs to the descriptors of the available LTTng tracepoints or Java/Python loggers for the tracing domain of handle.
 

Detailed Description

The lttng_list_tracepoints() and lttng_list_syscalls() functions set a pointer to an array of instrumentation point descriptors.

With those two functions, you can get details about the available LTTng tracepoints, Java/Python loggers, and Linux kernel system calls, as long as you can connect to a session daemon. You can then use the discovered information to create corresponding recording event rules so that you can record the events which LTTng creates from instrumentation points.

See Recording event rule API to learn more about instrumentation points, events, event records, and recording event rules.

Enumeration Type Documentation

◆ lttng_event_field_type

LTTng tracepoint field data type (type of the lttng_event_field::type member).

Enumerator
LTTNG_EVENT_FIELD_OTHER 

Other/unknown.

LTTNG_EVENT_FIELD_INTEGER 

Integer.

LTTNG_EVENT_FIELD_ENUM 

Enumeration.

LTTNG_EVENT_FIELD_FLOAT 

Floating point number.

LTTNG_EVENT_FIELD_STRING 

String.

◆ lttng_event_flag

Instrumentation point descriptor flag (type of the lttng_event::flags member).

Enumerator
LTTNG_EVENT_FLAG_SYSCALL_32 

32-bit Linux system call.

Only valid when the lttng_event::type member is LTTNG_EVENT_SYSCALL.

LTTNG_EVENT_FLAG_SYSCALL_64 

64-bit Linux system call.

Only valid when the lttng_event::type member is LTTNG_EVENT_SYSCALL.

Function Documentation

◆ lttng_list_syscalls()

int lttng_list_syscalls ( struct lttng_event **  descrs)
extern

Sets *descrs to the descriptors of the available Linux system calls for the LTTNG_DOMAIN_KERNEL tracing domain.

Parameters
[out]descrs

On success, this function sets *descrs to the available system calls.

The lttng_event instances of *descrs have an lttng_event::flags member which indicates whether the described system call is 32-bit, 64-bit, or both.

Free *descrs with free().

Returns
The number of items in *descrs on success, or a negative lttng_error_code enumerator otherwise.
Precondition
See also
lttng_list_tracepoint_fields() – Returns all the field descriptions of all the available LTTng tracepoints.
lttng_list_syscalls() – Returns the descriptors of all the available Linux system calls.

◆ lttng_list_tracepoint_fields()

int lttng_list_tracepoint_fields ( struct lttng_handle handle,
struct lttng_event_field **  fields 
)
extern

Sets *fields to the field descriptions of all the available LTTng tracepoints for the tracing domain of handle.

Parameters
[in]handle

Recording session handle which contains the summary of the tracing domain which offers the LTTng tracepoints of which to get the field descriptions.

This function ignores handle->session_name.

[out]fields

On success, this function sets *fields to the descriptions of the available LTTng tracepoint fields of handle.

Each lttng_event_field instance in *fields contains a pointer to the descriptor of a tracepoint which contains the described field (lttng_event_field::event member).

Free *fields with free().

Returns
The number of items in *fields on success, or a negative lttng_error_code enumerator otherwise.
Precondition
See also
lttng_list_tracepoints() – Returns the descriptors of all the available LTTng tracepoints or Java/Python loggers.
lttng_list_syscalls() – Returns the descriptors of all the available Linux system calls.

◆ lttng_list_tracepoints()

int lttng_list_tracepoints ( struct lttng_handle handle,
struct lttng_event **  descrs 
)
extern

Sets *descrs to the descriptors of the available LTTng tracepoints or Java/Python loggers for the tracing domain of handle.

Parameters
[in]handle

Recording session handle which contains the summary of the tracing domain which offers the LTTng tracepoints or Java/Python loggers of which to get the descriptors.

This function ignores handle->session_name.

[out]descrs

On success, this function sets *descrs to the descriptors of the available tracepoints or Java/Python loggers of handle.

Free *descrs with free().

Returns
The number of items in *descrs on success, or a negative lttng_error_code enumerator otherwise.
Precondition
See also
lttng_list_tracepoint_fields() – Returns all the field descriptions of all the available LTTng tracepoints.
lttng_list_syscalls() – Returns the descriptors of all the available Linux system calls.