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 <zephyr/kernel.h> 9 #include <zephyr/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_stop_enter(queue, timeout) 85 #define sys_port_trace_k_work_queue_stop_blocking(queue, timeout) 86 #define sys_port_trace_k_work_queue_stop_exit(queue, timeout, ret) 87 #define sys_port_trace_k_work_queue_drain_enter(queue) 88 #define sys_port_trace_k_work_queue_drain_exit(queue, ret) 89 #define sys_port_trace_k_work_queue_unplug_enter(queue) 90 #define sys_port_trace_k_work_queue_unplug_exit(queue, ret) 91 92 #define sys_port_trace_k_work_delayable_init(dwork) 93 #define sys_port_trace_k_work_schedule_for_queue_enter(queue, dwork, delay) 94 #define sys_port_trace_k_work_schedule_for_queue_exit(queue, dwork, delay, ret) 95 #define sys_port_trace_k_work_schedule_enter(dwork, delay) 96 #define sys_port_trace_k_work_schedule_exit(dwork, delay, ret) 97 #define sys_port_trace_k_work_reschedule_for_queue_enter(queue, dwork, delay) 98 #define sys_port_trace_k_work_reschedule_for_queue_exit(queue, dwork, delay, ret) 99 #define sys_port_trace_k_work_reschedule_enter(dwork, delay) 100 #define sys_port_trace_k_work_reschedule_exit(dwork, delay, ret) 101 #define sys_port_trace_k_work_flush_delayable_enter(dwork, sync) 102 #define sys_port_trace_k_work_flush_delayable_exit(dwork, sync, ret) 103 #define sys_port_trace_k_work_cancel_delayable_enter(dwork) 104 #define sys_port_trace_k_work_cancel_delayable_exit(dwork, ret) 105 #define sys_port_trace_k_work_cancel_delayable_sync_enter(dwork, sync) 106 #define sys_port_trace_k_work_cancel_delayable_sync_exit(dwork, sync, ret) 107 108 #define sys_port_trace_k_work_poll_init_enter(work) 109 #define sys_port_trace_k_work_poll_init_exit(work) 110 #define sys_port_trace_k_work_poll_submit_to_queue_enter(work_q, work, timeout) 111 #define sys_port_trace_k_work_poll_submit_to_queue_blocking(work_q, work, timeout) 112 #define sys_port_trace_k_work_poll_submit_to_queue_exit(work_q, work, timeout, ret) 113 #define sys_port_trace_k_work_poll_submit_enter(work, timeout) 114 #define sys_port_trace_k_work_poll_submit_exit(work, timeout, ret) 115 #define sys_port_trace_k_work_poll_cancel_enter(work) 116 #define sys_port_trace_k_work_poll_cancel_exit(work, ret) 117 118 #define sys_port_trace_k_poll_api_event_init(event) 119 #define sys_port_trace_k_poll_api_poll_enter(events) 120 #define sys_port_trace_k_poll_api_poll_exit(events, ret) 121 #define sys_port_trace_k_poll_api_signal_init(signal) 122 #define sys_port_trace_k_poll_api_signal_reset(signal) 123 #define sys_port_trace_k_poll_api_signal_check(signal) 124 #define sys_port_trace_k_poll_api_signal_raise(signal, ret) 125 126 #define sys_port_trace_k_sem_init(sem, ret) sys_trace_k_sem_init(sem, ret) 127 #define sys_port_trace_k_sem_give_enter(sem) sys_trace_k_sem_give_enter(sem) 128 #define sys_port_trace_k_sem_give_exit(sem) 129 #define sys_port_trace_k_sem_take_enter(sem, timeout) sys_trace_k_sem_take_enter(sem, timeout) 130 #define sys_port_trace_k_sem_take_blocking(sem, timeout) sys_trace_k_sem_take_blocking(sem, timeout) 131 #define sys_port_trace_k_sem_take_exit(sem, timeout, ret) \ 132 sys_trace_k_sem_take_exit(sem, timeout, ret) 133 #define sys_port_trace_k_sem_reset(sem) sys_trace_k_sem_reset(sem) 134 135 #define sys_port_trace_k_mutex_init(mutex, ret) sys_trace_k_mutex_init(mutex, ret) 136 #define sys_port_trace_k_mutex_lock_enter(mutex, timeout) \ 137 sys_trace_k_mutex_lock_enter(mutex, timeout) 138 #define sys_port_trace_k_mutex_lock_blocking(mutex, timeout) \ 139 sys_trace_k_mutex_lock_blocking(mutex, timeout) 140 #define sys_port_trace_k_mutex_lock_exit(mutex, timeout, ret) \ 141 sys_trace_k_mutex_lock_exit(mutex, timeout, ret) 142 #define sys_port_trace_k_mutex_unlock_enter(mutex) sys_trace_k_mutex_unlock_enter(mutex) 143 #define sys_port_trace_k_mutex_unlock_exit(mutex, ret) sys_trace_k_mutex_unlock_exit(mutex, ret) 144 145 #define sys_port_trace_k_condvar_init(condvar, ret) sys_trace_k_condvar_init(condvar, ret) 146 #define sys_port_trace_k_condvar_signal_enter(condvar) sys_trace_k_condvar_signal_enter(condvar) 147 #define sys_port_trace_k_condvar_signal_blocking(condvar, timeout) \ 148 sys_trace_k_condvar_signal_blocking(condvar) 149 #define sys_port_trace_k_condvar_signal_exit(condvar, ret) \ 150 sys_trace_k_condvar_signal_exit(condvar, ret) 151 #define sys_port_trace_k_condvar_broadcast_enter(condvar) \ 152 sys_trace_k_condvar_broadcast_enter(condvar) 153 #define sys_port_trace_k_condvar_broadcast_exit(condvar, ret) \ 154 sys_trace_k_condvar_broadcast_exit(condvar, ret) 155 #define sys_port_trace_k_condvar_wait_enter(condvar) \ 156 sys_trace_k_condvar_wait_enter(condvar, mutex, timeout) 157 #define sys_port_trace_k_condvar_wait_exit(condvar, ret) \ 158 sys_trace_k_condvar_wait_exit(condvar, mutex, timeout, ret) 159 160 #define sys_port_trace_k_queue_init(queue) sys_trace_k_queue_init(queue) 161 #define sys_port_trace_k_queue_cancel_wait(queue) sys_trace_k_queue_cancel_wait(queue) 162 #define sys_port_trace_k_queue_queue_insert_enter(queue, alloc) \ 163 sys_trace_k_queue_queue_insert_enter(queue, alloc, data); 164 #define sys_port_trace_k_queue_queue_insert_blocking(queue, alloc, timeout) \ 165 sys_trace_k_queue_queue_insert_enter(queue, alloc, data); 166 #define sys_port_trace_k_queue_queue_insert_exit(queue, alloc, ret) \ 167 sys_trace_k_queue_queue_insert_exit(queue, alloc, data, ret); 168 #define sys_port_trace_k_queue_append_enter(queue) sys_trace_k_queue_append_enter(queue, data) 169 #define sys_port_trace_k_queue_append_exit(queue) sys_trace_k_queue_append_exit(queue, data) 170 #define sys_port_trace_k_queue_alloc_append_enter(queue) \ 171 sys_trace_k_queue_alloc_append_enter(queue, data) 172 #define sys_port_trace_k_queue_alloc_append_exit(queue, ret) \ 173 sys_trace_k_queue_alloc_append_exit(queue, data, ret) 174 #define sys_port_trace_k_queue_prepend_enter(queue) sys_trace_k_queue_prepend_enter(queue, data) 175 #define sys_port_trace_k_queue_prepend_exit(queue) sys_trace_k_queue_prepend_exit(queue, data) 176 #define sys_port_trace_k_queue_alloc_prepend_enter(queue) \ 177 sys_trace_k_queue_alloc_prepend_enter(queue, data) 178 #define sys_port_trace_k_queue_alloc_prepend_exit(queue, ret) \ 179 sys_trace_k_queue_alloc_prepend_exit(queue, data, ret) 180 #define sys_port_trace_k_queue_insert_enter(queue) sys_trace_k_queue_insert_enter(queue, prev, data) 181 #define sys_port_trace_k_queue_insert_blocking(queue, timeout) \ 182 sys_trace_k_queue_insert_blocking(queue, prev, data) 183 #define sys_port_trace_k_queue_insert_exit(queue) sys_trace_k_queue_insert_exit(queue, prev, data) 184 #define sys_port_trace_k_queue_append_list_enter(queue) 185 #define sys_port_trace_k_queue_append_list_exit(queue, ret) \ 186 sys_trace_k_queue_append_list_exit(queue, head, tail, ret) 187 #define sys_port_trace_k_queue_merge_slist_enter(queue) \ 188 sys_trace_k_queue_merge_slist_enter(queue, list) 189 #define sys_port_trace_k_queue_merge_slist_exit(queue, ret) \ 190 sys_trace_k_queue_merge_slist_exit(queue, list, ret) 191 #define sys_port_trace_k_queue_get_enter(queue, timeout) 192 #define sys_port_trace_k_queue_get_blocking(queue, timeout) \ 193 sys_trace_k_queue_get_blocking(queue, timeout) 194 #define sys_port_trace_k_queue_get_exit(queue, timeout, ret) \ 195 sys_trace_k_queue_get_exit(queue, timeout, ret) 196 #define sys_port_trace_k_queue_remove_enter(queue) sys_trace_k_queue_remove_enter(queue, data) 197 #define sys_port_trace_k_queue_remove_exit(queue, ret) \ 198 sys_trace_k_queue_remove_exit(queue, data, ret) 199 #define sys_port_trace_k_queue_unique_append_enter(queue) \ 200 sys_trace_k_queue_unique_append_enter(queue, data) 201 #define sys_port_trace_k_queue_unique_append_exit(queue, ret) \ 202 sys_trace_k_queue_unique_append_exit(queue, data, ret) 203 #define sys_port_trace_k_queue_peek_head(queue, ret) sys_trace_k_queue_peek_head(queue, ret) 204 #define sys_port_trace_k_queue_peek_tail(queue, ret) sys_trace_k_queue_peek_tail(queue, ret) 205 206 /* FIFO */ 207 208 #define sys_port_trace_k_fifo_init_enter(fifo) sys_trace_k_fifo_init_enter(fifo) 209 210 #define sys_port_trace_k_fifo_init_exit(fifo) sys_trace_k_fifo_init_exit(fifo) 211 212 #define sys_port_trace_k_fifo_cancel_wait_enter(fifo) sys_trace_k_fifo_cancel_wait_enter(fifo) 213 214 #define sys_port_trace_k_fifo_cancel_wait_exit(fifo) sys_trace_k_fifo_cancel_wait_exit(fifo) 215 216 #define sys_port_trace_k_fifo_put_enter(fifo, data) sys_trace_k_fifo_put_enter(fifo, data) 217 218 #define sys_port_trace_k_fifo_put_exit(fifo, data) sys_trace_k_fifo_put_exit(fifo, data) 219 220 #define sys_port_trace_k_fifo_alloc_put_enter(fifo, data) \ 221 sys_trace_k_fifo_alloc_put_enter(fifo, data) 222 223 #define sys_port_trace_k_fifo_alloc_put_exit(fifo, data, ret) \ 224 sys_trace_k_fifo_alloc_put_exit(fifo, data, ret) 225 226 #define sys_port_trace_k_fifo_put_list_enter(fifo, head, tail) \ 227 sys_trace_k_fifo_put_list_enter(fifo, head, tail) 228 229 #define sys_port_trace_k_fifo_put_list_exit(fifo, head, tail) \ 230 sys_trace_k_fifo_put_list_exit(fifo, head, tail) 231 232 #define sys_port_trace_k_fifo_put_slist_enter(fifo, list) \ 233 sys_trace_k_fifo_put_slist_enter(fifo, list) 234 235 #define sys_port_trace_k_fifo_put_slist_exit(fifo, list) sys_trace_k_fifo_put_slist_exit(fifo, list) 236 237 #define sys_port_trace_k_fifo_get_enter(fifo, timeout) sys_trace_k_fifo_get_enter(fifo, timeout) 238 239 #define sys_port_trace_k_fifo_get_exit(fifo, timeout, ret) \ 240 sys_trace_k_fifo_get_exit(fifo, timeout, ret) 241 242 #define sys_port_trace_k_fifo_peek_head_enter(fifo) sys_trace_k_fifo_peek_head_enter(fifo) 243 244 #define sys_port_trace_k_fifo_peek_head_exit(fifo, ret) sys_trace_k_fifo_peek_head_exit(fifo, ret) 245 246 #define sys_port_trace_k_fifo_peek_tail_enter(fifo) sys_trace_k_fifo_peek_tail_enter(fifo) 247 248 #define sys_port_trace_k_fifo_peek_tail_exit(fifo, ret) sys_trace_k_fifo_peek_tail_exit(fifo, ret) 249 250 /* LIFO */ 251 #define sys_port_trace_k_lifo_init_enter(lifo) sys_trace_k_lifo_init_enter(lifo) 252 253 #define sys_port_trace_k_lifo_init_exit(lifo) sys_trace_k_lifo_init_exit(lifo) 254 255 #define sys_port_trace_k_lifo_put_enter(lifo, data) sys_trace_k_lifo_put_enter(lifo, data) 256 257 #define sys_port_trace_k_lifo_put_exit(lifo, data) sys_trace_k_lifo_put_exit(lifo, data) 258 259 #define sys_port_trace_k_lifo_alloc_put_enter(lifo, data) \ 260 sys_trace_k_lifo_alloc_put_enter(lifo, data) 261 262 #define sys_port_trace_k_lifo_alloc_put_exit(lifo, data, ret) \ 263 sys_trace_k_lifo_alloc_put_exit(lifo, data, ret) 264 265 #define sys_port_trace_k_lifo_get_enter(lifo, timeout) sys_trace_k_lifo_get_enter(lifo, timeout) 266 267 #define sys_port_trace_k_lifo_get_exit(lifo, timeout, ret) \ 268 sys_trace_k_lifo_get_exit(lifo, timeout, ret) 269 270 /* Stack */ 271 #define sys_port_trace_k_stack_init(stack) sys_trace_k_stack_init(stack, buffer, num_entries) 272 273 #define sys_port_trace_k_stack_alloc_init_enter(stack) \ 274 sys_trace_k_stack_alloc_init_enter(stack, num_entries) 275 276 #define sys_port_trace_k_stack_alloc_init_exit(stack, ret) \ 277 sys_trace_k_stack_alloc_init_exit(stack, num_entries, ret) 278 279 #define sys_port_trace_k_stack_cleanup_enter(stack) sys_trace_k_stack_cleanup_enter(stack) 280 281 #define sys_port_trace_k_stack_cleanup_exit(stack, ret) sys_trace_k_stack_cleanup_exit(stack, ret) 282 283 #define sys_port_trace_k_stack_push_enter(stack) sys_trace_k_stack_push_enter(stack, data) 284 285 #define sys_port_trace_k_stack_push_exit(stack, ret) sys_trace_k_stack_push_exit(stack, data, ret) 286 287 #define sys_port_trace_k_stack_pop_enter(stack, timeout) 288 289 #define sys_port_trace_k_stack_pop_blocking(stack, timeout) \ 290 sys_trace_k_stack_pop_blocking(stack, data, timeout) 291 292 #define sys_port_trace_k_stack_pop_exit(stack, timeout, ret) \ 293 sys_trace_k_stack_pop_exit(stack, data, timeout, ret) 294 295 /* Message Queue */ 296 #define sys_port_trace_k_msgq_init(msgq) sys_trace_k_msgq_init(msgq) 297 298 #define sys_port_trace_k_msgq_alloc_init_enter(msgq) \ 299 sys_trace_k_msgq_alloc_init_enter(msgq, msg_size, max_msgs) 300 301 #define sys_port_trace_k_msgq_alloc_init_exit(msgq, ret) \ 302 sys_trace_k_msgq_alloc_init_exit(msgq, msg_size, max_msgs, ret) 303 304 #define sys_port_trace_k_msgq_cleanup_enter(msgq) sys_trace_k_msgq_cleanup_enter(msgq) 305 306 #define sys_port_trace_k_msgq_cleanup_exit(msgq, ret) sys_trace_k_msgq_cleanup_exit(msgq, ret) 307 308 #define sys_port_trace_k_msgq_put_enter(msgq, timeout) \ 309 sys_trace_k_msgq_put_enter(msgq, data, timeout) 310 311 #define sys_port_trace_k_msgq_put_blocking(msgq, timeout) \ 312 sys_trace_k_msgq_put_blocking(msgq, data, timeout) 313 #define sys_port_trace_k_msgq_put_exit(msgq, timeout, ret) \ 314 sys_trace_k_msgq_put_exit(msgq, data, timeout, ret) 315 #define sys_port_trace_k_msgq_get_enter(msgq, timeout) \ 316 sys_trace_k_msgq_get_enter(msgq, data, timeout) 317 #define sys_port_trace_k_msgq_get_blocking(msgq, timeout) \ 318 sys_trace_k_msgq_get_blocking(msgq, data, timeout) 319 #define sys_port_trace_k_msgq_get_exit(msgq, timeout, ret) \ 320 sys_trace_k_msgq_get_exit(msgq, data, timeout, ret) 321 #define sys_port_trace_k_msgq_peek(msgq, ret) sys_trace_k_msgq_peek(msgq, data, ret) 322 #define sys_port_trace_k_msgq_purge(msgq) sys_trace_k_msgq_purge(msgq) 323 324 #define sys_port_trace_k_mbox_init(mbox) sys_trace_k_mbox_init(mbox) 325 #define sys_port_trace_k_mbox_message_put_enter(mbox, timeout) \ 326 sys_trace_k_mbox_message_put_enter(mbox, tx_msg, timeout) 327 #define sys_port_trace_k_mbox_message_put_blocking(mbox, timeout) \ 328 sys_trace_k_mbox_message_put_blocking(mbox, tx_msg, timeout) 329 #define sys_port_trace_k_mbox_message_put_exit(mbox, timeout, ret) \ 330 sys_trace_k_mbox_message_put_exit(mbox, tx_msg, timeout, ret) 331 #define sys_port_trace_k_mbox_put_enter(mbox, timeout) \ 332 sys_trace_k_mbox_put_enter(mbox, tx_msg, timeout) 333 #define sys_port_trace_k_mbox_put_exit(mbox, timeout, ret) \ 334 sys_trace_k_mbox_put_exit(mbox, tx_msg, timeout, ret) 335 #define sys_port_trace_k_mbox_async_put_enter(mbox, sem) sys_trace_k_mbox_async_put_enter(mbox, sem) 336 #define sys_port_trace_k_mbox_async_put_exit(mbox, sem) sys_trace_k_mbox_async_put_exit(mbox, sem) 337 #define sys_port_trace_k_mbox_get_enter(mbox, timeout) \ 338 sys_trace_k_mbox_get_enter(mbox, rx_msg, buffer, timeout) 339 #define sys_port_trace_k_mbox_get_blocking(mbox, timeout) \ 340 sys_trace_k_mbox_get_blocking(mbox, rx_msg, buffer, timeout) 341 #define sys_port_trace_k_mbox_get_exit(mbox, timeout, ret) \ 342 sys_trace_k_mbox_get_exit(mbox, rx_msg, buffer, timeout, ret) 343 #define sys_port_trace_k_mbox_data_get(rx_msg) sys_trace_k_mbox_data_get(mbox, rx_msg, buffer) 344 345 #define sys_port_trace_k_pipe_init(pipe) sys_trace_k_pipe_init(pipe, buffer, size) 346 #define sys_port_trace_k_pipe_cleanup_enter(pipe) sys_trace_k_pipe_cleanup_enter(pipe) 347 #define sys_port_trace_k_pipe_cleanup_exit(pipe, ret) sys_trace_k_pipe_cleanup_exit(pipe, ret) 348 #define sys_port_trace_k_pipe_alloc_init_enter(pipe) sys_trace_k_pipe_alloc_init_enter(pipe, size) 349 #define sys_port_trace_k_pipe_alloc_init_exit(pipe, ret) \ 350 sys_trace_k_pipe_alloc_init_exit(pipe, size, ret) 351 #define sys_port_trace_k_pipe_flush_enter(pipe) \ 352 sys_trace_k_pipe_flush_enter(pipe) 353 #define sys_port_trace_k_pipe_flush_exit(pipe) \ 354 sys_trace_k_pipe_flush_exit(pipe) 355 #define sys_port_trace_k_pipe_buffer_flush_enter(pipe) \ 356 sys_trace_k_pipe_buffer_flush_enter(pipe) 357 #define sys_port_trace_k_pipe_buffer_flush_exit(pipe) \ 358 sys_trace_k_pipe_buffer_flush_exit(pipe) 359 360 #define sys_port_trace_k_pipe_put_enter(pipe, timeout) \ 361 sys_trace_k_pipe_put_enter(pipe, data, bytes_to_write, bytes_written, min_xfer, timeout) 362 #define sys_port_trace_k_pipe_put_blocking(pipe, timeout) \ 363 sys_trace_k_pipe_put_blocking(pipe, data, bytes_to_write, bytes_written, min_xfer, timeout) 364 #define sys_port_trace_k_pipe_put_exit(pipe, timeout, ret) \ 365 sys_trace_k_pipe_put_exit(pipe, data, bytes_to_write, bytes_written, min_xfer, timeout, ret) 366 #define sys_port_trace_k_pipe_get_enter(pipe, timeout) \ 367 sys_trace_k_pipe_get_enter(pipe, data, bytes_to_read, bytes_read, min_xfer, timeout) 368 #define sys_port_trace_k_pipe_get_blocking(pipe, timeout) \ 369 sys_trace_k_pipe_get_blocking(pipe, data, bytes_to_read, bytes_read, min_xfer, timeout) 370 #define sys_port_trace_k_pipe_get_exit(pipe, timeout, ret) \ 371 sys_trace_k_pipe_get_exit(pipe, data, bytes_to_read, bytes_read, min_xfer, timeout, ret) 372 373 #define sys_port_trace_k_heap_init(h) sys_trace_k_heap_init(h, mem, bytes) 374 #define sys_port_trace_k_heap_aligned_alloc_enter(h, timeout) \ 375 sys_trace_k_heap_aligned_alloc_enter(h, bytes, timeout) 376 #define sys_port_trace_k_heap_aligned_alloc_blocking(h, timeout) \ 377 sys_trace_k_heap_aligned_alloc_blocking(h, bytes, timeout) 378 #define sys_port_trace_k_heap_aligned_alloc_exit(h, timeout, ret) \ 379 sys_trace_k_heap_aligned_alloc_exit(h, bytes, timeout, ret) 380 #define sys_port_trace_k_heap_alloc_enter(h, timeout) \ 381 sys_trace_k_heap_alloc_enter(h, bytes, timeout) 382 #define sys_port_trace_k_heap_alloc_exit(h, timeout, ret) \ 383 sys_trace_k_heap_alloc_exit(h, bytes, timeout, ret) 384 #define sys_port_trace_k_heap_calloc_enter(h, timeout) \ 385 sys_trace_k_heap_calloc_enter(h, num, size, timeout) 386 #define sys_port_trace_k_heap_calloc_exit(h, timeout, ret) \ 387 sys_trace_k_heap_calloc_exit(h, num, size, timeout, ret) 388 #define sys_port_trace_k_heap_free(h) sys_trace_k_heap_free(h, mem) 389 #define sys_port_trace_k_heap_realloc_enter(h, ptr, bytes, timeout) \ 390 sys_trace_k_heap_realloc_enter(h, ptr, bytes, timeout) 391 #define sys_port_trace_k_heap_realloc_exit(h, ptr, bytes, timeout, ret) \ 392 sys_trace_k_heap_realloc_exit(h, ptr, bytes, timeout, ret) 393 #define sys_port_trace_k_heap_sys_k_aligned_alloc_enter(heap) \ 394 sys_trace_k_heap_sys_k_aligned_alloc_enter(heap, align, size) 395 #define sys_port_trace_k_heap_sys_k_aligned_alloc_exit(heap, ret) \ 396 sys_trace_k_heap_sys_k_aligned_alloc_exit(heap, align, size, ret) 397 #define sys_port_trace_k_heap_sys_k_malloc_enter(heap) \ 398 sys_trace_k_heap_sys_k_malloc_enter(heap, size) 399 #define sys_port_trace_k_heap_sys_k_malloc_exit(heap, ret) \ 400 sys_trace_k_heap_sys_k_malloc_exit(heap, size, ret) 401 #define sys_port_trace_k_heap_sys_k_free_enter(heap, heap_ref) \ 402 sys_trace_k_heap_sys_k_free_enter(heap, heap_ref) 403 #define sys_port_trace_k_heap_sys_k_free_exit(heap, heap_ref) \ 404 sys_trace_k_heap_sys_k_free_exit(heap, heap_ref) 405 #define sys_port_trace_k_heap_sys_k_calloc_enter(heap) \ 406 sys_trace_k_heap_sys_k_calloc_enter(heap, nmemb, size) 407 #define sys_port_trace_k_heap_sys_k_calloc_exit(heap, ret) \ 408 sys_trace_k_heap_sys_k_calloc_exit(heap, nmemb, size, ret) 409 #define sys_port_trace_k_heap_sys_k_realloc_enter(heap, ptr) \ 410 sys_trace_k_heap_sys_k_realloc_enter(heap, ptr, size) 411 #define sys_port_trace_k_heap_sys_k_realloc_exit(heap, ptr, ret) \ 412 sys_trace_k_heap_sys_k_realloc_exit(heap, ptr, size, ret) 413 414 #define sys_port_trace_k_mem_slab_init(slab, rc) \ 415 sys_trace_k_mem_slab_init(slab, buffer, block_size, num_blocks, rc) 416 #define sys_port_trace_k_mem_slab_alloc_enter(slab, timeout) \ 417 sys_trace_k_mem_slab_alloc_enter(slab, mem, timeout) 418 #define sys_port_trace_k_mem_slab_alloc_blocking(slab, timeout) \ 419 sys_trace_k_mem_slab_alloc_blocking(slab, mem, timeout) 420 #define sys_port_trace_k_mem_slab_alloc_exit(slab, timeout, ret) \ 421 sys_trace_k_mem_slab_alloc_exit(slab, mem, timeout, ret) 422 #define sys_port_trace_k_mem_slab_free_enter(slab) 423 #define sys_port_trace_k_mem_slab_free_exit(slab) sys_trace_k_mem_slab_free_exit(slab, mem) 424 425 #define sys_port_trace_k_timer_init(timer) sys_trace_k_timer_init(timer, expiry_fn, stop_fn) 426 #define sys_port_trace_k_timer_start(timer, duration, period) \ 427 sys_trace_k_timer_start(timer, duration, period) 428 #define sys_port_trace_k_timer_stop(timer) sys_trace_k_timer_stop(timer) 429 #define sys_port_trace_k_timer_status_sync_enter(timer) 430 #define sys_port_trace_k_timer_status_sync_blocking(timer, timeout) \ 431 sys_trace_k_timer_status_sync_blocking(timer) 432 #define sys_port_trace_k_timer_status_sync_exit(timer, result) \ 433 sys_trace_k_timer_status_sync_exit(timer, result) 434 435 #define sys_port_trace_k_event_init(event) sys_trace_k_event_init(event) 436 #define sys_port_trace_k_event_post_enter(event, events, events_mask) \ 437 sys_trace_k_event_post_enter(event, events, events_mask) 438 #define sys_port_trace_k_event_post_exit(event, events, events_mask) \ 439 sys_trace_k_event_post_exit(event, events, events_mask) 440 #define sys_port_trace_k_event_wait_enter(event, events, options, timeout) \ 441 sys_trace_k_event_wait_enter(event, events, options, timeout) 442 #define sys_port_trace_k_event_wait_blocking(event, events, options, timeout) \ 443 sys_trace_k_event_wait_blocking(event, events, options, timeout) 444 #define sys_port_trace_k_event_wait_exit(event, events, ret) \ 445 sys_trace_k_event_wait_exit(event, events, ret) 446 447 #define sys_port_trace_k_thread_abort_exit(thread) sys_trace_k_thread_abort_exit(thread) 448 449 #define sys_port_trace_k_thread_abort_enter(thread) sys_trace_k_thread_abort_enter(thread) 450 451 #define sys_port_trace_k_thread_resume_exit(thread) sys_trace_k_thread_resume_exit(thread) 452 453 #define sys_port_trace_pm_system_suspend_enter(ticks) 454 #define sys_port_trace_pm_system_suspend_exit(ticks, state) 455 456 #define sys_port_trace_pm_device_runtime_get_enter(dev) 457 #define sys_port_trace_pm_device_runtime_get_exit(dev, ret) 458 #define sys_port_trace_pm_device_runtime_put_enter(dev) 459 #define sys_port_trace_pm_device_runtime_put_exit(dev, ret) 460 #define sys_port_trace_pm_device_runtime_put_async_enter(dev, delay) 461 #define sys_port_trace_pm_device_runtime_put_async_exit(dev, delay, ret) 462 #define sys_port_trace_pm_device_runtime_enable_enter(dev) 463 #define sys_port_trace_pm_device_runtime_enable_exit(dev, ret) 464 #define sys_port_trace_pm_device_runtime_disable_enter(dev) 465 #define sys_port_trace_pm_device_runtime_disable_exit(dev, ret) 466 467 void sys_trace_idle(void); 468 void sys_trace_isr_enter(void); 469 void sys_trace_isr_exit(void); 470 471 void sys_trace_k_thread_abort_exit(struct k_thread *thread); 472 void sys_trace_k_thread_abort_enter(struct k_thread *thread); 473 void sys_trace_k_thread_resume_exit(struct k_thread *thread); 474 void sys_trace_k_thread_sched_wakeup(struct k_thread *thread); 475 void sys_trace_k_thread_sched_abort(struct k_thread *thread); 476 void sys_trace_k_thread_sched_set_priority(struct k_thread *thread, int prio); 477 void sys_trace_k_thread_sched_ready(struct k_thread *thread); 478 void sys_trace_k_thread_sched_pend(struct k_thread *thread); 479 void sys_trace_k_thread_sched_resume(struct k_thread *thread); 480 void sys_trace_k_thread_sched_suspend(struct k_thread *thread); 481 482 void sys_trace_k_thread_foreach_enter(k_thread_user_cb_t user_cb, void *user_data); 483 void sys_trace_k_thread_foreach_exit(k_thread_user_cb_t user_cb, void *user_data); 484 void sys_trace_k_thread_foreach_unlocked_enter(k_thread_user_cb_t user_cb, void *user_data); 485 void sys_trace_k_thread_foreach_unlocked_exit(k_thread_user_cb_t user_cb, void *user_data); 486 void sys_trace_k_thread_create(struct k_thread *new_thread, size_t stack_size, int prio); 487 void sys_trace_k_thread_user_mode_enter(k_thread_entry_t entry, void *p1, void *p2, void *p3); 488 void sys_trace_k_thread_heap_assign(struct k_thread *thread, struct k_heap *heap); 489 void sys_trace_k_thread_join_blocking(struct k_thread *thread, k_timeout_t timeout); 490 void sys_trace_k_thread_join_exit(struct k_thread *thread, k_timeout_t timeout, int ret); 491 void sys_trace_k_thread_sleep_enter(k_timeout_t timeout); 492 void sys_trace_k_thread_sleep_exit(k_timeout_t timeout, int ret); 493 void sys_trace_k_thread_msleep_enter(int32_t ms); 494 void sys_trace_k_thread_msleep_exit(int32_t ms, int ret); 495 void sys_trace_k_thread_usleep_enter(int32_t us); 496 void sys_trace_k_thread_usleep_exit(int32_t us, int ret); 497 498 void sys_trace_k_thread_yield(void); 499 void sys_trace_k_thread_wakeup(struct k_thread *thread); 500 void sys_trace_k_thread_abort(struct k_thread *thread); 501 void sys_trace_k_thread_start(struct k_thread *thread); 502 void sys_trace_k_thread_priority_set(struct k_thread *thread); 503 void sys_trace_k_thread_suspend(struct k_thread *thread); 504 void sys_trace_k_thread_resume(struct k_thread *thread); 505 void sys_trace_k_thread_sched_lock(void); 506 void sys_trace_k_thread_sched_unlock(void); 507 void sys_trace_k_thread_name_set(struct k_thread *thread, int ret); 508 void sys_trace_k_thread_switched_out(void); 509 void sys_trace_k_thread_switched_in(void); 510 void sys_trace_k_thread_ready(struct k_thread *thread); 511 void sys_trace_k_thread_pend(struct k_thread *thread); 512 void sys_trace_k_thread_info(struct k_thread *thread); 513 514 void sys_trace_k_sem_init(struct k_sem *sem, int ret); 515 void sys_trace_k_sem_give_enter(struct k_sem *sem); 516 void sys_trace_k_sem_take_enter(struct k_sem *sem, k_timeout_t timeout); 517 void sys_trace_k_sem_take_blocking(struct k_sem *sem, k_timeout_t timeout); 518 void sys_trace_k_sem_take_exit(struct k_sem *sem, k_timeout_t timeout, int ret); 519 void sys_trace_k_sem_reset(struct k_sem *sem); 520 521 void sys_trace_k_mutex_init(struct k_mutex *mutex, int ret); 522 void sys_trace_k_mutex_lock_enter(struct k_mutex *mutex, k_timeout_t timeout); 523 void sys_trace_k_mutex_lock_blocking(struct k_mutex *mutex, k_timeout_t timeout); 524 void sys_trace_k_mutex_lock_exit(struct k_mutex *mutex, k_timeout_t timeout, int ret); 525 void sys_trace_k_mutex_unlock_enter(struct k_mutex *mutex); 526 void sys_trace_k_mutex_unlock_exit(struct k_mutex *mutex, int ret); 527 528 void sys_trace_k_condvar_init(struct k_condvar *condvar, int ret); 529 void sys_trace_k_condvar_signal_enter(struct k_condvar *condvar); 530 void sys_trace_k_condvar_signal_blocking(struct k_condvar *condvar); 531 void sys_trace_k_condvar_signal_exit(struct k_condvar *condvar, int ret); 532 void sys_trace_k_condvar_broadcast_enter(struct k_condvar *condvar); 533 void sys_trace_k_condvar_broadcast_exit(struct k_condvar *condvar, int ret); 534 void sys_trace_k_condvar_wait_enter(struct k_condvar *condvar, struct k_mutex *mutex, 535 k_timeout_t timeout); 536 void sys_trace_k_condvar_wait_exit(struct k_condvar *condvar, struct k_mutex *mutex, 537 k_timeout_t timeout, int ret); 538 539 void sys_trace_k_queue_init(struct k_queue *queue); 540 void sys_trace_k_queue_cancel_wait(struct k_queue *queue); 541 void sys_trace_k_queue_queue_insert_enter(struct k_queue *queue, bool alloc, void *data); 542 void sys_trace_k_queue_queue_insert_blocking(struct k_queue *queue, bool alloc, void *data); 543 void sys_trace_k_queue_queue_insert_exit(struct k_queue *queue, bool alloc, void *data, int ret); 544 void sys_trace_k_queue_append_enter(struct k_queue *queue, void *data); 545 void sys_trace_k_queue_append_exit(struct k_queue *queue, void *data); 546 void sys_trace_k_queue_alloc_append_enter(struct k_queue *queue, void *data); 547 void sys_trace_k_queue_alloc_append_exit(struct k_queue *queue, void *data, int ret); 548 void sys_trace_k_queue_prepend_enter(struct k_queue *queue, void *data); 549 void sys_trace_k_queue_prepend_exit(struct k_queue *queue, void *data); 550 void sys_trace_k_queue_alloc_prepend_enter(struct k_queue *queue, void *data); 551 void sys_trace_k_queue_alloc_prepend_exit(struct k_queue *queue, void *data, int ret); 552 void sys_trace_k_queue_insert_enter(struct k_queue *queue, void *prev, void *data); 553 void sys_trace_k_queue_insert_exit(struct k_queue *queue, void *prev, void *data); 554 void sys_trace_k_queue_append_list_exit(struct k_queue *queue, void *head, void *tail, int ret); 555 void sys_trace_k_queue_merge_slist_enter(struct k_queue *queue, sys_slist_t *list); 556 void sys_trace_k_queue_merge_slist_exit(struct k_queue *queue, sys_slist_t *list, int ret); 557 void sys_trace_k_queue_get_blocking(struct k_queue *queue, k_timeout_t timeout); 558 void sys_trace_k_queue_get_exit(struct k_queue *queue, k_timeout_t timeout, void *ret); 559 void sys_trace_k_queue_remove_enter(struct k_queue *queue, void *data); 560 void sys_trace_k_queue_remove_exit(struct k_queue *queue, void *data, bool ret); 561 void sys_trace_k_queue_unique_append_enter(struct k_queue *queue, void *data); 562 void sys_trace_k_queue_unique_append_exit(struct k_queue *queue, void *data, bool ret); 563 void sys_trace_k_queue_peek_head(struct k_queue *queue, void *ret); 564 void sys_trace_k_queue_peek_tail(struct k_queue *queue, void *ret); 565 566 void sys_trace_k_fifo_init_enter(struct k_fifo *fifo); 567 void sys_trace_k_fifo_init_exit(struct k_fifo *fifo); 568 void sys_trace_k_fifo_cancel_wait_enter(struct k_fifo *fifo); 569 void sys_trace_k_fifo_cancel_wait_exit(struct k_fifo *fifo); 570 void sys_trace_k_fifo_put_enter(struct k_fifo *fifo, void *data); 571 void sys_trace_k_fifo_put_exit(struct k_fifo *fifo, void *data); 572 void sys_trace_k_fifo_alloc_put_enter(struct k_fifo *fifo, void *data); 573 void sys_trace_k_fifo_alloc_put_exit(struct k_fifo *fifo, void *data, int ret); 574 void sys_trace_k_fifo_put_list_enter(struct k_fifo *fifo, void *head, void *tail); 575 void sys_trace_k_fifo_put_list_exit(struct k_fifo *fifo, void *head, void *tail); 576 void sys_trace_k_fifo_put_slist_enter(struct k_fifo *fifo, sys_slist_t *list); 577 void sys_trace_k_fifo_put_slist_exit(struct k_fifo *fifo, sys_slist_t *list); 578 void sys_trace_k_fifo_get_enter(struct k_fifo *fifo, k_timeout_t timeout); 579 void sys_trace_k_fifo_get_exit(struct k_fifo *fifo, k_timeout_t timeout, void *ret); 580 void sys_trace_k_fifo_peek_head_enter(struct k_fifo *fifo); 581 void sys_trace_k_fifo_peek_head_exit(struct k_fifo *fifo, void *ret); 582 void sys_trace_k_fifo_peek_tail_enter(struct k_fifo *fifo); 583 void sys_trace_k_fifo_peek_tail_exit(struct k_fifo *fifo, void *ret); 584 585 void sys_trace_k_lifo_init_enter(struct k_lifo *lifo); 586 void sys_trace_k_lifo_init_exit(struct k_lifo *lifo); 587 void sys_trace_k_lifo_put_enter(struct k_lifo *lifo, void *data); 588 void sys_trace_k_lifo_put_exit(struct k_lifo *lifo, void *data); 589 void sys_trace_k_lifo_alloc_put_enter(struct k_lifo *lifo, void *data); 590 void sys_trace_k_lifo_alloc_put_exit(struct k_lifo *lifo, void *data, int ret); 591 void sys_trace_k_lifo_get_enter(struct k_lifo *lifo, k_timeout_t timeout); 592 void sys_trace_k_lifo_get_exit(struct k_lifo *lifo, k_timeout_t timeout, void *ret); 593 594 void sys_trace_k_stack_init(struct k_stack *stack, stack_data_t *buffer, uint32_t num_entries); 595 void sys_trace_k_stack_alloc_init_enter(struct k_stack *stack, uint32_t num_entries); 596 void sys_trace_k_stack_alloc_init_exit(struct k_stack *stack, uint32_t num_entries, int ret); 597 void sys_trace_k_stack_cleanup_enter(struct k_stack *stack); 598 void sys_trace_k_stack_cleanup_exit(struct k_stack *stack, int ret); 599 void sys_trace_k_stack_push_enter(struct k_stack *stack, stack_data_t data); 600 void sys_trace_k_stack_push_exit(struct k_stack *stack, stack_data_t data, int ret); 601 void sys_trace_k_stack_pop_blocking(struct k_stack *stack, stack_data_t *data, k_timeout_t timeout); 602 void sys_trace_k_stack_pop_exit(struct k_stack *stack, stack_data_t *data, k_timeout_t timeout, 603 int ret); 604 605 void sys_trace_k_mbox_init(struct k_mbox *mbox); 606 void sys_trace_k_mbox_message_put_enter(struct k_mbox *mbox, struct k_mbox_msg *tx_msg, 607 k_timeout_t timeout); 608 void sys_trace_k_mbox_message_put_blocking(struct k_mbox *mbox, struct k_mbox_msg *tx_msg, 609 k_timeout_t timeout); 610 void sys_trace_k_mbox_message_put_exit(struct k_mbox *mbox, struct k_mbox_msg *tx_msg, 611 k_timeout_t timeout, int ret); 612 void sys_trace_k_mbox_put_enter(struct k_mbox *mbox, struct k_mbox_msg *tx_msg, 613 k_timeout_t timeout); 614 void sys_trace_k_mbox_put_exit(struct k_mbox *mbox, struct k_mbox_msg *tx_msg, k_timeout_t timeout, 615 int ret); 616 void sys_trace_k_mbox_async_put_enter(struct k_mbox *mbox, struct k_sem *sem); 617 void sys_trace_k_mbox_async_put_exit(struct k_mbox *mbox, struct k_sem *sem); 618 void sys_trace_k_mbox_get_enter(struct k_mbox *mbox, struct k_mbox_msg *rx_msg, void *buffer, 619 k_timeout_t timeout); 620 void sys_trace_k_mbox_get_blocking(struct k_mbox *mbox, struct k_mbox_msg *rx_msg, void *buffer, 621 k_timeout_t timeout); 622 void sys_trace_k_mbox_get_exit(struct k_mbox *mbox, struct k_mbox_msg *rx_msg, void *buffer, 623 k_timeout_t timeout, int ret); 624 void sys_trace_k_mbox_data_get(struct k_mbox *mbox, struct k_mbox_msg *rx_msg, void *buffer); 625 626 void sys_trace_k_pipe_init(struct k_pipe *pipe, unsigned char *buffer, size_t size); 627 void sys_trace_k_pipe_cleanup_enter(struct k_pipe *pipe); 628 void sys_trace_k_pipe_cleanup_exit(struct k_pipe *pipe, int ret); 629 void sys_trace_k_pipe_alloc_init_enter(struct k_pipe *pipe, size_t size); 630 void sys_trace_k_pipe_alloc_init_exit(struct k_pipe *pipe, size_t size, int ret); 631 void sys_trace_k_pipe_flush_enter(struct k_pipe *pipe); 632 void sys_trace_k_pipe_flush_exit(struct k_pipe *pipe); 633 void sys_trace_k_pipe_buffer_flush_enter(struct k_pipe *pipe); 634 void sys_trace_k_pipe_buffer_flush_exit(struct k_pipe *pipe); 635 void sys_trace_k_pipe_put_enter(struct k_pipe *pipe, const void *data, size_t bytes_to_write, 636 size_t *bytes_written, size_t min_xfer, k_timeout_t timeout); 637 void sys_trace_k_pipe_put_blocking(struct k_pipe *pipe, const void *data, size_t bytes_to_write, 638 size_t *bytes_written, size_t min_xfer, k_timeout_t timeout); 639 void sys_trace_k_pipe_put_exit(struct k_pipe *pipe, const void *data, size_t bytes_to_write, 640 size_t *bytes_written, size_t min_xfer, k_timeout_t timeout, 641 int ret); 642 void sys_trace_k_pipe_get_enter(struct k_pipe *pipe, void *data, size_t bytes_to_read, 643 size_t *bytes_read, size_t min_xfer, k_timeout_t timeout); 644 void sys_trace_k_pipe_get_blocking(struct k_pipe *pipe, void *data, size_t bytes_to_read, 645 size_t *bytes_read, size_t min_xfer, k_timeout_t timeout); 646 void sys_trace_k_pipe_get_exit(struct k_pipe *pipe, void *data, size_t bytes_to_read, 647 size_t *bytes_read, size_t min_xfer, k_timeout_t timeout, int ret); 648 649 void sys_trace_k_msgq_init(struct k_msgq *msgq); 650 void sys_trace_k_msgq_alloc_init_enter(struct k_msgq *msgq, size_t msg_size, uint32_t max_msgs); 651 void sys_trace_k_msgq_alloc_init_exit(struct k_msgq *msgq, size_t msg_size, uint32_t max_msgs, 652 int ret); 653 void sys_trace_k_msgq_cleanup_enter(struct k_msgq *msgq); 654 void sys_trace_k_msgq_cleanup_exit(struct k_msgq *msgq, int ret); 655 void sys_trace_k_msgq_put_enter(struct k_msgq *msgq, const void *data, k_timeout_t timeout); 656 void sys_trace_k_msgq_put_blocking(struct k_msgq *msgq, const void *data, k_timeout_t timeout); 657 void sys_trace_k_msgq_put_exit(struct k_msgq *msgq, const void *data, k_timeout_t timeout, int ret); 658 void sys_trace_k_msgq_get_enter(struct k_msgq *msgq, const void *data, k_timeout_t timeout); 659 void sys_trace_k_msgq_get_blocking(struct k_msgq *msgq, const void *data, k_timeout_t timeout); 660 void sys_trace_k_msgq_get_exit(struct k_msgq *msgq, const void *data, k_timeout_t timeout, int ret); 661 void sys_trace_k_msgq_peek(struct k_msgq *msgq, void *data, int ret); 662 void sys_trace_k_msgq_purge(struct k_msgq *msgq); 663 664 void sys_trace_k_heap_init(struct k_heap *h, void *mem, size_t bytes); 665 void sys_trace_k_heap_alloc_enter(struct k_heap *h, size_t bytes, k_timeout_t timeout); 666 void sys_trace_k_heap_alloc_exit(struct k_heap *h, size_t bytes, k_timeout_t timeout, void *ret); 667 void sys_trace_k_heap_calloc_enter(struct k_heap *h, size_t num, size_t size, k_timeout_t timeout); 668 void sys_trace_k_heap_calloc_exit(struct k_heap *h, size_t num, size_t size, k_timeout_t timeout, 669 void *ret); 670 void sys_trace_k_heap_aligned_alloc_enter(struct k_heap *h, size_t bytes, k_timeout_t timeout); 671 void sys_trace_k_heap_aligned_alloc_blocking(struct k_heap *h, size_t bytes, k_timeout_t timeout); 672 void sys_trace_k_heap_aligned_alloc_exit(struct k_heap *h, size_t bytes, k_timeout_t timeout, 673 void *ret); 674 void sys_trace_k_heap_free(struct k_heap *h, void *mem); 675 void sys_trace_k_heap_realloc_enter(struct k_heap *h, void *ptr, size_t bytes, k_timeout_t timeout); 676 void sys_trace_k_heap_realloc_exit(struct k_heap *h, void *ptr, size_t bytes, k_timeout_t timeout, 677 void *ret); 678 void sys_trace_k_heap_sys_k_aligned_alloc_enter(struct k_heap *h, size_t align, size_t size); 679 void sys_trace_k_heap_sys_k_aligned_alloc_exit(struct k_heap *h, size_t align, size_t size, 680 void *ret); 681 void sys_trace_k_heap_sys_k_malloc_enter(struct k_heap *h, size_t size); 682 void sys_trace_k_heap_sys_k_malloc_exit(struct k_heap *h, size_t size, void *ret); 683 void sys_trace_k_heap_sys_k_free_enter(struct k_heap *h, struct k_heap **heap_ref); 684 void sys_trace_k_heap_sys_k_free_exit(struct k_heap *h, struct k_heap **heap_ref); 685 void sys_trace_k_heap_sys_k_calloc_enter(struct k_heap *h, size_t nmemb, size_t size); 686 void sys_trace_k_heap_sys_k_calloc_exit(struct k_heap *h, size_t nmemb, size_t size, void *ret); 687 void sys_trace_k_heap_sys_k_realloc_enter(struct k_heap *h, void *ptr, size_t bytes); 688 void sys_trace_k_heap_sys_k_realloc_exit(struct k_heap *h, void *ptr, size_t bytes, void *ret); 689 690 void sys_trace_k_mem_slab_init(struct k_mem_slab *slab, void *buffer, size_t block_size, 691 uint32_t num_blocks, int ret); 692 void sys_trace_k_mem_slab_alloc_enter(struct k_mem_slab *slab, void **mem, k_timeout_t timeout); 693 void sys_trace_k_mem_slab_alloc_blocking(struct k_mem_slab *slab, void **mem, k_timeout_t timeout); 694 void sys_trace_k_mem_slab_alloc_exit(struct k_mem_slab *slab, void **mem, k_timeout_t timeout, 695 int ret); 696 void sys_trace_k_mem_slab_free_exit(struct k_mem_slab *slab, void *mem); 697 698 void sys_trace_k_timer_init(struct k_timer *timer, k_timer_expiry_t expiry_fn, 699 k_timer_expiry_t stop_fn); 700 void sys_trace_k_timer_start(struct k_timer *timer, k_timeout_t duration, k_timeout_t period); 701 void sys_trace_k_timer_stop(struct k_timer *timer); 702 void sys_trace_k_timer_status_sync_blocking(struct k_timer *timer); 703 void sys_trace_k_timer_status_sync_exit(struct k_timer *timer, uint32_t result); 704 705 void sys_trace_k_event_init(struct k_event *event); 706 707 #define sys_port_trace_socket_init(sock, family, type, proto) 708 #define sys_port_trace_socket_close_enter(sock) 709 #define sys_port_trace_socket_close_exit(sock, ret) 710 #define sys_port_trace_socket_shutdown_enter(sock, how) 711 #define sys_port_trace_socket_shutdown_exit(sock, ret) 712 #define sys_port_trace_socket_bind_enter(sock, addr, addrlen) 713 #define sys_port_trace_socket_bind_exit(sock, ret) 714 #define sys_port_trace_socket_connect_enter(sock, addr, addrlen) 715 #define sys_port_trace_socket_connect_exit(sock, ret) 716 #define sys_port_trace_socket_listen_enter(sock, backlog) 717 #define sys_port_trace_socket_listen_exit(sock, ret) 718 #define sys_port_trace_socket_accept_enter(sock) 719 #define sys_port_trace_socket_accept_exit(sock, addr, addrlen, ret) 720 #define sys_port_trace_socket_sendto_enter(sock, len, flags, dest_addr, addrlen) 721 #define sys_port_trace_socket_sendto_exit(sock, ret) 722 #define sys_port_trace_socket_sendmsg_enter(sock, msg, flags) 723 #define sys_port_trace_socket_sendmsg_exit(sock, ret) 724 #define sys_port_trace_socket_recvfrom_enter(sock, max_len, flags, addr, addrlen) 725 #define sys_port_trace_socket_recvfrom_exit(sock, src_addr, addrlen, ret) 726 #define sys_port_trace_socket_recvmsg_enter(sock, msg, flags) 727 #define sys_port_trace_socket_recvmsg_exit(sock, msg, ret) 728 #define sys_port_trace_socket_fcntl_enter(sock, cmd, flags) 729 #define sys_port_trace_socket_fcntl_exit(sock, ret) 730 #define sys_port_trace_socket_ioctl_enter(sock, req) 731 #define sys_port_trace_socket_ioctl_exit(sock, ret) 732 #define sys_port_trace_socket_poll_enter(fds, nfds, timeout) 733 #define sys_port_trace_socket_poll_exit(fds, nfds, ret) 734 #define sys_port_trace_socket_getsockopt_enter(sock, level, optname) 735 #define sys_port_trace_socket_getsockopt_exit(sock, level, optname, optval, optlen, ret) 736 #define sys_port_trace_socket_setsockopt_enter(sock, level, optname, optval, optlen) 737 #define sys_port_trace_socket_setsockopt_exit(sock, ret) 738 #define sys_port_trace_socket_getpeername_enter(sock) 739 #define sys_port_trace_socket_getpeername_exit(sock, addr, addrlen, ret) 740 #define sys_port_trace_socket_getsockname_enter(sock) 741 #define sys_port_trace_socket_getsockname_exit(sock, addr, addrlen, ret) 742 #define sys_port_trace_socket_socketpair_enter(family, type, proto, sv) 743 #define sys_port_trace_socket_socketpair_exit(sockA, sockB, ret) 744 745 #define sys_port_trace_net_recv_data_enter(iface, pkt) 746 #define sys_port_trace_net_recv_data_exit(iface, pkt, ret) 747 #define sys_port_trace_net_send_data_enter(pkt) 748 #define sys_port_trace_net_send_data_exit(pkt, ret) 749 #define sys_port_trace_net_rx_time(pkt, end_time) 750 #define sys_port_trace_net_tx_time(pkt, end_time) 751 752 #define sys_trace_sys_init_enter(...) 753 #define sys_trace_sys_init_exit(...) 754 755 #define sys_trace_named_event(name, arg0, arg1) 756 #define sys_port_trace_gpio_pin_interrupt_configure_enter(port, pin, flags) 757 #define sys_port_trace_gpio_pin_interrupt_configure_exit(port, pin, ret) 758 #define sys_port_trace_gpio_pin_configure_enter(port, pin, flags) 759 #define sys_port_trace_gpio_pin_configure_exit(port, pin, ret) 760 #define sys_port_trace_gpio_port_get_direction_enter(port, map, inputs, outputs) 761 #define sys_port_trace_gpio_port_get_direction_exit(port, map, ret) 762 #define sys_port_trace_gpio_pin_get_config_enter(port, pin, flags) 763 #define sys_port_trace_gpio_pin_get_config_exit(port, pin, ret) 764 #define sys_port_trace_gpio_port_get_raw_enter(port, value) 765 #define sys_port_trace_gpio_port_get_raw_exit(port, ret) 766 #define sys_port_trace_gpio_port_set_masked_raw_enter(port, mask, value) 767 #define sys_port_trace_gpio_port_set_masked_raw_exit(port, ret) 768 #define sys_port_trace_gpio_port_set_bits_raw_enter(port, pins) 769 #define sys_port_trace_gpio_port_set_bits_raw_exit(port, ret) 770 #define sys_port_trace_gpio_port_clear_bits_raw_enter(port, pins) 771 #define sys_port_trace_gpio_port_clear_bits_raw_exit(port, ret) 772 #define sys_port_trace_gpio_port_toggle_bits_enter(port, pins) 773 #define sys_port_trace_gpio_port_toggle_bits_exit(port, ret) 774 #define sys_port_trace_gpio_init_callback_enter(callback, handler, pin_mask) 775 #define sys_port_trace_gpio_init_callback_exit(callback) 776 #define sys_port_trace_gpio_add_callback_enter(port, callback) 777 #define sys_port_trace_gpio_add_callback_exit(port, ret) 778 #define sys_port_trace_gpio_remove_callback_enter(port, callback) 779 #define sys_port_trace_gpio_remove_callback_exit(port, ret) 780 #define sys_port_trace_gpio_get_pending_int_enter(dev) 781 #define sys_port_trace_gpio_get_pending_int_exit(dev, ret) 782 #define sys_port_trace_gpio_fire_callbacks_enter(list, port, pins) 783 #define sys_port_trace_gpio_fire_callback(port, cb) 784 785 #endif /* ZEPHYR_TRACE_TEST_H */ 786