tracing_ctf.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  1. /*
  2. * Copyright (c) 2018 Oticon A/S
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #ifndef _TRACE_CTF_H
  7. #define _TRACE_CTF_H
  8. #include <kernel.h>
  9. #include <kernel_structs.h>
  10. #include <init.h>
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. #define sys_port_trace_k_thread_foreach_enter()
  15. #define sys_port_trace_k_thread_foreach_exit()
  16. #define sys_port_trace_k_thread_foreach_unlocked_enter()
  17. #define sys_port_trace_k_thread_foreach_unlocked_exit()
  18. #define sys_port_trace_k_thread_create(new_thread) \
  19. sys_trace_k_thread_create(new_thread, stack_size, prio)
  20. #define sys_port_trace_k_thread_user_mode_enter() \
  21. sys_trace_k_thread_user_mode_enter(entry, p1, p2, p3)
  22. #define sys_port_trace_k_thread_heap_assign(thread, heap)
  23. #define sys_port_trace_k_thread_join_enter(thread, timeout)
  24. #define sys_port_trace_k_thread_join_blocking(thread, timeout)
  25. #define sys_port_trace_k_thread_join_exit(thread, timeout, ret)
  26. #define sys_port_trace_k_thread_sleep_enter(timeout)
  27. #define sys_port_trace_k_thread_sleep_exit(timeout, ret)
  28. #define sys_port_trace_k_thread_msleep_enter(ms)
  29. #define sys_port_trace_k_thread_msleep_exit(ms, ret)
  30. #define sys_port_trace_k_thread_usleep_enter(us)
  31. #define sys_port_trace_k_thread_usleep_exit(us, ret)
  32. #define sys_port_trace_k_thread_busy_wait_enter(usec_to_wait)
  33. #define sys_port_trace_k_thread_busy_wait_exit(usec_to_wait)
  34. #define sys_port_trace_k_thread_yield()
  35. #define sys_port_trace_k_thread_wakeup(thread) sys_trace_k_thread_wakeup(thread)
  36. #define sys_port_trace_k_thread_start(thread) sys_trace_k_thread_start(thread)
  37. #define sys_port_trace_k_thread_abort(thread) sys_trace_k_thread_abort(thread)
  38. #define sys_port_trace_k_thread_suspend_enter(thread) \
  39. sys_trace_k_thread_suspend(thread)
  40. #define sys_port_trace_k_thread_suspend_exit(thread)
  41. #define sys_port_trace_k_thread_resume_enter(thread) \
  42. sys_trace_k_thread_resume(thread)
  43. #define sys_port_trace_k_thread_sched_lock()
  44. #define sys_port_trace_k_thread_sched_unlock()
  45. #define sys_port_trace_k_thread_name_set(thread, ret) \
  46. sys_trace_k_thread_name_set(thread, ret)
  47. #define sys_port_trace_k_thread_switched_out() sys_trace_k_thread_switched_out()
  48. #define sys_port_trace_k_thread_switched_in() sys_trace_k_thread_switched_in()
  49. #define sys_port_trace_k_thread_info(thread) sys_trace_k_thread_info(thread)
  50. #define sys_port_trace_k_thread_sched_wakeup(thread)
  51. #define sys_port_trace_k_thread_sched_abort(thread)
  52. #define sys_port_trace_k_thread_sched_priority_set(thread, prio)
  53. #define sys_port_trace_k_thread_sched_ready(thread)
  54. #define sys_port_trace_k_thread_sched_pend(thread)
  55. #define sys_port_trace_k_thread_sched_resume(thread)
  56. #define sys_port_trace_k_thread_sched_suspend(thread)
  57. #define sys_port_trace_k_work_init(work)
  58. #define sys_port_trace_k_work_submit_to_queue_enter(queue, work)
  59. #define sys_port_trace_k_work_submit_to_queue_exit(queue, work, ret)
  60. #define sys_port_trace_k_work_submit_enter(work)
  61. #define sys_port_trace_k_work_submit_exit(work, ret)
  62. #define sys_port_trace_k_work_flush_enter(work)
  63. #define sys_port_trace_k_work_flush_blocking(work, timeout)
  64. #define sys_port_trace_k_work_flush_exit(work, ret)
  65. #define sys_port_trace_k_work_cancel_enter(work)
  66. #define sys_port_trace_k_work_cancel_exit(work, ret)
  67. #define sys_port_trace_k_work_cancel_sync_enter(work, sync)
  68. #define sys_port_trace_k_work_cancel_sync_blocking(work, sync)
  69. #define sys_port_trace_k_work_cancel_sync_exit(work, sync, ret)
  70. #define sys_port_trace_k_work_queue_init(queue)
  71. #define sys_port_trace_k_work_queue_start_enter(queue)
  72. #define sys_port_trace_k_work_queue_start_exit(queue)
  73. #define sys_port_trace_k_work_queue_drain_enter(queue)
  74. #define sys_port_trace_k_work_queue_drain_exit(queue, ret)
  75. #define sys_port_trace_k_work_queue_unplug_enter(queue)
  76. #define sys_port_trace_k_work_queue_unplug_exit(queue, ret)
  77. #define sys_port_trace_k_work_delayable_init(dwork)
  78. #define sys_port_trace_k_work_schedule_for_queue_enter(queue, dwork, delay)
  79. #define sys_port_trace_k_work_schedule_for_queue_exit(queue, dwork, delay, \
  80. ret)
  81. #define sys_port_trace_k_work_schedule_enter(dwork, delay)
  82. #define sys_port_trace_k_work_schedule_exit(dwork, delay, ret)
  83. #define sys_port_trace_k_work_reschedule_for_queue_enter(queue, dwork, delay)
  84. #define sys_port_trace_k_work_reschedule_for_queue_exit(queue, dwork, delay, \
  85. ret)
  86. #define sys_port_trace_k_work_reschedule_enter(dwork, delay)
  87. #define sys_port_trace_k_work_reschedule_exit(dwork, delay, ret)
  88. #define sys_port_trace_k_work_flush_delayable_enter(dwork, sync)
  89. #define sys_port_trace_k_work_flush_delayable_exit(dwork, sync, ret)
  90. #define sys_port_trace_k_work_cancel_delayable_enter(dwork)
  91. #define sys_port_trace_k_work_cancel_delayable_exit(dwork, ret)
  92. #define sys_port_trace_k_work_cancel_delayable_sync_enter(dwork, sync)
  93. #define sys_port_trace_k_work_cancel_delayable_sync_exit(dwork, sync, ret)
  94. #define sys_port_trace_k_work_poll_init_enter(work)
  95. #define sys_port_trace_k_work_poll_init_exit(work)
  96. #define sys_port_trace_k_work_poll_submit_to_queue_enter(work_q, work, \
  97. timeout)
  98. #define sys_port_trace_k_work_poll_submit_to_queue_blocking(work_q, work, \
  99. timeout)
  100. #define sys_port_trace_k_work_poll_submit_to_queue_exit(work_q, work, timeout, \
  101. ret)
  102. #define sys_port_trace_k_work_poll_submit_enter(work, timeout)
  103. #define sys_port_trace_k_work_poll_submit_exit(work, timeout, ret)
  104. #define sys_port_trace_k_work_poll_cancel_enter(work)
  105. #define sys_port_trace_k_work_poll_cancel_exit(work, ret)
  106. #define sys_port_trace_k_poll_api_event_init(event)
  107. #define sys_port_trace_k_poll_api_poll_enter(events)
  108. #define sys_port_trace_k_poll_api_poll_exit(events, ret)
  109. #define sys_port_trace_k_poll_api_signal_init(signal)
  110. #define sys_port_trace_k_poll_api_signal_reset(signal)
  111. #define sys_port_trace_k_poll_api_signal_check(signal)
  112. #define sys_port_trace_k_poll_api_signal_raise(signal, ret)
  113. #define sys_port_trace_k_sem_init(sem, ret) \
  114. sys_trace_k_sem_init(sem, ret)
  115. #define sys_port_trace_k_sem_give_enter(sem) sys_trace_k_sem_give_enter(sem)
  116. #define sys_port_trace_k_sem_give_exit(sem) sys_trace_k_sem_give_exit(sem)
  117. #define sys_port_trace_k_sem_take_enter(sem, timeout) \
  118. sys_trace_k_sem_take_enter(sem, timeout)
  119. #define sys_port_trace_k_sem_take_blocking(sem, timeout) \
  120. sys_trace_k_sem_take_blocking(sem, timeout)
  121. #define sys_port_trace_k_sem_take_exit(sem, timeout, ret) \
  122. sys_trace_k_sem_take_exit(sem, timeout, ret)
  123. #define sys_port_trace_k_sem_reset(sem) sys_trace_k_sem_reset(sem)
  124. #define sys_port_trace_k_mutex_init(mutex, ret) \
  125. sys_trace_k_mutex_init(mutex, ret)
  126. #define sys_port_trace_k_mutex_lock_enter(mutex, timeout) \
  127. sys_trace_k_mutex_lock_enter(mutex, timeout)
  128. #define sys_port_trace_k_mutex_lock_blocking(mutex, timeout) \
  129. sys_trace_k_mutex_lock_blocking(mutex, timeout)
  130. #define sys_port_trace_k_mutex_lock_exit(mutex, timeout, ret) \
  131. sys_trace_k_mutex_lock_exit(mutex, timeout, ret)
  132. #define sys_port_trace_k_mutex_unlock_enter(mutex) \
  133. sys_trace_k_mutex_unlock_enter(mutex)
  134. #define sys_port_trace_k_mutex_unlock_exit(mutex, ret) \
  135. sys_trace_k_mutex_unlock_exit(mutex, ret)
  136. #define sys_port_trace_k_condvar_init(condvar, ret)
  137. #define sys_port_trace_k_condvar_signal_enter(condvar)
  138. #define sys_port_trace_k_condvar_signal_blocking(condvar, timeout)
  139. #define sys_port_trace_k_condvar_signal_exit(condvar, ret)
  140. #define sys_port_trace_k_condvar_broadcast_enter(condvar)
  141. #define sys_port_trace_k_condvar_broadcast_exit(condvar, ret)
  142. #define sys_port_trace_k_condvar_wait_enter(condvar)
  143. #define sys_port_trace_k_condvar_wait_exit(condvar, ret)
  144. #define sys_port_trace_k_queue_init(queue)
  145. #define sys_port_trace_k_queue_cancel_wait(queue)
  146. #define sys_port_trace_k_queue_queue_insert_enter(queue, alloc)
  147. #define sys_port_trace_k_queue_queue_insert_blocking(queue, alloc, timeout)
  148. #define sys_port_trace_k_queue_queue_insert_exit(queue, alloc, ret)
  149. #define sys_port_trace_k_queue_append_enter(queue)
  150. #define sys_port_trace_k_queue_append_exit(queue)
  151. #define sys_port_trace_k_queue_alloc_append_enter(queue)
  152. #define sys_port_trace_k_queue_alloc_append_exit(queue, ret)
  153. #define sys_port_trace_k_queue_prepend_enter(queue)
  154. #define sys_port_trace_k_queue_prepend_exit(queue)
  155. #define sys_port_trace_k_queue_alloc_prepend_enter(queue)
  156. #define sys_port_trace_k_queue_alloc_prepend_exit(queue, ret)
  157. #define sys_port_trace_k_queue_insert_enter(queue)
  158. #define sys_port_trace_k_queue_insert_blocking(queue, timeout)
  159. #define sys_port_trace_k_queue_insert_exit(queue)
  160. #define sys_port_trace_k_queue_append_list_enter(queue)
  161. #define sys_port_trace_k_queue_append_list_exit(queue, ret)
  162. #define sys_port_trace_k_queue_merge_slist_enter(queue)
  163. #define sys_port_trace_k_queue_merge_slist_exit(queue, ret)
  164. #define sys_port_trace_k_queue_get_enter(queue, timeout)
  165. #define sys_port_trace_k_queue_get_blocking(queue, timeout)
  166. #define sys_port_trace_k_queue_get_exit(queue, timeout, ret)
  167. #define sys_port_trace_k_queue_remove_enter(queue)
  168. #define sys_port_trace_k_queue_remove_exit(queue, ret)
  169. #define sys_port_trace_k_queue_unique_append_enter(queue)
  170. #define sys_port_trace_k_queue_unique_append_exit(queue, ret)
  171. #define sys_port_trace_k_queue_peek_head(queue, ret)
  172. #define sys_port_trace_k_queue_peek_tail(queue, ret)
  173. #define sys_port_trace_k_fifo_init_enter(fifo)
  174. #define sys_port_trace_k_fifo_init_exit(fifo)
  175. #define sys_port_trace_k_fifo_cancel_wait_enter(fifo)
  176. #define sys_port_trace_k_fifo_cancel_wait_exit(fifo)
  177. #define sys_port_trace_k_fifo_put_enter(fifo, data)
  178. #define sys_port_trace_k_fifo_put_exit(fifo, data)
  179. #define sys_port_trace_k_fifo_alloc_put_enter(fifo, data)
  180. #define sys_port_trace_k_fifo_alloc_put_exit(fifo, data, ret)
  181. #define sys_port_trace_k_fifo_put_list_enter(fifo, head, tail)
  182. #define sys_port_trace_k_fifo_put_list_exit(fifo, head, tail)
  183. #define sys_port_trace_k_fifo_put_slist_enter(fifo, list)
  184. #define sys_port_trace_k_fifo_put_slist_exit(fifo, list)
  185. #define sys_port_trace_k_fifo_get_enter(fifo, timeout)
  186. #define sys_port_trace_k_fifo_get_exit(fifo, timeout, ret)
  187. #define sys_port_trace_k_fifo_peek_head_enter(fifo)
  188. #define sys_port_trace_k_fifo_peek_head_exit(fifo, ret)
  189. #define sys_port_trace_k_fifo_peek_tail_enter(fifo)
  190. #define sys_port_trace_k_fifo_peek_tail_exit(fifo, ret)
  191. #define sys_port_trace_k_lifo_init_enter(lifo)
  192. #define sys_port_trace_k_lifo_init_exit(lifo)
  193. #define sys_port_trace_k_lifo_put_enter(lifo, data)
  194. #define sys_port_trace_k_lifo_put_exit(lifo, data)
  195. #define sys_port_trace_k_lifo_alloc_put_enter(lifo, data)
  196. #define sys_port_trace_k_lifo_alloc_put_exit(lifo, data, ret)
  197. #define sys_port_trace_k_lifo_get_enter(lifo, timeout)
  198. #define sys_port_trace_k_lifo_get_exit(lifo, timeout, ret)
  199. #define sys_port_trace_k_stack_init(stack)
  200. #define sys_port_trace_k_stack_alloc_init_enter(stack)
  201. #define sys_port_trace_k_stack_alloc_init_exit(stack, ret)
  202. #define sys_port_trace_k_stack_cleanup_enter(stack)
  203. #define sys_port_trace_k_stack_cleanup_exit(stack, ret)
  204. #define sys_port_trace_k_stack_push_enter(stack)
  205. #define sys_port_trace_k_stack_push_exit(stack, ret)
  206. #define sys_port_trace_k_stack_pop_enter(stack, timeout)
  207. #define sys_port_trace_k_stack_pop_blocking(stack, timeout)
  208. #define sys_port_trace_k_stack_pop_exit(stack, timeout, ret)
  209. #define sys_port_trace_k_msgq_init(msgq)
  210. #define sys_port_trace_k_msgq_alloc_init_enter(msgq)
  211. #define sys_port_trace_k_msgq_alloc_init_exit(msgq, ret)
  212. #define sys_port_trace_k_msgq_cleanup_enter(msgq)
  213. #define sys_port_trace_k_msgq_cleanup_exit(msgq, ret)
  214. #define sys_port_trace_k_msgq_put_enter(msgq, timeout)
  215. #define sys_port_trace_k_msgq_put_blocking(msgq, timeout)
  216. #define sys_port_trace_k_msgq_put_exit(msgq, timeout, ret)
  217. #define sys_port_trace_k_msgq_get_enter(msgq, timeout)
  218. #define sys_port_trace_k_msgq_get_blocking(msgq, timeout)
  219. #define sys_port_trace_k_msgq_get_exit(msgq, timeout, ret)
  220. #define sys_port_trace_k_msgq_peek(msgq, ret)
  221. #define sys_port_trace_k_msgq_purge(msgq)
  222. #define sys_port_trace_k_mbox_init(mbox)
  223. #define sys_port_trace_k_mbox_message_put_enter(mbox, timeout)
  224. #define sys_port_trace_k_mbox_message_put_blocking(mbox, timeout)
  225. #define sys_port_trace_k_mbox_message_put_exit(mbox, timeout, ret)
  226. #define sys_port_trace_k_mbox_put_enter(mbox, timeout)
  227. #define sys_port_trace_k_mbox_put_exit(mbox, timeout, ret)
  228. #define sys_port_trace_k_mbox_async_put_enter(mbox, sem)
  229. #define sys_port_trace_k_mbox_async_put_exit(mbox, sem)
  230. #define sys_port_trace_k_mbox_get_enter(mbox, timeout)
  231. #define sys_port_trace_k_mbox_get_blocking(mbox, timeout)
  232. #define sys_port_trace_k_mbox_get_exit(mbox, timeout, ret)
  233. #define sys_port_trace_k_mbox_data_get(rx_msg)
  234. #define sys_port_trace_k_pipe_init(pipe)
  235. #define sys_port_trace_k_pipe_cleanup_enter(pipe)
  236. #define sys_port_trace_k_pipe_cleanup_exit(pipe, ret)
  237. #define sys_port_trace_k_pipe_alloc_init_enter(pipe)
  238. #define sys_port_trace_k_pipe_alloc_init_exit(pipe, ret)
  239. #define sys_port_trace_k_pipe_put_enter(pipe, timeout)
  240. #define sys_port_trace_k_pipe_put_blocking(pipe, timeout)
  241. #define sys_port_trace_k_pipe_put_exit(pipe, timeout, ret)
  242. #define sys_port_trace_k_pipe_get_enter(pipe, timeout)
  243. #define sys_port_trace_k_pipe_get_blocking(pipe, timeout)
  244. #define sys_port_trace_k_pipe_get_exit(pipe, timeout, ret)
  245. #define sys_port_trace_k_pipe_block_put_enter(pipe, sem)
  246. #define sys_port_trace_k_pipe_block_put_exit(pipe, sem)
  247. #define sys_port_trace_k_heap_init(heap)
  248. #define sys_port_trace_k_heap_aligned_alloc_enter(heap, timeout)
  249. #define sys_port_trace_k_heap_aligned_alloc_blocking(heap, timeout)
  250. #define sys_port_trace_k_heap_aligned_alloc_exit(heap, timeout, ret)
  251. #define sys_port_trace_k_heap_alloc_enter(heap, timeout)
  252. #define sys_port_trace_k_heap_alloc_exit(heap, timeout, ret)
  253. #define sys_port_trace_k_heap_free(heap)
  254. #define sys_port_trace_k_heap_sys_k_aligned_alloc_enter(heap)
  255. #define sys_port_trace_k_heap_sys_k_aligned_alloc_exit(heap, ret)
  256. #define sys_port_trace_k_heap_sys_k_malloc_enter(heap)
  257. #define sys_port_trace_k_heap_sys_k_malloc_exit(heap, ret)
  258. #define sys_port_trace_k_heap_sys_k_free_enter(heap)
  259. #define sys_port_trace_k_heap_sys_k_free_exit(heap)
  260. #define sys_port_trace_k_heap_sys_k_calloc_enter(heap)
  261. #define sys_port_trace_k_heap_sys_k_calloc_exit(heap, ret)
  262. #define sys_port_trace_k_mem_slab_init(slab, rc)
  263. #define sys_port_trace_k_mem_slab_alloc_enter(slab, timeout)
  264. #define sys_port_trace_k_mem_slab_alloc_blocking(slab, timeout)
  265. #define sys_port_trace_k_mem_slab_alloc_exit(slab, timeout, ret)
  266. #define sys_port_trace_k_mem_slab_free_enter(slab)
  267. #define sys_port_trace_k_mem_slab_free_exit(slab)
  268. #define sys_port_trace_k_timer_init(timer)
  269. #define sys_port_trace_k_timer_start(timer)
  270. #define sys_port_trace_k_timer_stop(timer)
  271. #define sys_port_trace_k_timer_status_sync_enter(timer)
  272. #define sys_port_trace_k_timer_status_sync_blocking(timer, timeout)
  273. #define sys_port_trace_k_timer_status_sync_exit(timer, result)
  274. #define sys_port_trace_k_thread_abort_exit(thread)
  275. #define sys_port_trace_k_thread_abort_enter(thread)
  276. #define sys_port_trace_k_thread_resume_exit(thread)
  277. #define sys_port_trace_syscall_enter() sys_trace_syscall_enter()
  278. #define sys_port_trace_syscall_exit() sys_trace_syscall_exit()
  279. #define sys_port_trace_pm_system_suspend_enter(ticks)
  280. #define sys_port_trace_pm_system_suspend_exit(ticks, ret)
  281. #define sys_port_trace_pm_device_request_enter(dev, target_state)
  282. #define sys_port_trace_pm_device_request_exit(dev, ret)
  283. #define sys_port_trace_pm_device_enable_enter(dev)
  284. #define sys_port_trace_pm_device_enable_exit(dev)
  285. #define sys_port_trace_pm_device_disable_enter(dev)
  286. #define sys_port_trace_pm_device_disable_exit(dev)
  287. void sys_trace_syscall_enter(void);
  288. void sys_trace_syscall_exit(void);
  289. void sys_trace_idle(void);
  290. void sys_trace_isr_enter(void);
  291. void sys_trace_isr_exit(void);
  292. void sys_trace_k_thread_abort_exit(struct k_thread *thread);
  293. void sys_trace_k_thread_abort_enter(struct k_thread *thread);
  294. void sys_trace_k_thread_resume_exit(struct k_thread *thread);
  295. void sys_trace_k_thread_sched_abort(struct k_thread *thread);
  296. void sys_trace_k_thread_sched_ready(struct k_thread *thread);
  297. void sys_trace_k_thread_sched_resume(struct k_thread *thread);
  298. void sys_trace_k_thread_sched_suspend(struct k_thread *thread);
  299. void sys_trace_k_thread_foreach_enter(k_thread_user_cb_t user_cb,
  300. void *user_data);
  301. void sys_trace_k_thread_foreach_exit(k_thread_user_cb_t user_cb,
  302. void *user_data);
  303. void sys_trace_k_thread_foreach_unlocked_enter(k_thread_user_cb_t user_cb,
  304. void *user_data);
  305. void sys_trace_k_thread_foreach_unlocked_exit(k_thread_user_cb_t user_cb,
  306. void *user_data);
  307. void sys_trace_k_thread_create(struct k_thread *new_thread, size_t stack_size,
  308. int prio);
  309. void sys_trace_k_thread_user_mode_enter(k_thread_entry_t entry, void *p1,
  310. void *p2, void *p3);
  311. void sys_trace_k_thread_heap_assign(struct k_thread *thread,
  312. struct k_heap *heap);
  313. void sys_trace_k_thread_join_blocking(struct k_thread *thread,
  314. k_timeout_t timeout);
  315. void sys_trace_k_thread_join_exit(struct k_thread *thread, k_timeout_t timeout,
  316. int ret);
  317. void sys_trace_k_thread_sleep_enter(k_timeout_t timeout);
  318. void sys_trace_k_thread_sleep_exit(k_timeout_t timeout, int ret);
  319. void sys_trace_k_thread_msleep_enter(int32_t ms);
  320. void sys_trace_k_thread_msleep_exit(int32_t ms, int ret);
  321. void sys_trace_k_thread_usleep_enter(int32_t us);
  322. void sys_trace_k_thread_usleep_exit(int32_t us, int ret);
  323. void sys_trace_k_thread_busy_wait_enter(uint32_t usec_to_wait);
  324. void sys_trace_k_thread_busy_wait_exit(uint32_t usec_to_wait);
  325. void sys_trace_k_thread_yield(void);
  326. void sys_trace_k_thread_wakeup(struct k_thread *thread);
  327. void sys_trace_k_thread_abort(struct k_thread *thread);
  328. void sys_trace_k_thread_start(struct k_thread *thread);
  329. void sys_trace_k_thread_priority_set(struct k_thread *thread);
  330. void sys_trace_k_thread_suspend(struct k_thread *thread);
  331. void sys_trace_k_thread_resume(struct k_thread *thread);
  332. void sys_trace_k_thread_sched_lock(void);
  333. void sys_trace_k_thread_sched_unlock(void);
  334. void sys_trace_k_thread_name_set(struct k_thread *thread, int ret);
  335. void sys_trace_k_thread_switched_out(void);
  336. void sys_trace_k_thread_switched_in(void);
  337. void sys_trace_k_thread_ready(struct k_thread *thread);
  338. void sys_trace_k_thread_pend(struct k_thread *thread);
  339. void sys_trace_k_thread_info(struct k_thread *thread);
  340. /* Semaphore */
  341. void sys_trace_k_sem_init(struct k_sem *sem, int ret);
  342. void sys_trace_k_sem_give_enter(struct k_sem *sem);
  343. void sys_trace_k_sem_give_exit(struct k_sem *sem);
  344. void sys_trace_k_sem_take_enter(struct k_sem *sem, k_timeout_t timeout);
  345. void sys_trace_k_sem_take_blocking(struct k_sem *sem, k_timeout_t timeout);
  346. void sys_trace_k_sem_take_exit(struct k_sem *sem, k_timeout_t timeout, int ret);
  347. void sys_trace_k_sem_reset(struct k_sem *sem);
  348. /* Mutex */
  349. void sys_trace_k_mutex_init(struct k_mutex *mutex, int ret);
  350. void sys_trace_k_mutex_lock_enter(struct k_mutex *mutex, k_timeout_t timeout);
  351. void sys_trace_k_mutex_lock_blocking(struct k_mutex *mutex,
  352. k_timeout_t timeout);
  353. void sys_trace_k_mutex_lock_exit(struct k_mutex *mutex, k_timeout_t timeout,
  354. int ret);
  355. void sys_trace_k_mutex_unlock_enter(struct k_mutex *mutex);
  356. void sys_trace_k_mutex_unlock_exit(struct k_mutex *mutex, int ret);
  357. void sys_trace_k_timer_init(struct k_timer *timer, k_timer_expiry_t expiry_fn,
  358. k_timer_expiry_t stop_fn);
  359. void sys_trace_k_timer_start(struct k_timer *timer, k_timeout_t duration,
  360. k_timeout_t period);
  361. void sys_trace_k_timer_stop(struct k_timer *timer);
  362. void sys_trace_k_timer_status_sync_blocking(struct k_timer *timer);
  363. void sys_trace_k_timer_status_sync_exit(struct k_timer *timer, uint32_t result);
  364. #ifdef __cplusplus
  365. }
  366. #endif
  367. #endif /* _TRACE_CTF_H */