ChibiOS
21.6.0
|
System events tracing service.
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... | |
Data Structures | |
struct | trace_event_t |
Trace buffer record. More... | |
struct | trace_buffer_t |
Trace buffer header. More... | |
Functions | |
static NOINLINE void | trace_next (os_instance_t *oip) |
Writes a time stamp and increases the trace buffer pointer. More... | |
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 | chTraceResumeI (uint16_t mask) |
Resumes one or more trace events. More... | |
void | chTraceResume (uint16_t mask) |
Resumes one or more trace events. More... | |
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED |
#define CH_DBG_TRACE_BUFFER_SIZE 128 |
|
static |
Writes a time stamp and increases the trace buffer pointer.
Definition at line 57 of file chtrace.c.
References trace_buffer_t::buffer, CH_CFG_TRACE_HOOK, CH_DBG_TRACE_BUFFER_SIZE, chSysGetRealtimeCounterX, chVTGetSystemTimeX, trace_buffer_t::ptr, trace_event_t::rtstamp, trace_event_t::time, and ch_os_instance::trace_buffer.
void __trace_object_init | ( | trace_buffer_t * | tbp | ) |
Circular trace buffer initialization.
[out] | tbp | pointer to the trace_buffer_t structure |
Definition at line 88 of file chtrace.c.
References trace_buffer_t::suspended.
Referenced by chInstanceObjectInit().
Inserts in the circular debug trace buffer a ready record.
[in] | tp | the thread that just become ready |
[in] | msg | the thread ready message |
Definition at line 107 of file chtrace.c.
References currcore, trace_buffer_t::suspended, and ch_os_instance::trace_buffer.
Referenced by __sch_ready_ahead(), and __sch_ready_behind().
Inserts in the circular debug trace buffer a context switch record.
[in] | ntp | the thread being switched in |
[in] | otp | the thread being switched out |
Definition at line 127 of file chtrace.c.
References currcore, trace_buffer_t::suspended, and ch_os_instance::trace_buffer.
void __trace_isr_enter | ( | const char * | isr | ) |
Inserts in the circular debug trace buffer an ISR-enter record.
[in] | isr | name of the isr |
Definition at line 146 of file chtrace.c.
References currcore, trace_buffer_t::suspended, and ch_os_instance::trace_buffer.
void __trace_isr_leave | ( | const char * | isr | ) |
Inserts in the circular debug trace buffer an ISR-leave record.
[in] | isr | name of the isr |
Definition at line 166 of file chtrace.c.
References currcore, trace_buffer_t::suspended, and ch_os_instance::trace_buffer.
void __trace_halt | ( | const char * | reason | ) |
Inserts in the circular debug trace buffer an halt record.
[in] | reason | the halt error string |
Definition at line 186 of file chtrace.c.
References currcore, trace_buffer_t::suspended, and ch_os_instance::trace_buffer.
Referenced by chSysHalt().
void chTraceWriteI | ( | void * | up1, |
void * | up2 | ||
) |
Adds an user trace record to the trace buffer.
[in] | up1 | user parameter 1 |
[in] | up2 | user parameter 2 |
Definition at line 205 of file chtrace.c.
References currcore.
Referenced by chTraceWrite().
void chTraceWrite | ( | void * | up1, |
void * | up2 | ||
) |
Adds an user trace record to the trace buffer.
[in] | up1 | user parameter 1 |
[in] | up2 | user parameter 2 |
Definition at line 227 of file chtrace.c.
References chSysLock, chSysUnlock, and chTraceWriteI().
void chTraceSuspendI | ( | uint16_t | mask | ) |
Suspends one or more trace events.
[in] | mask | mask of the trace events to be suspended |
Definition at line 241 of file chtrace.c.
Referenced by chTraceSuspend().
void chTraceSuspend | ( | uint16_t | mask | ) |
Suspends one or more trace events.
[in] | mask | mask of the trace events to be suspended |
Definition at line 255 of file chtrace.c.
References chSysLock, chSysUnlock, and chTraceSuspendI().
void chTraceResumeI | ( | uint16_t | mask | ) |
Resumes one or more trace events.
[in] | mask | mask of the trace events to be resumed |
Definition at line 269 of file chtrace.c.
Referenced by chTraceResume().
void chTraceResume | ( | uint16_t | mask | ) |
Resumes one or more trace events.
[in] | mask | mask of the trace events to be resumed |
Definition at line 283 of file chtrace.c.
References chSysLock, chSysUnlock, and chTraceResumeI().