mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 03:45:50 +08:00
Add on-boot instrumentation support for note filter
This commit is contained in:
committed by
Xiang Xiao
parent
a373079a94
commit
89ea234af8
@@ -55,6 +55,15 @@ config DRIVER_NOTERAM_BUFSIZE
|
|||||||
---help---
|
---help---
|
||||||
The size of the in-memory, circular instrumentation buffer (in bytes).
|
The size of the in-memory, circular instrumentation buffer (in bytes).
|
||||||
|
|
||||||
|
config DRIVER_NOTERAM_DEFAULT_NOOVERWRITE
|
||||||
|
bool "Disable overwrite by default"
|
||||||
|
depends on DRIVER_NOTERAM
|
||||||
|
default n
|
||||||
|
---help---
|
||||||
|
Disables overwriting old notes in the circular buffer when the buffer
|
||||||
|
is full by default. This is useful to keep instrumentation data of the
|
||||||
|
beginning of a system boot.
|
||||||
|
|
||||||
config DRIVER_NOTECTL
|
config DRIVER_NOTECTL
|
||||||
bool "Scheduler instrumentation filter control driver"
|
bool "Scheduler instrumentation filter control driver"
|
||||||
default n
|
default n
|
||||||
|
|||||||
@@ -92,7 +92,11 @@ static const struct file_operations g_noteram_fops =
|
|||||||
|
|
||||||
static struct noteram_info_s g_noteram_info =
|
static struct noteram_info_s g_noteram_info =
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_DRIVER_NOTERAM_DEFAULT_NOOVERWRITE
|
||||||
|
.ni_overwrite = NOTERAM_MODE_OVERWRITE_DISABLE
|
||||||
|
#else
|
||||||
.ni_overwrite = NOTERAM_MODE_OVERWRITE_ENABLE
|
.ni_overwrite = NOTERAM_MODE_OVERWRITE_ENABLE
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
|
|||||||
@@ -1000,6 +1000,16 @@ config SCHED_INSTRUMENTATION_FILTER
|
|||||||
The filter logic can be configured by sched_note_filter APIs defined in
|
The filter logic can be configured by sched_note_filter APIs defined in
|
||||||
include/nuttx/sched_note.h.
|
include/nuttx/sched_note.h.
|
||||||
|
|
||||||
|
config SCHED_INSTRUMENTATION_FILTER_DEFAULT_MODE
|
||||||
|
hex "Default instrumentation filter mode"
|
||||||
|
depends on SCHED_INSTRUMENTATION_FILTER
|
||||||
|
default 0x7
|
||||||
|
---help---
|
||||||
|
Default mode of the instrumentation filter logic.
|
||||||
|
Bit 0 = Enable instrumentation
|
||||||
|
Bit 1 = Enable syscall instrumentation
|
||||||
|
Bit 2 = Enable IRQ instrumentation
|
||||||
|
|
||||||
endif # SCHED_INSTRUMENTATION
|
endif # SCHED_INSTRUMENTATION
|
||||||
endmenu # Performance Monitoring
|
endmenu # Performance Monitoring
|
||||||
|
|
||||||
|
|||||||
@@ -75,9 +75,13 @@ struct note_startalloc_s
|
|||||||
#ifdef CONFIG_SCHED_INSTRUMENTATION_FILTER
|
#ifdef CONFIG_SCHED_INSTRUMENTATION_FILTER
|
||||||
static struct note_filter_s g_note_filter =
|
static struct note_filter_s g_note_filter =
|
||||||
{
|
{
|
||||||
|
.mode =
|
||||||
|
{
|
||||||
|
.flag = CONFIG_SCHED_INSTRUMENTATION_FILTER_DEFAULT_MODE,
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
.mode.cpuset = CONFIG_SCHED_INSTRUMENTATION_CPUSET
|
.cpuset = CONFIG_SCHED_INSTRUMENTATION_CPUSET,
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
|
|||||||
Reference in New Issue
Block a user