1 /*
2  * Copyright (c) 2021 Intel corporation
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 #ifndef ZEPHYR_TRACE_TEST_H
7 #define ZEPHYR_TRACE_TEST_H
8 #include <kernel.h>
9 #include <init.h>
10 
11 #define sys_port_trace_k_thread_foreach_enter() sys_trace_k_thread_foreach_enter(user_cb, user_data)
12 #define sys_port_trace_k_thread_foreach_exit() sys_trace_k_thread_foreach_exit(user_cb, user_data)
13 #define sys_port_trace_k_thread_foreach_unlocked_enter()                                           \
14 	sys_trace_k_thread_foreach_unlocked_enter(user_cb, user_data)
15 #define sys_port_trace_k_thread_foreach_unlocked_exit()                                            \
16 	sys_trace_k_thread_foreach_unlocked_exit(user_cb, user_data)
17 #define sys_port_trace_k_thread_create(new_thread)                                                 \
18 	sys_trace_k_thread_create(new_thread, stack_size, prio)
19 #define sys_port_trace_k_thread_user_mode_enter()                                                  \
20 	sys_trace_k_thread_user_mode_enter(entry, p1, p2, p3)
21 #define sys_port_trace_k_thread_heap_assign(thread, heap)                                          \
22 	sys_trace_k_thread_heap_assign(thread, heap)
23 #define sys_port_trace_k_thread_join_enter(thread, timeout)                                        \
24 	sys_trace_k_thread_join_blocking(thread, timeout)
25 #define sys_port_trace_k_thread_join_blocking(thread, timeout)                                     \
26 	sys_trace_k_thread_join_blocking(thread, timeout)
27 #define sys_port_trace_k_thread_join_exit(thread, timeout, ret)                                    \
28 	sys_trace_k_thread_join_exit(thread, timeout, ret)
29 #define sys_port_trace_k_thread_sleep_enter(timeout) sys_trace_k_thread_sleep_enter(timeout)
30 #define sys_port_trace_k_thread_sleep_exit(timeout, ret) sys_trace_k_thread_sleep_exit(timeout, ret)
31 #define sys_port_trace_k_thread_msleep_enter(ms) sys_trace_k_thread_msleep_enter(ms)
32 #define sys_port_trace_k_thread_msleep_exit(ms, ret) sys_trace_k_thread_msleep_exit(ms, ret)
33 #define sys_port_trace_k_thread_usleep_enter(us) sys_trace_k_thread_usleep_enter(us)
34 #define sys_port_trace_k_thread_usleep_exit(us, ret) sys_trace_k_thread_usleep_exit(us, ret)
35 #define sys_port_trace_k_thread_busy_wait_enter(usec_to_wait)
36 #define sys_port_trace_k_thread_busy_wait_exit(usec_to_wait)
37 #define sys_port_trace_k_thread_yield() sys_trace_k_thread_yield()
38 #define sys_port_trace_k_thread_wakeup(thread) sys_trace_k_thread_wakeup(thread)
39 #define sys_port_trace_k_thread_start(thread) sys_trace_k_thread_start(thread)
40 #define sys_port_trace_k_thread_abort(thread) sys_trace_k_thread_abort(thread)
41 #define sys_port_trace_k_thread_priority_set(thread) sys_trace_k_thread_priority_set(thread)
42 #define sys_port_trace_k_thread_suspend_enter(thread) sys_trace_k_thread_suspend(thread)
43 #define sys_port_trace_k_thread_suspend_exit(thread)
44 #define sys_port_trace_k_thread_resume_enter(thread) sys_trace_k_thread_resume(thread)
45 
46 #define sys_port_trace_k_thread_sched_lock(...) sys_trace_k_thread_sched_lock()
47 
48 #define sys_port_trace_k_thread_sched_unlock(...) sys_trace_k_thread_sched_unlock()
49 
50 #define sys_port_trace_k_thread_name_set(thread, ret) sys_trace_k_thread_name_set(thread, ret)
51 
52 #define sys_port_trace_k_thread_switched_out() sys_trace_k_thread_switched_out()
53 
54 #define sys_port_trace_k_thread_switched_in() sys_trace_k_thread_switched_in()
55 
56 #define sys_port_trace_k_thread_info(thread) sys_trace_k_thread_info(thread)
57 
58 #define sys_port_trace_k_thread_sched_wakeup(thread) sys_trace_k_thread_sched_wakeup(thread)
59 #define sys_port_trace_k_thread_sched_abort(thread) sys_trace_k_thread_sched_abort(thread)
60 #define sys_port_trace_k_thread_sched_priority_set(thread, prio)                                   \
61 	sys_trace_k_thread_sched_set_priority(thread, prio)
62 #define sys_port_trace_k_thread_sched_ready(thread) sys_trace_k_thread_sched_ready(thread)
63 #define sys_port_trace_k_thread_sched_pend(thread) sys_trace_k_thread_sched_pend(thread)
64 #define sys_port_trace_k_thread_sched_resume(thread) sys_trace_k_thread_sched_resume(thread)
65 #define sys_port_trace_k_thread_sched_suspend(thread) sys_trace_k_thread_sched_suspend(thread)
66 
67 #define sys_port_trace_k_work_init(work)
68 #define sys_port_trace_k_work_submit_to_queue_enter(queue, work)
69 #define sys_port_trace_k_work_submit_to_queue_exit(queue, work, ret)
70 #define sys_port_trace_k_work_submit_enter(work)
71 #define sys_port_trace_k_work_submit_exit(work, ret)
72 #define sys_port_trace_k_work_flush_enter(work)
73 #define sys_port_trace_k_work_flush_blocking(work, timeout)
74 #define sys_port_trace_k_work_flush_exit(work, ret)
75 #define sys_port_trace_k_work_cancel_enter(work)
76 #define sys_port_trace_k_work_cancel_exit(work, ret)
77 #define sys_port_trace_k_work_cancel_sync_enter(work, sync)
78 #define sys_port_trace_k_work_cancel_sync_blocking(work, sync)
79 #define sys_port_trace_k_work_cancel_sync_exit(work, sync, ret)
80 
81 #define sys_port_trace_k_work_queue_init(queue)
82 #define sys_port_trace_k_work_queue_start_enter(queue)
83 #define sys_port_trace_k_work_queue_start_exit(queue)
84 #define sys_port_trace_k_work_queue_drain_enter(queue)
85 #define sys_port_trace_k_work_queue_drain_exit(queue, ret)
86 #define sys_port_trace_k_work_queue_unplug_enter(queue)
87 #define sys_port_trace_k_work_queue_unplug_exit(queue, ret)
88 
89 #define sys_port_trace_k_work_delayable_init(dwork)
90 #define sys_port_trace_k_work_schedule_for_queue_enter(queue, dwork, delay)
91 #define sys_port_trace_k_work_schedule_for_queue_exit(queue, dwork, delay, ret)
92 #define sys_port_trace_k_work_schedule_enter(dwork, delay)
93 #define sys_port_trace_k_work_schedule_exit(dwork, delay, ret)
94 #define sys_port_trace_k_work_reschedule_for_queue_enter(queue, dwork, delay)
95 #define sys_port_trace_k_work_reschedule_for_queue_exit(queue, dwork, delay, ret)
96 #define sys_port_trace_k_work_reschedule_enter(dwork, delay)
97 #define sys_port_trace_k_work_reschedule_exit(dwork, delay, ret)
98 #define sys_port_trace_k_work_flush_delayable_enter(dwork, sync)
99 #define sys_port_trace_k_work_flush_delayable_exit(dwork, sync, ret)
100 #define sys_port_trace_k_work_cancel_delayable_enter(dwork)
101 #define sys_port_trace_k_work_cancel_delayable_exit(dwork, ret)
102 #define sys_port_trace_k_work_cancel_delayable_sync_enter(dwork, sync)
103 #define sys_port_trace_k_work_cancel_delayable_sync_exit(dwork, sync, ret)
104 
105 #define sys_port_trace_k_work_poll_init_enter(work)
106 #define sys_port_trace_k_work_poll_init_exit(work)
107 #define sys_port_trace_k_work_poll_submit_to_queue_enter(work_q, work, timeout)
108 #define sys_port_trace_k_work_poll_submit_to_queue_blocking(work_q, work, timeout)
109 #define sys_port_trace_k_work_poll_submit_to_queue_exit(work_q, work, timeout, ret)
110 #define sys_port_trace_k_work_poll_submit_enter(work, timeout)
111 #define sys_port_trace_k_work_poll_submit_exit(work, timeout, ret)
112 #define sys_port_trace_k_work_poll_cancel_enter(work)
113 #define sys_port_trace_k_work_poll_cancel_exit(work, ret)
114 
115 #define sys_port_trace_k_poll_api_event_init(event)
116 #define sys_port_trace_k_poll_api_poll_enter(events)
117 #define sys_port_trace_k_poll_api_poll_exit(events, ret)
118 #define sys_port_trace_k_poll_api_signal_init(signal)
119 #define sys_port_trace_k_poll_api_signal_reset(signal)
120 #define sys_port_trace_k_poll_api_signal_check(signal)
121 #define sys_port_trace_k_poll_api_signal_raise(signal, ret)
122 
123 #define sys_port_trace_k_sem_init(sem, ret) sys_trace_k_sem_init(sem, ret)
124 #define sys_port_trace_k_sem_give_enter(sem) sys_trace_k_sem_give_enter(sem)
125 #define sys_port_trace_k_sem_give_exit(sem)
126 #define sys_port_trace_k_sem_take_enter(sem, timeout) sys_trace_k_sem_take_enter(sem, timeout)
127 #define sys_port_trace_k_sem_take_blocking(sem, timeout) sys_trace_k_sem_take_blocking(sem, timeout)
128 #define sys_port_trace_k_sem_take_exit(sem, timeout, ret)                                          \
129 	sys_trace_k_sem_take_exit(sem, timeout, ret)
130 #define sys_port_trace_k_sem_reset(sem) sys_trace_k_sem_reset(sem)
131 
132 #define sys_port_trace_k_mutex_init(mutex, ret) sys_trace_k_mutex_init(mutex, ret)
133 #define sys_port_trace_k_mutex_lock_enter(mutex, timeout)                                          \
134 	sys_trace_k_mutex_lock_enter(mutex, timeout)
135 #define sys_port_trace_k_mutex_lock_blocking(mutex, timeout)                                       \
136 	sys_trace_k_mutex_lock_blocking(mutex, timeout)
137 #define sys_port_trace_k_mutex_lock_exit(mutex, timeout, ret)                                      \
138 	sys_trace_k_mutex_lock_exit(mutex, timeout, ret)
139 #define sys_port_trace_k_mutex_unlock_enter(mutex) sys_trace_k_mutex_unlock_enter(mutex)
140 #define sys_port_trace_k_mutex_unlock_exit(mutex, ret) sys_trace_k_mutex_unlock_exit(mutex, ret)
141 
142 #define sys_port_trace_k_condvar_init(condvar, ret) sys_trace_k_condvar_init(condvar, ret)
143 #define sys_port_trace_k_condvar_signal_enter(condvar) sys_trace_k_condvar_signal_enter(condvar)
144 #define sys_port_trace_k_condvar_signal_blocking(condvar, timeout)                                 \
145 	sys_trace_k_condvar_signal_blocking(condvar)
146 #define sys_port_trace_k_condvar_signal_exit(condvar, ret)                                         \
147 	sys_trace_k_condvar_signal_exit(condvar, ret)
148 #define sys_port_trace_k_condvar_broadcast_enter(condvar)                                          \
149 	sys_trace_k_condvar_broadcast_enter(condvar)
150 #define sys_port_trace_k_condvar_broadcast_exit(condvar, ret)                                      \
151 	sys_trace_k_condvar_broadcast_exit(condvar, ret)
152 #define sys_port_trace_k_condvar_wait_enter(condvar)                                               \
153 	sys_trace_k_condvar_wait_enter(condvar, mutex, timeout)
154 #define sys_port_trace_k_condvar_wait_exit(condvar, ret)                                           \
155 	sys_trace_k_condvar_wait_exit(condvar, mutex, timeout, ret)
156 
157 #define sys_port_trace_k_queue_init(queue) sys_trace_k_queue_init(queue)
158 #define sys_port_trace_k_queue_cancel_wait(queue) sys_trace_k_queue_cancel_wait(queue)
159 #define sys_port_trace_k_queue_queue_insert_enter(queue, alloc)                                    \
160 	sys_trace_k_queue_queue_insert_enter(queue, alloc, data);
161 #define sys_port_trace_k_queue_queue_insert_blocking(queue, alloc, timeout)                        \
162 	sys_trace_k_queue_queue_insert_enter(queue, alloc, data);
163 #define sys_port_trace_k_queue_queue_insert_exit(queue, alloc, ret)                                \
164 	sys_trace_k_queue_queue_insert_exit(queue, alloc, data, ret);
165 #define sys_port_trace_k_queue_append_enter(queue) sys_trace_k_queue_append_enter(queue, data)
166 #define sys_port_trace_k_queue_append_exit(queue) sys_trace_k_queue_append_exit(queue, data)
167 #define sys_port_trace_k_queue_alloc_append_enter(queue)                                           \
168 	sys_trace_k_queue_alloc_append_enter(queue, data)
169 #define sys_port_trace_k_queue_alloc_append_exit(queue, ret)                                       \
170 	sys_trace_k_queue_alloc_append_exit(queue, data, ret)
171 #define sys_port_trace_k_queue_prepend_enter(queue) sys_trace_k_queue_prepend_enter(queue, data)
172 #define sys_port_trace_k_queue_prepend_exit(queue) sys_trace_k_queue_prepend_exit(queue, data)
173 #define sys_port_trace_k_queue_alloc_prepend_enter(queue)                                          \
174 	sys_trace_k_queue_alloc_prepend_enter(queue, data)
175 #define sys_port_trace_k_queue_alloc_prepend_exit(queue, ret)                                      \
176 	sys_trace_k_queue_alloc_prepend_exit(queue, data, ret)
177 #define sys_port_trace_k_queue_insert_enter(queue) sys_trace_k_queue_insert_enter(queue, prev, data)
178 #define sys_port_trace_k_queue_insert_blocking(queue, timeout)                                     \
179 	sys_trace_k_queue_insert_blocking(queue, prev, data)
180 #define sys_port_trace_k_queue_insert_exit(queue) sys_trace_k_queue_insert_exit(queue, prev, data)
181 #define sys_port_trace_k_queue_append_list_enter(queue)
182 #define sys_port_trace_k_queue_append_list_exit(queue, ret)                                        \
183 	sys_trace_k_queue_append_list_exit(queue, head, tail, ret)
184 #define sys_port_trace_k_queue_merge_slist_enter(queue)                                            \
185 	sys_trace_k_queue_merge_slist_enter(queue, list)
186 #define sys_port_trace_k_queue_merge_slist_exit(queue, ret)                                        \
187 	sys_trace_k_queue_merge_slist_exit(queue, list, ret)
188 #define sys_port_trace_k_queue_get_enter(queue, timeout)
189 #define sys_port_trace_k_queue_get_blocking(queue, timeout)                                        \
190 	sys_trace_k_queue_get_blocking(queue, timeout)
191 #define sys_port_trace_k_queue_get_exit(queue, timeout, ret)                                       \
192 	sys_trace_k_queue_get_exit(queue, timeout, ret)
193 #define sys_port_trace_k_queue_remove_enter(queue) sys_trace_k_queue_remove_enter(queue, data)
194 #define sys_port_trace_k_queue_remove_exit(queue, ret)                                             \
195 	sys_trace_k_queue_remove_exit(queue, data, ret)
196 #define sys_port_trace_k_queue_unique_append_enter(queue)                                          \
197 	sys_trace_k_queue_unique_append_enter(queue, data)
198 #define sys_port_trace_k_queue_unique_append_exit(queue, ret)                                      \
199 	sys_trace_k_queue_unique_append_exit(queue, data, ret)
200 #define sys_port_trace_k_queue_peek_head(queue, ret) sys_trace_k_queue_peek_head(queue, ret)
201 #define sys_port_trace_k_queue_peek_tail(queue, ret) sys_trace_k_queue_peek_tail(queue, ret)
202 
203 /* FIFO */
204 
205 #define sys_port_trace_k_fifo_init_enter(fifo) sys_trace_k_fifo_init_enter(fifo)
206 
207 #define sys_port_trace_k_fifo_init_exit(fifo) sys_trace_k_fifo_init_exit(fifo)
208 
209 #define sys_port_trace_k_fifo_cancel_wait_enter(fifo) sys_trace_k_fifo_cancel_wait_enter(fifo)
210 
211 #define sys_port_trace_k_fifo_cancel_wait_exit(fifo) sys_trace_k_fifo_cancel_wait_exit(fifo)
212 
213 #define sys_port_trace_k_fifo_put_enter(fifo, data) sys_trace_k_fifo_put_enter(fifo, data)
214 
215 #define sys_port_trace_k_fifo_put_exit(fifo, data) sys_trace_k_fifo_put_exit(fifo, data)
216 
217 #define sys_port_trace_k_fifo_alloc_put_enter(fifo, data)                                          \
218 	sys_trace_k_fifo_alloc_put_enter(fifo, data)
219 
220 #define sys_port_trace_k_fifo_alloc_put_exit(fifo, data, ret)                                      \
221 	sys_trace_k_fifo_alloc_put_exit(fifo, data, ret)
222 
223 #define sys_port_trace_k_fifo_put_list_enter(fifo, head, tail)                                     \
224 	sys_trace_k_fifo_put_list_enter(fifo, head, tail)
225 
226 #define sys_port_trace_k_fifo_put_list_exit(fifo, head, tail)                                      \
227 	sys_trace_k_fifo_put_list_exit(fifo, head, tail)
228 
229 #define sys_port_trace_k_fifo_put_slist_enter(fifo, list)                                          \
230 	sys_trace_k_fifo_put_slist_enter(fifo, list)
231 
232 #define sys_port_trace_k_fifo_put_slist_exit(fifo, list) sys_trace_k_fifo_put_slist_exit(fifo, list)
233 
234 #define sys_port_trace_k_fifo_get_enter(fifo, timeout) sys_trace_k_fifo_get_enter(fifo, timeout)
235 
236 #define sys_port_trace_k_fifo_get_exit(fifo, timeout, ret)                                         \
237 	sys_trace_k_fifo_get_exit(fifo, timeout, ret)
238 
239 #define sys_port_trace_k_fifo_peek_head_enter(fifo) sys_trace_k_fifo_peek_head_enter(fifo)
240 
241 #define sys_port_trace_k_fifo_peek_head_exit(fifo, ret) sys_trace_k_fifo_peek_head_exit(fifo, ret)
242 
243 #define sys_port_trace_k_fifo_peek_tail_enter(fifo) sys_trace_k_fifo_peek_tail_enter(fifo)
244 
245 #define sys_port_trace_k_fifo_peek_tail_exit(fifo, ret) sys_trace_k_fifo_peek_tail_exit(fifo, ret)
246 
247 /* LIFO */
248 #define sys_port_trace_k_lifo_init_enter(lifo) sys_trace_k_lifo_init_enter(lifo)
249 
250 #define sys_port_trace_k_lifo_init_exit(lifo) sys_trace_k_lifo_init_exit(lifo)
251 
252 #define sys_port_trace_k_lifo_put_enter(lifo, data) sys_trace_k_lifo_put_enter(lifo, data)
253 
254 #define sys_port_trace_k_lifo_put_exit(lifo, data) sys_trace_k_lifo_put_exit(lifo, data)
255 
256 #define sys_port_trace_k_lifo_alloc_put_enter(lifo, data)                                          \
257 	sys_trace_k_lifo_alloc_put_enter(lifo, data)
258 
259 #define sys_port_trace_k_lifo_alloc_put_exit(lifo, data, ret)                                      \
260 	sys_trace_k_lifo_alloc_put_exit(lifo, data, ret)
261 
262 #define sys_port_trace_k_lifo_get_enter(lifo, timeout) sys_trace_k_lifo_get_enter(lifo, timeout)
263 
264 #define sys_port_trace_k_lifo_get_exit(lifo, timeout, ret)                                         \
265 	sys_trace_k_lifo_get_exit(lifo, timeout, ret)
266 
267 /* Stack */
268 #define sys_port_trace_k_stack_init(stack) sys_trace_k_stack_init(stack, buffer, num_entries)
269 
270 #define sys_port_trace_k_stack_alloc_init_enter(stack)                                             \
271 	sys_trace_k_stack_alloc_init_enter(stack, num_entries)
272 
273 #define sys_port_trace_k_stack_alloc_init_exit(stack, ret)                                         \
274 	sys_trace_k_stack_alloc_init_exit(stack, num_entries, ret)
275 
276 #define sys_port_trace_k_stack_cleanup_enter(stack) sys_trace_k_stack_cleanup_enter(stack)
277 
278 #define sys_port_trace_k_stack_cleanup_exit(stack, ret) sys_trace_k_stack_cleanup_exit(stack, ret)
279 
280 #define sys_port_trace_k_stack_push_enter(stack) sys_trace_k_stack_push_enter(stack, data)
281 
282 #define sys_port_trace_k_stack_push_exit(stack, ret) sys_trace_k_stack_push_exit(stack, data, ret)
283 
284 #define sys_port_trace_k_stack_pop_enter(stack, timeout)
285 
286 #define sys_port_trace_k_stack_pop_blocking(stack, timeout)                                        \
287 	sys_trace_k_stack_pop_blocking(stack, data, timeout)
288 
289 #define sys_port_trace_k_stack_pop_exit(stack, timeout, ret)                                       \
290 	sys_trace_k_stack_pop_exit(stack, data, timeout, ret)
291 
292 /* Message Queue */
293 #define sys_port_trace_k_msgq_init(msgq) sys_trace_k_msgq_init(msgq)
294 
295 #define sys_port_trace_k_msgq_alloc_init_enter(msgq)                                               \
296 	sys_trace_k_msgq_alloc_init_enter(msgq, msg_size, max_msgs)
297 
298 #define sys_port_trace_k_msgq_alloc_init_exit(msgq, ret)                                           \
299 	sys_trace_k_msgq_alloc_init_exit(msgq, msg_size, max_msgs, ret)
300 
301 #define sys_port_trace_k_msgq_cleanup_enter(msgq) sys_trace_k_msgq_cleanup_enter(msgq)
302 
303 #define sys_port_trace_k_msgq_cleanup_exit(msgq, ret) sys_trace_k_msgq_cleanup_exit(msgq, ret)
304 
305 #define sys_port_trace_k_msgq_put_enter(msgq, timeout)                                             \
306 	sys_trace_k_msgq_put_enter(msgq, data, timeout)
307 
308 #define sys_port_trace_k_msgq_put_blocking(msgq, timeout)                                          \
309 	sys_trace_k_msgq_put_blocking(msgq, data, timeout)
310 #define sys_port_trace_k_msgq_put_exit(msgq, timeout, ret)                                         \
311 	sys_trace_k_msgq_put_exit(msgq, data, timeout, ret)
312 #define sys_port_trace_k_msgq_get_enter(msgq, timeout)                                             \
313 	sys_trace_k_msgq_get_enter(msgq, data, timeout)
314 #define sys_port_trace_k_msgq_get_blocking(msgq, timeout)                                          \
315 	sys_trace_k_msgq_get_blocking(msgq, data, timeout)
316 #define sys_port_trace_k_msgq_get_exit(msgq, timeout, ret)                                         \
317 	sys_trace_k_msgq_get_exit(msgq, data, timeout, ret)
318 #define sys_port_trace_k_msgq_peek(msgq, ret) sys_trace_k_msgq_peek(msgq, data, ret)
319 #define sys_port_trace_k_msgq_purge(msgq) sys_trace_k_msgq_purge(msgq)
320 
321 #define sys_port_trace_k_mbox_init(mbox) sys_trace_k_mbox_init(mbox)
322 #define sys_port_trace_k_mbox_message_put_enter(mbox, timeout)                                     \
323 	sys_trace_k_mbox_message_put_enter(mbox, tx_msg, timeout)
324 #define sys_port_trace_k_mbox_message_put_blocking(mbox, timeout)                                  \
325 	sys_trace_k_mbox_message_put_blocking(mbox, tx_msg, timeout)
326 #define sys_port_trace_k_mbox_message_put_exit(mbox, timeout, ret)                                 \
327 	sys_trace_k_mbox_message_put_exit(mbox, tx_msg, timeout, ret)
328 #define sys_port_trace_k_mbox_put_enter(mbox, timeout)                                             \
329 	sys_trace_k_mbox_put_enter(mbox, tx_msg, timeout)
330 #define sys_port_trace_k_mbox_put_exit(mbox, timeout, ret)                                         \
331 	sys_trace_k_mbox_put_exit(mbox, tx_msg, timeout, ret)
332 #define sys_port_trace_k_mbox_async_put_enter(mbox, sem) sys_trace_k_mbox_async_put_enter(mbox, sem)
333 #define sys_port_trace_k_mbox_async_put_exit(mbox, sem) sys_trace_k_mbox_async_put_exit(mbox, sem)
334 #define sys_port_trace_k_mbox_get_enter(mbox, timeout)                                             \
335 	sys_trace_k_mbox_get_enter(mbox, rx_msg, buffer, timeout)
336 #define sys_port_trace_k_mbox_get_blocking(mbox, timeout)                                          \
337 	sys_trace_k_mbox_get_blocking(mbox, rx_msg, buffer, timeout)
338 #define sys_port_trace_k_mbox_get_exit(mbox, timeout, ret)                                         \
339 	sys_trace_k_mbox_get_exit(mbox, rx_msg, buffer, timeout, ret)
340 #define sys_port_trace_k_mbox_data_get(rx_msg) sys_trace_k_mbox_data_get(mbox, rx_msg, buffer)
341 
342 #define sys_port_trace_k_pipe_init(pipe) sys_trace_k_pipe_init(pipe, buffer, size)
343 #define sys_port_trace_k_pipe_cleanup_enter(pipe) sys_trace_k_pipe_cleanup_enter(pipe)
344 #define sys_port_trace_k_pipe_cleanup_exit(pipe, ret) sys_trace_k_pipe_cleanup_exit(pipe, ret)
345 #define sys_port_trace_k_pipe_alloc_init_enter(pipe) sys_trace_k_pipe_alloc_init_enter(pipe, size)
346 #define sys_port_trace_k_pipe_alloc_init_exit(pipe, ret)                                           \
347 	sys_trace_k_pipe_alloc_init_exit(pipe, size, ret)
348 #define sys_port_trace_k_pipe_put_enter(pipe, timeout)                                             \
349 	sys_trace_k_pipe_put_enter(pipe, data, bytes_to_write, bytes_written, min_xfer, timeout)
350 #define sys_port_trace_k_pipe_put_blocking(pipe, timeout)                                          \
351 	sys_trace_k_pipe_put_blocking(pipe, data, bytes_to_write, bytes_written, min_xfer, timeout)
352 #define sys_port_trace_k_pipe_put_exit(pipe, timeout, ret)                                         \
353 	sys_trace_k_pipe_put_exit(pipe, data, bytes_to_write, bytes_written, min_xfer, timeout, ret)
354 #define sys_port_trace_k_pipe_get_enter(pipe, timeout)                                             \
355 	sys_trace_k_pipe_get_enter(pipe, data, bytes_to_read, bytes_read, min_xfer, timeout)
356 #define sys_port_trace_k_pipe_get_blocking(pipe, timeout)                                          \
357 	sys_trace_k_pipe_get_blocking(pipe, data, bytes_to_read, bytes_read, min_xfer, timeout)
358 #define sys_port_trace_k_pipe_get_exit(pipe, timeout, ret)                                         \
359 	sys_trace_k_pipe_get_exit(pipe, data, bytes_to_read, bytes_read, min_xfer, timeout, ret)
360 #define sys_port_trace_k_pipe_block_put_enter(pipe, sem)                                           \
361 	sys_trace_k_pipe_block_put_enter(pipe, block, bytes_to_write, sem)
362 #define sys_port_trace_k_pipe_block_put_exit(pipe, sem)                                            \
363 	sys_trace_k_pipe_block_put_exit(pipe, block, bytes_to_write, sem)
364 
365 #define sys_port_trace_k_heap_init(h) sys_trace_k_heap_init(h, mem, bytes)
366 #define sys_port_trace_k_heap_aligned_alloc_enter(h, timeout)                                      \
367 	sys_trace_k_heap_aligned_alloc_enter(h, bytes, timeout)
368 #define sys_port_trace_k_heap_aligned_alloc_blocking(h, timeout)                                   \
369 	sys_trace_k_heap_aligned_alloc_blocking(h, bytes, timeout)
370 #define sys_port_trace_k_heap_aligned_alloc_exit(h, timeout, ret)                                  \
371 	sys_trace_k_heap_aligned_alloc_exit(h, bytes, timeout, ret)
372 #define sys_port_trace_k_heap_alloc_enter(h, timeout)                                              \
373 	sys_trace_k_heap_alloc_enter(h, bytes, timeout)
374 #define sys_port_trace_k_heap_alloc_exit(h, timeout, ret)                                          \
375 	sys_trace_k_heap_alloc_exit(h, bytes, timeout, ret)
376 #define sys_port_trace_k_heap_free(h) sys_trace_k_heap_free(h, mem)
377 #define sys_port_trace_k_heap_sys_k_aligned_alloc_enter(heap)                                      \
378 	sys_trace_k_heap_sys_k_aligned_alloc_enter(heap, align, size)
379 #define sys_port_trace_k_heap_sys_k_aligned_alloc_exit(heap, ret)                                  \
380 	sys_trace_k_heap_sys_k_aligned_alloc_exit(heap, align, size, ret)
381 #define sys_port_trace_k_heap_sys_k_malloc_enter(heap)                                             \
382 	sys_trace_k_heap_sys_k_malloc_enter(heap, size)
383 #define sys_port_trace_k_heap_sys_k_malloc_exit(heap, ret)                                         \
384 	sys_trace_k_heap_sys_k_malloc_exit(heap, size, ret)
385 #define sys_port_trace_k_heap_sys_k_free_enter(heap) sys_trace_k_heap_sys_k_free_enter(heap)
386 #define sys_port_trace_k_heap_sys_k_free_exit(heap) sys_trace_k_heap_sys_k_free_exit(heap)
387 #define sys_port_trace_k_heap_sys_k_calloc_enter(heap)                                             \
388 	sys_trace_k_heap_sys_k_calloc_enter(heap, nmemb, size)
389 #define sys_port_trace_k_heap_sys_k_calloc_exit(heap, ret)                                         \
390 	sys_trace_k_heap_sys_k_calloc_exit(heap, nmemb, size, ret)
391 
392 #define sys_port_trace_k_mem_slab_init(slab, rc)                                                   \
393 	sys_trace_k_mem_slab_init(slab, buffer, block_size, num_blocks, rc)
394 #define sys_port_trace_k_mem_slab_alloc_enter(slab, timeout)                                       \
395 	sys_trace_k_mem_slab_alloc_enter(slab, mem, timeout)
396 #define sys_port_trace_k_mem_slab_alloc_blocking(slab, timeout)                                    \
397 	sys_trace_k_mem_slab_alloc_blocking(slab, mem, timeout)
398 #define sys_port_trace_k_mem_slab_alloc_exit(slab, timeout, ret)                                   \
399 	sys_trace_k_mem_slab_alloc_exit(slab, mem, timeout, ret)
400 #define sys_port_trace_k_mem_slab_free_enter(slab)
401 #define sys_port_trace_k_mem_slab_free_exit(slab) sys_trace_k_mem_slab_free_exit(slab, mem)
402 
403 #define sys_port_trace_k_timer_init(timer) sys_trace_k_timer_init(timer, expiry_fn, stop_fn)
404 #define sys_port_trace_k_timer_start(timer) sys_trace_k_timer_start(timer, duration, period)
405 #define sys_port_trace_k_timer_stop(timer) sys_trace_k_timer_stop(timer)
406 #define sys_port_trace_k_timer_status_sync_enter(timer)
407 #define sys_port_trace_k_timer_status_sync_blocking(timer, timeout)                                \
408 	sys_trace_k_timer_status_sync_blocking(timer)
409 #define sys_port_trace_k_timer_status_sync_exit(timer, result)                                     \
410 	sys_trace_k_timer_status_sync_exit(timer, result)
411 #define sys_port_trace_k_thread_abort_exit(thread) sys_trace_k_thread_abort_exit(thread)
412 
413 #define sys_port_trace_k_thread_abort_enter(thread) sys_trace_k_thread_abort_enter(thread)
414 
415 #define sys_port_trace_k_thread_resume_exit(thread) sys_trace_k_thread_resume_exit(thread)
416 
417 #define sys_port_trace_syscall_enter() sys_trace_syscall_enter()
418 #define sys_port_trace_syscall_exit() sys_trace_syscall_exit()
419 
420 
421 #define sys_port_trace_pm_system_suspend_enter(ticks)
422 #define sys_port_trace_pm_system_suspend_exit(ticks, ret)
423 #define sys_port_trace_pm_device_request_enter(dev, target_state)
424 #define sys_port_trace_pm_device_request_exit(dev, ret)
425 
426 #define sys_port_trace_pm_device_enable_enter(dev)
427 #define sys_port_trace_pm_device_enable_exit(dev)
428 #define sys_port_trace_pm_device_disable_enter(dev)
429 #define sys_port_trace_pm_device_disable_exit(dev)
430 
431 void sys_trace_syscall_enter(void);
432 void sys_trace_syscall_exit(void);
433 void sys_trace_idle(void);
434 void sys_trace_isr_enter(void);
435 void sys_trace_isr_exit(void);
436 
437 void sys_trace_k_thread_abort_exit(struct k_thread *thread);
438 void sys_trace_k_thread_abort_enter(struct k_thread *thread);
439 void sys_trace_k_thread_resume_exit(struct k_thread *thread);
440 void sys_trace_k_thread_sched_wakeup(struct k_thread *thread);
441 void sys_trace_k_thread_sched_abort(struct k_thread *thread);
442 void sys_trace_k_thread_sched_set_priority(struct k_thread *thread, int prio);
443 void sys_trace_k_thread_sched_ready(struct k_thread *thread);
444 void sys_trace_k_thread_sched_pend(struct k_thread *thread);
445 void sys_trace_k_thread_sched_resume(struct k_thread *thread);
446 void sys_trace_k_thread_sched_suspend(struct k_thread *thread);
447 
448 void sys_trace_k_thread_foreach_enter(k_thread_user_cb_t user_cb, void *user_data);
449 void sys_trace_k_thread_foreach_exit(k_thread_user_cb_t user_cb, void *user_data);
450 void sys_trace_k_thread_foreach_unlocked_enter(k_thread_user_cb_t user_cb, void *user_data);
451 void sys_trace_k_thread_foreach_unlocked_exit(k_thread_user_cb_t user_cb, void *user_data);
452 void sys_trace_k_thread_create(struct k_thread *new_thread, size_t stack_size, int prio);
453 void sys_trace_k_thread_user_mode_enter(k_thread_entry_t entry, void *p1, void *p2, void *p3);
454 void sys_trace_k_thread_heap_assign(struct k_thread *thread, struct k_heap *heap);
455 void sys_trace_k_thread_join_blocking(struct k_thread *thread, k_timeout_t timeout);
456 void sys_trace_k_thread_join_exit(struct k_thread *thread, k_timeout_t timeout, int ret);
457 void sys_trace_k_thread_sleep_enter(k_timeout_t timeout);
458 void sys_trace_k_thread_sleep_exit(k_timeout_t timeout, int ret);
459 void sys_trace_k_thread_msleep_enter(int32_t ms);
460 void sys_trace_k_thread_msleep_exit(int32_t ms, int ret);
461 void sys_trace_k_thread_usleep_enter(int32_t us);
462 void sys_trace_k_thread_usleep_exit(int32_t us, int ret);
463 
464 void sys_trace_k_thread_yield(void);
465 void sys_trace_k_thread_wakeup(struct k_thread *thread);
466 void sys_trace_k_thread_abort(struct k_thread *thread);
467 void sys_trace_k_thread_start(struct k_thread *thread);
468 void sys_trace_k_thread_priority_set(struct k_thread *thread);
469 void sys_trace_k_thread_suspend(struct k_thread *thread);
470 void sys_trace_k_thread_resume(struct k_thread *thread);
471 void sys_trace_k_thread_sched_lock(void);
472 void sys_trace_k_thread_sched_unlock(void);
473 void sys_trace_k_thread_name_set(struct k_thread *thread, int ret);
474 void sys_trace_k_thread_switched_out(void);
475 void sys_trace_k_thread_switched_in(void);
476 void sys_trace_k_thread_ready(struct k_thread *thread);
477 void sys_trace_k_thread_pend(struct k_thread *thread);
478 void sys_trace_k_thread_info(struct k_thread *thread);
479 
480 void sys_trace_k_sem_init(struct k_sem *sem, int ret);
481 void sys_trace_k_sem_give_enter(struct k_sem *sem);
482 void sys_trace_k_sem_take_enter(struct k_sem *sem, k_timeout_t timeout);
483 void sys_trace_k_sem_take_blocking(struct k_sem *sem, k_timeout_t timeout);
484 void sys_trace_k_sem_take_exit(struct k_sem *sem, k_timeout_t timeout, int ret);
485 void sys_trace_k_sem_reset(struct k_sem *sem);
486 
487 void sys_trace_k_mutex_init(struct k_mutex *mutex, int ret);
488 void sys_trace_k_mutex_lock_enter(struct k_mutex *mutex, k_timeout_t timeout);
489 void sys_trace_k_mutex_lock_blocking(struct k_mutex *mutex, k_timeout_t timeout);
490 void sys_trace_k_mutex_lock_exit(struct k_mutex *mutex, k_timeout_t timeout, int ret);
491 void sys_trace_k_mutex_unlock_enter(struct k_mutex *mutex);
492 void sys_trace_k_mutex_unlock_exit(struct k_mutex *mutex, int ret);
493 
494 void sys_trace_k_condvar_init(struct k_condvar *condvar, int ret);
495 void sys_trace_k_condvar_signal_enter(struct k_condvar *condvar);
496 void sys_trace_k_condvar_signal_blocking(struct k_condvar *condvar);
497 void sys_trace_k_condvar_signal_exit(struct k_condvar *condvar, int ret);
498 void sys_trace_k_condvar_broadcast_enter(struct k_condvar *condvar);
499 void sys_trace_k_condvar_broadcast_exit(struct k_condvar *condvar, int ret);
500 void sys_trace_k_condvar_wait_enter(struct k_condvar *condvar, struct k_mutex *mutex,
501 				    k_timeout_t timeout);
502 void sys_trace_k_condvar_wait_exit(struct k_condvar *condvar, struct k_mutex *mutex,
503 				   k_timeout_t timeout, int ret);
504 
505 void sys_trace_k_queue_init(struct k_queue *queue);
506 void sys_trace_k_queue_cancel_wait(struct k_queue *queue);
507 void sys_trace_k_queue_queue_insert_enter(struct k_queue *queue, bool alloc, void *data);
508 void sys_trace_k_queue_queue_insert_blocking(struct k_queue *queue, bool alloc, void *data);
509 void sys_trace_k_queue_queue_insert_exit(struct k_queue *queue, bool alloc, void *data, int ret);
510 void sys_trace_k_queue_append_enter(struct k_queue *queue, void *data);
511 void sys_trace_k_queue_append_exit(struct k_queue *queue, void *data);
512 void sys_trace_k_queue_alloc_append_enter(struct k_queue *queue, void *data);
513 void sys_trace_k_queue_alloc_append_exit(struct k_queue *queue, void *data, int ret);
514 void sys_trace_k_queue_prepend_enter(struct k_queue *queue, void *data);
515 void sys_trace_k_queue_prepend_exit(struct k_queue *queue, void *data);
516 void sys_trace_k_queue_alloc_prepend_enter(struct k_queue *queue, void *data);
517 void sys_trace_k_queue_alloc_prepend_exit(struct k_queue *queue, void *data, int ret);
518 void sys_trace_k_queue_insert_enter(struct k_queue *queue, void *prev, void *data);
519 void sys_trace_k_queue_insert_exit(struct k_queue *queue, void *prev, void *data);
520 void sys_trace_k_queue_append_list_exit(struct k_queue *queue, void *head, void *tail, int ret);
521 void sys_trace_k_queue_merge_slist_enter(struct k_queue *queue, sys_slist_t *list);
522 void sys_trace_k_queue_merge_slist_exit(struct k_queue *queue, sys_slist_t *list, int ret);
523 void sys_trace_k_queue_get_blocking(struct k_queue *queue, k_timeout_t timeout);
524 void sys_trace_k_queue_get_exit(struct k_queue *queue, k_timeout_t timeout, void *ret);
525 void sys_trace_k_queue_remove_enter(struct k_queue *queue, void *data);
526 void sys_trace_k_queue_remove_exit(struct k_queue *queue, void *data, bool ret);
527 void sys_trace_k_queue_unique_append_enter(struct k_queue *queue, void *data);
528 void sys_trace_k_queue_unique_append_exit(struct k_queue *queue, void *data, bool ret);
529 void sys_trace_k_queue_peek_head(struct k_queue *queue, void *ret);
530 void sys_trace_k_queue_peek_tail(struct k_queue *queue, void *ret);
531 
532 void sys_trace_k_fifo_init_enter(struct k_fifo *fifo);
533 void sys_trace_k_fifo_init_exit(struct k_fifo *fifo);
534 void sys_trace_k_fifo_cancel_wait_enter(struct k_fifo *fifo);
535 void sys_trace_k_fifo_cancel_wait_exit(struct k_fifo *fifo);
536 void sys_trace_k_fifo_put_enter(struct k_fifo *fifo, void *data);
537 void sys_trace_k_fifo_put_exit(struct k_fifo *fifo, void *data);
538 void sys_trace_k_fifo_alloc_put_enter(struct k_fifo *fifo, void *data);
539 void sys_trace_k_fifo_alloc_put_exit(struct k_fifo *fifo, void *data, int ret);
540 void sys_trace_k_fifo_put_list_enter(struct k_fifo *fifo, void *head, void *tail);
541 void sys_trace_k_fifo_put_list_exit(struct k_fifo *fifo, void *head, void *tail);
542 void sys_trace_k_fifo_put_slist_enter(struct k_fifo *fifo, sys_slist_t *list);
543 void sys_trace_k_fifo_put_slist_exit(struct k_fifo *fifo, sys_slist_t *list);
544 void sys_trace_k_fifo_get_enter(struct k_fifo *fifo, k_timeout_t timeout);
545 void sys_trace_k_fifo_get_exit(struct k_fifo *fifo, k_timeout_t timeout, void *ret);
546 void sys_trace_k_fifo_peek_head_enter(struct k_fifo *fifo);
547 void sys_trace_k_fifo_peek_head_exit(struct k_fifo *fifo, void *ret);
548 void sys_trace_k_fifo_peek_tail_enter(struct k_fifo *fifo);
549 void sys_trace_k_fifo_peek_tail_exit(struct k_fifo *fifo, void *ret);
550 
551 void sys_trace_k_lifo_init_enter(struct k_lifo *lifo);
552 void sys_trace_k_lifo_init_exit(struct k_lifo *lifo);
553 void sys_trace_k_lifo_put_enter(struct k_lifo *lifo, void *data);
554 void sys_trace_k_lifo_put_exit(struct k_lifo *lifo, void *data);
555 void sys_trace_k_lifo_alloc_put_enter(struct k_lifo *lifo, void *data);
556 void sys_trace_k_lifo_alloc_put_exit(struct k_lifo *lifo, void *data, int ret);
557 void sys_trace_k_lifo_get_enter(struct k_lifo *lifo, k_timeout_t timeout);
558 void sys_trace_k_lifo_get_exit(struct k_lifo *lifo, k_timeout_t timeout, void *ret);
559 
560 void sys_trace_k_stack_init(struct k_stack *stack, stack_data_t *buffer, uint32_t num_entries);
561 void sys_trace_k_stack_alloc_init_enter(struct k_stack *stack, uint32_t num_entries);
562 void sys_trace_k_stack_alloc_init_exit(struct k_stack *stack, uint32_t num_entries, int ret);
563 void sys_trace_k_stack_cleanup_enter(struct k_stack *stack);
564 void sys_trace_k_stack_cleanup_exit(struct k_stack *stack, int ret);
565 void sys_trace_k_stack_push_enter(struct k_stack *stack, stack_data_t data);
566 void sys_trace_k_stack_push_exit(struct k_stack *stack, stack_data_t data, int ret);
567 void sys_trace_k_stack_pop_blocking(struct k_stack *stack, stack_data_t *data, k_timeout_t timeout);
568 void sys_trace_k_stack_pop_exit(struct k_stack *stack, stack_data_t *data, k_timeout_t timeout,
569 				int ret);
570 
571 void sys_trace_k_mbox_init(struct k_mbox *mbox);
572 void sys_trace_k_mbox_message_put_enter(struct k_mbox *mbox, struct k_mbox_msg *tx_msg,
573 					k_timeout_t timeout);
574 void sys_trace_k_mbox_message_put_blocking(struct k_mbox *mbox, struct k_mbox_msg *tx_msg,
575 					   k_timeout_t timeout);
576 void sys_trace_k_mbox_message_put_exit(struct k_mbox *mbox, struct k_mbox_msg *tx_msg,
577 				       k_timeout_t timeout, int ret);
578 void sys_trace_k_mbox_put_enter(struct k_mbox *mbox, struct k_mbox_msg *tx_msg,
579 				k_timeout_t timeout);
580 void sys_trace_k_mbox_put_exit(struct k_mbox *mbox, struct k_mbox_msg *tx_msg, k_timeout_t timeout,
581 			       int ret);
582 void sys_trace_k_mbox_async_put_enter(struct k_mbox *mbox, struct k_sem *sem);
583 void sys_trace_k_mbox_async_put_exit(struct k_mbox *mbox, struct k_sem *sem);
584 void sys_trace_k_mbox_get_enter(struct k_mbox *mbox, struct k_mbox_msg *rx_msg, void *buffer,
585 				k_timeout_t timeout);
586 void sys_trace_k_mbox_get_blocking(struct k_mbox *mbox, struct k_mbox_msg *rx_msg, void *buffer,
587 				   k_timeout_t timeout);
588 void sys_trace_k_mbox_get_exit(struct k_mbox *mbox, struct k_mbox_msg *rx_msg, void *buffer,
589 			       k_timeout_t timeout, int ret);
590 void sys_trace_k_mbox_data_get(struct k_mbox *mbox, struct k_mbox_msg *rx_msg, void *buffer);
591 
592 void sys_trace_k_pipe_init(struct k_pipe *pipe, unsigned char *buffer, size_t size);
593 void sys_trace_k_pipe_cleanup_enter(struct k_pipe *pipe);
594 void sys_trace_k_pipe_cleanup_exit(struct k_pipe *pipe, int ret);
595 void sys_trace_k_pipe_alloc_init_enter(struct k_pipe *pipe, size_t size);
596 void sys_trace_k_pipe_alloc_init_exit(struct k_pipe *pipe, size_t size, int ret);
597 void sys_trace_k_pipe_put_enter(struct k_pipe *pipe, void *data, size_t bytes_to_write,
598 				size_t *bytes_written, size_t min_xfer, k_timeout_t timeout);
599 void sys_trace_k_pipe_put_blocking(struct k_pipe *pipe, void *data, size_t bytes_to_write,
600 				   size_t *bytes_written, size_t min_xfer, k_timeout_t timeout);
601 void sys_trace_k_pipe_put_exit(struct k_pipe *pipe, void *data, size_t bytes_to_write,
602 			       size_t *bytes_written, size_t min_xfer, k_timeout_t timeout,
603 			       int ret);
604 void sys_trace_k_pipe_get_enter(struct k_pipe *pipe, void *data, size_t bytes_to_read,
605 				size_t *bytes_read, size_t min_xfer, k_timeout_t timeout);
606 void sys_trace_k_pipe_get_blocking(struct k_pipe *pipe, void *data, size_t bytes_to_read,
607 				   size_t *bytes_read, size_t min_xfer, k_timeout_t timeout);
608 void sys_trace_k_pipe_get_exit(struct k_pipe *pipe, void *data, size_t bytes_to_read,
609 			       size_t *bytes_read, size_t min_xfer, k_timeout_t timeout, int ret);
610 void sys_trace_k_pipe_block_put_enter(struct k_pipe *pipe, struct k_mem_block *block, size_t size,
611 				      struct k_sem *sem);
612 void sys_trace_k_pipe_block_put_exit(struct k_pipe *pipe, struct k_mem_block *block, size_t size,
613 				     struct k_sem *sem);
614 
615 void sys_trace_k_msgq_init(struct k_msgq *msgq);
616 void sys_trace_k_msgq_alloc_init_enter(struct k_msgq *msgq, size_t msg_size, uint32_t max_msgs);
617 void sys_trace_k_msgq_alloc_init_exit(struct k_msgq *msgq, size_t msg_size, uint32_t max_msgs,
618 				      int ret);
619 void sys_trace_k_msgq_cleanup_enter(struct k_msgq *msgq);
620 void sys_trace_k_msgq_cleanup_exit(struct k_msgq *msgq, int ret);
621 void sys_trace_k_msgq_put_enter(struct k_msgq *msgq, const void *data, k_timeout_t timeout);
622 void sys_trace_k_msgq_put_blocking(struct k_msgq *msgq, const void *data, k_timeout_t timeout);
623 void sys_trace_k_msgq_put_exit(struct k_msgq *msgq, const void *data, k_timeout_t timeout, int ret);
624 void sys_trace_k_msgq_get_enter(struct k_msgq *msgq, const void *data, k_timeout_t timeout);
625 void sys_trace_k_msgq_get_blocking(struct k_msgq *msgq, const void *data, k_timeout_t timeout);
626 void sys_trace_k_msgq_get_exit(struct k_msgq *msgq, const void *data, k_timeout_t timeout, int ret);
627 void sys_trace_k_msgq_peek(struct k_msgq *msgq, void *data, int ret);
628 void sys_trace_k_msgq_purge(struct k_msgq *msgq);
629 
630 void sys_trace_k_heap_init(struct k_heap *h, void *mem, size_t bytes);
631 void sys_trace_k_heap_alloc_enter(struct k_heap *h, size_t bytes, k_timeout_t timeout);
632 void sys_trace_k_heap_alloc_exit(struct k_heap *h, size_t bytes, k_timeout_t timeout, void *ret);
633 void sys_trace_k_heap_aligned_alloc_enter(struct k_heap *h, size_t bytes, k_timeout_t timeout);
634 void sys_trace_k_heap_aligned_alloc_blocking(struct k_heap *h, size_t bytes, k_timeout_t timeout);
635 void sys_trace_k_heap_aligned_alloc_exit(struct k_heap *h, size_t bytes, k_timeout_t timeout,
636 					 void *ret);
637 void sys_trace_k_heap_free(struct k_heap *h, void *mem);
638 void sys_trace_k_heap_sys_k_aligned_alloc_enter(struct k_heap *h, size_t align, size_t size);
639 void sys_trace_k_heap_sys_k_aligned_alloc_exit(struct k_heap *h, size_t align, size_t size,
640 					       void *ret);
641 void sys_trace_k_heap_sys_k_malloc_enter(struct k_heap *h, size_t size);
642 void sys_trace_k_heap_sys_k_malloc_exit(struct k_heap *h, size_t size, void *ret);
643 void sys_trace_k_heap_sys_k_free_enter(struct k_heap *h);
644 void sys_trace_k_heap_sys_k_free_exit(struct k_heap *h);
645 void sys_trace_k_heap_sys_k_calloc_enter(struct k_heap *h, size_t nmemb, size_t size);
646 void sys_trace_k_heap_sys_k_calloc_exit(struct k_heap *h, size_t nmemb, size_t size, void *ret);
647 
648 void sys_trace_k_mem_slab_init(struct k_mem_slab *slab, void *buffer, size_t block_size,
649 			       uint32_t num_blocks, int ret);
650 void sys_trace_k_mem_slab_alloc_enter(struct k_mem_slab *slab, void **mem, k_timeout_t timeout);
651 void sys_trace_k_mem_slab_alloc_blocking(struct k_mem_slab *slab, void **mem, k_timeout_t timeout);
652 void sys_trace_k_mem_slab_alloc_exit(struct k_mem_slab *slab, void **mem, k_timeout_t timeout,
653 				     int ret);
654 void sys_trace_k_mem_slab_free_exit(struct k_mem_slab *slab, void **mem);
655 
656 void sys_trace_k_timer_init(struct k_timer *timer, k_timer_expiry_t expiry_fn,
657 			    k_timer_expiry_t stop_fn);
658 void sys_trace_k_timer_start(struct k_timer *timer, k_timeout_t duration, k_timeout_t period);
659 void sys_trace_k_timer_stop(struct k_timer *timer);
660 void sys_trace_k_timer_status_sync_blocking(struct k_timer *timer);
661 void sys_trace_k_timer_status_sync_exit(struct k_timer *timer, uint32_t result);
662 
663 #endif /* ZEPHYR_TRACE_TEST_H */
664