6#ifndef ZEPHYR_INCLUDE_TRACING_TRACING_H_
7#define ZEPHYR_INCLUDE_TRACING_TRACING_H_
11#if defined CONFIG_SEGGER_SYSTEMVIEW
12#include "tracing_sysview.h"
14#elif defined CONFIG_TRACING_CTF
15#include "tracing_ctf.h"
17#elif defined CONFIG_TRACING_TEST
18#include "tracing_test.h"
20#elif defined CONFIG_TRACING_USER
21#include "tracing_user.h"
35#define sys_port_trace_k_thread_foreach_enter()
40#define sys_port_trace_k_thread_foreach_exit()
45#define sys_port_trace_k_thread_foreach_unlocked_enter()
50#define sys_port_trace_k_thread_foreach_unlocked_exit()
56#define sys_port_trace_k_thread_create(new_thread)
61#define sys_port_trace_k_thread_user_mode_enter()
68#define sys_port_trace_k_thread_join_enter(thread, timeout)
75#define sys_port_trace_k_thread_join_blocking(thread, timeout)
83#define sys_port_trace_k_thread_join_exit(thread, timeout, ret)
89#define sys_port_trace_k_thread_sleep_enter(timeout)
96#define sys_port_trace_k_thread_sleep_exit(timeout, ret)
102#define sys_port_trace_k_thread_msleep_enter(ms)
109#define sys_port_trace_k_thread_msleep_exit(ms, ret)
115#define sys_port_trace_k_thread_usleep_enter(us)
122#define sys_port_trace_k_thread_usleep_exit(us, ret)
128#define sys_port_trace_k_thread_busy_wait_enter(usec_to_wait)
134#define sys_port_trace_k_thread_busy_wait_exit(usec_to_wait)
139#define sys_port_trace_k_thread_yield()
145#define sys_port_trace_k_thread_wakeup(thread)
151#define sys_port_trace_k_thread_start(thread)
157#define sys_port_trace_k_thread_abort(thread)
163#define sys_port_trace_k_thread_priority_set(thread)
170#define sys_port_trace_k_thread_suspend_enter(thread)
177#define sys_port_trace_k_thread_suspend_exit(thread)
184#define sys_port_trace_k_thread_resume_enter(thread)
191#define sys_port_trace_k_thread_resume_exit(thread)
196#define sys_port_trace_k_thread_sched_lock()
201#define sys_port_trace_k_thread_sched_unlock()
208#define sys_port_trace_k_thread_name_set(thread, ret)
213#define sys_port_trace_k_thread_switched_out()
218#define sys_port_trace_k_thread_switched_in()
224#define sys_port_trace_k_thread_ready(thread)
230#define sys_port_trace_k_thread_pend(thread)
236#define sys_port_trace_k_thread_info(thread)
242#define sys_port_trace_k_thread_sched_wakeup(thread)
248#define sys_port_trace_k_thread_sched_abort(thread)
255#define sys_port_trace_k_thread_sched_priority_set(thread, prio)
261#define sys_port_trace_k_thread_sched_ready(thread)
267#define sys_port_trace_k_thread_sched_pend(thread)
273#define sys_port_trace_k_thread_sched_resume(thread)
279#define sys_port_trace_k_thread_sched_suspend(thread)
299#define sys_port_trace_k_work_init(work)
306#define sys_port_trace_k_work_submit_to_queue_enter(queue, work)
314#define sys_port_trace_k_work_submit_to_queue_exit(queue, work, ret)
320#define sys_port_trace_k_work_submit_enter(work)
327#define sys_port_trace_k_work_submit_exit(work, ret)
333#define sys_port_trace_k_work_flush_enter(work)
340#define sys_port_trace_k_work_flush_blocking(work, timeout)
347#define sys_port_trace_k_work_flush_exit(work, ret)
353#define sys_port_trace_k_work_cancel_enter(work)
360#define sys_port_trace_k_work_cancel_exit(work, ret)
367#define sys_port_trace_k_work_cancel_sync_enter(work, sync)
374#define sys_port_trace_k_work_cancel_sync_blocking(work, sync)
382#define sys_port_trace_k_work_cancel_sync_exit(work, sync, ret)
402#define sys_port_trace_k_work_queue_init(queue)
408#define sys_port_trace_k_work_queue_start_enter(queue)
414#define sys_port_trace_k_work_queue_start_exit(queue)
420#define sys_port_trace_k_work_queue_drain_enter(queue)
427#define sys_port_trace_k_work_queue_drain_exit(queue, ret)
433#define sys_port_trace_k_work_queue_unplug_enter(queue)
440#define sys_port_trace_k_work_queue_unplug_exit(queue, ret)
460#define sys_port_trace_k_work_delayable_init(dwork)
468#define sys_port_trace_k_work_schedule_for_queue_enter(queue, dwork, delay)
477#define sys_port_trace_k_work_schedule_for_queue_exit(queue, dwork, delay, ret)
484#define sys_port_trace_k_work_schedule_enter(dwork, delay)
492#define sys_port_trace_k_work_schedule_exit(dwork, delay, ret)
500#define sys_port_trace_k_work_reschedule_for_queue_enter(queue, dwork, delay)
509#define sys_port_trace_k_work_reschedule_for_queue_exit(queue, dwork, delay, ret)
516#define sys_port_trace_k_work_reschedule_enter(dwork, delay)
524#define sys_port_trace_k_work_reschedule_exit(dwork, delay, ret)
531#define sys_port_trace_k_work_flush_delayable_enter(dwork, sync)
539#define sys_port_trace_k_work_flush_delayable_exit(dwork, sync, ret)
545#define sys_port_trace_k_work_cancel_delayable_enter(dwork)
552#define sys_port_trace_k_work_cancel_delayable_exit(dwork, ret)
559#define sys_port_trace_k_work_cancel_delayable_sync_enter(dwork, sync)
567#define sys_port_trace_k_work_cancel_delayable_sync_exit(dwork, sync, ret)
587#define sys_port_trace_k_work_poll_init_enter(work)
593#define sys_port_trace_k_work_poll_init_exit(work)
601#define sys_port_trace_k_work_poll_submit_to_queue_enter(work_q, work, timeout)
609#define sys_port_trace_k_work_poll_submit_to_queue_blocking(work_q, work, timeout)
618#define sys_port_trace_k_work_poll_submit_to_queue_exit(work_q, work, timeout, ret)
625#define sys_port_trace_k_work_poll_submit_enter(work, timeout)
633#define sys_port_trace_k_work_poll_submit_exit(work, timeout, ret)
639#define sys_port_trace_k_work_poll_cancel_enter(work)
646#define sys_port_trace_k_work_poll_cancel_exit(work, ret)
666#define sys_port_trace_k_poll_api_event_init(event)
672#define sys_port_trace_k_poll_api_poll_enter(events)
679#define sys_port_trace_k_poll_api_poll_exit(events, ret)
685#define sys_port_trace_k_poll_api_signal_init(signal)
691#define sys_port_trace_k_poll_api_signal_reset(signal)
697#define sys_port_trace_k_poll_api_signal_check(signal)
704#define sys_port_trace_k_poll_api_signal_raise(signal, ret)
725#define sys_port_trace_k_sem_init(sem, ret)
731#define sys_port_trace_k_sem_give_enter(sem)
737#define sys_port_trace_k_sem_give_exit(sem)
744#define sys_port_trace_k_sem_take_enter(sem, timeout)
751#define sys_port_trace_k_sem_take_blocking(sem, timeout)
759#define sys_port_trace_k_sem_take_exit(sem, timeout, ret)
765#define sys_port_trace_k_sem_reset(sem)
786#define sys_port_trace_k_mutex_init(mutex, ret)
793#define sys_port_trace_k_mutex_lock_enter(mutex, timeout)
800#define sys_port_trace_k_mutex_lock_blocking(mutex, timeout)
808#define sys_port_trace_k_mutex_lock_exit(mutex, timeout, ret)
814#define sys_port_trace_k_mutex_unlock_enter(mutex)
819#define sys_port_trace_k_mutex_unlock_exit(mutex, ret)
840#define sys_port_trace_k_condvar_init(condvar, ret)
846#define sys_port_trace_k_condvar_signal_enter(condvar)
853#define sys_port_trace_k_condvar_signal_blocking(condvar, timeout)
860#define sys_port_trace_k_condvar_signal_exit(condvar, ret)
866#define sys_port_trace_k_condvar_broadcast_enter(condvar)
873#define sys_port_trace_k_condvar_broadcast_exit(condvar, ret)
879#define sys_port_trace_k_condvar_wait_enter(condvar)
886#define sys_port_trace_k_condvar_wait_exit(condvar, ret)
906#define sys_port_trace_k_queue_init(queue)
912#define sys_port_trace_k_queue_cancel_wait(queue)
919#define sys_port_trace_k_queue_queue_insert_enter(queue, alloc)
927#define sys_port_trace_k_queue_queue_insert_blocking(queue, alloc, timeout)
935#define sys_port_trace_k_queue_queue_insert_exit(queue, alloc, ret)
941#define sys_port_trace_k_queue_append_enter(queue)
947#define sys_port_trace_k_queue_append_exit(queue)
953#define sys_port_trace_k_queue_alloc_append_enter(queue)
960#define sys_port_trace_k_queue_alloc_append_exit(queue, ret)
966#define sys_port_trace_k_queue_prepend_enter(queue)
972#define sys_port_trace_k_queue_prepend_exit(queue)
978#define sys_port_trace_k_queue_alloc_prepend_enter(queue)
985#define sys_port_trace_k_queue_alloc_prepend_exit(queue, ret)
991#define sys_port_trace_k_queue_insert_enter(queue)
998#define sys_port_trace_k_queue_insert_blocking(queue, timeout)
1004#define sys_port_trace_k_queue_insert_exit(queue)
1010#define sys_port_trace_k_queue_append_list_enter(queue)
1017#define sys_port_trace_k_queue_append_list_exit(queue, ret)
1023#define sys_port_trace_k_queue_merge_slist_enter(queue)
1030#define sys_port_trace_k_queue_merge_slist_exit(queue, ret)
1037#define sys_port_trace_k_queue_get_enter(queue, timeout)
1044#define sys_port_trace_k_queue_get_blocking(queue, timeout)
1052#define sys_port_trace_k_queue_get_exit(queue, timeout, ret)
1058#define sys_port_trace_k_queue_remove_enter(queue)
1065#define sys_port_trace_k_queue_remove_exit(queue, ret)
1071#define sys_port_trace_k_queue_unique_append_enter(queue)
1079#define sys_port_trace_k_queue_unique_append_exit(queue, ret)
1086#define sys_port_trace_k_queue_peek_head(queue, ret)
1093#define sys_port_trace_k_queue_peek_tail(queue, ret)
1113#define sys_port_trace_k_fifo_init_enter(fifo)
1119#define sys_port_trace_k_fifo_init_exit(fifo)
1125#define sys_port_trace_k_fifo_cancel_wait_enter(fifo)
1131#define sys_port_trace_k_fifo_cancel_wait_exit(fifo)
1138#define sys_port_trace_k_fifo_put_enter(fifo, data)
1145#define sys_port_trace_k_fifo_put_exit(fifo, data)
1152#define sys_port_trace_k_fifo_alloc_put_enter(fifo, data)
1160#define sys_port_trace_k_fifo_alloc_put_exit(fifo, data, ret)
1168#define sys_port_trace_k_fifo_alloc_put_list_enter(fifo, head, tail)
1176#define sys_port_trace_k_fifo_alloc_put_list_exit(fifo, head, tail)
1183#define sys_port_trace_k_fifo_alloc_put_slist_enter(fifo, list)
1190#define sys_port_trace_k_fifo_alloc_put_slist_exit(fifo, list)
1197#define sys_port_trace_k_fifo_get_enter(fifo, timeout)
1205#define sys_port_trace_k_fifo_get_exit(fifo, timeout, ret)
1211#define sys_port_trace_k_fifo_peek_head_entry(fifo)
1218#define sys_port_trace_k_fifo_peek_head_exit(fifo, ret)
1224#define sys_port_trace_k_fifo_peek_tail_entry(fifo)
1231#define sys_port_trace_k_fifo_peek_tail_exit(fifo, ret)
1251#define sys_port_trace_k_lifo_init_enter(lifo)
1257#define sys_port_trace_k_lifo_init_exit(lifo)
1264#define sys_port_trace_k_lifo_put_enter(lifo, data)
1271#define sys_port_trace_k_lifo_put_exit(lifo, data)
1278#define sys_port_trace_k_lifo_alloc_put_enter(lifo, data)
1286#define sys_port_trace_k_lifo_alloc_put_exit(lifo, data, ret)
1293#define sys_port_trace_k_lifo_get_enter(lifo, timeout)
1301#define sys_port_trace_k_lifo_get_exit(lifo, timeout, ret)
1321#define sys_port_trace_k_stack_init(stack)
1327#define sys_port_trace_k_stack_alloc_init_enter(stack)
1334#define sys_port_trace_k_stack_alloc_init_exit(stack, ret)
1340#define sys_port_trace_k_stack_cleanup_enter(stack)
1347#define sys_port_trace_k_stack_cleanup_exit(stack, ret)
1353#define sys_port_trace_k_stack_push_enter(stack)
1360#define sys_port_trace_k_stack_push_exit(stack, ret)
1367#define sys_port_trace_k_stack_pop_enter(stack, timeout)
1374#define sys_port_trace_k_stack_pop_blocking(stack, timeout)
1382#define sys_port_trace_k_stack_pop_exit(stack, timeout, ret)
1402#define sys_port_trace_k_msgq_init(msgq)
1408#define sys_port_trace_k_msgq_alloc_init_enter(msgq)
1415#define sys_port_trace_k_msgq_alloc_init_exit(msgq, ret)
1421#define sys_port_trace_k_msgq_cleanup_enter(msgq)
1428#define sys_port_trace_k_msgq_cleanup_exit(msgq, ret)
1435#define sys_port_trace_k_msgq_put_enter(msgq, timeout)
1442#define sys_port_trace_k_msgq_put_blocking(msgq, timeout)
1450#define sys_port_trace_k_msgq_put_exit(msgq, timeout, ret)
1457#define sys_port_trace_k_msgq_get_enter(msgq, timeout)
1464#define sys_port_trace_k_msgq_get_blocking(msgq, timeout)
1472#define sys_port_trace_k_msgq_get_exit(msgq, timeout, ret)
1479#define sys_port_trace_k_msgq_peek(msgq, ret)
1485#define sys_port_trace_k_msgq_purge(msgq)
1505#define sys_port_trace_k_mbox_init(mbox)
1512#define sys_port_trace_k_mbox_message_put_enter(mbox, timeout)
1519#define sys_port_trace_k_mbox_message_put_blocking(mbox, timeout)
1527#define sys_port_trace_k_mbox_message_put_exit(mbox, timeout, ret)
1534#define sys_port_trace_k_mbox_put_enter(mbox, timeout)
1542#define sys_port_trace_k_mbox_put_exit(mbox, timeout, ret)
1549#define sys_port_trace_k_mbox_async_put_enter(mbox, sem)
1556#define sys_port_trace_k_mbox_async_put_exit(mbox, sem)
1563#define sys_port_trace_k_mbox_get_enter(mbox, timeout)
1570#define sys_port_trace_k_mbox_get_blocking(mbox, timeout)
1578#define sys_port_trace_k_mbox_get_exit(mbox, timeout, ret)
1584#define sys_port_trace_k_mbox_data_get(rx_msg)
1604#define sys_port_trace_k_pipe_init(pipe)
1610#define sys_port_trace_k_pipe_cleanup_enter(pipe)
1617#define sys_port_trace_k_pipe_cleanup_exit(pipe, ret)
1623#define sys_port_trace_k_pipe_alloc_init_enter(pipe)
1630#define sys_port_trace_k_pipe_alloc_init_exit(pipe, ret)
1637#define sys_port_trace_k_pipe_put_enter(pipe, timeout)
1644#define sys_port_trace_k_pipe_put_blocking(pipe, timeout)
1652#define sys_port_trace_k_pipe_put_exit(pipe, timeout, ret)
1659#define sys_port_trace_k_pipe_get_enter(pipe, timeout)
1666#define sys_port_trace_k_pipe_get_blocking(pipe, timeout)
1674#define sys_port_trace_k_pipe_get_exit(pipe, timeout, ret)
1681#define sys_port_trace_k_pipe_block_put_enter(pipe, sem)
1688#define sys_port_trace_k_pipe_block_put_exit(pipe, sem)
1708#define sys_port_trace_k_heap_init(h)
1715#define sys_port_trace_k_heap_aligned_alloc_enter(h, timeout)
1722#define sys_port_trace_k_heap_aligned_alloc_blocking(h, timeout)
1730#define sys_port_trace_k_heap_aligned_alloc_exit(h, timeout, ret)
1737#define sys_port_trace_k_heap_alloc_enter(h, timeout)
1745#define sys_port_trace_k_heap_alloc_exit(h, timeout, ret)
1751#define sys_port_trace_k_heap_free(h)
1757#define sys_port_trace_k_heap_sys_k_aligned_alloc_enter(heap)
1764#define sys_port_trace_k_heap_sys_k_aligned_alloc_exit(heap, ret)
1770#define sys_port_trace_k_heap_sys_k_malloc_enter(heap)
1777#define sys_port_trace_k_heap_sys_k_malloc_exit(heap, ret)
1783#define sys_port_trace_k_heap_sys_k_free_enter(heap)
1789#define sys_port_trace_k_heap_sys_k_free_exit(heap)
1795#define sys_port_trace_k_heap_sys_k_calloc_enter(heap)
1802#define sys_port_trace_k_heap_sys_k_calloc_exit(heap, ret)
1823#define sys_port_trace_k_mem_slab_init(slab, rc)
1830#define sys_port_trace_k_mem_slab_alloc_enter(slab, timeout)
1837#define sys_port_trace_k_mem_slab_alloc_blocking(slab, timeout)
1845#define sys_port_trace_k_mem_slab_alloc_exit(slab, timeout, ret)
1851#define sys_port_trace_k_mem_slab_free_enter(slab)
1857#define sys_port_trace_k_mem_slab_free_exit(slab)
1877#define sys_port_trace_k_timer_init(timer)
1883#define sys_port_trace_k_timer_start(timer)
1889#define sys_port_trace_k_timer_stop(timer)
1895#define sys_port_trace_k_timer_status_sync_enter(timer)
1902#define sys_port_trace_k_timer_status_sync_blocking(timer, timeout)
1909#define sys_port_trace_k_timer_status_sync_exit(timer, result)
1926#define sys_port_trace_k_event_init(event)
1934#define sys_port_trace_k_event_post_enter(event, events, accumulate)
1942#define sys_port_trace_k_event_post_exit(event, events, accumulate)
1951#define sys_port_trace_k_event_wait_enter(event, events, options, timeout)
1960#define sys_port_trace_k_event_wait_blocking(event, events, options, timeout)
1968#define sys_port_trace_k_event_wait_exit(event, events, ret)
1974#define sys_port_trace_pm_system_suspend_enter(ticks)
1976#define sys_port_trace_pm_system_suspend_exit(ticks, ret)
1978#define sys_port_trace_pm_device_request_enter(dev, target_state)
1980#define sys_port_trace_pm_device_request_exit(dev, ret)
1982#define sys_port_trace_pm_device_enable_enter(dev)
1984#define sys_port_trace_pm_device_enable_exit(dev)
1986#define sys_port_trace_pm_device_disable_enter(dev)
1988#define sys_port_trace_pm_device_disable_exit(dev)
1991#if defined CONFIG_PERCEPIO_TRACERECORDER
1992#include "tracing_tracerecorder.h"
void sys_trace_isr_exit_to_scheduler(void)
Called when exiting an ISR and switching to scheduler.
void sys_trace_isr_enter(void)
Called when entering an ISR.
void sys_trace_isr_exit(void)
Called when exiting an ISR.
void sys_trace_idle(void)
Called when the cpu enters the idle state.