Zephyr Project API  3.2.0
A Scalable Open Source RTOS
thread_analyzer.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 - 2020 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef __STACK_SIZE_ANALYZER_H
8#define __STACK_SIZE_ANALYZER_H
9#include <stddef.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
27 const char *name;
29 size_t stack_size;
31 size_t stack_used;
32
33#ifdef CONFIG_THREAD_RUNTIME_STATS
34 unsigned int utilization;
35#ifdef CONFIG_SCHED_THREAD_USAGE
37#endif
38#endif
39};
40
47typedef void (*thread_analyzer_cb)(struct thread_analyzer_info *info);
48
57
64
67#ifdef __cplusplus
68}
69#endif
70
71#endif /* __STACK_SIZE_ANALYZER_H */
void thread_analyzer_run(thread_analyzer_cb cb)
Run the thread analyzer and provide information to the callback.
void(* thread_analyzer_cb)(struct thread_analyzer_info *info)
Thread analyzer stack size callback function.
Definition: thread_analyzer.h:47
void thread_analyzer_print(void)
Run the thread analyzer and print stack size statistics.
Definition: thread.h:192
Definition: thread_analyzer.h:23
const char * name
Definition: thread_analyzer.h:27
size_t stack_used
Definition: thread_analyzer.h:31
size_t stack_size
Definition: thread_analyzer.h:29