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 TRACING_FORMAT_CHOICE 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_PERCEPIO_MODULE 41 42config SEGGER_SYSTEMVIEW 43 bool "Segger SystemView support" 44 select USE_SEGGER_RTT 45 select THREAD_MONITOR 46 select SEGGER_RTT_CUSTOM_LOCKING 47 48config TRACING_CTF 49 bool "Tracing via Common Trace Format support" 50 select TRACING_CORE 51 help 52 Enable tracing to a Common Trace Format stream. 53 54config TRACING_TEST 55 bool "Tracing for test usage" 56 select TRACING_CORE 57 help 58 Enable tracing for testing kinds of format purpose. It must 59 implement the tracing hooks defined in tracing_test.h 60 61config TRACING_USER 62 bool "Tracing using user-defined functions" 63 help 64 Use user-defined functions for tracing task switching and irqs 65 66endchoice 67 68 69config TRACING_CTF_TIMESTAMP 70 bool "CTF internal timestamp" 71 default y 72 depends on TRACING_CTF 73 help 74 Timestamp prefix will be added to the beginning of CTF 75 event internally. 76 77choice TRACING_METHOD_CHOICE 78 prompt "Tracing Method" 79 default TRACING_ASYNC 80 81config TRACING_SYNC 82 bool "Synchronous Tracing" 83 select RING_BUFFER 84 help 85 Enable synchronous tracing. This requires the backend to be 86 very low-latency. 87 88config TRACING_ASYNC 89 bool "Asynchronous Tracing" 90 select RING_BUFFER 91 help 92 Enable asynchronous tracing. This will buffer all the tracing 93 packets to the ring buffer first, tracing thread will try to 94 output as much data as possible from the buffer when tracing 95 thread get scheduled. 96 97endchoice 98 99config TRACING_THREAD_STACK_SIZE 100 int "Stack size of tracing thread" 101 default 1024 102 depends on TRACING_ASYNC 103 help 104 Stack size of tracing thread. 105 106config TRACING_THREAD_WAIT_THRESHOLD 107 int "Tracing thread waiting threshold" 108 default 100 109 depends on TRACING_ASYNC 110 help 111 Tracing thread waiting period given in milliseconds after 112 every first packet put to tracing buffer. 113 114config TRACING_BUFFER_SIZE 115 int "Size of tracing buffer" 116 default 2048 if TRACING_ASYNC 117 default TRACING_PACKET_MAX_SIZE if TRACING_SYNC 118 range 32 65536 119 help 120 Size of tracing buffer. If TRACING_ASYNC is enabled, tracing buffer 121 is used as a ring buffer to buffer data packet and string packet. If 122 TRACING_SYNC is enabled, the buffer is used to hold the formatted data. 123 124config TRACING_PACKET_MAX_SIZE 125 int "Max size of one tracing packet" 126 default 32 127 help 128 Max size of one tracing packet. 129 130choice TRACING_BACKEND_CHOICE 131 prompt "Tracing Backend" 132 default TRACING_BACKEND_UART 133 134config TRACING_BACKEND_UART 135 bool "UART backend" 136 depends on UART_CONSOLE 137 138 help 139 Use UART to output tracing data. 140 141config TRACING_BACKEND_USB 142 bool "USB backend" 143 depends on USB_DEVICE_STACK_NEXT 144 depends on TRACING_ASYNC 145 help 146 Use USB to output tracing data. 147 148config TRACING_BACKEND_POSIX 149 bool "Posix architecture (native) backend" 150 depends on TRACING_SYNC 151 depends on ARCH_POSIX 152 help 153 Use posix architecture to output tracing data to file system. 154 155config TRACING_BACKEND_RAM 156 bool "RAM backend" 157 help 158 Use a ram buffer to output tracing data which can 159 be dumped to a file at runtime with a debugger. 160 See gdb dump binary memory documentation for example. 161 162config TRACING_BACKEND_ADSP_MEMORY_WINDOW 163 bool "Memory window in RAM" 164 depends on SOC_FAMILY_INTEL_ADSP 165 depends on TRACING_SYNC 166 help 167 Use ADSP memory debug memory window to output tracing data 168 169endchoice 170 171config TRACING_BACKEND_NAME 172 string 173 default "tracing_backend_uart" if TRACING_BACKEND_UART 174 default "tracing_backend_usb" if TRACING_BACKEND_USB 175 default "tracing_backend_posix" if TRACING_BACKEND_POSIX 176 default "tracing_backend_ram" if TRACING_BACKEND_RAM 177 default "tracing_backend_adsp_memory_window" if TRACING_BACKEND_ADSP_MEMORY_WINDOW 178 179config RAM_TRACING_BUFFER_SIZE 180 int "Ram Tracing buffer size" 181 default 4096 182 depends on TRACING_BACKEND_RAM 183 help 184 Size of the RAM trace buffer. Trace will be discarded if the 185 length is exceeded. 186 187config TRACING_HANDLE_HOST_CMD 188 bool "Host command handle" 189 select UART_INTERRUPT_DRIVEN if TRACING_BACKEND_UART 190 help 191 When enabled tracing will handle cmd from host to dynamically 192 enable and disable tracing to have host capture tracing stream 193 data conveniently. 194 195config TRACING_CMD_BUFFER_SIZE 196 int "Size of tracing command buffer" 197 default 32 198 range 32 128 199 help 200 Size of tracing command buffer. 201 202config TRACING_OBJECT_TRACKING 203 bool "Object tracking" 204 help 205 Keep lists to track kernel objects. 206 207menu "Tracing Configuration" 208 209config TRACING_SYSCALL 210 bool "Tracing Syscalls" 211 default y 212 help 213 Enable tracing Syscalls. 214 215config TRACING_THREAD 216 bool "Tracing Threads" 217 default y 218 help 219 Enable tracing Threads. 220 221config TRACING_WORK 222 bool "Tracing Work" 223 default y 224 help 225 Enable tracing Work and Work queue events 226 227config TRACING_ISR 228 bool "Tracing ISRs" 229 default y 230 help 231 Enable tracing ISRs. This requires the backend to be 232 very low-latency. 233 234config TRACING_SEMAPHORE 235 bool "Tracing Semaphores" 236 default y 237 help 238 Enable tracing Semaphores. 239 240config TRACING_MUTEX 241 bool "Tracing Mutexes" 242 default y 243 help 244 Enable tracing Mutexes. 245 246config TRACING_CONDVAR 247 bool "Tracing Condition Variables" 248 default y 249 help 250 Enable tracing Condition Variables 251 252config TRACING_QUEUE 253 bool "Tracing Queues" 254 default y 255 help 256 Enable tracing Queues. 257 258config TRACING_FIFO 259 bool "Tracing FIFO queues" 260 default y 261 help 262 Enable tracing FIFO queues. 263 264config TRACING_LIFO 265 bool "Tracing LIFO queues" 266 default y 267 help 268 Enable tracing LIFO queues. 269 270config TRACING_STACK 271 bool "Tracing Memory Stacks" 272 default y 273 help 274 Enable tracing Memory Stacks. 275 276config TRACING_MESSAGE_QUEUE 277 bool "Tracing Message Queues" 278 default y 279 help 280 Enable tracing Message Queues. 281 282config TRACING_MAILBOX 283 bool "Tracing Mailboxes" 284 default y 285 help 286 Enable tracing Mailboxes. 287 288config TRACING_PIPE 289 bool "Tracing Pipes" 290 default y 291 help 292 Enable tracing Pipes. 293 294config TRACING_HEAP 295 bool "Tracing Memory Heaps" 296 default y 297 help 298 Enable tracing Memory Heaps. 299 300config TRACING_MEMORY_SLAB 301 bool "Tracing Memory Slabs" 302 default y 303 help 304 Enable tracing Memory Slabs. 305 306config TRACING_TIMER 307 bool "Tracing Timers" 308 default y 309 help 310 Enable tracing Timers. 311 312config TRACING_EVENT 313 bool "Tracing Events" 314 default y 315 help 316 Enable tracing Events. 317 318config TRACING_POLLING 319 bool "Tracing Polling" 320 default y 321 help 322 Enable tracing Work Polling and Polling API. 323 324config TRACING_PM 325 bool "Tracing Power Management" 326 default y 327 help 328 Enable tracing Power Management. 329 330config TRACING_NETWORKING 331 bool "Tracing Network Objects" 332 default y if NETWORKING 333 help 334 Enable tracing network objects. 335 336config TRACING_NET_SOCKETS 337 bool "Tracing Network Sockets" 338 depends on TRACING_NETWORKING 339 default y if NET_SOCKETS 340 help 341 Enable tracing network sockets. 342 343config TRACING_NET_CORE 344 bool "Tracing Network Core IP stack" 345 depends on TRACING_NETWORKING 346 default y if NET_IP 347 help 348 Enable tracing core network IP stack, like packet reception 349 and sending. 350 351config TRACING_GPIO 352 bool "Tracing GPIO" 353 default n 354 help 355 Enable tracing GPIO. 356 357config TRACING_IDLE 358 bool "Tracing Idle" 359 default y 360 help 361 Enable tracing Idle state. 362 363endmenu # Tracing Configuration 364 365endif 366 367source "subsys/tracing/sysview/Kconfig" 368