Zephyr Project API  3.4.0
A Scalable Open Source RTOS
stats.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021,2023, Intel Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_KERNEL_STATS_H_
8#define ZEPHYR_INCLUDE_KERNEL_STATS_H_
9
10#include <stdint.h>
11#include <stdbool.h>
12
13/*
14 * [k_cycle_stats] is used to track internal statistics about both thread
15 * and CPU usage.
16 */
17
19 uint64_t total; /* total usage in cycles */
20#ifdef CONFIG_SCHED_THREAD_USAGE_ANALYSIS
21 uint64_t current; /* # of cycles in current usage window */
22 uint64_t longest; /* # of cycles in longest usage window */
23 uint32_t num_windows; /* # of usage windows */
24#endif
25 bool track_usage; /* true if gathering usage stats */
26};
27
28#endif
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
__UINT64_TYPE__ uint64_t
Definition: stdint.h:91
Definition: stats.h:18
uint64_t total
Definition: stats.h:19
bool track_usage
Definition: stats.h:25