1 /* 2 * Copyright (c) 2020 Lexmark International, Inc. 3 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7 8 #ifndef _TRACE_USER_H 9 #define _TRACE_USER_H 10 #include <zephyr/device.h> 11 #include <zephyr/kernel.h> 12 #include <zephyr/init.h> 13 14 #ifdef __cplusplus 15 extern "C" { 16 #endif 17 18 void sys_trace_thread_create_user(struct k_thread *thread); 19 void sys_trace_thread_abort_user(struct k_thread *thread); 20 void sys_trace_thread_suspend_user(struct k_thread *thread); 21 void sys_trace_thread_resume_user(struct k_thread *thread); 22 void sys_trace_thread_name_set_user(struct k_thread *thread); 23 void sys_trace_thread_switched_in_user(void); 24 void sys_trace_thread_switched_out_user(void); 25 void sys_trace_thread_info_user(struct k_thread *thread); 26 void sys_trace_thread_priority_set_user(struct k_thread *thread, int prio); 27 void sys_trace_thread_sched_ready_user(struct k_thread *thread); 28 void sys_trace_thread_pend_user(struct k_thread *thread); 29 void sys_trace_isr_enter_user(void); 30 void sys_trace_isr_exit_user(void); 31 void sys_trace_idle_user(void); 32 void sys_trace_sys_init_enter_user(const struct init_entry *entry, int level); 33 void sys_trace_sys_init_exit_user(const struct init_entry *entry, int level, int result); 34 35 void sys_trace_thread_create(struct k_thread *thread); 36 void sys_trace_thread_abort(struct k_thread *thread); 37 void sys_trace_thread_suspend(struct k_thread *thread); 38 void sys_trace_thread_resume(struct k_thread *thread); 39 void sys_trace_thread_name_set(struct k_thread *thread); 40 void sys_trace_k_thread_switched_in(void); 41 void sys_trace_k_thread_switched_out(void); 42 void sys_trace_thread_info(struct k_thread *thread); 43 void sys_trace_thread_sched_priority_set(struct k_thread *thread, int prio); 44 void sys_trace_thread_sched_ready(struct k_thread *thread); 45 void sys_trace_thread_pend(struct k_thread *thread); 46 void sys_trace_isr_enter(void); 47 void sys_trace_isr_exit(void); 48 void sys_trace_idle(void); 49 void sys_trace_sys_init_enter(const struct init_entry *entry, int level); 50 void sys_trace_sys_init_exit(const struct init_entry *entry, int level, int result); 51 52 struct gpio_callback; 53 typedef uint8_t gpio_pin_t; 54 typedef uint32_t gpio_flags_t; 55 typedef uint32_t gpio_port_pins_t; 56 typedef uint32_t gpio_port_value_t; 57 typedef void (*gpio_callback_handler_t)(const struct device *port, struct gpio_callback *cb, 58 gpio_port_pins_t pins); 59 void sys_trace_gpio_pin_interrupt_configure_enter_user(const struct device *port, gpio_pin_t pin, 60 gpio_flags_t flags); 61 void sys_trace_gpio_pin_interrupt_configure_exit_user(const struct device *port, gpio_pin_t pin, 62 int ret); 63 void sys_trace_gpio_pin_configure_enter_user(const struct device *port, gpio_pin_t pin, 64 gpio_flags_t flags); 65 void sys_trace_gpio_pin_configure_exit_user(const struct device *port, gpio_pin_t pin, int ret); 66 void sys_trace_gpio_port_get_direction_enter_user(const struct device *port, gpio_port_pins_t map, 67 gpio_port_pins_t inputs, 68 gpio_port_pins_t outputs); 69 void sys_trace_gpio_port_get_direction_exit_user(const struct device *port, int ret); 70 void sys_trace_gpio_pin_get_config_enter_user(const struct device *port, gpio_pin_t pin, int ret); 71 void sys_trace_gpio_pin_get_config_exit_user(const struct device *port, gpio_pin_t pin, int ret); 72 void sys_trace_gpio_port_get_raw_enter_user(const struct device *port, gpio_port_value_t *value); 73 void sys_trace_gpio_port_get_raw_exit_user(const struct device *port, int ret); 74 void sys_trace_gpio_port_set_masked_raw_enter_user(const struct device *port, gpio_port_pins_t mask, 75 gpio_port_value_t value); 76 void sys_trace_gpio_port_set_masked_raw_exit_user(const struct device *port, int ret); 77 void sys_trace_gpio_port_set_bits_raw_enter_user(const struct device *port, gpio_port_pins_t pins); 78 void sys_trace_gpio_port_set_bits_raw_exit_user(const struct device *port, int ret); 79 void sys_trace_gpio_port_clear_bits_raw_enter_user(const struct device *port, 80 gpio_port_pins_t pins); 81 void sys_trace_gpio_port_clear_bits_raw_exit_user(const struct device *port, int ret); 82 void sys_trace_gpio_port_toggle_bits_enter_user(const struct device *port, gpio_port_pins_t pins); 83 void sys_trace_gpio_port_toggle_bits_exit_user(const struct device *port, int ret); 84 void sys_trace_gpio_init_callback_enter_user(struct gpio_callback *callback, 85 gpio_callback_handler_t handler, 86 gpio_port_pins_t pin_mask); 87 void sys_trace_gpio_init_callback_exit_user(struct gpio_callback *callback); 88 void sys_trace_gpio_add_callback_enter_user(const struct device *port, 89 struct gpio_callback *callback); 90 void sys_trace_gpio_add_callback_exit_user(const struct device *port, int ret); 91 void sys_trace_gpio_remove_callback_enter_user(const struct device *port, 92 struct gpio_callback *callback); 93 void sys_trace_gpio_remove_callback_exit_user(const struct device *port, int ret); 94 void sys_trace_gpio_get_pending_int_enter_user(const struct device *dev); 95 void sys_trace_gpio_get_pending_int_exit_user(const struct device *dev, int ret); 96 void sys_trace_gpio_fire_callbacks_enter_user(sys_slist_t *list, const struct device *port, 97 gpio_pin_t pins); 98 void sys_trace_gpio_fire_callback_user(const struct device *port, struct gpio_callback *callback); 99 100 #define sys_port_trace_k_thread_foreach_enter() 101 #define sys_port_trace_k_thread_foreach_exit() 102 #define sys_port_trace_k_thread_foreach_unlocked_enter() 103 #define sys_port_trace_k_thread_foreach_unlocked_exit() 104 #define sys_port_trace_k_thread_create(new_thread) sys_trace_thread_create(new_thread) 105 #define sys_port_trace_k_thread_user_mode_enter() 106 #define sys_port_trace_k_thread_heap_assign(thread, heap) 107 #define sys_port_trace_k_thread_join_enter(thread, timeout) 108 #define sys_port_trace_k_thread_join_blocking(thread, timeout) 109 #define sys_port_trace_k_thread_join_exit(thread, timeout, ret) 110 #define sys_port_trace_k_thread_sleep_enter(timeout) 111 #define sys_port_trace_k_thread_sleep_exit(timeout, ret) 112 #define sys_port_trace_k_thread_msleep_enter(ms) 113 #define sys_port_trace_k_thread_msleep_exit(ms, ret) 114 #define sys_port_trace_k_thread_usleep_enter(us) 115 #define sys_port_trace_k_thread_usleep_exit(us, ret) 116 #define sys_port_trace_k_thread_busy_wait_enter(usec_to_wait) 117 #define sys_port_trace_k_thread_busy_wait_exit(usec_to_wait) 118 #define sys_port_trace_k_thread_yield() 119 #define sys_port_trace_k_thread_wakeup(thread) 120 #define sys_port_trace_k_thread_start(thread) 121 #define sys_port_trace_k_thread_abort(thread) sys_trace_thread_abort(thread) 122 #define sys_port_trace_k_thread_suspend_enter(thread) sys_trace_thread_suspend(thread) 123 #define sys_port_trace_k_thread_suspend_exit(thread) 124 #define sys_port_trace_k_thread_resume_enter(thread) sys_trace_thread_resume(thread) 125 #define sys_port_trace_k_thread_sched_lock() 126 #define sys_port_trace_k_thread_sched_unlock() 127 #define sys_port_trace_k_thread_name_set(thread, ret) sys_trace_thread_name_set(thread) 128 #define sys_port_trace_k_thread_switched_out() sys_trace_k_thread_switched_out() 129 #define sys_port_trace_k_thread_switched_in() sys_trace_k_thread_switched_in() 130 #define sys_port_trace_k_thread_info(thread) sys_trace_thread_info(thread) 131 132 #define sys_port_trace_k_thread_sched_wakeup(thread) 133 #define sys_port_trace_k_thread_sched_abort(thread) 134 #define sys_port_trace_k_thread_sched_priority_set(thread, prio) \ 135 sys_trace_thread_sched_priority_set(thread, prio) 136 #define sys_port_trace_k_thread_sched_ready(thread) sys_trace_thread_sched_ready(thread) 137 #define sys_port_trace_k_thread_sched_pend(thread) sys_trace_thread_pend(thread) 138 #define sys_port_trace_k_thread_sched_resume(thread) 139 #define sys_port_trace_k_thread_sched_suspend(thread) 140 141 #define sys_port_trace_k_work_init(work) 142 #define sys_port_trace_k_work_submit_to_queue_enter(queue, work) 143 #define sys_port_trace_k_work_submit_to_queue_exit(queue, work, ret) 144 #define sys_port_trace_k_work_submit_enter(work) 145 #define sys_port_trace_k_work_submit_exit(work, ret) 146 #define sys_port_trace_k_work_flush_enter(work) 147 #define sys_port_trace_k_work_flush_blocking(work, timeout) 148 #define sys_port_trace_k_work_flush_exit(work, ret) 149 #define sys_port_trace_k_work_cancel_enter(work) 150 #define sys_port_trace_k_work_cancel_exit(work, ret) 151 #define sys_port_trace_k_work_cancel_sync_enter(work, sync) 152 #define sys_port_trace_k_work_cancel_sync_blocking(work, sync) 153 #define sys_port_trace_k_work_cancel_sync_exit(work, sync, ret) 154 155 #define sys_port_trace_k_work_queue_init(queue) 156 #define sys_port_trace_k_work_queue_start_enter(queue) 157 #define sys_port_trace_k_work_queue_start_exit(queue) 158 #define sys_port_trace_k_work_queue_stop_enter(queue, timeout) 159 #define sys_port_trace_k_work_queue_stop_blocking(queue, timeout) 160 #define sys_port_trace_k_work_queue_stop_exit(queue, timeout, ret) 161 #define sys_port_trace_k_work_queue_drain_enter(queue) 162 #define sys_port_trace_k_work_queue_drain_exit(queue, ret) 163 #define sys_port_trace_k_work_queue_unplug_enter(queue) 164 #define sys_port_trace_k_work_queue_unplug_exit(queue, ret) 165 166 #define sys_port_trace_k_work_delayable_init(dwork) 167 #define sys_port_trace_k_work_schedule_for_queue_enter(queue, dwork, delay) 168 #define sys_port_trace_k_work_schedule_for_queue_exit(queue, dwork, delay, \ 169 ret) 170 #define sys_port_trace_k_work_schedule_enter(dwork, delay) 171 #define sys_port_trace_k_work_schedule_exit(dwork, delay, ret) 172 #define sys_port_trace_k_work_reschedule_for_queue_enter(queue, dwork, delay) 173 #define sys_port_trace_k_work_reschedule_for_queue_exit(queue, dwork, delay, \ 174 ret) 175 #define sys_port_trace_k_work_reschedule_enter(dwork, delay) 176 #define sys_port_trace_k_work_reschedule_exit(dwork, delay, ret) 177 #define sys_port_trace_k_work_flush_delayable_enter(dwork, sync) 178 #define sys_port_trace_k_work_flush_delayable_exit(dwork, sync, ret) 179 #define sys_port_trace_k_work_cancel_delayable_enter(dwork) 180 #define sys_port_trace_k_work_cancel_delayable_exit(dwork, ret) 181 #define sys_port_trace_k_work_cancel_delayable_sync_enter(dwork, sync) 182 #define sys_port_trace_k_work_cancel_delayable_sync_exit(dwork, sync, ret) 183 184 #define sys_port_trace_k_work_poll_init_enter(work) 185 #define sys_port_trace_k_work_poll_init_exit(work) 186 #define sys_port_trace_k_work_poll_submit_to_queue_enter(work_q, work, \ 187 timeout) 188 #define sys_port_trace_k_work_poll_submit_to_queue_blocking(work_q, work, \ 189 timeout) 190 #define sys_port_trace_k_work_poll_submit_to_queue_exit(work_q, work, timeout, \ 191 ret) 192 #define sys_port_trace_k_work_poll_submit_enter(work, timeout) 193 #define sys_port_trace_k_work_poll_submit_exit(work, timeout, ret) 194 #define sys_port_trace_k_work_poll_cancel_enter(work) 195 #define sys_port_trace_k_work_poll_cancel_exit(work, ret) 196 197 #define sys_port_trace_k_poll_api_event_init(event) 198 #define sys_port_trace_k_poll_api_poll_enter(events) 199 #define sys_port_trace_k_poll_api_poll_exit(events, ret) 200 #define sys_port_trace_k_poll_api_signal_init(signal) 201 #define sys_port_trace_k_poll_api_signal_reset(signal) 202 #define sys_port_trace_k_poll_api_signal_check(signal) 203 #define sys_port_trace_k_poll_api_signal_raise(signal, ret) 204 205 #define sys_port_trace_k_sem_init(sem, ret) 206 #define sys_port_trace_k_sem_give_enter(sem) 207 #define sys_port_trace_k_sem_give_exit(sem) 208 #define sys_port_trace_k_sem_take_enter(sem, timeout) 209 #define sys_port_trace_k_sem_take_blocking(sem, timeout) 210 #define sys_port_trace_k_sem_take_exit(sem, timeout, ret) 211 #define sys_port_trace_k_sem_reset(sem) 212 213 #define sys_port_trace_k_mutex_init(mutex, ret) 214 #define sys_port_trace_k_mutex_lock_enter(mutex, timeout) 215 #define sys_port_trace_k_mutex_lock_blocking(mutex, timeout) 216 #define sys_port_trace_k_mutex_lock_exit(mutex, timeout, ret) 217 #define sys_port_trace_k_mutex_unlock_enter(mutex) 218 #define sys_port_trace_k_mutex_unlock_exit(mutex, ret) 219 220 #define sys_port_trace_k_condvar_init(condvar, ret) 221 #define sys_port_trace_k_condvar_signal_enter(condvar) 222 #define sys_port_trace_k_condvar_signal_blocking(condvar, timeout) 223 #define sys_port_trace_k_condvar_signal_exit(condvar, ret) 224 #define sys_port_trace_k_condvar_broadcast_enter(condvar) 225 #define sys_port_trace_k_condvar_broadcast_exit(condvar, ret) 226 #define sys_port_trace_k_condvar_wait_enter(condvar) 227 #define sys_port_trace_k_condvar_wait_exit(condvar, ret) 228 229 #define sys_port_trace_k_queue_init(queue) 230 #define sys_port_trace_k_queue_cancel_wait(queue) 231 #define sys_port_trace_k_queue_queue_insert_enter(queue, alloc) 232 #define sys_port_trace_k_queue_queue_insert_blocking(queue, alloc, timeout) 233 #define sys_port_trace_k_queue_queue_insert_exit(queue, alloc, ret) 234 #define sys_port_trace_k_queue_append_enter(queue) 235 #define sys_port_trace_k_queue_append_exit(queue) 236 #define sys_port_trace_k_queue_alloc_append_enter(queue) 237 #define sys_port_trace_k_queue_alloc_append_exit(queue, ret) 238 #define sys_port_trace_k_queue_prepend_enter(queue) 239 #define sys_port_trace_k_queue_prepend_exit(queue) 240 #define sys_port_trace_k_queue_alloc_prepend_enter(queue) 241 #define sys_port_trace_k_queue_alloc_prepend_exit(queue, ret) 242 #define sys_port_trace_k_queue_insert_enter(queue) 243 #define sys_port_trace_k_queue_insert_blocking(queue, timeout) 244 #define sys_port_trace_k_queue_insert_exit(queue) 245 #define sys_port_trace_k_queue_append_list_enter(queue) 246 #define sys_port_trace_k_queue_append_list_exit(queue, ret) 247 #define sys_port_trace_k_queue_merge_slist_enter(queue) 248 #define sys_port_trace_k_queue_merge_slist_exit(queue, ret) 249 #define sys_port_trace_k_queue_get_enter(queue, timeout) 250 #define sys_port_trace_k_queue_get_blocking(queue, timeout) 251 #define sys_port_trace_k_queue_get_exit(queue, timeout, ret) 252 #define sys_port_trace_k_queue_remove_enter(queue) 253 #define sys_port_trace_k_queue_remove_exit(queue, ret) 254 #define sys_port_trace_k_queue_unique_append_enter(queue) 255 #define sys_port_trace_k_queue_unique_append_exit(queue, ret) 256 #define sys_port_trace_k_queue_peek_head(queue, ret) 257 #define sys_port_trace_k_queue_peek_tail(queue, ret) 258 259 #define sys_port_trace_k_fifo_init_enter(fifo) 260 #define sys_port_trace_k_fifo_init_exit(fifo) 261 #define sys_port_trace_k_fifo_cancel_wait_enter(fifo) 262 #define sys_port_trace_k_fifo_cancel_wait_exit(fifo) 263 #define sys_port_trace_k_fifo_put_enter(fifo, data) 264 #define sys_port_trace_k_fifo_put_exit(fifo, data) 265 #define sys_port_trace_k_fifo_alloc_put_enter(fifo, data) 266 #define sys_port_trace_k_fifo_alloc_put_exit(fifo, data, ret) 267 #define sys_port_trace_k_fifo_put_list_enter(fifo, head, tail) 268 #define sys_port_trace_k_fifo_put_list_exit(fifo, head, tail) 269 #define sys_port_trace_k_fifo_put_slist_enter(fifo, list) 270 #define sys_port_trace_k_fifo_put_slist_exit(fifo, list) 271 #define sys_port_trace_k_fifo_get_enter(fifo, timeout) 272 #define sys_port_trace_k_fifo_get_exit(fifo, timeout, ret) 273 #define sys_port_trace_k_fifo_peek_head_enter(fifo) 274 #define sys_port_trace_k_fifo_peek_head_exit(fifo, ret) 275 #define sys_port_trace_k_fifo_peek_tail_enter(fifo) 276 #define sys_port_trace_k_fifo_peek_tail_exit(fifo, ret) 277 278 #define sys_port_trace_k_lifo_init_enter(lifo) 279 #define sys_port_trace_k_lifo_init_exit(lifo) 280 #define sys_port_trace_k_lifo_put_enter(lifo, data) 281 #define sys_port_trace_k_lifo_put_exit(lifo, data) 282 #define sys_port_trace_k_lifo_alloc_put_enter(lifo, data) 283 #define sys_port_trace_k_lifo_alloc_put_exit(lifo, data, ret) 284 #define sys_port_trace_k_lifo_get_enter(lifo, timeout) 285 #define sys_port_trace_k_lifo_get_exit(lifo, timeout, ret) 286 287 #define sys_port_trace_k_stack_init(stack) 288 #define sys_port_trace_k_stack_alloc_init_enter(stack) 289 #define sys_port_trace_k_stack_alloc_init_exit(stack, ret) 290 #define sys_port_trace_k_stack_cleanup_enter(stack) 291 #define sys_port_trace_k_stack_cleanup_exit(stack, ret) 292 #define sys_port_trace_k_stack_push_enter(stack) 293 #define sys_port_trace_k_stack_push_exit(stack, ret) 294 #define sys_port_trace_k_stack_pop_enter(stack, timeout) 295 #define sys_port_trace_k_stack_pop_blocking(stack, timeout) 296 #define sys_port_trace_k_stack_pop_exit(stack, timeout, ret) 297 298 #define sys_port_trace_k_msgq_init(msgq) 299 #define sys_port_trace_k_msgq_alloc_init_enter(msgq) 300 #define sys_port_trace_k_msgq_alloc_init_exit(msgq, ret) 301 #define sys_port_trace_k_msgq_cleanup_enter(msgq) 302 #define sys_port_trace_k_msgq_cleanup_exit(msgq, ret) 303 #define sys_port_trace_k_msgq_put_enter(msgq, timeout) 304 #define sys_port_trace_k_msgq_put_blocking(msgq, timeout) 305 #define sys_port_trace_k_msgq_put_exit(msgq, timeout, ret) 306 #define sys_port_trace_k_msgq_get_enter(msgq, timeout) 307 #define sys_port_trace_k_msgq_get_blocking(msgq, timeout) 308 #define sys_port_trace_k_msgq_get_exit(msgq, timeout, ret) 309 #define sys_port_trace_k_msgq_peek(msgq, ret) 310 #define sys_port_trace_k_msgq_purge(msgq) 311 312 #define sys_port_trace_k_mbox_init(mbox) 313 #define sys_port_trace_k_mbox_message_put_enter(mbox, timeout) 314 #define sys_port_trace_k_mbox_message_put_blocking(mbox, timeout) 315 #define sys_port_trace_k_mbox_message_put_exit(mbox, timeout, ret) 316 #define sys_port_trace_k_mbox_put_enter(mbox, timeout) 317 #define sys_port_trace_k_mbox_put_exit(mbox, timeout, ret) 318 #define sys_port_trace_k_mbox_async_put_enter(mbox, sem) 319 #define sys_port_trace_k_mbox_async_put_exit(mbox, sem) 320 #define sys_port_trace_k_mbox_get_enter(mbox, timeout) 321 #define sys_port_trace_k_mbox_get_blocking(mbox, timeout) 322 #define sys_port_trace_k_mbox_get_exit(mbox, timeout, ret) 323 #define sys_port_trace_k_mbox_data_get(rx_msg) 324 325 #define sys_port_trace_k_pipe_init(pipe) 326 #define sys_port_trace_k_pipe_cleanup_enter(pipe) 327 #define sys_port_trace_k_pipe_cleanup_exit(pipe, ret) 328 #define sys_port_trace_k_pipe_alloc_init_enter(pipe) 329 #define sys_port_trace_k_pipe_alloc_init_exit(pipe, ret) 330 #define sys_port_trace_k_pipe_flush_enter(pipe) 331 #define sys_port_trace_k_pipe_flush_exit(pipe) 332 #define sys_port_trace_k_pipe_buffer_flush_enter(pipe) 333 #define sys_port_trace_k_pipe_buffer_flush_exit(pipe) 334 #define sys_port_trace_k_pipe_put_enter(pipe, timeout) 335 #define sys_port_trace_k_pipe_put_blocking(pipe, timeout) 336 #define sys_port_trace_k_pipe_put_exit(pipe, timeout, ret) 337 #define sys_port_trace_k_pipe_get_enter(pipe, timeout) 338 #define sys_port_trace_k_pipe_get_blocking(pipe, timeout) 339 #define sys_port_trace_k_pipe_get_exit(pipe, timeout, ret) 340 341 #define sys_port_trace_k_heap_init(heap) 342 #define sys_port_trace_k_heap_aligned_alloc_enter(heap, timeout) 343 #define sys_port_trace_k_heap_aligned_alloc_blocking(heap, timeout) 344 #define sys_port_trace_k_heap_aligned_alloc_exit(heap, timeout, ret) 345 #define sys_port_trace_k_heap_alloc_enter(heap, timeout) 346 #define sys_port_trace_k_heap_alloc_exit(heap, timeout, ret) 347 #define sys_port_trace_k_heap_calloc_enter(heap, timeout) 348 #define sys_port_trace_k_heap_calloc_exit(heap, timeout, ret) 349 #define sys_port_trace_k_heap_free(heap) 350 #define sys_port_trace_k_heap_realloc_enter(h, ptr, bytes, timeout) 351 #define sys_port_trace_k_heap_realloc_exit(h, ptr, bytes, timeout, ret) 352 #define sys_port_trace_k_heap_sys_k_aligned_alloc_enter(heap) 353 #define sys_port_trace_k_heap_sys_k_aligned_alloc_exit(heap, ret) 354 #define sys_port_trace_k_heap_sys_k_malloc_enter(heap) 355 #define sys_port_trace_k_heap_sys_k_malloc_exit(heap, ret) 356 #define sys_port_trace_k_heap_sys_k_free_enter(heap, heap_ref) 357 #define sys_port_trace_k_heap_sys_k_free_exit(heap, heap_ref) 358 #define sys_port_trace_k_heap_sys_k_calloc_enter(heap) 359 #define sys_port_trace_k_heap_sys_k_calloc_exit(heap, ret) 360 #define sys_port_trace_k_heap_sys_k_realloc_enter(heap, ptr) 361 #define sys_port_trace_k_heap_sys_k_realloc_exit(heap, ptr, ret) 362 363 #define sys_port_trace_k_mem_slab_init(slab, rc) 364 #define sys_port_trace_k_mem_slab_alloc_enter(slab, timeout) 365 #define sys_port_trace_k_mem_slab_alloc_blocking(slab, timeout) 366 #define sys_port_trace_k_mem_slab_alloc_exit(slab, timeout, ret) 367 #define sys_port_trace_k_mem_slab_free_enter(slab) 368 #define sys_port_trace_k_mem_slab_free_exit(slab) 369 370 #define sys_port_trace_k_timer_init(timer) 371 #define sys_port_trace_k_timer_start(timer, duration, period) 372 #define sys_port_trace_k_timer_stop(timer) 373 #define sys_port_trace_k_timer_status_sync_enter(timer) 374 #define sys_port_trace_k_timer_status_sync_blocking(timer, timeout) 375 #define sys_port_trace_k_timer_status_sync_exit(timer, result) 376 377 #define sys_port_trace_k_event_init(event) 378 #define sys_port_trace_k_event_post_enter(event, events, events_mask) 379 #define sys_port_trace_k_event_post_exit(event, events, events_mask) 380 #define sys_port_trace_k_event_wait_enter(event, events, options, timeout) 381 #define sys_port_trace_k_event_wait_blocking(event, events, options, timeout) 382 #define sys_port_trace_k_event_wait_exit(event, events, ret) 383 384 #define sys_port_trace_k_thread_abort_exit(thread) 385 #define sys_port_trace_k_thread_abort_enter(thread) 386 #define sys_port_trace_k_thread_resume_exit(thread) 387 388 #define sys_port_trace_pm_system_suspend_enter(ticks) 389 #define sys_port_trace_pm_system_suspend_exit(ticks, state) 390 391 #define sys_port_trace_pm_device_runtime_get_enter(dev) 392 #define sys_port_trace_pm_device_runtime_get_exit(dev, ret) 393 #define sys_port_trace_pm_device_runtime_put_enter(dev) 394 #define sys_port_trace_pm_device_runtime_put_exit(dev, ret) 395 #define sys_port_trace_pm_device_runtime_put_async_enter(dev, delay) 396 #define sys_port_trace_pm_device_runtime_put_async_exit(dev, delay, ret) 397 #define sys_port_trace_pm_device_runtime_enable_enter(dev) 398 #define sys_port_trace_pm_device_runtime_enable_exit(dev, ret) 399 #define sys_port_trace_pm_device_runtime_disable_enter(dev) 400 #define sys_port_trace_pm_device_runtime_disable_exit(dev, ret) 401 402 #define sys_port_trace_socket_init(sock, family, type, proto) 403 #define sys_port_trace_socket_close_enter(sock) 404 #define sys_port_trace_socket_close_exit(sock, ret) 405 #define sys_port_trace_socket_shutdown_enter(sock, how) 406 #define sys_port_trace_socket_shutdown_exit(sock, ret) 407 #define sys_port_trace_socket_bind_enter(sock, addr, addrlen) 408 #define sys_port_trace_socket_bind_exit(sock, ret) 409 #define sys_port_trace_socket_connect_enter(sock, addr, addrlen) 410 #define sys_port_trace_socket_connect_exit(sock, ret) 411 #define sys_port_trace_socket_listen_enter(sock, backlog) 412 #define sys_port_trace_socket_listen_exit(sock, ret) 413 #define sys_port_trace_socket_accept_enter(sock) 414 #define sys_port_trace_socket_accept_exit(sock, addr, addrlen, ret) 415 #define sys_port_trace_socket_sendto_enter(sock, len, flags, dest_addr, addrlen) 416 #define sys_port_trace_socket_sendto_exit(sock, ret) 417 #define sys_port_trace_socket_sendmsg_enter(sock, msg, flags) 418 #define sys_port_trace_socket_sendmsg_exit(sock, ret) 419 #define sys_port_trace_socket_recvfrom_enter(sock, max_len, flags, addr, addrlen) 420 #define sys_port_trace_socket_recvfrom_exit(sock, src_addr, addrlen, ret) 421 #define sys_port_trace_socket_recvmsg_enter(sock, msg, flags) 422 #define sys_port_trace_socket_recvmsg_exit(sock, msg, ret) 423 #define sys_port_trace_socket_fcntl_enter(sock, cmd, flags) 424 #define sys_port_trace_socket_fcntl_exit(sock, ret) 425 #define sys_port_trace_socket_ioctl_enter(sock, req) 426 #define sys_port_trace_socket_ioctl_exit(sock, ret) 427 #define sys_port_trace_socket_poll_enter(fds, nfds, timeout) 428 #define sys_port_trace_socket_poll_exit(fds, nfds, ret) 429 #define sys_port_trace_socket_getsockopt_enter(sock, level, optname) 430 #define sys_port_trace_socket_getsockopt_exit(sock, level, optname, optval, optlen, ret) 431 #define sys_port_trace_socket_setsockopt_enter(sock, level, optname, optval, optlen) 432 #define sys_port_trace_socket_setsockopt_exit(sock, ret) 433 #define sys_port_trace_socket_getpeername_enter(sock) 434 #define sys_port_trace_socket_getpeername_exit(sock, addr, addrlen, ret) 435 #define sys_port_trace_socket_getsockname_enter(sock) 436 #define sys_port_trace_socket_getsockname_exit(sock, addr, addrlen, ret) 437 #define sys_port_trace_socket_socketpair_enter(family, type, proto, sv) 438 #define sys_port_trace_socket_socketpair_exit(sockA, sockB, ret) 439 440 #define sys_port_trace_net_recv_data_enter(iface, pkt) 441 #define sys_port_trace_net_recv_data_exit(iface, pkt, ret) 442 #define sys_port_trace_net_send_data_enter(pkt) 443 #define sys_port_trace_net_send_data_exit(pkt, ret) 444 #define sys_port_trace_net_rx_time(pkt, end_time) 445 #define sys_port_trace_net_tx_time(pkt, end_time) 446 447 #define sys_trace_named_event(name, arg0, arg1) 448 449 #define sys_port_trace_gpio_pin_interrupt_configure_enter(port, pin, flags) \ 450 sys_trace_gpio_pin_interrupt_configure_enter_user(port, pin, flags) 451 #define sys_port_trace_gpio_pin_interrupt_configure_exit(port, pin, ret) \ 452 sys_trace_gpio_pin_interrupt_configure_exit_user(port, pin, ret) 453 #define sys_port_trace_gpio_pin_configure_enter(port, pin, flags) \ 454 sys_trace_gpio_pin_configure_enter_user(port, pin, flags) 455 #define sys_port_trace_gpio_pin_configure_exit(port, pin, ret) \ 456 sys_trace_gpio_pin_configure_exit_user(port, pin, ret) 457 #define sys_port_trace_gpio_port_get_direction_enter(port, map, inputs, outputs) \ 458 sys_trace_gpio_port_get_direction_enter_user(port, map, inputs, outputs) 459 #define sys_port_trace_gpio_port_get_direction_exit(port, ret) \ 460 sys_trace_gpio_port_get_direction_exit_user(port, ret) 461 #define sys_port_trace_gpio_pin_get_config_enter(port, pin, ret) \ 462 sys_trace_gpio_pin_get_config_enter_user(port, pin, ret) 463 #define sys_port_trace_gpio_pin_get_config_exit(port, pin, ret) \ 464 sys_trace_gpio_pin_get_config_exit_user(port, pin, ret) 465 #define sys_port_trace_gpio_port_get_raw_enter(port, value) \ 466 sys_trace_gpio_port_get_raw_enter_user(port, value) 467 #define sys_port_trace_gpio_port_get_raw_exit(port, ret) \ 468 sys_trace_gpio_port_get_raw_exit_user(port, ret) 469 #define sys_port_trace_gpio_port_set_masked_raw_enter(port, mask, value) \ 470 sys_trace_gpio_port_set_masked_raw_enter_user(port, mask, value) 471 #define sys_port_trace_gpio_port_set_masked_raw_exit(port, ret) \ 472 sys_trace_gpio_port_set_masked_raw_exit_user(port, ret) 473 #define sys_port_trace_gpio_port_set_bits_raw_enter(port, pins) \ 474 sys_trace_gpio_port_set_bits_raw_enter_user(port, pins) 475 #define sys_port_trace_gpio_port_set_bits_raw_exit(port, ret) \ 476 sys_trace_gpio_port_set_bits_raw_exit_user(port, ret) 477 #define sys_port_trace_gpio_port_clear_bits_raw_enter(port, pins) \ 478 sys_trace_gpio_port_clear_bits_raw_enter_user(port, pins) 479 #define sys_port_trace_gpio_port_clear_bits_raw_exit(port, ret) \ 480 sys_trace_gpio_port_clear_bits_raw_exit_user(port, ret) 481 #define sys_port_trace_gpio_port_toggle_bits_enter(port, pins) \ 482 sys_trace_gpio_port_toggle_bits_enter_user(port, pins) 483 #define sys_port_trace_gpio_port_toggle_bits_exit(port, ret) \ 484 sys_trace_gpio_port_toggle_bits_exit_user(port, ret) 485 #define sys_port_trace_gpio_init_callback_enter(callback, handler, pin_mask) \ 486 sys_trace_gpio_init_callback_enter_user(callback, handler, pin_mask) 487 #define sys_port_trace_gpio_init_callback_exit(callback) \ 488 sys_trace_gpio_init_callback_exit_user(callback) 489 #define sys_port_trace_gpio_add_callback_enter(port, callback) \ 490 sys_trace_gpio_add_callback_enter_user(port, callback) 491 #define sys_port_trace_gpio_add_callback_exit(port, ret) \ 492 sys_trace_gpio_add_callback_exit_user(port, ret) 493 #define sys_port_trace_gpio_remove_callback_enter(port, callback) \ 494 sys_trace_gpio_remove_callback_enter_user(port, callback) 495 #define sys_port_trace_gpio_remove_callback_exit(port, ret) \ 496 sys_trace_gpio_remove_callback_exit_user(port, ret) 497 #define sys_port_trace_gpio_get_pending_int_enter(dev) \ 498 sys_trace_gpio_get_pending_int_enter_user(dev) 499 #define sys_port_trace_gpio_get_pending_int_exit(dev, ret) \ 500 sys_trace_gpio_get_pending_int_exit_user(dev, ret) 501 #define sys_port_trace_gpio_fire_callbacks_enter(list, port, pins) \ 502 sys_trace_gpio_fire_callbacks_enter_user(list, port, pins) 503 #define sys_port_trace_gpio_fire_callback(port, callback) \ 504 sys_trace_gpio_fire_callback_user(port, callback) 505 506 #ifdef __cplusplus 507 } 508 #endif 509 510 #endif /* _TRACE_USER_H */ 511