mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 13:18:50 +08:00
Update task trace document
This commit is contained in:
parent
7905ee17d4
commit
08ad202dfb
2 changed files with 39 additions and 6 deletions
|
@ -180,6 +180,23 @@ Noteram Device (``/dev/note``)
|
|||
|
||||
The header file ``include/nuttx/note/noteram_driver.h`` provides the interface definitions of the device.
|
||||
|
||||
``/dev/note`` Data Structures
|
||||
--------------------------------
|
||||
|
||||
.. c:struct:: noteram_get_taskname_s
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
struct noteram_get_taskname_s
|
||||
{
|
||||
pid_t pid;
|
||||
char taskname[CONFIG_TASK_NAME_SIZE + 1];
|
||||
};
|
||||
|
||||
- ``pid`` : Task ID to get the task name.
|
||||
|
||||
- ``taskname`` : The task name string corresponding to given pid.
|
||||
|
||||
``/dev/note`` Ioctls
|
||||
--------------------
|
||||
|
||||
|
@ -222,6 +239,15 @@ Noteram Device (``/dev/note``)
|
|||
:return: If success, 0 (``OK``) is returned and the given overwriter mode is set as the current settings.
|
||||
If failed, a negated ``errno`` is returned.
|
||||
|
||||
.. c:macro:: NOTERAM_GETTASKNAME
|
||||
|
||||
Get task name string
|
||||
|
||||
:argument: A writable pointer to :c:struct:`noteram_get_taskname_s`
|
||||
|
||||
:return: If success, 0 (``OK``) is returned and the task name corresponding to given pid is stored into the given pointer.
|
||||
If failed, a negated ``errno`` is returned.
|
||||
|
||||
Filter control APIs
|
||||
===================
|
||||
|
||||
|
|
|
@ -43,20 +43,27 @@ The following configurations are configurable parameters for trace.
|
|||
- Bit 2 = Enable IRQ instrumentation
|
||||
- Bit 3 = Enable collecting syscall arguments
|
||||
|
||||
- ``CONFIG_SCHED_INSTRUMENTATION_NOTERAM_BUFSIZE``
|
||||
- ``CONFIG_SCHED_INSTRUMENTATION_HIRES``
|
||||
|
||||
- If enabled, use higher resolution system timer for instrumentation.
|
||||
|
||||
- ``CONFIG_DRIVER_NOTERAM_BUFSIZE``
|
||||
|
||||
- Specify the note buffer size in bytes.
|
||||
Higher value can hold more note records, but consumes more kernel memory.
|
||||
|
||||
- ``CONFIG_SCHED_INSTRUMENTATION_NOTERAM_DEFAULT_NOOVERWRITE``
|
||||
- ``CONFIG_DRIVER_NOTERAM_TASKNAME_BUFSIZE``
|
||||
|
||||
- Specify the task name buffer size 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.
|
||||
|
||||
- ``CONFIG_DRIVER_NOTERAM_DEFAULT_NOOVERWRITE``
|
||||
|
||||
- If enabled, stop 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_SCHED_INSTRUMENTATION_HIRES``
|
||||
|
||||
- If enabled, use higher resolution system timer for instrumentation.
|
||||
|
||||
After the configuration, rebuild the NuttX kernel and application.
|
||||
|
||||
If the trace function is enabled, "``trace``" :doc:`../applications/nsh/builtin` will be available.
|
||||
|
|
Loading…
Reference in a new issue