Tracing: Trace hook support macros
Adds generic trace hook macros for inserting trace hook for function entry, exit, blocking, and object initialization with a variable number of arguments (objects, return values, etc.). Utilizing macro concatenation these macros produce trace hooks of a similar format to the old trace system with SYS_TRACING_OBJ_FUNC(k_thread, switched_in) being turned into sys_trace_k_thread_switched_in() by the preprocessor. Although these macros still rely on the manual definition of each unique trace hook in tracing.h, the benefit of not directly calling those is that we can enable/disable trace hooks based on object type (k_thread, k_sem, etc.) through the preprocessor while providing the ability of adding type specific runtime trace processing similar to SYS_TRACING_OBJ_INIT. Signed-off-by: Torbjörn Leksell <torbjorn.leksell@percepio.com> Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
2f01479b56
commit
16bbb8ef34
3 changed files with 421 additions and 1 deletions
|
@ -189,13 +189,111 @@ config TRACING_CMD_BUFFER_SIZE
|
|||
help
|
||||
Size of tracing command buffer.
|
||||
|
||||
config TRACING_ISR
|
||||
menu "Tracing Configuration"
|
||||
config SYSCALL_TRACING
|
||||
bool "Enable tracing Syscalls"
|
||||
default y
|
||||
help
|
||||
Enable tracing Syscalls.
|
||||
|
||||
config TRACING_THREAD
|
||||
bool "Enable tracing Threads"
|
||||
default y
|
||||
help
|
||||
Enable tracing Threads.
|
||||
|
||||
config TRACING_WORK
|
||||
bool "Enable tracing Work"
|
||||
default y
|
||||
help
|
||||
Enable tracing Work and Work queue events
|
||||
|
||||
config TRACING_ISR
|
||||
bool "Enable tracing ISRs"
|
||||
default y
|
||||
help
|
||||
Enable tracing ISRs. This requires the backend to be
|
||||
very low-latency.
|
||||
|
||||
config TRACING_SEMAPHORE
|
||||
bool "Enable tracing Semaphores"
|
||||
default y
|
||||
help
|
||||
Enable tracing Semaphores.
|
||||
|
||||
config TRACING_MUTEX
|
||||
bool "Enable tracing Mutexes"
|
||||
default y
|
||||
help
|
||||
Enable tracing Mutexes.
|
||||
|
||||
config TRACING_CONDVAR
|
||||
bool "Enable tracing Condition Variables"
|
||||
default y
|
||||
help
|
||||
Enable tracing Condition Variables
|
||||
|
||||
config TRACING_QUEUE
|
||||
bool "Enable tracing Queues"
|
||||
default y
|
||||
help
|
||||
Enable tracing Queues.
|
||||
|
||||
config TRACING_FIFO
|
||||
bool "Enable tracing FIFO queues"
|
||||
default y
|
||||
help
|
||||
Enable tracing FIFO queues.
|
||||
|
||||
config TRACING_LIFO
|
||||
bool "Enable tracing LIFO queues"
|
||||
default y
|
||||
help
|
||||
Enable tracing LIFO queues.
|
||||
|
||||
config TRACING_STACK
|
||||
bool "Enable tracing Memory Stacks"
|
||||
default y
|
||||
help
|
||||
Enable tracing Memory Stacks.
|
||||
|
||||
config TRACING_MESSAGE_QUEUE
|
||||
bool "Enable tracing Message Queues"
|
||||
default y
|
||||
help
|
||||
Enable tracing Message Queues.
|
||||
|
||||
config TRACING_MAILBOX
|
||||
bool "Enable tracing Mailboxes"
|
||||
default y
|
||||
help
|
||||
Enable tracing Mailboxes.
|
||||
|
||||
config TRACING_PIPE
|
||||
bool "Enable tracing Pipes"
|
||||
default y
|
||||
help
|
||||
Enable tracing Pipes.
|
||||
|
||||
config TRACING_HEAP
|
||||
bool "Enable tracing Memory Heaps"
|
||||
default y
|
||||
help
|
||||
Enable tracing Memory Heaps.
|
||||
|
||||
config TRACING_MEMORY_SLAB
|
||||
bool "Enable tracing Memory Slabs"
|
||||
default y
|
||||
help
|
||||
Enable tracing Memory Slabs.
|
||||
|
||||
config TRACING_TIMER
|
||||
bool "Enable tracing Timers"
|
||||
default y
|
||||
help
|
||||
Enable tracing Timers.
|
||||
endmenu
|
||||
|
||||
endif
|
||||
|
||||
source "subsys/tracing/sysview/Kconfig"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue