Zephyr API Documentation 3.7.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
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
10#include <stddef.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
30 const char *name;
32 size_t stack_size;
34 size_t stack_used;
35
36#ifdef CONFIG_THREAD_RUNTIME_STATS
37 unsigned int utilization;
38#ifdef CONFIG_SCHED_THREAD_USAGE
40#endif
41#endif
42
43#ifdef CONFIG_THREAD_ANALYZER_PRIV_STACK_USAGE
45 size_t priv_stack_size;
46
48 size_t priv_stack_used;
49#endif
50};
51
58typedef void (*thread_analyzer_cb)(struct thread_analyzer_info *info);
59
70void thread_analyzer_run(thread_analyzer_cb cb, unsigned int cpu);
71
81void thread_analyzer_print(unsigned int cpu);
82
85#ifdef __cplusplus
86}
87#endif
88
89#endif /* __STACK_SIZE_ANALYZER_H */
void thread_analyzer_print(unsigned int cpu)
Run the thread analyzer and print stack size statistics.
void(* thread_analyzer_cb)(struct thread_analyzer_info *info)
Thread analyzer stack size callback function.
Definition thread_analyzer.h:58
void thread_analyzer_run(thread_analyzer_cb cb, unsigned int cpu)
Run the thread analyzer and provide information to the callback.
Definition thread.h:207
Definition thread_analyzer.h:26
const char * name
The name of the thread or stringified address of the thread handle if name is not set.
Definition thread_analyzer.h:30
size_t stack_used
Stack size in used.
Definition thread_analyzer.h:34
size_t stack_size
The total size of the stack.
Definition thread_analyzer.h:32