Zephyr API 3.6.99
Loading...
Searching...
No Matches
Tracing utility macros

Tracing utility macros . More...

Macros

#define SYS_PORT_TRACING_TYPE_MASK(type, trace_call)
 Checks if an object type should be traced or not.
 
#define SYS_PORT_TRACING_FUNC(type, func, ...)
 Tracing macro for function calls which are not directly associated with a specific type of object.
 
#define SYS_PORT_TRACING_FUNC_ENTER(type, func, ...)
 Tracing macro for the entry into a function that might or might not return a value.
 
#define SYS_PORT_TRACING_FUNC_BLOCKING(type, func, ...)
 Tracing macro for when a function blocks during its execution.
 
#define SYS_PORT_TRACING_FUNC_EXIT(type, func, ...)
 Tracing macro for when a function ends its execution.
 
#define SYS_PORT_TRACING_OBJ_INIT(obj_type, obj, ...)
 Tracing macro for the initialization of an object.
 
#define SYS_PORT_TRACING_OBJ_FUNC(obj_type, func, obj, ...)
 Tracing macro for simple object function calls often without returns or branching.
 
#define SYS_PORT_TRACING_OBJ_FUNC_ENTER(obj_type, func, obj, ...)
 Tracing macro for the entry into a function that might or might not return a value.
 
#define SYS_PORT_TRACING_OBJ_FUNC_BLOCKING(obj_type, func, obj, timeout, ...)
 Tracing macro for when a function blocks during its execution.
 
#define SYS_PORT_TRACING_OBJ_FUNC_EXIT(obj_type, func, obj, ...)
 Tracing macro for when a function ends its execution.
 
#define SYS_PORT_TRACING_TRACKING_FIELD(type)
 Field added to kernel objects so they are tracked.
 

Detailed Description

Tracing utility macros .

Macro Definition Documentation

◆ SYS_PORT_TRACING_FUNC

#define SYS_PORT_TRACING_FUNC ( type,
func,
... )

#include <zephyr/tracing/tracing_macros.h>

Value:
_SYS_PORT_TRACE_IF_NOT_DISABLED(type, _SYS_PORT_TRACING_FUNC(type, func), __VA_ARGS__)

Tracing macro for function calls which are not directly associated with a specific type of object.

Parameters
typeType of tracing event or object type
funcName of the function responsible for the call. This does not need to exactly match the name of the function but should rather match what the user called in case of system calls etc. That is, we can often omit the z_vrfy/z_impl part of the name.
...Additional parameters relevant to the tracing call

◆ SYS_PORT_TRACING_FUNC_BLOCKING

#define SYS_PORT_TRACING_FUNC_BLOCKING ( type,
func,
... )

#include <zephyr/tracing/tracing_macros.h>

Value:
_SYS_PORT_TRACE_IF_NOT_DISABLED(type, _SYS_PORT_TRACING_FUNC_BLOCKING(type, func), \
__VA_ARGS__)

Tracing macro for when a function blocks during its execution.

Parameters
typeType of tracing event or object type
funcName of the function responsible for the call. This does not need to exactly match the name of the function but should rather match what the user called in case of system calls etc. That is, we can often omit the z_vrfy/z_impl part of the name.
...Additional parameters relevant to the tracing call

◆ SYS_PORT_TRACING_FUNC_ENTER

#define SYS_PORT_TRACING_FUNC_ENTER ( type,
func,
... )

#include <zephyr/tracing/tracing_macros.h>

Value:
_SYS_PORT_TRACE_IF_NOT_DISABLED(type, _SYS_PORT_TRACING_FUNC_ENTER(type, func), __VA_ARGS__)

Tracing macro for the entry into a function that might or might not return a value.

Parameters
typeType of tracing event or object type
funcName of the function responsible for the call. This does not need to exactly match the name of the function but should rather match what the user called in case of system calls etc. That is, we can often omit the z_vrfy/z_impl part of the name.
...Additional parameters relevant to the tracing call

◆ SYS_PORT_TRACING_FUNC_EXIT

#define SYS_PORT_TRACING_FUNC_EXIT ( type,
func,
... )

#include <zephyr/tracing/tracing_macros.h>

Value:
_SYS_PORT_TRACE_IF_NOT_DISABLED(type, _SYS_PORT_TRACING_FUNC_EXIT(type, func), __VA_ARGS__)

Tracing macro for when a function ends its execution.

Potential return values can be given as additional arguments.

Parameters
typeType of tracing event or object type
funcName of the function responsible for the call. This does not need to exactly match the name of the function but should rather match what the user called in case of system calls etc. That is, we can often omit the z_vrfy/z_impl part of the name.
...Additional parameters relevant to the tracing call

◆ SYS_PORT_TRACING_OBJ_FUNC

#define SYS_PORT_TRACING_OBJ_FUNC ( obj_type,
func,
obj,
... )

#include <zephyr/tracing/tracing_macros.h>

Value:
do { \
SYS_PORT_TRACING_TYPE_MASK(obj_type, \
_SYS_PORT_TRACING_OBJ_FUNC(obj_type, func)(obj, ##__VA_ARGS__)); \
SYS_PORT_TRACING_TYPE_MASK(obj_type, \
_SYS_PORT_TRACKING_OBJ_FUNC(obj_type, func)(obj, ##__VA_ARGS__)); \
} while (false)

Tracing macro for simple object function calls often without returns or branching.

Parameters
obj_typeThe type of object associated with the call (k_thread, k_sem, k_mutex etc.)
funcName of the function responsible for the call. This does not need to exactly match the name of the function but should rather match what the user called in case of system calls etc. That is, we can often omit the z_vrfy/z_impl part of the name.
objObject
...Additional parameters relevant to the tracing call

◆ SYS_PORT_TRACING_OBJ_FUNC_BLOCKING

#define SYS_PORT_TRACING_OBJ_FUNC_BLOCKING ( obj_type,
func,
obj,
timeout,
... )

#include <zephyr/tracing/tracing_macros.h>

Value:
do { \
SYS_PORT_TRACING_TYPE_MASK(obj_type, \
_SYS_PORT_TRACING_OBJ_FUNC_BLOCKING(obj_type, func) \
(obj, timeout, ##__VA_ARGS__)); \
} while (false)

Tracing macro for when a function blocks during its execution.

Parameters
obj_typeThe type of object associated with the call (k_thread, k_sem, k_mutex etc.)
funcName of the function responsible for the call. This does not need to exactly match the name of the function but should rather match what the user called in case of system calls etc. That is, we can often omit the z_vrfy/z_impl part of the name.
objObject
timeoutTimeout
...Additional parameters relevant to the tracing call

◆ SYS_PORT_TRACING_OBJ_FUNC_ENTER

#define SYS_PORT_TRACING_OBJ_FUNC_ENTER ( obj_type,
func,
obj,
... )

#include <zephyr/tracing/tracing_macros.h>

Value:
do { \
SYS_PORT_TRACING_TYPE_MASK(obj_type, \
_SYS_PORT_TRACING_OBJ_FUNC_ENTER(obj_type, func)(obj, ##__VA_ARGS__)); \
} while (false)

Tracing macro for the entry into a function that might or might not return a value.

Parameters
obj_typeThe type of object associated with the call (k_thread, k_sem, k_mutex etc.)
funcName of the function responsible for the call. This does not need to exactly match the name of the function but should rather match what the user called in case of system calls etc. That is, we can often omit the z_vrfy/z_impl part of the name.
objObject
...Additional parameters relevant to the tracing call

◆ SYS_PORT_TRACING_OBJ_FUNC_EXIT

#define SYS_PORT_TRACING_OBJ_FUNC_EXIT ( obj_type,
func,
obj,
... )

#include <zephyr/tracing/tracing_macros.h>

Value:
do { \
SYS_PORT_TRACING_TYPE_MASK(obj_type, \
_SYS_PORT_TRACING_OBJ_FUNC_EXIT(obj_type, func)(obj, ##__VA_ARGS__)); \
} while (false)

Tracing macro for when a function ends its execution.

Potential return values can be given as additional arguments.

Parameters
obj_typeThe type of object associated with the call (k_thread, k_sem, k_mutex etc.)
funcName of the function responsible for the call. This does not need to exactly match the name of the function but should rather match what the user called in case of system calls etc. That is, we can often omit the z_vrfy/z_impl part of the name.
objObject
...Additional parameters relevant to the tracing call

◆ SYS_PORT_TRACING_OBJ_INIT

#define SYS_PORT_TRACING_OBJ_INIT ( obj_type,
obj,
... )

#include <zephyr/tracing/tracing_macros.h>

Value:
do { \
SYS_PORT_TRACING_TYPE_MASK(obj_type, \
_SYS_PORT_TRACING_OBJ_INIT(obj_type)(obj, ##__VA_ARGS__)); \
SYS_PORT_TRACING_TYPE_MASK(obj_type, \
_SYS_PORT_TRACKING_OBJ_INIT(obj_type)(obj, ##__VA_ARGS__)); \
} while (false)

Tracing macro for the initialization of an object.

Parameters
obj_typeThe type of object associated with the call (k_thread, k_sem, k_mutex etc.)
objObject

◆ SYS_PORT_TRACING_TRACKING_FIELD

#define SYS_PORT_TRACING_TRACKING_FIELD ( type)

#include <zephyr/tracing/tracing_macros.h>

Value:
SYS_PORT_TRACING_TYPE_MASK(type, struct type *_obj_track_next;)
#define SYS_PORT_TRACING_TYPE_MASK(type, trace_call)
Checks if an object type should be traced or not.
Definition tracing_macros.h:222

Field added to kernel objects so they are tracked.

Parameters
typeType of object being tracked (k_thread, k_sem, etc.)

◆ SYS_PORT_TRACING_TYPE_MASK

#define SYS_PORT_TRACING_TYPE_MASK ( type,
trace_call )

#include <zephyr/tracing/tracing_macros.h>

Value:
_SYS_PORT_TRACING_TYPE_MASK(type)(trace_call)

Checks if an object type should be traced or not.

Parameters
typeTracing event type/object
trace_callTracing call