mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 19:20:22 +01:00
zephyr: Fix call to thread_analyzer_print for v4.0.
Commit 1b6e0f64796dfd6f86a8679ea6d24e1fca1e63a8 for Zephyr v4.0.0 changed the function "thread_analyzer_print" to require a cpu argument and allow thread analysis on each cpu separately. The argument is ignored when THREAD_ANALYZER_AUTO_SEPARATE_CORES=n which is the default on single core machines. Promote this change to the MicroPython zephyr module. Signed-off-by: Detlev Zundel <dzu@member.fsf.org> Signed-off-by: Maureen Helm <maureen.helm@analog.com>
This commit is contained in:
committed by
Damien George
parent
cd71db0172
commit
cd3eaad05c
@@ -22,9 +22,10 @@ Functions
|
||||
|
||||
Returns the thread id of the current thread, which is used to reference the thread.
|
||||
|
||||
.. function:: thread_analyze()
|
||||
.. function:: thread_analyze(cpu)
|
||||
|
||||
Runs the Zephyr debug thread analyzer on the current thread and prints stack size statistics in the format:
|
||||
Runs the Zephyr debug thread analyzer on the current thread on the given cpu
|
||||
and prints stack size statistics in the format:
|
||||
|
||||
"``thread_name``-20s: STACK: unused ``available_stack_space`` usage ``stack_space_used``
|
||||
/ ``stack_size`` (``percent_stack_space_used`` %); CPU: ``cpu_utilization`` %"
|
||||
@@ -35,6 +36,9 @@ Functions
|
||||
For more information, see documentation for Zephyr `thread analyzer
|
||||
<https://docs.zephyrproject.org/latest/guides/debug_tools/thread-analyzer.html#thread-analyzer>`_.
|
||||
|
||||
Note that the ``cpu`` argument is only used in Zephyr v4.0.0 and
|
||||
newer and ignored otherwise.
|
||||
|
||||
.. function:: shell_exec(cmd_in)
|
||||
|
||||
Executes the given command on an UART backend. This function can only be accessed if ``CONFIG_SHELL_BACKEND_SERIAL``
|
||||
|
||||
Reference in New Issue
Block a user