12#ifndef ZEPHYR_INCLUDE_DEBUG_STACK_H_
13#define ZEPHYR_INCLUDE_DEBUG_STACK_H_
20#if defined(CONFIG_INIT_STACKS) && defined(CONFIG_THREAD_STACK_INFO)
25 if (k_thread_stack_space_get(
thread, &unused) == 0) {
26 unsigned int pcnt = ((size - unused) * 100U) / size;
34 LOG_INF(
"%p (%s):\tunused %zu\tusage %zu / %zu (%u %%)",
static struct k_thread thread[2]
Definition: atomic.c:22
static char * log_strdup(const char *str)
Definition: log.h:290
#define LOG_MODULE_DECLARE(...)
Macro for declaring a log module (not registering it).
Definition: log.h:410
#define LOG_INF(...)
Writes an INFO level message to the log.
Definition: log.h:61
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:18
struct _thread_stack_info stack_info
Definition: thread.h:256