Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
tracing_default_hooks.h File Reference

Default implementations of the low-level sys_trace_* hook layer. More...

Go to the source code of this file.

Macros

#define sys_trace_named_event(name, arg0, arg1)
 Trace a user-defined named event.
#define sys_trace_sys_init_enter(entry, level)
 Trace a system init level entry being entered.
#define sys_trace_sys_init_exit(entry, level, result)
 Trace a system init level entry being exited.

Functions

void sys_trace_isr_enter (void)
 Trace an interrupt service routine being entered.
void sys_trace_isr_exit (void)
 Trace an interrupt service routine being exited.
void sys_trace_isr_exit_to_scheduler (void)
 Trace an interrupt service routine exiting into the scheduler.
void sys_trace_idle (void)
 Trace the CPU entering the idle state.
void sys_trace_idle_exit (void)
 Trace the CPU leaving the idle state.

Detailed Description

Default implementations of the low-level sys_trace_* hook layer.

Besides the sys_port_trace_* macro hooks (see tracing_hooks.h), the kernel calls a small set of lower-level sys_trace_* hooks for the scheduler/ISR, idle, system init and user-named events. A tracing format that does not instrument these can include this header to get safe defaults:

  • sys_trace_isr_* / sys_trace_idle* resolve to the weak no-op (or CPU load accounting) implementations in tracing_none.c, which a format may override with a real definition.
  • sys_trace_named_event and sys_trace_sys_init_* become no-op macros, guarded by #ifndef so a format that defines its own wins.

In-tree formats (CTF, SystemView, ...) provide this layer themselves and do not include this header; it exists for out-of-tree formats selected via CONFIG_TRACING_FORMAT_HEADER or CONFIG_TRACING_CUSTOM.

Macro Definition Documentation

◆ sys_trace_named_event

#define sys_trace_named_event ( name,
arg0,
arg1 )

Trace a user-defined named event.

Parameters
nameEvent name
arg0First user argument
arg1Second user argument

◆ sys_trace_sys_init_enter

#define sys_trace_sys_init_enter ( entry,
level )

Trace a system init level entry being entered.

Parameters
entryInit entry being run
levelInit level the entry belongs to

◆ sys_trace_sys_init_exit

#define sys_trace_sys_init_exit ( entry,
level,
result )

Trace a system init level entry being exited.

Parameters
entryInit entry that was run
levelInit level the entry belongs to
resultReturn code of the init entry

Function Documentation

◆ sys_trace_idle()

void sys_trace_idle ( void )

Trace the CPU entering the idle state.

◆ sys_trace_idle_exit()

void sys_trace_idle_exit ( void )

Trace the CPU leaving the idle state.

◆ sys_trace_isr_enter()

void sys_trace_isr_enter ( void )

Trace an interrupt service routine being entered.

◆ sys_trace_isr_exit()

void sys_trace_isr_exit ( void )

Trace an interrupt service routine being exited.

◆ sys_trace_isr_exit_to_scheduler()

void sys_trace_isr_exit_to_scheduler ( void )

Trace an interrupt service routine exiting into the scheduler.