1 /* 2 * Trace Recorder for Tracealyzer v4.6.6 3 * Copyright 2021 Percepio AB 4 * www.percepio.com 5 * 6 * SPDX-License-Identifier: Apache-2.0 7 */ 8 9 #ifndef _TRACE_TRACERECORDER_H 10 #define _TRACE_TRACERECORDER_H 11 12 #include <zephyr/kernel.h> 13 #include <zephyr/init.h> 14 #include <trcRecorder.h> 15 16 17 /* Legacy trace defines that are pending refactoring/removal by 18 * the Zephyr team. 19 */ 20 #undef sys_trace_isr_enter 21 #undef sys_trace_isr_exit 22 #undef sys_trace_isr_exit_to_scheduler 23 #undef sys_trace_idle 24 25 26 /* Thread trace mappings */ 27 #undef sys_port_trace_k_thread_foreach_enter 28 #define sys_port_trace_k_thread_foreach_enter(...) \ 29 sys_trace_k_thread_foreach_enter(user_cb, user_data) 30 #undef sys_port_trace_k_thread_foreach_exit 31 #define sys_port_trace_k_thread_foreach_exit(...) \ 32 sys_trace_k_thread_foreach_exit(user_cb, user_data) 33 #undef sys_port_trace_k_thread_foreach_unlocked_enter 34 #define sys_port_trace_k_thread_foreach_unlocked_enter(...) \ 35 sys_trace_k_thread_foreach_unlocked_enter(user_cb, user_data) 36 #undef sys_port_trace_k_thread_foreach_unlocked_exit 37 #define sys_port_trace_k_thread_foreach_unlocked_exit(...) \ 38 sys_trace_k_thread_foreach_unlocked_exit(user_cb, user_data) 39 #undef sys_port_trace_k_thread_create 40 #define sys_port_trace_k_thread_create(new_thread, ...) \ 41 sys_trace_k_thread_create(new_thread, stack_size, prio) 42 #undef sys_port_trace_k_thread_user_mode_enter 43 #define sys_port_trace_k_thread_user_mode_enter(...) \ 44 sys_trace_k_thread_user_mode_enter(entry, p1, p2, p3) 45 #undef sys_port_trace_k_thread_heap_assign 46 #define sys_port_trace_k_thread_heap_assign(thread, heap, ...) \ 47 sys_trace_k_thread_heap_assign(thread, heap) 48 #undef sys_port_trace_k_thread_join_enter 49 #define sys_port_trace_k_thread_join_enter(thread, timeout, ...) 50 #undef sys_port_trace_k_thread_join_blocking 51 #define sys_port_trace_k_thread_join_blocking(thread, timeout, ...) \ 52 sys_trace_k_thread_join_blocking(thread, timeout) 53 #undef sys_port_trace_k_thread_join_exit 54 #define sys_port_trace_k_thread_join_exit(thread, timeout, ret, ...) \ 55 sys_trace_k_thread_join_exit(thread, timeout, ret) 56 #undef sys_port_trace_k_thread_sleep_enter 57 #define sys_port_trace_k_thread_sleep_enter(timeout, ...) \ 58 sys_trace_k_thread_sleep_enter(timeout) 59 #undef sys_port_trace_k_thread_sleep_exit 60 #define sys_port_trace_k_thread_sleep_exit(timeout, ret, ...) \ 61 sys_trace_k_thread_sleep_exit(timeout, ret) 62 #undef sys_port_trace_k_thread_msleep_enter 63 #define sys_port_trace_k_thread_msleep_enter(ms, ...) \ 64 sys_trace_k_thread_msleep_enter(ms) 65 #undef sys_port_trace_k_thread_msleep_exit 66 #define sys_port_trace_k_thread_msleep_exit(ms, ret, ...) \ 67 sys_trace_k_thread_msleep_exit(ms, ret) 68 #undef sys_port_trace_k_thread_usleep_enter 69 #define sys_port_trace_k_thread_usleep_enter(us, ...) \ 70 sys_trace_k_thread_usleep_enter(us) 71 #undef sys_port_trace_k_thread_usleep_exit 72 #define sys_port_trace_k_thread_usleep_exit(us, ret, ...) \ 73 sys_trace_k_thread_usleep_exit(us, ret) 74 #undef sys_port_trace_k_thread_busy_wait_enter 75 #define sys_port_trace_k_thread_busy_wait_enter(usec_to_wait, ...) \ 76 sys_trace_k_thread_busy_wait_enter(usec_to_wait) 77 #undef sys_port_trace_k_thread_busy_wait_exit 78 #define sys_port_trace_k_thread_busy_wait_exit(usec_to_wait, ...) \ 79 sys_trace_k_thread_busy_wait_exit(usec_to_wait) 80 #undef sys_port_trace_k_thread_yield 81 #define sys_port_trace_k_thread_yield(...) \ 82 sys_trace_k_thread_yield() 83 #undef sys_port_trace_k_thread_wakeup 84 #define sys_port_trace_k_thread_wakeup(thread, ...) \ 85 sys_trace_k_thread_wakeup(thread) 86 #undef sys_port_trace_k_thread_start 87 #define sys_port_trace_k_thread_start(thread, ...) \ 88 sys_trace_k_thread_start(thread) 89 #undef sys_port_trace_k_thread_abort 90 #define sys_port_trace_k_thread_abort(thread, ...) \ 91 sys_trace_k_thread_abort(thread) 92 #undef sys_port_trace_k_thread_priority_set 93 #define sys_port_trace_k_thread_priority_set(thread, ...) \ 94 sys_trace_k_thread_priority_set(thread) 95 #undef sys_port_trace_k_thread_suspend_enter 96 #define sys_port_trace_k_thread_suspend_enter(thread, ...) \ 97 sys_trace_k_thread_suspend(thread) 98 #undef sys_port_trace_k_thread_suspend_exit 99 #define sys_port_trace_k_thread_suspend_exit(thread, ...) 100 #undef sys_port_trace_k_thread_resume_enter 101 #define sys_port_trace_k_thread_resume_enter(thread, ...) \ 102 sys_trace_k_thread_resume(thread) 103 #undef sys_port_trace_k_thread_resume_exit 104 #define sys_port_trace_k_thread_resume_exit(thread, ...) 105 #undef sys_port_trace_k_thread_name_set 106 #define sys_port_trace_k_thread_name_set(thread, ret, ...) \ 107 sys_trace_k_thread_name_set(thread, ret) 108 #undef sys_port_trace_k_thread_switched_out 109 #define sys_port_trace_k_thread_switched_out(...) \ 110 sys_trace_k_thread_switched_out() 111 #undef sys_port_trace_k_thread_switched_in 112 #define sys_port_trace_k_thread_switched_in(...) \ 113 sys_trace_k_thread_switched_in() 114 #undef sys_port_trace_k_thread_info 115 #define sys_port_trace_k_thread_info(thread, ...) \ 116 sys_trace_k_thread_info(thread) 117 118 119 /* Thread scheduler trace mappings */ 120 #undef sys_port_trace_k_thread_sched_lock 121 #define sys_port_trace_k_thread_sched_lock(...) \ 122 sys_trace_k_thread_sched_lock() 123 #undef sys_port_trace_k_thread_sched_unlock 124 #define sys_port_trace_k_thread_sched_unlock(...) \ 125 sys_trace_k_thread_sched_unlock() 126 #undef sys_port_trace_k_thread_sched_wakeup 127 #define sys_port_trace_k_thread_sched_wakeup(thread, ...) \ 128 sys_trace_k_thread_sched_wakeup(thread) 129 #undef sys_port_trace_k_thread_sched_abort 130 #define sys_port_trace_k_thread_sched_abort(thread, ...) \ 131 sys_trace_k_thread_sched_abort(thread) 132 #undef sys_port_trace_k_thread_sched_priority_set 133 #define sys_port_trace_k_thread_sched_priority_set(thread, prio, ...) \ 134 sys_trace_k_thread_sched_set_priority(thread, prio) 135 #undef sys_port_trace_k_thread_sched_ready 136 #define sys_port_trace_k_thread_sched_ready(thread, ...) \ 137 sys_trace_k_thread_sched_ready(thread) 138 #undef sys_port_trace_k_thread_sched_pend 139 #define sys_port_trace_k_thread_sched_pend(thread, ...) \ 140 sys_trace_k_thread_sched_pend(thread) 141 #undef sys_port_trace_k_thread_sched_resume 142 #define sys_port_trace_k_thread_sched_resume(thread, ...) \ 143 sys_trace_k_thread_sched_resume(thread) 144 #undef sys_port_trace_k_thread_sched_suspend 145 #define sys_port_trace_k_thread_sched_suspend(thread, ...) \ 146 sys_trace_k_thread_sched_suspend(thread) 147 148 149 /* Work trace mappings */ 150 #undef sys_port_trace_k_work_init 151 #define sys_port_trace_k_work_init(work, ...) \ 152 sys_trace_k_work_init(work, handler) 153 #undef sys_port_trace_k_work_submit_to_queue_enter 154 #define sys_port_trace_k_work_submit_to_queue_enter(queue, work, ...) \ 155 sys_trace_k_work_submit_to_queue_enter(queue, work) 156 #undef sys_port_trace_k_work_submit_to_queue_exit 157 #define sys_port_trace_k_work_submit_to_queue_exit(queue, work, ret, ...) \ 158 sys_trace_k_work_submit_to_queue_exit(queue, work, ret) 159 #undef sys_port_trace_k_work_submit_enter 160 #define sys_port_trace_k_work_submit_enter(work, ...) \ 161 sys_trace_k_work_submit_enter(work) 162 #undef sys_port_trace_k_work_submit_exit 163 #define sys_port_trace_k_work_submit_exit(work, ret, ...) \ 164 sys_trace_k_work_submit_exit(work, ret) 165 #undef sys_port_trace_k_work_flush_enter 166 #define sys_port_trace_k_work_flush_enter(work, ...) \ 167 sys_trace_k_work_flush_enter(work, sync) 168 #undef sys_port_trace_k_work_flush_blocking 169 #define sys_port_trace_k_work_flush_blocking(work, timeout, ...) \ 170 sys_trace_k_work_flush_blocking(work, sync, timeout) 171 #undef sys_port_trace_k_work_flush_exit 172 #define sys_port_trace_k_work_flush_exit(work, ret, ...) \ 173 sys_trace_k_work_flush_exit(work, sync, ret) 174 #undef sys_port_trace_k_work_cancel_enter 175 #define sys_port_trace_k_work_cancel_enter(work, ...) \ 176 sys_trace_k_work_cancel_enter(work) 177 #undef sys_port_trace_k_work_cancel_exit 178 #define sys_port_trace_k_work_cancel_exit(work, ret, ...) \ 179 sys_trace_k_work_cancel_exit(work, ret) 180 #undef sys_port_trace_k_work_cancel_sync_enter 181 #define sys_port_trace_k_work_cancel_sync_enter(work, sync, ...) \ 182 sys_trace_k_work_cancel_sync_enter(work, sync) 183 #undef sys_port_trace_k_work_cancel_sync_blocking 184 #define sys_port_trace_k_work_cancel_sync_blocking(work, sync, ...) \ 185 sys_trace_k_work_cancel_sync_blocking(work, sync) 186 #undef sys_port_trace_k_work_cancel_sync_exit 187 #define sys_port_trace_k_work_cancel_sync_exit(work, sync, ret, ...) \ 188 sys_trace_k_work_cancel_sync_exit(work, sync, ret) 189 190 191 /* Work queue trace mappings */ 192 #undef sys_port_trace_k_work_queue_start_enter 193 #define sys_port_trace_k_work_queue_start_enter(queue, ...) \ 194 sys_trace_k_work_queue_start_enter(queue, stack, stack_size, prio, cfg) 195 #undef sys_port_trace_k_work_queue_start_exit 196 #define sys_port_trace_k_work_queue_start_exit(queue, ...) \ 197 sys_trace_k_work_queue_start_exit(queue, stack, stack_size, prio, cfg) 198 #undef sys_port_trace_k_work_queue_drain_enter 199 #define sys_port_trace_k_work_queue_drain_enter(queue, ...) \ 200 sys_trace_k_work_queue_drain_enter(queue, plug) 201 #undef sys_port_trace_k_work_queue_drain_exit 202 #define sys_port_trace_k_work_queue_drain_exit(queue, ret, ...) \ 203 sys_trace_k_work_queue_drain_exit(queue, plug, ret) 204 #undef sys_port_trace_k_work_queue_unplug_enter 205 #define sys_port_trace_k_work_queue_unplug_enter(queue, ...) \ 206 sys_trace_k_work_queue_unplug_enter(queue) 207 #undef sys_port_trace_k_work_queue_unplug_exit 208 #define sys_port_trace_k_work_queue_unplug_exit(queue, ret, ...) \ 209 sys_trace_k_work_queue_unplug_exit(queue, ret) 210 211 212 /* Work delayable trace mappings */ 213 #undef sys_port_trace_k_work_delayable_init 214 #define sys_port_trace_k_work_delayable_init(dwork, ...) \ 215 sys_trace_k_work_delayable_init(dwork, handler) 216 #undef sys_port_trace_k_work_schedule_for_queue_enter 217 #define sys_port_trace_k_work_schedule_for_queue_enter(queue, dwork, delay, ...) \ 218 sys_trace_k_work_schedule_for_queue_enter(queue, dwork, delay) 219 #undef sys_port_trace_k_work_schedule_for_queue_exit 220 #define sys_port_trace_k_work_schedule_for_queue_exit(queue, dwork, delay, \ 221 ret, ...) \ 222 sys_trace_k_work_schedule_for_queue_exit(queue, dwork, delay, ret) 223 #undef sys_port_trace_k_work_schedule_enter 224 #define sys_port_trace_k_work_schedule_enter(dwork, delay, ...) \ 225 sys_trace_k_work_schedule_enter(dwork, delay) 226 #undef sys_port_trace_k_work_schedule_exit 227 #define sys_port_trace_k_work_schedule_exit(dwork, delay, ret, ...) \ 228 sys_trace_k_work_schedule_exit(dwork, delay, ret) 229 #undef sys_port_trace_k_work_reschedule_for_queue_enter 230 #define sys_port_trace_k_work_reschedule_for_queue_enter(queue, dwork, delay, ...) \ 231 sys_trace_k_work_reschedule_for_queue_enter(queue, dwork, delay) 232 #undef sys_port_trace_k_work_reschedule_for_queue_exit 233 #define sys_port_trace_k_work_reschedule_for_queue_exit(queue, dwork, delay, \ 234 ret, ...) \ 235 sys_trace_k_work_reschedule_for_queue_exit(queue, dwork, delay, ret) 236 #undef sys_port_trace_k_work_reschedule_enter 237 #define sys_port_trace_k_work_reschedule_enter(dwork, delay, ...) \ 238 sys_trace_k_work_reschedule_enter(dwork, delay) 239 #undef sys_port_trace_k_work_reschedule_exit 240 #define sys_port_trace_k_work_reschedule_exit(dwork, delay, ret, ...) \ 241 sys_trace_k_work_reschedule_exit(dwork, delay, ret) 242 #undef sys_port_trace_k_work_flush_delayable_enter 243 #define sys_port_trace_k_work_flush_delayable_enter(dwork, sync, ...) \ 244 sys_trace_k_work_flush_delayable_enter(dwork, sync) 245 #undef sys_port_trace_k_work_flush_delayable_exit 246 #define sys_port_trace_k_work_flush_delayable_exit(dwork, sync, ret, ...) \ 247 sys_trace_k_work_flush_delayable_exit(dwork, sync, ret) 248 #undef sys_port_trace_k_work_cancel_delayable_enter 249 #define sys_port_trace_k_work_cancel_delayable_enter(dwork, ...) \ 250 sys_trace_k_work_cancel_delayable_enter(dwork) 251 #undef sys_port_trace_k_work_cancel_delayable_exit 252 #define sys_port_trace_k_work_cancel_delayable_exit(dwork, ret, ...) \ 253 sys_trace_k_work_cancel_delayable_exit(dwork, ret) 254 #undef sys_port_trace_k_work_cancel_delayable_sync_enter 255 #define sys_port_trace_k_work_cancel_delayable_sync_enter(dwork, sync, ...) \ 256 sys_trace_cancel_delayable_sync_enter(dwork, sync) 257 #undef sys_port_trace_k_work_cancel_delayable_sync_exit 258 #define sys_port_trace_k_work_cancel_delayable_sync_exit(dwork, sync, ret, ...) \ 259 sys_trace_cancel_delayable_sync_exit(dwork, sync, ret) 260 261 262 /* Work poll trace mappings */ 263 #undef sys_port_trace_k_work_poll_init_enter 264 #define sys_port_trace_k_work_poll_init_enter(work, ...) \ 265 sys_trace_k_work_poll_init_enter(work, handler) 266 #undef sys_port_trace_k_work_poll_init_exit 267 #define sys_port_trace_k_work_poll_init_exit(work, ...) \ 268 sys_trace_k_work_poll_init_exit(work, handler) 269 #undef sys_port_trace_k_work_poll_submit_to_queue_enter 270 #define sys_port_trace_k_work_poll_submit_to_queue_enter(work_q, work, \ 271 timeout, ...) \ 272 sys_trace_k_work_poll_submit_to_queue_enter(work_q, work, events, \ 273 num_events, timeout) 274 #undef sys_port_trace_k_work_poll_submit_to_queue_blocking 275 #define sys_port_trace_k_work_poll_submit_to_queue_blocking(work_q, work, \ 276 timeout, ...) \ 277 sys_trace_k_work_poll_submit_to_queue_blocking(work_q, work, events, \ 278 num_events, timeout) 279 #undef sys_port_trace_k_work_poll_submit_to_queue_exit 280 #define sys_port_trace_k_work_poll_submit_to_queue_exit(work_q, work, timeout, \ 281 ret, ...) \ 282 sys_trace_k_work_poll_submit_to_queue_exit(work_q, work, events, \ 283 num_events, timeout, ret) 284 #undef sys_port_trace_k_work_poll_submit_enter 285 #define sys_port_trace_k_work_poll_submit_enter(work, timeout, ...) \ 286 sys_trace_k_work_poll_submit_enter(work, events, num_events, timeout) 287 #undef sys_port_trace_k_work_poll_submit_exit 288 #define sys_port_trace_k_work_poll_submit_exit(work, timeout, ret, ...) \ 289 sys_trace_k_work_poll_submit_exit(work, events, num_events, timeout, ret) 290 #undef sys_port_trace_k_work_poll_cancel_enter 291 #define sys_port_trace_k_work_poll_cancel_enter(work, ...) \ 292 sys_trace_k_work_poll_cancel_enter(work) 293 #undef sys_port_trace_k_work_poll_cancel_exit 294 #define sys_port_trace_k_work_poll_cancel_exit(work, ret, ...) \ 295 sys_trace_k_work_poll_cancel_exit(work, ret) 296 297 298 /* Poll API trace mappings */ 299 #undef sys_port_trace_k_poll_api_event_init 300 #define sys_port_trace_k_poll_api_event_init(event, ...) \ 301 sys_trace_k_poll_api_event_init(event, type, mode, obj) 302 #undef sys_port_trace_k_poll_api_poll_enter 303 #define sys_port_trace_k_poll_api_poll_enter(events, ...) \ 304 sys_trace_k_poll_api_event_poll_enter(events, num_events, timeout) 305 #undef sys_port_trace_k_poll_api_poll_exit 306 #define sys_port_trace_k_poll_api_poll_exit(events, ret, ...) \ 307 sys_trace_k_poll_api_event_poll_exit(events, num_events, timeout, ret) 308 #undef sys_port_trace_k_poll_api_signal_init 309 #define sys_port_trace_k_poll_api_signal_init(signal, ...) \ 310 sys_trace_k_poll_api_signal_init(signal) 311 #undef sys_port_trace_k_poll_api_signal_reset 312 #define sys_port_trace_k_poll_api_signal_reset(signal, ...) \ 313 sys_trace_k_poll_api_signal_reset(signal) 314 #undef sys_port_trace_k_poll_api_signal_check 315 #define sys_port_trace_k_poll_api_signal_check(signal, ...) \ 316 sys_trace_k_poll_api_signal_check(signal, signaled,result) 317 #undef sys_port_trace_k_poll_api_signal_raise 318 #define sys_port_trace_k_poll_api_signal_raise(signal, ret, ...) \ 319 sys_trace_k_poll_api_signal_raise(signal, result, ret) 320 321 322 /* Semaphore trace mappings */ 323 #undef sys_port_trace_k_sem_init 324 #define sys_port_trace_k_sem_init(sem, ret, ...) \ 325 sys_trace_k_sem_init(sem, initial_count, limit, ret) 326 #undef sys_port_trace_k_sem_give_enter 327 #define sys_port_trace_k_sem_give_enter(sem, ...) \ 328 sys_trace_k_sem_give_enter(sem) 329 #undef sys_port_trace_k_sem_give_exit 330 #define sys_port_trace_k_sem_give_exit(sem, ...) 331 #undef sys_port_trace_k_sem_take_enter 332 #define sys_port_trace_k_sem_take_enter(sem, timeout, ...) \ 333 sys_trace_k_sem_take_enter(sem, timeout) 334 #undef sys_port_trace_k_sem_take_blocking 335 #define sys_port_trace_k_sem_take_blocking(sem, timeout, ...) \ 336 sys_trace_k_sem_take_blocking(sem, timeout) 337 #undef sys_port_trace_k_sem_take_exit 338 #define sys_port_trace_k_sem_take_exit(sem, timeout, ret, ...) \ 339 sys_trace_k_sem_take_exit(sem, timeout, ret) 340 #undef sys_port_trace_k_sem_reset 341 #define sys_port_trace_k_sem_reset(sem, ...) \ 342 sys_trace_k_sem_reset(sem) 343 344 345 /* Mutex trace mappings */ 346 #undef sys_port_trace_k_mutex_init 347 #define sys_port_trace_k_mutex_init(mutex, ret, ...) \ 348 sys_trace_k_mutex_init(mutex, ret) 349 #undef sys_port_trace_k_mutex_lock_enter 350 #define sys_port_trace_k_mutex_lock_enter(mutex, timeout, ...) \ 351 sys_trace_k_mutex_lock_enter(mutex, timeout) 352 #undef sys_port_trace_k_mutex_lock_blocking 353 #define sys_port_trace_k_mutex_lock_blocking(mutex, timeout, ...) \ 354 sys_trace_k_mutex_lock_blocking(mutex, timeout) 355 #undef sys_port_trace_k_mutex_lock_exit 356 #define sys_port_trace_k_mutex_lock_exit(mutex, timeout, ret, ...) \ 357 sys_trace_k_mutex_lock_exit(mutex, timeout, ret) 358 #undef sys_port_trace_k_mutex_unlock_enter 359 #define sys_port_trace_k_mutex_unlock_enter(mutex, ...) \ 360 sys_trace_k_mutex_unlock_enter(mutex) 361 #undef sys_port_trace_k_mutex_unlock_exit 362 #define sys_port_trace_k_mutex_unlock_exit(mutex, ret, ...) \ 363 sys_trace_k_mutex_unlock_exit(mutex, ret) 364 365 366 /* Conditional variable trace mappings */ 367 #undef sys_port_trace_k_condvar_init 368 #define sys_port_trace_k_condvar_init(condvar, ret, ...) \ 369 sys_trace_k_condvar_init(condvar, ret) 370 #undef sys_port_trace_k_condvar_signal_enter 371 #define sys_port_trace_k_condvar_signal_enter(condvar, ...) \ 372 sys_trace_k_condvar_signal_enter(condvar) 373 #undef sys_port_trace_k_condvar_signal_blocking 374 #define sys_port_trace_k_condvar_signal_blocking(condvar, timeout, ...) \ 375 sys_trace_k_condvar_signal_blocking(condvar) 376 #undef sys_port_trace_k_condvar_signal_exit 377 #define sys_port_trace_k_condvar_signal_exit(condvar, ret, ...) \ 378 sys_trace_k_condvar_signal_exit(condvar, ret) 379 #undef sys_port_trace_k_condvar_broadcast_enter 380 #define sys_port_trace_k_condvar_broadcast_enter(condvar, ...) \ 381 sys_trace_k_condvar_broadcast_enter(condvar) 382 #undef sys_port_trace_k_condvar_broadcast_exit 383 #define sys_port_trace_k_condvar_broadcast_exit(condvar, ret, ...) \ 384 sys_trace_k_condvar_broadcast_exit(condvar, ret) 385 #undef sys_port_trace_k_condvar_wait_enter 386 #define sys_port_trace_k_condvar_wait_enter(condvar, ...) \ 387 sys_trace_k_condvar_wait_enter(condvar, mutex, timeout) 388 #undef sys_port_trace_k_condvar_wait_exit 389 #define sys_port_trace_k_condvar_wait_exit(condvar, ret, ...) \ 390 sys_trace_k_condvar_wait_exit(condvar, mutex, timeout, ret) 391 392 393 /* Queue trace mappings */ 394 #undef sys_port_trace_k_queue_init 395 #define sys_port_trace_k_queue_init(queue, ...) \ 396 sys_trace_k_queue_init(queue) 397 #undef sys_port_trace_k_queue_cancel_wait 398 #define sys_port_trace_k_queue_cancel_wait(queue, ...) \ 399 sys_trace_k_queue_cancel_wait(queue) 400 #undef sys_port_trace_k_queue_queue_insert_enter 401 #define sys_port_trace_k_queue_queue_insert_enter(queue, alloc, ...) \ 402 sys_trace_k_queue_queue_insert_enter(queue, alloc, data) 403 #undef sys_port_trace_k_queue_queue_insert_blocking 404 #define sys_port_trace_k_queue_queue_insert_blocking(queue, alloc, timeout, ...) \ 405 sys_trace_k_queue_queue_insert_blocking(queue, alloc, data) 406 #undef sys_port_trace_k_queue_queue_insert_exit 407 #define sys_port_trace_k_queue_queue_insert_exit(queue, alloc, ret, ...) \ 408 sys_trace_k_queue_queue_insert_exit(queue, alloc, data, ret); 409 #undef sys_port_trace_k_queue_append_enter 410 #define sys_port_trace_k_queue_append_enter(queue, ...) \ 411 sys_trace_k_queue_append_enter(queue, data) 412 #undef sys_port_trace_k_queue_append_exit 413 #define sys_port_trace_k_queue_append_exit(queue, ...) \ 414 sys_trace_k_queue_append_exit(queue, data) 415 #undef sys_port_trace_k_queue_alloc_append_enter 416 #define sys_port_trace_k_queue_alloc_append_enter(queue, ...) \ 417 sys_trace_k_queue_alloc_append_enter(queue, data) 418 #undef sys_port_trace_k_queue_alloc_append_exit 419 #define sys_port_trace_k_queue_alloc_append_exit(queue, ret, ...) \ 420 sys_trace_k_queue_alloc_append_exit(queue, data, ret) 421 #undef sys_port_trace_k_queue_prepend_enter 422 #define sys_port_trace_k_queue_prepend_enter(queue, ...) \ 423 sys_trace_k_queue_prepend_enter(queue, data) 424 #undef sys_port_trace_k_queue_prepend_exit 425 #define sys_port_trace_k_queue_prepend_exit(queue, ...) \ 426 sys_trace_k_queue_prepend_exit(queue, data) 427 #undef sys_port_trace_k_queue_alloc_prepend_enter 428 #define sys_port_trace_k_queue_alloc_prepend_enter(queue, ...) \ 429 sys_trace_k_queue_alloc_prepend_enter(queue, data) 430 #undef sys_port_trace_k_queue_alloc_prepend_exit 431 #define sys_port_trace_k_queue_alloc_prepend_exit(queue, ret, ...) \ 432 sys_trace_k_queue_alloc_prepend_exit(queue, data, ret) 433 #undef sys_port_trace_k_queue_insert_enter 434 #define sys_port_trace_k_queue_insert_enter(queue, ...) \ 435 sys_trace_k_queue_insert_enter(queue, prev, data) 436 #undef sys_port_trace_k_queue_insert_blocking 437 #define sys_port_trace_k_queue_insert_blocking(queue, timeout, ...) \ 438 sys_trace_k_queue_insert_blocking(queue, prev, data) 439 #undef sys_port_trace_k_queue_insert_exit 440 #define sys_port_trace_k_queue_insert_exit(queue, ...) \ 441 sys_trace_k_queue_insert_exit(queue, prev, data) 442 #undef sys_port_trace_k_queue_append_list_enter 443 #define sys_port_trace_k_queue_append_list_enter(queue, ...) \ 444 sys_trace_k_queue_append_list_enter(queue, head, tail) 445 #undef sys_port_trace_k_queue_append_list_exit 446 #define sys_port_trace_k_queue_append_list_exit(queue, ret, ...) \ 447 sys_trace_k_queue_append_list_exit(queue, ret) 448 #undef sys_port_trace_k_queue_merge_slist_enter 449 #define sys_port_trace_k_queue_merge_slist_enter(queue, ...) \ 450 sys_trace_k_queue_merge_slist_enter(queue, list) 451 #undef sys_port_trace_k_queue_merge_slist_exit 452 #define sys_port_trace_k_queue_merge_slist_exit(queue, ret, ...) \ 453 sys_trace_k_queue_merge_slist_exit(queue, list, ret) 454 #undef sys_port_trace_k_queue_get_enter 455 #define sys_port_trace_k_queue_get_enter(queue, timeout, ...) 456 #undef sys_port_trace_k_queue_get_blocking 457 #define sys_port_trace_k_queue_get_blocking(queue, timeout, ...) \ 458 sys_trace_k_queue_get_blocking(queue, timeout) 459 #undef sys_port_trace_k_queue_get_exit 460 #define sys_port_trace_k_queue_get_exit(queue, timeout, ret, ...) \ 461 sys_trace_k_queue_get_exit(queue, timeout, ret) 462 #undef sys_port_trace_k_queue_remove_enter 463 #define sys_port_trace_k_queue_remove_enter(queue, ...) \ 464 sys_trace_k_queue_remove_enter(queue, data) 465 #undef sys_port_trace_k_queue_remove_exit 466 #define sys_port_trace_k_queue_remove_exit(queue, ret, ...) \ 467 sys_trace_k_queue_remove_exit(queue, data, ret) 468 #undef sys_port_trace_k_queue_unique_append_enter 469 #define sys_port_trace_k_queue_unique_append_enter(queue, ...) \ 470 sys_trace_k_queue_unique_append_enter(queue, data) 471 #undef sys_port_trace_k_queue_unique_append_exit 472 #define sys_port_trace_k_queue_unique_append_exit(queue, ret, ...) \ 473 sys_trace_k_queue_unique_append_exit(queue, data, ret) 474 #undef sys_port_trace_k_queue_peek_head 475 #define sys_port_trace_k_queue_peek_head(queue, ret, ...) \ 476 sys_trace_k_queue_peek_head(queue, ret) 477 #undef sys_port_trace_k_queue_peek_tail 478 #define sys_port_trace_k_queue_peek_tail(queue, ret, ...) \ 479 sys_trace_k_queue_peek_tail(queue, ret) 480 481 482 /* FIFO trace mappings */ 483 #undef sys_port_trace_k_fifo_init_enter 484 #define sys_port_trace_k_fifo_init_enter(fifo, ...) \ 485 sys_trace_k_fifo_init_enter(fifo) 486 #undef sys_port_trace_k_fifo_init_exit 487 #define sys_port_trace_k_fifo_init_exit(fifo, ...) \ 488 sys_trace_k_fifo_init_exit(fifo) 489 #undef sys_port_trace_k_fifo_cancel_wait_enter 490 #define sys_port_trace_k_fifo_cancel_wait_enter(fifo, ...) \ 491 sys_trace_k_fifo_cancel_wait_enter(fifo) 492 #undef sys_port_trace_k_fifo_cancel_wait_exit 493 #define sys_port_trace_k_fifo_cancel_wait_exit(fifo, ...) \ 494 sys_trace_k_fifo_cancel_wait_exit(fifo) 495 #undef sys_port_trace_k_fifo_put_enter 496 #define sys_port_trace_k_fifo_put_enter(fifo, data, ...) \ 497 sys_trace_k_fifo_put_enter(fifo, data) 498 #undef sys_port_trace_k_fifo_put_exit 499 #define sys_port_trace_k_fifo_put_exit(fifo, data, ...) \ 500 sys_trace_k_fifo_put_exit(fifo, data) 501 #undef sys_port_trace_k_fifo_alloc_put_enter 502 #define sys_port_trace_k_fifo_alloc_put_enter(fifo, data, ...) \ 503 sys_trace_k_fifo_alloc_put_enter(fifo, data) 504 #undef sys_port_trace_k_fifo_alloc_put_exit 505 #define sys_port_trace_k_fifo_alloc_put_exit(fifo, data, ret, ...) \ 506 sys_trace_k_fifo_alloc_put_exit(fifo, data, ret) 507 #undef sys_port_trace_k_fifo_put_list_enter 508 #define sys_port_trace_k_fifo_put_list_enter(fifo, head, tail, ...) \ 509 sys_trace_k_fifo_put_list_enter(fifo, head, tail) 510 #undef sys_port_trace_k_fifo_put_list_exit 511 #define sys_port_trace_k_fifo_put_list_exit(fifo, head, tail, ...) \ 512 sys_trace_k_fifo_put_list_exit(fifo, head, tail) 513 #undef sys_port_trace_k_fifo_put_slist_enter 514 #define sys_port_trace_k_fifo_put_slist_enter(fifo, list, ...) \ 515 sys_trace_k_fifo_put_slist_enter(fifo, list) 516 #undef sys_port_trace_k_fifo_put_slist_exit 517 #define sys_port_trace_k_fifo_put_slist_exit(fifo, list, ...) \ 518 sys_trace_k_fifo_put_slist_exit(fifo, list) 519 #undef sys_port_trace_k_fifo_get_enter 520 #define sys_port_trace_k_fifo_get_enter(fifo, timeout, ...) \ 521 sys_trace_k_fifo_get_enter(fifo, timeout) 522 #undef sys_port_trace_k_fifo_get_exit 523 #define sys_port_trace_k_fifo_get_exit(fifo, timeout, ret, ...) \ 524 sys_trace_k_fifo_get_exit(fifo, timeout, ret) 525 #undef sys_port_trace_k_fifo_peek_head_enter 526 #define sys_port_trace_k_fifo_peek_head_enter(fifo, ...) \ 527 sys_trace_k_fifo_peek_head_enter(fifo) 528 #undef sys_port_trace_k_fifo_peek_head_exit 529 #define sys_port_trace_k_fifo_peek_head_exit(fifo, ret, ...) \ 530 sys_trace_k_fifo_peek_head_exit(fifo, ret) 531 #undef sys_port_trace_k_fifo_peek_tail_enter 532 #define sys_port_trace_k_fifo_peek_tail_enter(fifo, ...) \ 533 sys_trace_k_fifo_peek_tail_enter(fifo) 534 #undef sys_port_trace_k_fifo_peek_tail_exit 535 #define sys_port_trace_k_fifo_peek_tail_exit(fifo, ret, ...) \ 536 sys_trace_k_fifo_peek_tail_exit(fifo, ret) 537 538 539 /* LIFO trace mappings */ 540 #undef sys_port_trace_k_lifo_init_enter 541 #define sys_port_trace_k_lifo_init_enter(lifo, ...) \ 542 sys_trace_k_lifo_init_enter(lifo) 543 #undef sys_port_trace_k_lifo_init_exit 544 #define sys_port_trace_k_lifo_init_exit(lifo, ...) \ 545 sys_trace_k_lifo_init_exit(lifo) 546 #undef sys_port_trace_k_lifo_put_enter 547 #define sys_port_trace_k_lifo_put_enter(lifo, data, ...) \ 548 sys_trace_k_lifo_put_enter(lifo, data) 549 #undef sys_port_trace_k_lifo_put_exit 550 #define sys_port_trace_k_lifo_put_exit(lifo, data, ...) \ 551 sys_trace_k_lifo_put_exit(lifo, data) 552 #undef sys_port_trace_k_lifo_alloc_put_enter 553 #define sys_port_trace_k_lifo_alloc_put_enter(lifo, data, ...) \ 554 sys_trace_k_lifo_alloc_put_enter(lifo, data) 555 #undef sys_port_trace_k_lifo_alloc_put_exit 556 #define sys_port_trace_k_lifo_alloc_put_exit(lifo, data, ret, ...) \ 557 sys_trace_k_lifo_alloc_put_exit(lifo, data, ret) 558 #undef sys_port_trace_k_lifo_get_enter 559 #define sys_port_trace_k_lifo_get_enter(lifo, timeout, ...) \ 560 sys_trace_k_lifo_get_enter(lifo, timeout) 561 #undef sys_port_trace_k_lifo_get_exit 562 #define sys_port_trace_k_lifo_get_exit(lifo, timeout, ret, ...) \ 563 sys_trace_k_lifo_get_exit(lifo, timeout, ret) 564 565 566 /* Stack trace mappings */ 567 #undef sys_port_trace_k_stack_init 568 #define sys_port_trace_k_stack_init(stack, ...) \ 569 sys_trace_k_stack_init(stack, buffer, num_entries) 570 #undef sys_port_trace_k_stack_alloc_init_enter 571 #define sys_port_trace_k_stack_alloc_init_enter(stack, ...) \ 572 sys_trace_k_stack_alloc_init_enter(stack, num_entries) 573 #undef sys_port_trace_k_stack_alloc_init_exit 574 #define sys_port_trace_k_stack_alloc_init_exit(stack, ret, ...) \ 575 sys_trace_k_stack_alloc_init_exit(stack, num_entries, ret) 576 #undef sys_port_trace_k_stack_cleanup_enter 577 #define sys_port_trace_k_stack_cleanup_enter(stack, ...) \ 578 sys_trace_k_stack_cleanup_enter(stack) 579 #undef sys_port_trace_k_stack_cleanup_exit 580 #define sys_port_trace_k_stack_cleanup_exit(stack, ret, ...) \ 581 sys_trace_k_stack_cleanup_exit(stack, ret) 582 #undef sys_port_trace_k_stack_push_enter 583 #define sys_port_trace_k_stack_push_enter(stack, ...) \ 584 sys_trace_k_stack_push_enter(stack, data) 585 #undef sys_port_trace_k_stack_push_exit 586 #define sys_port_trace_k_stack_push_exit(stack, ret, ...) \ 587 sys_trace_k_stack_push_exit(stack, data, ret) 588 #undef sys_port_trace_k_stack_pop_enter 589 #define sys_port_trace_k_stack_pop_enter(stack, timeout, ...) 590 #undef sys_port_trace_k_stack_pop_blocking 591 #define sys_port_trace_k_stack_pop_blocking(stack, timeout, ...) \ 592 sys_trace_k_stack_pop_blocking(stack, data, timeout) 593 #undef sys_port_trace_k_stack_pop_exit 594 #define sys_port_trace_k_stack_pop_exit(stack, timeout, ret, ...) \ 595 sys_trace_k_stack_pop_exit(stack, data, timeout, ret) 596 597 598 /* Message queue trace mappings */ 599 #undef sys_port_trace_k_msgq_init 600 #define sys_port_trace_k_msgq_init(msgq, ...) \ 601 sys_trace_k_msgq_init(msgq) 602 #undef sys_port_trace_k_msgq_alloc_init_enter 603 #define sys_port_trace_k_msgq_alloc_init_enter(msgq, ...) \ 604 sys_trace_k_msgq_alloc_init_enter(msgq, msg_size, max_msgs) 605 #undef sys_port_trace_k_msgq_alloc_init_exit 606 #define sys_port_trace_k_msgq_alloc_init_exit(msgq, ret, ...) \ 607 sys_trace_k_msgq_alloc_init_exit(msgq, msg_size, max_msgs, ret) 608 #undef sys_port_trace_k_msgq_cleanup_enter 609 #define sys_port_trace_k_msgq_cleanup_enter(msgq, ...) \ 610 sys_trace_k_msgq_cleanup_enter(msgq) 611 #undef sys_port_trace_k_msgq_cleanup_exit 612 #define sys_port_trace_k_msgq_cleanup_exit(msgq, ret, ...) \ 613 sys_trace_k_msgq_cleanup_exit(msgq, ret) 614 #undef sys_port_trace_k_msgq_put_enter 615 #define sys_port_trace_k_msgq_put_enter(msgq, timeout, ...) \ 616 sys_trace_k_msgq_put_enter(msgq, data, timeout) 617 #undef sys_port_trace_k_msgq_put_blocking 618 #define sys_port_trace_k_msgq_put_blocking(msgq, timeout, ...) \ 619 sys_trace_k_msgq_put_blocking(msgq, data, timeout) 620 #undef sys_port_trace_k_msgq_put_exit 621 #define sys_port_trace_k_msgq_put_exit(msgq, timeout, ret, ...) \ 622 sys_trace_k_msgq_put_exit(msgq, data, timeout, ret) 623 #undef sys_port_trace_k_msgq_get_enter 624 #define sys_port_trace_k_msgq_get_enter(msgq, timeout, ...) \ 625 sys_trace_k_msgq_get_enter(msgq, data, timeout) 626 #undef sys_port_trace_k_msgq_get_blocking 627 #define sys_port_trace_k_msgq_get_blocking(msgq, timeout, ...) \ 628 sys_trace_k_msgq_get_blocking(msgq, data, timeout) 629 #undef sys_port_trace_k_msgq_get_exit 630 #define sys_port_trace_k_msgq_get_exit(msgq, timeout, ret, ...) \ 631 sys_trace_k_msgq_get_exit(msgq, data, timeout, ret) 632 #undef sys_port_trace_k_msgq_peek 633 #define sys_port_trace_k_msgq_peek(msgq, ret, ...) \ 634 sys_trace_k_msgq_peek(msgq, data, ret) 635 #undef sys_port_trace_k_msgq_purge 636 #define sys_port_trace_k_msgq_purge(msgq, ...) \ 637 sys_trace_k_msgq_purge(msgq) 638 639 640 /* Mailbox trace mappings */ 641 #undef sys_port_trace_k_mbox_init 642 #define sys_port_trace_k_mbox_init(mbox, ...) \ 643 sys_trace_k_mbox_init(mbox) 644 #undef sys_port_trace_k_mbox_message_put_enter 645 #define sys_port_trace_k_mbox_message_put_enter(mbox, timeout, ...) \ 646 sys_trace_k_mbox_message_put_enter(mbox, tx_msg, timeout) 647 #undef sys_port_trace_k_mbox_message_put_blocking 648 #define sys_port_trace_k_mbox_message_put_blocking(mbox, timeout, ...) \ 649 sys_trace_k_mbox_message_put_blocking(mbox, tx_msg, timeout) 650 #undef sys_port_trace_k_mbox_message_put_exit 651 #define sys_port_trace_k_mbox_message_put_exit(mbox, timeout, ret, ...) \ 652 sys_trace_k_mbox_message_put_exit(mbox, tx_msg, timeout, ret) 653 #undef sys_port_trace_k_mbox_put_enter 654 #define sys_port_trace_k_mbox_put_enter(mbox, timeout, ...) \ 655 sys_trace_k_mbox_put_enter(mbox, tx_msg, timeout) 656 #undef sys_port_trace_k_mbox_put_exit 657 #define sys_port_trace_k_mbox_put_exit(mbox, timeout, ret, ...) \ 658 sys_trace_k_mbox_put_exit(mbox, tx_msg, timeout, ret) 659 #undef sys_port_trace_k_mbox_async_put_enter 660 #define sys_port_trace_k_mbox_async_put_enter(mbox, sem, ...) \ 661 sys_trace_k_mbox_async_put_enter(mbox, sem) 662 #undef sys_port_trace_k_mbox_async_put_exit 663 #define sys_port_trace_k_mbox_async_put_exit(mbox, sem, ...) \ 664 sys_trace_k_mbox_async_put_exit(mbox, sem) 665 #undef sys_port_trace_k_mbox_get_enter 666 #define sys_port_trace_k_mbox_get_enter(mbox, timeout, ...) \ 667 sys_trace_k_mbox_get_enter(mbox, rx_msg, buffer, timeout) 668 #undef sys_port_trace_k_mbox_get_blocking 669 #define sys_port_trace_k_mbox_get_blocking(mbox, timeout, ...) \ 670 sys_trace_k_mbox_get_blocking(mbox, rx_msg, buffer, timeout) 671 #undef sys_port_trace_k_mbox_get_exit 672 #define sys_port_trace_k_mbox_get_exit(mbox, timeout, ret, ...) \ 673 sys_trace_k_mbox_get_exit(mbox, rx_msg, buffer, timeout, ret) 674 #undef sys_port_trace_k_mbox_data_get 675 #define sys_port_trace_k_mbox_data_get(rx_msg, buffer, ...) \ 676 sys_trace_k_mbox_data_get(rx_msg, buffer) 677 678 679 /* Pipe trace mappings */ 680 #undef sys_port_trace_k_pipe_init 681 #define sys_port_trace_k_pipe_init(pipe, ...) \ 682 sys_trace_k_pipe_init(pipe, buffer, size) 683 #undef sys_port_trace_k_pipe_cleanup_enter 684 #define sys_port_trace_k_pipe_cleanup_enter(pipe, ...) \ 685 sys_trace_k_pipe_cleanup_enter(pipe) 686 #undef sys_port_trace_k_pipe_cleanup_exit 687 #define sys_port_trace_k_pipe_cleanup_exit(pipe, ret, ...) \ 688 sys_trace_k_pipe_cleanup_exit(pipe, ret) 689 #undef sys_port_trace_k_pipe_alloc_init_enter 690 #define sys_port_trace_k_pipe_alloc_init_enter(pipe, ...) \ 691 sys_trace_k_pipe_alloc_init_enter(pipe, size) 692 #undef sys_port_trace_k_pipe_alloc_init_exit 693 #define sys_port_trace_k_pipe_alloc_init_exit(pipe, ret, ...) \ 694 sys_trace_k_pipe_alloc_init_exit(pipe, size, ret) 695 #undef sys_port_trace_k_pipe_put_enter 696 #define sys_port_trace_k_pipe_put_enter(pipe, timeout, ...) \ 697 sys_trace_k_pipe_put_enter(pipe, data, bytes_to_write, bytes_written, min_xfer, timeout) 698 #undef sys_port_trace_k_pipe_put_blocking 699 #define sys_port_trace_k_pipe_put_blocking(pipe, timeout, ...) \ 700 sys_trace_k_pipe_put_blocking(pipe, data, bytes_to_write, bytes_written, min_xfer, timeout) 701 #undef sys_port_trace_k_pipe_put_exit 702 #define sys_port_trace_k_pipe_put_exit(pipe, timeout, ret, ...) \ 703 sys_trace_k_pipe_put_exit(pipe, data, bytes_to_write, bytes_written, min_xfer, timeout, ret) 704 #undef sys_port_trace_k_pipe_get_enter 705 #define sys_port_trace_k_pipe_get_enter(pipe, timeout, ...) \ 706 sys_trace_k_pipe_get_enter(pipe, data, bytes_to_read, bytes_read, min_xfer, timeout) 707 #undef sys_port_trace_k_pipe_get_blocking 708 #define sys_port_trace_k_pipe_get_blocking(pipe, timeout, ...) \ 709 sys_trace_k_pipe_get_blocking(pipe, data, bytes_to_read, bytes_read, min_xfer, timeout) 710 #undef sys_port_trace_k_pipe_get_exit 711 #define sys_port_trace_k_pipe_get_exit(pipe, timeout, ret, ...) \ 712 sys_trace_k_pipe_get_exit(pipe, data, bytes_to_read, bytes_read, min_xfer, timeout, ret) 713 #undef sys_port_trace_k_pipe_block_put_enter 714 #define sys_port_trace_k_pipe_block_put_enter(pipe, sem, ...) \ 715 sys_trace_k_pipe_block_put_enter(pipe, block, bytes_to_write, sem) 716 #undef sys_port_trace_k_pipe_block_put_exit 717 #define sys_port_trace_k_pipe_block_put_exit(pipe, sem, ...) \ 718 sys_trace_k_pipe_block_put_exit(pipe, block, bytes_to_write, sem) 719 720 721 /* Heap trace mappings */ 722 #undef sys_port_trace_k_heap_init 723 #define sys_port_trace_k_heap_init(h, ...) \ 724 sys_trace_k_heap_init(h, mem, bytes) 725 #undef sys_port_trace_k_heap_aligned_alloc_enter 726 #define sys_port_trace_k_heap_aligned_alloc_enter(h, timeout, ...) \ 727 sys_trace_k_heap_aligned_alloc_enter(h, bytes, timeout) 728 #undef sys_port_trace_k_heap_aligned_alloc_blocking 729 #define sys_port_trace_k_heap_aligned_alloc_blocking(h, timeout, ...) \ 730 sys_trace_k_heap_aligned_alloc_blocking(h, bytes, timeout) 731 #undef sys_port_trace_k_heap_aligned_alloc_exit 732 #define sys_port_trace_k_heap_aligned_alloc_exit(h, timeout, ret, ...) \ 733 sys_trace_k_heap_aligned_alloc_exit(h, bytes, timeout, ret) 734 #undef sys_port_trace_k_heap_alloc_enter 735 #define sys_port_trace_k_heap_alloc_enter(h, timeout, ...) \ 736 sys_trace_k_heap_alloc_enter(h, bytes, timeout) 737 #undef sys_port_trace_k_heap_alloc_exit 738 #define sys_port_trace_k_heap_alloc_exit(h, timeout, ret, ...) \ 739 sys_trace_k_heap_alloc_exit(h, bytes, timeout, ret) 740 #undef sys_port_trace_k_heap_free 741 #define sys_port_trace_k_heap_free(h, ...) \ 742 sys_trace_k_heap_free(h, mem) 743 #undef sys_port_trace_k_heap_sys_k_aligned_alloc_enter 744 #define sys_port_trace_k_heap_sys_k_aligned_alloc_enter(heap, ...) \ 745 sys_trace_k_heap_sys_k_aligned_alloc_enter(heap, align, size) 746 #undef sys_port_trace_k_heap_sys_k_aligned_alloc_exit 747 #define sys_port_trace_k_heap_sys_k_aligned_alloc_exit(heap, ret, ...) \ 748 sys_trace_k_heap_sys_k_aligned_alloc_exit(heap, align, size, ret) 749 #undef sys_port_trace_k_heap_sys_k_malloc_enter 750 #define sys_port_trace_k_heap_sys_k_malloc_enter(heap, ...) \ 751 sys_trace_k_heap_sys_k_malloc_enter(heap, size) 752 #undef sys_port_trace_k_heap_sys_k_malloc_exit 753 #define sys_port_trace_k_heap_sys_k_malloc_exit(heap, ret, ...) \ 754 sys_trace_k_heap_sys_k_malloc_exit(heap, size, ret) 755 #undef sys_port_trace_k_heap_sys_k_free_enter 756 #define sys_port_trace_k_heap_sys_k_free_enter(heap, heap_ref, ...) \ 757 sys_trace_k_heap_sys_k_free_enter(heap) 758 #undef sys_port_trace_k_heap_sys_k_free_exit 759 #define sys_port_trace_k_heap_sys_k_free_exit(heap, heap_ref, ...) \ 760 sys_trace_k_heap_sys_k_free_exit(heap) 761 #undef sys_port_trace_k_heap_sys_k_calloc_enter 762 #define sys_port_trace_k_heap_sys_k_calloc_enter(heap, ...) \ 763 sys_trace_k_heap_sys_k_calloc_enter(heap, nmemb, size) 764 #undef sys_port_trace_k_heap_sys_k_calloc_exit 765 #define sys_port_trace_k_heap_sys_k_calloc_exit(heap, ret, ...) \ 766 sys_trace_k_heap_sys_k_calloc_exit(heap, nmemb, size, ret) 767 768 769 /* Memory slab trace mappings */ 770 #undef sys_port_trace_k_mem_slab_init 771 #define sys_port_trace_k_mem_slab_init(slab, rc, ...) \ 772 sys_trace_k_mem_slab_init(slab, buffer, block_size, num_blocks, rc) 773 #undef sys_port_trace_k_mem_slab_alloc_enter 774 #define sys_port_trace_k_mem_slab_alloc_enter(slab, timeout, ...) \ 775 sys_trace_k_mem_slab_alloc_enter(slab, mem, timeout) 776 #undef sys_port_trace_k_mem_slab_alloc_blocking 777 #define sys_port_trace_k_mem_slab_alloc_blocking(slab, timeout, ...) \ 778 sys_trace_k_mem_slab_alloc_blocking(slab, mem, timeout) 779 #undef sys_port_trace_k_mem_slab_alloc_exit 780 #define sys_port_trace_k_mem_slab_alloc_exit(slab, timeout, ret, ...) \ 781 sys_trace_k_mem_slab_alloc_exit(slab, mem, timeout, ret) 782 #undef sys_port_trace_k_mem_slab_free_enter 783 #define sys_port_trace_k_mem_slab_free_enter(slab, ...) 784 #undef sys_port_trace_k_mem_slab_free_exit 785 #define sys_port_trace_k_mem_slab_free_exit(slab, ...) \ 786 sys_trace_k_mem_slab_free_exit(slab, mem) 787 788 789 /* Timer trace mappings */ 790 #undef sys_port_trace_k_timer_init 791 #define sys_port_trace_k_timer_init(timer, ...) \ 792 sys_trace_k_timer_init(timer, expiry_fn, stop_fn) 793 #undef sys_port_trace_k_timer_start 794 #define sys_port_trace_k_timer_start(timer, ...) \ 795 sys_trace_k_timer_start(timer, duration, period) 796 #undef sys_port_trace_k_timer_stop 797 #define sys_port_trace_k_timer_stop(timer, ...) \ 798 sys_trace_k_timer_stop(timer) 799 #undef sys_port_trace_k_timer_status_sync_enter 800 #define sys_port_trace_k_timer_status_sync_enter(timer, ...) 801 #undef sys_port_trace_k_timer_status_sync_blocking 802 #define sys_port_trace_k_timer_status_sync_blocking(timer, timeout, ...) \ 803 sys_trace_k_timer_status_sync_blocking(timer) 804 #undef sys_port_trace_k_timer_status_sync_exit 805 #define sys_port_trace_k_timer_status_sync_exit(timer, result, ...) \ 806 sys_trace_k_timer_status_sync_exit(timer, result) 807 808 809 810 /* Syscall trace mappings */ 811 #undef sys_port_trace_syscall_enter 812 #define sys_port_trace_syscall_enter(id, name, ...) \ 813 sys_trace_syscall_enter(id, #name) 814 #undef sys_port_trace_syscall_exit 815 #define sys_port_trace_syscall_exit(id, name, ...) \ 816 sys_trace_syscall_exit(id, #name) 817 818 819 820 821 /* Thread trace function declarations */ 822 void sys_trace_k_thread_foreach_enter(k_thread_user_cb_t user_cb, 823 void *user_data); 824 void sys_trace_k_thread_foreach_exit(k_thread_user_cb_t user_cb, 825 void *user_data); 826 void sys_trace_k_thread_foreach_unlocked_enter(k_thread_user_cb_t user_cb, 827 void *user_data); 828 void sys_trace_k_thread_foreach_unlocked_exit(k_thread_user_cb_t user_cb, 829 void *user_data); 830 void sys_trace_k_thread_create(struct k_thread *new_thread, size_t stack_size, 831 int prio); 832 void sys_trace_k_thread_user_mode_enter(k_thread_entry_t entry, void *p1, 833 void *p2, void *p3); 834 void sys_trace_k_thread_heap_assign(struct k_thread *thread, 835 struct k_heap *heap); 836 void sys_trace_k_thread_join_blocking(struct k_thread *thread, 837 k_timeout_t timeout); 838 void sys_trace_k_thread_join_exit(struct k_thread *thread, 839 k_timeout_t timeout, int ret); 840 void sys_trace_k_thread_sleep_enter(k_timeout_t timeout); 841 void sys_trace_k_thread_sleep_exit(k_timeout_t timeout, int ret); 842 void sys_trace_k_thread_msleep_enter(int32_t ms); 843 void sys_trace_k_thread_msleep_exit(int32_t ms, int ret); 844 void sys_trace_k_thread_usleep_enter(int32_t us); 845 void sys_trace_k_thread_usleep_exit(int32_t us, int ret); 846 void sys_trace_k_thread_busy_wait_enter(uint32_t usec_to_wait); 847 void sys_trace_k_thread_busy_wait_exit(uint32_t usec_to_wait); 848 void sys_trace_k_thread_yield(); 849 void sys_trace_k_thread_wakeup(struct k_thread *thread); 850 void sys_trace_k_thread_abort(struct k_thread *thread); 851 void sys_trace_k_thread_start(struct k_thread *thread); 852 void sys_trace_k_thread_priority_set(struct k_thread *thread); 853 void sys_trace_k_thread_suspend(struct k_thread *thread); 854 void sys_trace_k_thread_resume(struct k_thread *thread); 855 void sys_trace_k_thread_sched_lock(); 856 void sys_trace_k_thread_sched_unlock(); 857 void sys_trace_k_thread_name_set(struct k_thread *thread, int ret); 858 void sys_trace_k_thread_switched_out(); 859 void sys_trace_k_thread_switched_in(); 860 void sys_trace_k_thread_ready(struct k_thread *thread); 861 void sys_trace_k_thread_pend(struct k_thread *thread); 862 void sys_trace_k_thread_info(struct k_thread *thread); 863 864 865 /* Thread scheduler trace function declarations */ 866 void sys_trace_k_thread_sched_wakeup(struct k_thread *thread); 867 void sys_trace_k_thread_sched_abort(struct k_thread *thread); 868 void sys_trace_k_thread_sched_set_priority(struct k_thread *thread, int prio); 869 void sys_trace_k_thread_sched_ready(struct k_thread *thread); 870 void sys_trace_k_thread_sched_pend(struct k_thread *thread); 871 void sys_trace_k_thread_sched_resume(struct k_thread *thread); 872 void sys_trace_k_thread_sched_suspend(struct k_thread *thread); 873 874 875 /* Work trace function declarations */ 876 void sys_trace_k_work_init(struct k_work *work, k_work_handler_t handler); 877 void sys_trace_k_work_submit_to_queue_enter(struct k_work_q *queue, 878 struct k_work *work); 879 void sys_trace_k_work_submit_to_queue_exit(struct k_work_q *queue, 880 struct k_work *work, int ret); 881 void sys_trace_k_work_submit_enter(struct k_work *work); 882 void sys_trace_k_work_submit_exit(struct k_work *work, int ret); 883 void sys_trace_k_work_flush_enter(struct k_work *work, 884 struct k_work_sync *sync); 885 void sys_trace_k_work_flush_blocking(struct k_work *work, 886 struct k_work_sync *sync, k_timeout_t timeout); 887 void sys_trace_k_work_flush_exit(struct k_work *work, 888 struct k_work_sync *sync, bool ret); 889 void sys_trace_k_work_cancel_enter(struct k_work *work); 890 void sys_trace_k_work_cancel_exit(struct k_work *work, int ret); 891 void sys_trace_k_work_cancel_sync_enter(struct k_work *work, 892 struct k_work_sync *sync); 893 void sys_trace_k_work_cancel_sync_blocking(struct k_work *work, 894 struct k_work_sync *sync); 895 void sys_trace_k_work_cancel_sync_exit(struct k_work *work, 896 struct k_work_sync *sync, bool ret); 897 898 899 /* Work queue trace function declarations */ 900 void sys_trace_k_work_queue_start_enter(struct k_work_q *queue, 901 k_thread_stack_t *stack, size_t stack_size, int prio, 902 const struct k_work_queue_config *cfg); 903 void sys_trace_k_work_queue_start_exit(struct k_work_q *queue, 904 k_thread_stack_t *stack, size_t stack_size, int prio, 905 const struct k_work_queue_config *cfg); 906 void sys_trace_k_work_queue_drain_enter(struct k_work_q *queue, bool plug); 907 void sys_trace_k_work_queue_drain_exit(struct k_work_q *queue, bool plug, 908 int ret); 909 void sys_trace_k_work_queue_unplug_enter(struct k_work_q *queue); 910 void sys_trace_k_work_queue_unplug_exit(struct k_work_q *queue, 911 int ret); 912 913 914 /* Work delayable trace function declarations */ 915 void sys_trace_k_work_delayable_init(struct k_work_delayable *dwork, 916 k_work_handler_t handler); 917 void sys_trace_k_work_schedule_for_queue_enter(struct k_work_q *queue, 918 struct k_work_delayable *dwork, k_timeout_t delay); 919 void sys_trace_k_work_schedule_for_queue_exit(struct k_work_q *queue, 920 struct k_work_delayable *dwork, k_timeout_t delay, int ret); 921 void sys_trace_k_work_schedule_enter(struct k_work_delayable *dwork, 922 k_timeout_t delay); 923 void sys_trace_k_work_schedule_exit(struct k_work_delayable *dwork, 924 k_timeout_t delay, int ret); 925 void sys_trace_k_work_reschedule_for_queue_enter(struct k_work_q *queue, 926 struct k_work_delayable *dwork, k_timeout_t delay); 927 void sys_trace_k_work_reschedule_for_queue_exit(struct k_work_q *queue, 928 struct k_work_delayable *dwork, k_timeout_t delay, int ret); 929 void sys_trace_k_work_reschedule_enter(struct k_work_delayable *dwork, 930 k_timeout_t delay); 931 void sys_trace_k_work_reschedule_exit(struct k_work_delayable *dwork, 932 k_timeout_t delay, int ret); 933 void sys_trace_k_work_flush_delayable_enter(struct k_work_delayable *dwork, 934 struct k_work_sync *sync); 935 void sys_trace_k_work_flush_delayable_exit(struct k_work_delayable *dwork, 936 struct k_work_sync *sync, bool ret); 937 void sys_trace_k_work_cancel_delayable_enter(struct k_work_delayable *dwork); 938 void sys_trace_k_work_cancel_delayable_exit(struct k_work_delayable *dwork, 939 int ret); 940 void sys_trace_cancel_delayable_sync_enter(struct k_work_delayable *dwork, 941 struct k_work_sync *sync); 942 void sys_trace_cancel_delayable_sync_exit(struct k_work_delayable *dwork, 943 struct k_work_sync *sync, bool ret); 944 945 946 /* Work poll trace function declarations */ 947 void sys_trace_k_work_poll_init_enter(struct k_work_poll *work, 948 k_work_handler_t handler); 949 void sys_trace_k_work_poll_init_exit(struct k_work_poll *work, 950 k_work_handler_t handler); 951 void sys_trace_k_work_poll_submit_to_queue_enter(struct k_work_q *work_q, 952 struct k_work_poll *work, struct k_poll_event *events, int num_events, 953 k_timeout_t timeout); 954 void sys_trace_k_work_poll_submit_to_queue_blocking(struct k_work_q *work_q, 955 struct k_work_poll *work, struct k_poll_event *events, int num_events, 956 k_timeout_t timeout); 957 void sys_trace_k_work_poll_submit_to_queue_exit(struct k_work_q *work_q, 958 struct k_work_poll *work, struct k_poll_event *events, int num_events, 959 k_timeout_t timeout, int ret); 960 void sys_trace_k_work_poll_submit_enter(struct k_work_poll *work, 961 struct k_poll_event *events, int num_events, k_timeout_t timeout); 962 void sys_trace_k_work_poll_submit_exit(struct k_work_poll *work, 963 struct k_poll_event *events, int num_events, k_timeout_t timeout, 964 int ret); 965 void sys_trace_k_work_poll_cancel_enter(struct k_work_poll *work); 966 void sys_trace_k_work_poll_cancel_exit(struct k_work_poll *work, int ret); 967 968 969 /* Poll API trace function declarations */ 970 void sys_trace_k_poll_api_event_init(struct k_poll_event *event, 971 uint32_t type, int mode, void *obj); 972 void sys_trace_k_poll_api_event_poll_enter(struct k_poll_event *events, 973 int num_events, k_timeout_t timeout); 974 void sys_trace_k_poll_api_event_poll_exit(struct k_poll_event *events, 975 int num_events, k_timeout_t timeout, int ret); 976 void sys_trace_k_poll_api_signal_init(struct k_poll_signal *signal); 977 void sys_trace_k_poll_api_signal_reset(struct k_poll_signal *signal); 978 void sys_trace_k_poll_api_signal_check(struct k_poll_signal *signal, 979 unsigned int *signaled, int *result); 980 void sys_trace_k_poll_api_signal_raise(struct k_poll_signal *signal, 981 int result, int ret); 982 983 984 /* Semaphore trace function declarations */ 985 void sys_trace_k_sem_init(struct k_sem *sem, uint32_t initial_count, 986 uint32_t limit, int ret); 987 void sys_trace_k_sem_give_enter(struct k_sem *sem); 988 void sys_trace_k_sem_take_enter(struct k_sem *sem, k_timeout_t timeout); 989 void sys_trace_k_sem_take_blocking(struct k_sem *sem, k_timeout_t timeout); 990 void sys_trace_k_sem_take_exit(struct k_sem *sem, k_timeout_t timeout, 991 int ret); 992 void sys_trace_k_sem_reset(struct k_sem *sem); 993 994 995 /* Mutex trace function declarations */ 996 void sys_trace_k_mutex_init(struct k_mutex *mutex, int ret); 997 void sys_trace_k_mutex_lock_enter(struct k_mutex *mutex, k_timeout_t timeout); 998 void sys_trace_k_mutex_lock_blocking(struct k_mutex *mutex, 999 k_timeout_t timeout); 1000 void sys_trace_k_mutex_lock_exit(struct k_mutex *mutex, k_timeout_t timeout, 1001 int ret); 1002 void sys_trace_k_mutex_unlock_enter(struct k_mutex *mutex); 1003 void sys_trace_k_mutex_unlock_exit(struct k_mutex *mutex, int ret); 1004 1005 1006 /* Conditional variable trace function declarations */ 1007 void sys_trace_k_condvar_init(struct k_condvar *condvar, int ret); 1008 void sys_trace_k_condvar_signal_enter(struct k_condvar *condvar); 1009 void sys_trace_k_condvar_signal_blocking(struct k_condvar *condvar); 1010 void sys_trace_k_condvar_signal_exit(struct k_condvar *condvar, int ret); 1011 void sys_trace_k_condvar_broadcast_enter(struct k_condvar *condvar); 1012 void sys_trace_k_condvar_broadcast_exit(struct k_condvar *condvar, int ret); 1013 void sys_trace_k_condvar_wait_enter(struct k_condvar *condvar, 1014 struct k_mutex *mutex, k_timeout_t timeout); 1015 void sys_trace_k_condvar_wait_exit(struct k_condvar *condvar, 1016 struct k_mutex *mutex, k_timeout_t timeout, int ret); 1017 1018 1019 /* Queue trace function declarations */ 1020 void sys_trace_k_queue_init(struct k_queue *queue); 1021 void sys_trace_k_queue_cancel_wait(struct k_queue *queue); 1022 void sys_trace_k_queue_queue_insert_enter(struct k_queue *queue, bool alloc, 1023 void *data); 1024 void sys_trace_k_queue_queue_insert_blocking(struct k_queue *queue, 1025 bool alloc, void *data); 1026 void sys_trace_k_queue_queue_insert_exit(struct k_queue *queue, bool alloc, 1027 void *data, int ret); 1028 void sys_trace_k_queue_append_enter(struct k_queue *queue, void *data); 1029 void sys_trace_k_queue_append_exit(struct k_queue *queue, void *data); 1030 void sys_trace_k_queue_alloc_append_enter(struct k_queue *queue, void *data); 1031 void sys_trace_k_queue_alloc_append_exit(struct k_queue *queue, void *data, 1032 int ret); 1033 void sys_trace_k_queue_prepend_enter(struct k_queue *queue, void *data); 1034 void sys_trace_k_queue_prepend_exit(struct k_queue *queue, void *data); 1035 void sys_trace_k_queue_alloc_prepend_enter(struct k_queue *queue, void *data); 1036 void sys_trace_k_queue_alloc_prepend_exit(struct k_queue *queue, void *data, 1037 int ret); 1038 void sys_trace_k_queue_insert_enter(struct k_queue *queue, void *prev, 1039 void *data); 1040 void sys_trace_k_queue_insert_exit(struct k_queue *queue, void *prev, 1041 void *data); 1042 void sys_trace_k_queue_append_list_enter(struct k_queue *queue, void *head, 1043 void *tail); 1044 void sys_trace_k_queue_append_list_exit(struct k_queue *queue, int ret); 1045 void sys_trace_k_queue_merge_slist_enter(struct k_queue *queue, 1046 sys_slist_t *list); 1047 void sys_trace_k_queue_merge_slist_exit(struct k_queue *queue, 1048 sys_slist_t *list, int ret); 1049 void sys_trace_k_queue_get_blocking(struct k_queue *queue, 1050 k_timeout_t timeout); 1051 void sys_trace_k_queue_get_exit(struct k_queue *queue, k_timeout_t timeout, 1052 void *ret); 1053 void sys_trace_k_queue_remove_enter(struct k_queue *queue, void *data); 1054 void sys_trace_k_queue_remove_exit(struct k_queue *queue, void *data, 1055 bool ret); 1056 void sys_trace_k_queue_unique_append_enter(struct k_queue *queue, void *data); 1057 void sys_trace_k_queue_unique_append_exit(struct k_queue *queue, void *data, 1058 bool ret); 1059 void sys_trace_k_queue_peek_head(struct k_queue *queue, void *ret); 1060 void sys_trace_k_queue_peek_tail(struct k_queue *queue, void *ret); 1061 1062 1063 /* FIFO trace function declarations */ 1064 void sys_trace_k_fifo_init_enter(struct k_fifo *fifo); 1065 void sys_trace_k_fifo_init_exit(struct k_fifo *fifo); 1066 void sys_trace_k_fifo_cancel_wait_enter(struct k_fifo *fifo); 1067 void sys_trace_k_fifo_cancel_wait_exit(struct k_fifo *fifo); 1068 void sys_trace_k_fifo_put_enter(struct k_fifo *fifo, void *data); 1069 void sys_trace_k_fifo_put_exit(struct k_fifo *fifo, void *data); 1070 void sys_trace_k_fifo_alloc_put_enter(struct k_fifo *fifo, void *data); 1071 void sys_trace_k_fifo_alloc_put_exit(struct k_fifo *fifo, void *data, 1072 int ret); 1073 void sys_trace_k_fifo_put_list_enter(struct k_fifo *fifo, void *head, 1074 void *tail); 1075 void sys_trace_k_fifo_put_list_exit(struct k_fifo *fifo, void *head, 1076 void *tail); 1077 void sys_trace_k_fifo_put_slist_enter(struct k_fifo *fifo, sys_slist_t *list); 1078 void sys_trace_k_fifo_put_slist_exit(struct k_fifo *fifo, sys_slist_t *list); 1079 void sys_trace_k_fifo_get_enter(struct k_fifo *fifo, k_timeout_t timeout); 1080 void sys_trace_k_fifo_get_exit(struct k_fifo *fifo, k_timeout_t timeout, 1081 void *ret); 1082 void sys_trace_k_fifo_peek_head_enter(struct k_fifo *fifo); 1083 void sys_trace_k_fifo_peek_head_exit(struct k_fifo *fifo, void *ret); 1084 void sys_trace_k_fifo_peek_tail_enter(struct k_fifo *fifo); 1085 void sys_trace_k_fifo_peek_tail_exit(struct k_fifo *fifo, void *ret); 1086 1087 1088 /* LIFO trace function declarations */ 1089 void sys_trace_k_lifo_init_enter(struct k_lifo *lifo); 1090 void sys_trace_k_lifo_init_exit(struct k_lifo *lifo); 1091 void sys_trace_k_lifo_put_enter(struct k_lifo *lifo, void *data); 1092 void sys_trace_k_lifo_put_exit(struct k_lifo *lifo, void *data); 1093 void sys_trace_k_lifo_alloc_put_enter(struct k_lifo *lifo, void *data); 1094 void sys_trace_k_lifo_alloc_put_exit(struct k_lifo *lifo, void *data, 1095 int ret); 1096 void sys_trace_k_lifo_get_enter(struct k_lifo *lifo, k_timeout_t timeout); 1097 void sys_trace_k_lifo_get_exit(struct k_lifo *lifo, k_timeout_t timeout, 1098 void *ret); 1099 1100 1101 /* Stack trace function declarations */ 1102 void sys_trace_k_stack_init(struct k_stack *stack, stack_data_t *buffer, 1103 uint32_t num_entries); 1104 void sys_trace_k_stack_alloc_init_enter(struct k_stack *stack, 1105 uint32_t num_entries); 1106 void sys_trace_k_stack_alloc_init_exit(struct k_stack *stack, 1107 uint32_t num_entries, int ret); 1108 void sys_trace_k_stack_cleanup_enter(struct k_stack *stack); 1109 void sys_trace_k_stack_cleanup_exit(struct k_stack *stack, int ret); 1110 void sys_trace_k_stack_push_enter(struct k_stack *stack, stack_data_t data); 1111 void sys_trace_k_stack_push_exit(struct k_stack *stack, stack_data_t data, 1112 int ret); 1113 void sys_trace_k_stack_pop_blocking(struct k_stack *stack, stack_data_t *data, 1114 k_timeout_t timeout); 1115 void sys_trace_k_stack_pop_exit(struct k_stack *stack, stack_data_t *data, 1116 k_timeout_t timeout, int ret); 1117 1118 1119 /* Mailbox trace function declarations */ 1120 void sys_trace_k_mbox_init(struct k_mbox *mbox); 1121 void sys_trace_k_mbox_message_put_enter(struct k_mbox *mbox, 1122 struct k_mbox_msg *tx_msg, k_timeout_t timeout); 1123 void sys_trace_k_mbox_message_put_blocking(struct k_mbox *mbox, 1124 struct k_mbox_msg *tx_msg, k_timeout_t timeout); 1125 void sys_trace_k_mbox_message_put_exit(struct k_mbox *mbox, 1126 struct k_mbox_msg *tx_msg, k_timeout_t timeout, int ret); 1127 void sys_trace_k_mbox_put_enter(struct k_mbox *mbox, 1128 struct k_mbox_msg *tx_msg, k_timeout_t timeout); 1129 void sys_trace_k_mbox_put_exit(struct k_mbox *mbox, struct k_mbox_msg *tx_msg, 1130 k_timeout_t timeout, int ret); 1131 void sys_trace_k_mbox_async_put_enter(struct k_mbox *mbox, struct k_sem *sem); 1132 void sys_trace_k_mbox_async_put_exit(struct k_mbox *mbox, struct k_sem *sem); 1133 void sys_trace_k_mbox_get_enter(struct k_mbox *mbox, 1134 struct k_mbox_msg *rx_msg, void *buffer, k_timeout_t timeout); 1135 void sys_trace_k_mbox_get_blocking(struct k_mbox *mbox, 1136 struct k_mbox_msg *rx_msg, void *buffer, k_timeout_t timeout); 1137 void sys_trace_k_mbox_get_exit(struct k_mbox *mbox, struct k_mbox_msg *rx_msg, 1138 void *buffer, k_timeout_t timeout, int ret); 1139 void sys_trace_k_mbox_data_get(struct k_mbox_msg *rx_msg, void *buffer); 1140 1141 1142 /* Pipe trace function declarations */ 1143 void sys_trace_k_pipe_init(struct k_pipe *pipe, unsigned char *buffer, 1144 size_t size); 1145 void sys_trace_k_pipe_cleanup_enter(struct k_pipe *pipe); 1146 void sys_trace_k_pipe_cleanup_exit(struct k_pipe *pipe, int ret); 1147 void sys_trace_k_pipe_alloc_init_enter(struct k_pipe *pipe, size_t size); 1148 void sys_trace_k_pipe_alloc_init_exit(struct k_pipe *pipe, size_t size, 1149 int ret); 1150 void sys_trace_k_pipe_put_enter(struct k_pipe *pipe, void *data, 1151 size_t bytes_to_write, size_t *bytes_written, size_t min_xfer, 1152 k_timeout_t timeout); 1153 void sys_trace_k_pipe_put_blocking(struct k_pipe *pipe, void *data, 1154 size_t bytes_to_write, size_t *bytes_written, size_t min_xfer, 1155 k_timeout_t timeout); 1156 void sys_trace_k_pipe_put_exit(struct k_pipe *pipe, void *data, 1157 size_t bytes_to_write, size_t *bytes_written, size_t min_xfer, 1158 k_timeout_t timeout, int ret); 1159 void sys_trace_k_pipe_get_enter(struct k_pipe *pipe, void *data, 1160 size_t bytes_to_read, size_t *bytes_read, size_t min_xfer, k_timeout_t timeout); 1161 void sys_trace_k_pipe_get_blocking(struct k_pipe *pipe, void *data, 1162 size_t bytes_to_read, size_t *bytes_read, size_t min_xfer, k_timeout_t timeout); 1163 void sys_trace_k_pipe_get_exit(struct k_pipe *pipe, void *data, 1164 size_t bytes_to_read, size_t *bytes_read, size_t min_xfer, 1165 k_timeout_t timeout, int ret); 1166 void sys_trace_k_pipe_block_put_enter(struct k_pipe *pipe, 1167 struct k_mem_block *block, size_t size, struct k_sem *sem); 1168 void sys_trace_k_pipe_block_put_exit(struct k_pipe *pipe, 1169 struct k_mem_block *block, size_t size, struct k_sem *sem); 1170 1171 1172 /* Message queue trace function declarations */ 1173 void sys_trace_k_msgq_init(struct k_msgq *msgq); 1174 void sys_trace_k_msgq_alloc_init_enter(struct k_msgq *msgq, size_t msg_size, 1175 uint32_t max_msgs); 1176 void sys_trace_k_msgq_alloc_init_exit(struct k_msgq *msgq, size_t msg_size, 1177 uint32_t max_msgs, int ret); 1178 void sys_trace_k_msgq_cleanup_enter(struct k_msgq *msgq); 1179 void sys_trace_k_msgq_cleanup_exit(struct k_msgq *msgq, int ret); 1180 void sys_trace_k_msgq_put_enter(struct k_msgq *msgq, const void *data, 1181 k_timeout_t timeout); 1182 void sys_trace_k_msgq_put_blocking(struct k_msgq *msgq, const void *data, 1183 k_timeout_t timeout); 1184 void sys_trace_k_msgq_put_exit(struct k_msgq *msgq, const void *data, 1185 k_timeout_t timeout, int ret); 1186 void sys_trace_k_msgq_get_enter(struct k_msgq *msgq, const void *data, 1187 k_timeout_t timeout); 1188 void sys_trace_k_msgq_get_blocking(struct k_msgq *msgq, const void *data, 1189 k_timeout_t timeout); 1190 void sys_trace_k_msgq_get_exit(struct k_msgq *msgq, const void *data, 1191 k_timeout_t timeout, int ret); 1192 void sys_trace_k_msgq_peek(struct k_msgq *msgq, void *data, int ret); 1193 void sys_trace_k_msgq_purge(struct k_msgq *msgq); 1194 1195 1196 /* Heap trace function declarations */ 1197 void sys_trace_k_heap_init(struct k_heap *h, void *mem, size_t bytes); 1198 void sys_trace_k_heap_alloc_enter(struct k_heap *h, size_t bytes, 1199 k_timeout_t timeout); 1200 void sys_trace_k_heap_alloc_exit(struct k_heap *h, size_t bytes, 1201 k_timeout_t timeout, void *ret); 1202 void sys_trace_k_heap_aligned_alloc_enter(struct k_heap *h, size_t bytes, 1203 k_timeout_t timeout); 1204 void sys_trace_k_heap_aligned_alloc_blocking(struct k_heap *h, size_t bytes, 1205 k_timeout_t timeout); 1206 void sys_trace_k_heap_aligned_alloc_exit(struct k_heap *h, size_t bytes, 1207 k_timeout_t timeout, void *ret); 1208 void sys_trace_k_heap_free(struct k_heap *h, void *mem); 1209 void sys_trace_k_heap_sys_k_aligned_alloc_enter(struct k_heap *h, 1210 size_t align, size_t size); 1211 void sys_trace_k_heap_sys_k_aligned_alloc_exit(struct k_heap *h, size_t align, 1212 size_t size, void *ret); 1213 void sys_trace_k_heap_sys_k_malloc_enter(struct k_heap *h, size_t size); 1214 void sys_trace_k_heap_sys_k_malloc_exit(struct k_heap *h, size_t size, 1215 void *ret); 1216 void sys_trace_k_heap_sys_k_free_enter(struct k_heap *h); 1217 void sys_trace_k_heap_sys_k_free_exit(struct k_heap *h); 1218 void sys_trace_k_heap_sys_k_calloc_enter(struct k_heap *h, size_t nmemb, 1219 size_t size); 1220 void sys_trace_k_heap_sys_k_calloc_exit(struct k_heap *h, size_t nmemb, 1221 size_t size, void *ret); 1222 1223 1224 /* Memory slab trace function declarations */ 1225 void sys_trace_k_mem_slab_init(struct k_mem_slab *slab, void *buffer, 1226 size_t block_size, uint32_t num_blocks, int ret); 1227 void sys_trace_k_mem_slab_alloc_enter(struct k_mem_slab *slab, void **mem, 1228 k_timeout_t timeout); 1229 void sys_trace_k_mem_slab_alloc_blocking(struct k_mem_slab *slab, void **mem, 1230 k_timeout_t timeout); 1231 void sys_trace_k_mem_slab_alloc_exit(struct k_mem_slab *slab, void **mem, 1232 k_timeout_t timeout, int ret); 1233 void sys_trace_k_mem_slab_free_exit(struct k_mem_slab *slab, void **mem); 1234 1235 1236 /* Timer trace function declarations */ 1237 void sys_trace_k_timer_init(struct k_timer *timer, k_timer_expiry_t expiry_fn, 1238 k_timer_expiry_t stop_fn); 1239 void sys_trace_k_timer_start(struct k_timer *timer, k_timeout_t duration, 1240 k_timeout_t period); 1241 void sys_trace_k_timer_stop(struct k_timer *timer); 1242 void sys_trace_k_timer_status_sync_blocking(struct k_timer *timer); 1243 void sys_trace_k_timer_status_sync_exit(struct k_timer *timer, 1244 uint32_t result); 1245 1246 1247 /* Syscall trace function declarations */ 1248 void sys_trace_syscall_enter(uint32_t id, const char *name); 1249 void sys_trace_syscall_exit(uint32_t id, const char *name); 1250 1251 1252 /* Legacy trace functions that are pending refactoring/removal by 1253 * the Zephyr team. 1254 */ 1255 void sys_trace_idle(void); 1256 void sys_trace_isr_enter(void); 1257 void sys_trace_isr_exit(void); 1258 1259 #endif /*_TRACE_TRACERECORDER_H*/ 1260