This adds a new event type to the kernel event logger that tracks thread-related events: being added to the ready queue, pending a thread, and exiting a thread. It's the only event type that contains "subevents" and thus has a non-void parameter in their respective _sys_k_event_logger_*() function. Luckily, as isn't the case with other events (such as IRQs and thread switching), these functions are called from platform-agnostic places, so there's no need to worry about changing the assembly guts. This is the first patch in a series adding support for better real-time profiling of Zephyr applications. Jira: ZEP-1463 Change-Id: I6d63607ba347f7a9cac3d016fef8f5a0a830e267 Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
92 lines
2.4 KiB
Plaintext
92 lines
2.4 KiB
Plaintext
#
|
|
# Copyright (c) 2014-2015 Wind River Systems, Inc.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
menuconfig KERNEL_EVENT_LOGGER
|
|
bool
|
|
prompt "Enable kernel event logger features"
|
|
default n
|
|
select RING_BUFFER
|
|
help
|
|
This feature enables the usage of the profiling logger. Provides the
|
|
logging of sleep events (either entering or leaving low power conditions),
|
|
context switch events, interrupt events, boot events and a method to
|
|
collect these event messages.
|
|
|
|
if KERNEL_EVENT_LOGGER
|
|
config KERNEL_EVENT_LOGGER_BUFFER_SIZE
|
|
int
|
|
prompt "Kernel event logger buffer size"
|
|
default 128
|
|
help
|
|
Buffer size in 32-bit words.
|
|
|
|
config KERNEL_EVENT_LOGGER_DYNAMIC
|
|
bool
|
|
prompt "Kernel event logger dynamic enabling"
|
|
default n
|
|
help
|
|
If enabled, kernel event logger is not logging any data to the ring buffer
|
|
It is up to the application to set the appropriate flags to enable/disable the
|
|
logging of each event type.
|
|
|
|
config KERNEL_EVENT_LOGGER_CUSTOM_TIMESTAMP
|
|
bool
|
|
prompt "Kernel event logger custom timestamp"
|
|
default n
|
|
help
|
|
This flag enables the possibility to set the timer function to be used to
|
|
populate kernel event logger timestamp. This has to be done at runtime by
|
|
calling sys_k_event_logger_set_timer and providing the function callback.
|
|
|
|
menu "Kernel event logging points"
|
|
|
|
config KERNEL_EVENT_LOGGER_CONTEXT_SWITCH
|
|
bool
|
|
prompt "Context switch event logging point"
|
|
default n
|
|
help
|
|
Enable the context switch event messages.
|
|
|
|
config KERNEL_EVENT_LOGGER_INTERRUPT
|
|
bool
|
|
prompt "Interrupt event logging point"
|
|
default n
|
|
help
|
|
Enable interrupt event messages. These messages provide the following
|
|
information: The time when interrupts occur.
|
|
|
|
config KERNEL_EVENT_LOGGER_SLEEP
|
|
bool
|
|
prompt "Sleep event logging point"
|
|
default n
|
|
depends on SYS_POWER_MANAGEMENT
|
|
help
|
|
Enable low power condition event messages. These messages provide the
|
|
following information:
|
|
|
|
- When the CPU went to sleep mode.
|
|
- When the CPU woke up.
|
|
- The ID of the interrupt that woke the CPU up.
|
|
|
|
config KERNEL_EVENT_LOGGER_THREAD
|
|
bool
|
|
prompt "Thread event logging point"
|
|
default n
|
|
help
|
|
Enable thread event messages. These messages provide the following
|
|
information:
|
|
|
|
- When threads are marked as ready to be executed.
|
|
- When threads are marked as pending.
|
|
- When threads end.
|
|
|
|
Context switching messages should be enabled by enabling the
|
|
CONFIG_KERNEL_EVENT_LOGGER_CONTEXT_SWITCH setting instead.
|
|
|
|
endmenu
|
|
|
|
endif
|