1# Debug configuration options 2 3# Copyright (c) 2015 Wind River Systems, Inc. 4# SPDX-License-Identifier: Apache-2.0 5 6DT_CHOSEN_Z_CONSOLE := zephyr,console 7 8config TRACING 9 bool "Tracing Support" 10 imply THREAD_NAME 11 imply THREAD_STACK_INFO 12 imply THREAD_MONITOR 13 select INSTRUMENT_THREAD_SWITCHING 14 help 15 Enable system tracing. This requires a backend such as SEGGER 16 Systemview to be enabled as well. 17 18if TRACING 19 20config TRACING_CORE 21 bool 22 help 23 Automatically selected by formats that require the core 24 tracing infrastructure. 25 26choice 27 prompt "Tracing Format" 28 default TRACING_NONE 29 30config TRACING_NONE 31 bool "No tracing format selected" 32 help 33 None of the available tracing formats is selected. 34 35config PERCEPIO_TRACERECORDER 36 bool "Percepio Tracealyzer support" 37 select THREAD_NAME 38 select INIT_STACKS 39 select THREAD_MONITOR 40 depends on ZEPHYR_TRACERECORDER_MODULE 41 42config SEGGER_SYSTEMVIEW 43 bool "Segger SystemView support" 44 select CONSOLE 45 select RTT_CONSOLE 46 select USE_SEGGER_RTT 47 select THREAD_MONITOR 48 select SEGGER_RTT_CUSTOM_LOCKING 49 50config TRACING_CTF 51 bool "Tracing via Common Trace Format support" 52 select TRACING_CORE 53 help 54 Enable tracing to a Common Trace Format stream. 55 56config TRACING_TEST 57 bool "Tracing for test usage" 58 select TRACING_CORE 59 help 60 Enable tracing for testing kinds of format purpose. It must 61 implement the tracing hooks defined in tracing_test.h 62 63config TRACING_USER 64 bool "Tracing using user-defined functions" 65 help 66 Use user-defined functions for tracing task switching and irqs 67 68endchoice 69 70 71config TRACING_CTF_TIMESTAMP 72 bool "CTF internal timestamp" 73 default y 74 depends on TRACING_CTF 75 help 76 Timestamp prefix will be added to the beginning of CTF 77 event internally. 78 79choice 80 prompt "Tracing Method" 81 default TRACING_ASYNC 82 83config TRACING_SYNC 84 bool "Synchronous Tracing" 85 select RING_BUFFER 86 help 87 Enable synchronous tracing. This requires the backend to be 88 very low-latency. 89 90config TRACING_ASYNC 91 bool "Asynchronous Tracing" 92 select RING_BUFFER 93 help 94 Enable asynchronous tracing. This will buffer all the tracing 95 packets to the ring buffer first, tracing thread will try to 96 output as much data as possible from the buffer when tracing 97 thread get scheduled. 98 99endchoice 100 101config TRACING_THREAD_STACK_SIZE 102 int "Stack size of tracing thread" 103 default 1024 104 depends on TRACING_ASYNC 105 help 106 Stack size of tracing thread. 107 108config TRACING_THREAD_WAIT_THRESHOLD 109 int "Tracing thread waiting threshold" 110 default 100 111 depends on TRACING_ASYNC 112 help 113 Tracing thread waiting period given in milliseconds after 114 every first packet put to tracing buffer. 115 116config TRACING_BUFFER_SIZE 117 int "Size of tracing buffer" 118 default 2048 if TRACING_ASYNC 119 default TRACING_PACKET_MAX_SIZE if TRACING_SYNC 120 range 32 65536 121 help 122 Size of tracing buffer. If TRACING_ASYNC is enabled, tracing buffer 123 is used as a ring buffer to buffer data packet and string packet. If 124 TRACING_SYNC is enabled, the buffer is used to hold the formatted data. 125 126config TRACING_PACKET_MAX_SIZE 127 int "Max size of one tracing packet" 128 default 32 129 help 130 Max size of one tracing packet. 131 132choice 133 prompt "Tracing Backend" 134 default TRACING_BACKEND_UART 135 136config TRACING_BACKEND_UART 137 bool "UART backend" 138 depends on UART_CONSOLE 139 140 help 141 Use UART to output tracing data. 142 143config TRACING_BACKEND_USB 144 bool "USB backend" 145 depends on USB_DEVICE_STACK 146 depends on TRACING_ASYNC 147 help 148 Use USB to output tracing data. 149 150config TRACING_BACKEND_POSIX 151 bool "Posix architecture (native) backend" 152 depends on TRACING_SYNC 153 depends on ARCH_POSIX 154 help 155 Use posix architecture to output tracing data to file system. 156 157config TRACING_BACKEND_RAM 158 bool "RAM backend" 159 help 160 Use a ram buffer to output tracing data which can 161 be dumped to a file at runtime with a debugger. 162 See gdb dump binary memory documentation for example. 163endchoice 164 165config RAM_TRACING_BUFFER_SIZE 166 int "Ram Tracing buffer size" 167 default 4096 168 depends on TRACING_BACKEND_RAM 169 help 170 Size of the RAM trace buffer. Trace will be discarded if the 171 length is exceeded. 172 173config TRACING_USB_MPS 174 int "USB backend max packet size" 175 default 64 176 depends on TRACING_BACKEND_USB 177 help 178 USB tracing backend max packet size(endpoint MPS). 179 180config TRACING_HANDLE_HOST_CMD 181 bool "Host command handle" 182 select UART_INTERRUPT_DRIVEN if TRACING_BACKEND_UART 183 help 184 When enabled tracing will handle cmd from host to dynamically 185 enable and disable tracing to have host capture tracing stream 186 data conveniently. 187 188config TRACING_CMD_BUFFER_SIZE 189 int "Size of tracing command buffer" 190 default 32 191 range 32 128 192 help 193 Size of tracing command buffer. 194 195config TRACING_OBJECT_TRACKING 196 bool "Object tracking" 197 help 198 Keep lists to track kernel objects. 199 200menu "Tracing Configuration" 201 202config TRACING_SYSCALL 203 bool "Tracing Syscalls" 204 default y 205 help 206 Enable tracing Syscalls. 207 208config TRACING_THREAD 209 bool "Tracing Threads" 210 default y 211 help 212 Enable tracing Threads. 213 214config TRACING_WORK 215 bool "Tracing Work" 216 default y 217 help 218 Enable tracing Work and Work queue events 219 220config TRACING_ISR 221 bool "Tracing ISRs" 222 default y 223 help 224 Enable tracing ISRs. This requires the backend to be 225 very low-latency. 226 227config TRACING_SEMAPHORE 228 bool "Tracing Semaphores" 229 default y 230 help 231 Enable tracing Semaphores. 232 233config TRACING_MUTEX 234 bool "Tracing Mutexes" 235 default y 236 help 237 Enable tracing Mutexes. 238 239config TRACING_CONDVAR 240 bool "Tracing Condition Variables" 241 default y 242 help 243 Enable tracing Condition Variables 244 245config TRACING_QUEUE 246 bool "Tracing Queues" 247 default y 248 help 249 Enable tracing Queues. 250 251config TRACING_FIFO 252 bool "Tracing FIFO queues" 253 default y 254 help 255 Enable tracing FIFO queues. 256 257config TRACING_LIFO 258 bool "Tracing LIFO queues" 259 default y 260 help 261 Enable tracing LIFO queues. 262 263config TRACING_STACK 264 bool "Tracing Memory Stacks" 265 default y 266 help 267 Enable tracing Memory Stacks. 268 269config TRACING_MESSAGE_QUEUE 270 bool "Tracing Message Queues" 271 default y 272 help 273 Enable tracing Message Queues. 274 275config TRACING_MAILBOX 276 bool "Tracing Mailboxes" 277 default y 278 help 279 Enable tracing Mailboxes. 280 281config TRACING_PIPE 282 bool "Tracing Pipes" 283 default y 284 help 285 Enable tracing Pipes. 286 287config TRACING_HEAP 288 bool "Tracing Memory Heaps" 289 default y 290 help 291 Enable tracing Memory Heaps. 292 293config TRACING_MEMORY_SLAB 294 bool "Tracing Memory Slabs" 295 default y 296 help 297 Enable tracing Memory Slabs. 298 299config TRACING_TIMER 300 bool "Tracing Timers" 301 default y 302 help 303 Enable tracing Timers. 304 305config TRACING_EVENT 306 bool "Tracing Events" 307 default y 308 help 309 Enable tracing Events. 310 311endmenu # Tracing Configuration 312 313endif 314 315source "subsys/tracing/sysview/Kconfig" 316