ChibiOS  21.6.0
chtrace.h File Reference

Tracer macros and structures. More...

Go to the source code of this file.

Data Structures

struct  trace_event_t
 Trace buffer record. More...
 
struct  trace_buffer_t
 Trace buffer header. More...
 

Macros

Trace record types
#define CH_TRACE_TYPE_UNUSED   0U
 
#define CH_TRACE_TYPE_READY   1U
 
#define CH_TRACE_TYPE_SWITCH   2U
 
#define CH_TRACE_TYPE_ISR_ENTER   3U
 
#define CH_TRACE_TYPE_ISR_LEAVE   4U
 
#define CH_TRACE_TYPE_HALT   5U
 
#define CH_TRACE_TYPE_USER   6U
 
Events to trace
#define CH_DBG_TRACE_MASK_DISABLED   255U
 
#define CH_DBG_TRACE_MASK_NONE   0U
 
#define CH_DBG_TRACE_MASK_READY   1U
 
#define CH_DBG_TRACE_MASK_SWITCH   2U
 
#define CH_DBG_TRACE_MASK_ISR   4U
 
#define CH_DBG_TRACE_MASK_HALT   8U
 
#define CH_DBG_TRACE_MASK_USER   16U
 
#define CH_DBG_TRACE_MASK_SLOW
 
#define CH_DBG_TRACE_MASK_ALL
 
Debug related settings
#define CH_DBG_TRACE_MASK   CH_DBG_TRACE_MASK_DISABLED
 Trace buffer entries. More...
 
#define CH_DBG_TRACE_BUFFER_SIZE   128
 Trace buffer entries. More...
 

Functions

void __trace_object_init (trace_buffer_t *tbp)
 Circular trace buffer initialization. More...
 
void __trace_ready (thread_t *tp, msg_t msg)
 Inserts in the circular debug trace buffer a ready record. More...
 
void __trace_switch (thread_t *ntp, thread_t *otp)
 Inserts in the circular debug trace buffer a context switch record. More...
 
void __trace_isr_enter (const char *isr)
 Inserts in the circular debug trace buffer an ISR-enter record. More...
 
void __trace_isr_leave (const char *isr)
 Inserts in the circular debug trace buffer an ISR-leave record. More...
 
void __trace_halt (const char *reason)
 Inserts in the circular debug trace buffer an halt record. More...
 
void chTraceWriteI (void *up1, void *up2)
 Adds an user trace record to the trace buffer. More...
 
void chTraceWrite (void *up1, void *up2)
 Adds an user trace record to the trace buffer. More...
 
void chTraceSuspendI (uint16_t mask)
 Suspends one or more trace events. More...
 
void chTraceSuspend (uint16_t mask)
 Suspends one or more trace events. More...
 
void chTraceResume (uint16_t mask)
 Resumes one or more trace events. More...
 

Detailed Description

Tracer macros and structures.

Definition in file chtrace.h.