2020-08-06 01:43:13 +08:00
|
|
|
#
|
|
|
|
# For a description of the syntax of this configuration file,
|
|
|
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
|
|
|
#
|
|
|
|
|
2023-02-14 01:11:48 +08:00
|
|
|
config DRIVERS_NOTE
|
2020-09-08 18:44:29 +08:00
|
|
|
bool "Note Driver Support"
|
2023-02-14 00:58:19 +08:00
|
|
|
depends on SCHED_INSTRUMENTATION
|
2020-08-06 01:43:13 +08:00
|
|
|
default n
|
2020-09-08 18:44:29 +08:00
|
|
|
|
2023-02-14 01:11:48 +08:00
|
|
|
if DRIVERS_NOTE
|
2020-09-08 18:44:29 +08:00
|
|
|
|
2023-02-14 01:11:48 +08:00
|
|
|
config DRIVERS_NOTE_MAX
|
2022-12-16 18:31:28 +08:00
|
|
|
int "Maximum number of sched_note drivers"
|
|
|
|
default 1
|
|
|
|
---help---
|
|
|
|
sched_note supports the maximum number of drivers
|
|
|
|
|
2023-02-14 01:11:48 +08:00
|
|
|
config DRIVERS_NOTE_TASKNAME_BUFSIZE
|
2022-12-26 13:18:33 +08:00
|
|
|
int "Note task name buffer size"
|
|
|
|
default 256 if TASK_NAME_SIZE > 0
|
|
|
|
default 0 if TASK_NAME_SIZE = 0
|
|
|
|
---help---
|
|
|
|
The size of the in-memory task name buffer (in bytes).
|
|
|
|
The buffer is used to hold the name of the task during instrumentation.
|
|
|
|
Trace dump can find and show a task name corresponding to given pid in
|
|
|
|
the instrumentation data by using this buffer.
|
|
|
|
If 0 is specified, this feature is disabled and trace dump shows only
|
|
|
|
the name of the newly created task.
|
|
|
|
|
2023-02-14 01:11:48 +08:00
|
|
|
config DRIVERS_NOTECTL
|
2022-12-27 21:43:14 +08:00
|
|
|
bool "Scheduler instrumentation filter control driver"
|
|
|
|
default n
|
|
|
|
depends on SCHED_INSTRUMENTATION_FILTER
|
|
|
|
---help---
|
|
|
|
If this option is selected, the instrumentation filter control device
|
|
|
|
/dev/notectl is provided.
|
|
|
|
|
2023-02-14 01:11:48 +08:00
|
|
|
config DRIVERS_NOTERAM
|
2020-09-08 18:44:29 +08:00
|
|
|
bool "Note RAM driver"
|
2023-01-06 12:44:36 +08:00
|
|
|
default y
|
2020-08-06 01:43:13 +08:00
|
|
|
---help---
|
2020-08-07 02:57:30 +08:00
|
|
|
If this option is selected, then in-memory buffering logic is
|
|
|
|
enabled to capture scheduler instrumentation data. This has
|
|
|
|
the advantage that (1) the platform logic does not have to provide
|
|
|
|
the sched_note_* interfaces described for the previous settings.
|
|
|
|
Instead, the buffering logic catches all of these. It encodes
|
|
|
|
timestamps the scheduler note and adds the note to an in-memory,
|
|
|
|
circular buffer. And (2) buffering the scheduler instrumentation
|
|
|
|
data (versus performing some output operation) minimizes the impact
|
|
|
|
of the instrumentation on the behavior of the system. If the in-memory
|
|
|
|
buffer becomes full, then older notes are overwritten by newer notes.
|
|
|
|
|
|
|
|
A character driver is provided which can be used by an application
|
2020-08-06 01:43:13 +08:00
|
|
|
to read data from the in-memory, scheduler instrumentation "note"
|
|
|
|
buffer.
|
|
|
|
|
2020-08-07 02:57:30 +08:00
|
|
|
NOTE: This option is not available if critical sections are being
|
2021-11-13 01:50:14 +08:00
|
|
|
monitored (nor if spinlocks are being monitored in SMP configuration)
|
2020-08-07 02:57:30 +08:00
|
|
|
because there would be a logical error in the design in those cases.
|
|
|
|
That error is that these interfaces call enter_ and leave_critical_section
|
2021-11-13 01:50:14 +08:00
|
|
|
(which use spinlocks in SMP mode). That means that each call to
|
2020-08-07 02:57:30 +08:00
|
|
|
sched_note_get() causes several additional entries to be added from
|
|
|
|
the note buffer in order to remove one entry.
|
|
|
|
|
2023-02-14 01:11:48 +08:00
|
|
|
if DRIVERS_NOTERAM
|
2020-09-08 18:44:29 +08:00
|
|
|
|
2023-02-14 01:11:48 +08:00
|
|
|
config DRIVERS_NOTERAM_BUFSIZE
|
2020-09-08 18:44:29 +08:00
|
|
|
int "Note RAM buffer size"
|
2020-08-07 02:57:30 +08:00
|
|
|
default 2048
|
|
|
|
---help---
|
2020-09-08 18:44:29 +08:00
|
|
|
The size of the in-memory, circular instrumentation buffer (in bytes).
|
2020-08-07 02:57:30 +08:00
|
|
|
|
2023-02-14 01:11:48 +08:00
|
|
|
config DRIVERS_NOTERAM_DEFAULT_NOOVERWRITE
|
2020-09-09 08:06:38 +08:00
|
|
|
bool "Disable overwrite by default"
|
|
|
|
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.
|
|
|
|
|
2023-07-05 21:53:33 +08:00
|
|
|
config DRIVERS_NOTERAM_CRASH_DUMP
|
|
|
|
bool "Dump noteram buffer on panic"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
If this option is enabled, dump all contents when a crash occurs.
|
|
|
|
|
2023-02-14 01:11:48 +08:00
|
|
|
endif # DRIVERS_NOTERAM
|
2023-01-06 12:44:36 +08:00
|
|
|
|
2023-02-14 01:11:48 +08:00
|
|
|
config DRIVERS_NOTELOG
|
2023-01-06 12:44:36 +08:00
|
|
|
bool "Note syslog driver"
|
|
|
|
---help---
|
|
|
|
The note driver output to syslog.
|
|
|
|
|
2023-02-24 11:37:35 +08:00
|
|
|
config DRIVERS_NOTESNAP
|
|
|
|
bool "Last scheduling information"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Record the last scheduling information.
|
|
|
|
|
|
|
|
if DRIVERS_NOTESNAP
|
|
|
|
config DRIVERS_NOTESNAP_NBUFFERS
|
|
|
|
int "Number of last scheduling information buffers"
|
|
|
|
default 128
|
|
|
|
---help---
|
|
|
|
Number of last scheduling information buffers.
|
|
|
|
endif
|
|
|
|
|
2023-02-14 01:11:48 +08:00
|
|
|
endif # DRIVERS_NOTE
|