Zephyr Project API  3.4.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
28 const char *name;
30 size_t stack_size;
32 size_t stack_used;
33
34#ifdef CONFIG_THREAD_RUNTIME_STATS
35 unsigned int utilization;
36#ifdef CONFIG_SCHED_THREAD_USAGE
38#endif
39#endif
40};
41
48typedef void (*thread_analyzer_cb)(struct thread_analyzer_info *info);
49
58
65
68#ifdef __cplusplus
69}
70#endif
71
72#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:48
void thread_analyzer_print(void)
Run the thread analyzer and print stack size statistics.
Definition: thread.h:192
Definition: thread_analyzer.h:24
const char * name
Definition: thread_analyzer.h:28
size_t stack_used
Definition: thread_analyzer.h:32
size_t stack_size
Definition: thread_analyzer.h:30