12#ifndef ZEPHYR_INCLUDE_DEBUG_STACK_H_
13#define ZEPHYR_INCLUDE_DEBUG_STACK_H_
21#if defined(CONFIG_INIT_STACKS) && defined(CONFIG_THREAD_STACK_INFO)
28 if (k_thread_stack_space_get(thread, &unused) == 0) {
29 unsigned int pcnt = ((size - unused) * 100U) / size;
37 LOG_INF(
"%p (%s):\tunused %zu\tusage %zu / %zu (%u %%)",
38 thread, tname, unused, size - unused, size,
#define LOG_MODULE_DECLARE(...)
Macro for declaring a log module (not registering it).
Definition: log.h:425
#define LOG_INF(...)
Writes an INFO level message to the log.
Definition: log.h:65
const char * k_thread_name_get(k_tid_t thread)
Get thread name.
static void log_stack_usage(const struct k_thread *thread)
Definition: stack.h:19
Thread Structure.
Definition: thread.h:259
struct _thread_stack_info stack_info
Stack Info.
Definition: thread.h:317