Print the stack usage of threads in JSON metric format. More...
Print the stack usage of threads in JSON metric format.
When the module test_utils_print_stack_usage is used, the stack usage of each thread is printed when it exits, and the stack usage of the idle thread is printed when main() returns.
DEVELHELP is enabled, as the stacks are only filled with canaries and the stack sizes and thread names are only stored with DEVELHELP. Files | |
| file | print_stack_usage.h |
| Print the stack usage of threads. | |
Functions | |
| void | print_stack_usage_metric (const char *name, void *stack, unsigned max_size) |
| Print the stack usage of a stack in JSON metric format. | |
| void print_stack_usage_metric | ( | const char * | name, |
| void * | stack, | ||
| unsigned | max_size ) |
Print the stack usage of a stack in JSON metric format.
Does nothing if DEVELHELP is not enabled.
| [in] | name | Name of the thread to print. |
| [in] | stack | Start of the stack, as passed to thread_create() (may be unaligned). |
| [in] | max_size | Size of the stack in bytes, as passed to thread_create(). |