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_PERCEPIO_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. 163 164config TRACING_BACKEND_ADSP_MEMORY_WINDOW 165 bool "Memory window in RAM" 166 depends on SOC_FAMILY_INTEL_ADSP 167 depends on TRACING_SYNC 168 help 169 Use ADSP memory debug memory window to output tracing data 170 171endchoice 172 173config RAM_TRACING_BUFFER_SIZE 174 int "Ram Tracing buffer size" 175 default 4096 176 depends on TRACING_BACKEND_RAM 177 help 178 Size of the RAM trace buffer. Trace will be discarded if the 179 length is exceeded. 180 181config TRACING_USB_MPS 182 int "USB backend max packet size" 183 default 64 184 depends on TRACING_BACKEND_USB 185 help 186 USB tracing backend max packet size(endpoint MPS). 187 188config TRACING_HANDLE_HOST_CMD 189 bool "Host command handle" 190 select UART_INTERRUPT_DRIVEN if TRACING_BACKEND_UART 191 help 192 When enabled tracing will handle cmd from host to dynamically 193 enable and disable tracing to have host capture tracing stream 194 data conveniently. 195 196config TRACING_CMD_BUFFER_SIZE 197 int "Size of tracing command buffer" 198 default 32 199 range 32 128 200 help 201 Size of tracing command buffer. 202 203config TRACING_OBJECT_TRACKING 204 bool "Object tracking" 205 help 206 Keep lists to track kernel objects. 207 208menu "Tracing Configuration" 209 210config TRACING_SYSCALL 211 bool "Tracing Syscalls" 212 default y 213 help 214 Enable tracing Syscalls. 215 216config TRACING_THREAD 217 bool "Tracing Threads" 218 default y 219 help 220 Enable tracing Threads. 221 222config TRACING_WORK 223 bool "Tracing Work" 224 default y 225 help 226 Enable tracing Work and Work queue events 227 228config TRACING_ISR 229 bool "Tracing ISRs" 230 default y 231 help 232 Enable tracing ISRs. This requires the backend to be 233 very low-latency. 234 235config TRACING_SEMAPHORE 236 bool "Tracing Semaphores" 237 default y 238 help 239 Enable tracing Semaphores. 240 241config TRACING_MUTEX 242 bool "Tracing Mutexes" 243 default y 244 help 245 Enable tracing Mutexes. 246 247config TRACING_CONDVAR 248 bool "Tracing Condition Variables" 249 default y 250 help 251 Enable tracing Condition Variables 252 253config TRACING_QUEUE 254 bool "Tracing Queues" 255 default y 256 help 257 Enable tracing Queues. 258 259config TRACING_FIFO 260 bool "Tracing FIFO queues" 261 default y 262 help 263 Enable tracing FIFO queues. 264 265config TRACING_LIFO 266 bool "Tracing LIFO queues" 267 default y 268 help 269 Enable tracing LIFO queues. 270 271config TRACING_STACK 272 bool "Tracing Memory Stacks" 273 default y 274 help 275 Enable tracing Memory Stacks. 276 277config TRACING_MESSAGE_QUEUE 278 bool "Tracing Message Queues" 279 default y 280 help 281 Enable tracing Message Queues. 282 283config TRACING_MAILBOX 284 bool "Tracing Mailboxes" 285 default y 286 help 287 Enable tracing Mailboxes. 288 289config TRACING_PIPE 290 bool "Tracing Pipes" 291 default y 292 help 293 Enable tracing Pipes. 294 295config TRACING_HEAP 296 bool "Tracing Memory Heaps" 297 default y 298 help 299 Enable tracing Memory Heaps. 300 301config TRACING_MEMORY_SLAB 302 bool "Tracing Memory Slabs" 303 default y 304 help 305 Enable tracing Memory Slabs. 306 307config TRACING_TIMER 308 bool "Tracing Timers" 309 default y 310 help 311 Enable tracing Timers. 312 313config TRACING_EVENT 314 bool "Tracing Events" 315 default y 316 help 317 Enable tracing Events. 318 319config TRACING_POLLING 320 bool "Tracing Polling" 321 default y 322 help 323 Enable tracing Work Polling and Polling API. 324 325config TRACING_PM 326 bool "Tracing Power Management" 327 default y 328 help 329 Enable tracing Power Management. 330 331config TRACING_NETWORKING 332 bool "Tracing Network Objects" 333 default y if NETWORKING 334 help 335 Enable tracing network objects. 336 337config TRACING_NET_SOCKETS 338 bool "Tracing Network Sockets" 339 depends on TRACING_NETWORKING 340 default y if NET_SOCKETS 341 help 342 Enable tracing network sockets. 343 344config TRACING_NET_CORE 345 bool "Tracing Network Core IP stack" 346 depends on TRACING_NETWORKING 347 default y if NET_IP 348 help 349 Enable tracing core network IP stack, like packet reception 350 and sending. 351 352config TRACING_GPIO 353 bool "Tracing GPIO" 354 default n 355 help 356 Enable tracing GPIO. 357 358endmenu # Tracing Configuration 359 360endif 361 362source "subsys/tracing/sysview/Kconfig" 363