1 /*
2  * Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
3  *
4  * SPDX-License-Identifier: BSD-2-Clause
5  */
6 
7 #pragma once
8 
9 #include <autoconf.h>
10 
11 #ifdef CONFIG_BENCHMARK_TRACK_UTILISATION
12 enum benchmark_track_util_ipc_index {
13     /* TCB cap passed in the syscall */
14     /* Number of cycles thread spends scheduled */
15     BENCHMARK_TCB_UTILISATION,
16     /* Number of times thread is scheduled */
17     BENCHMARK_TCB_NUMBER_SCHEDULES,
18     /* Number of cycles thread spends in kernel */
19     BENCHMARK_TCB_KERNEL_UTILISATION,
20     /* Number of times thread enters kernel */
21     BENCHMARK_TCB_NUMBER_KERNEL_ENTRIES,
22 
23     /* Idle thread */
24     /* Number of cycles idle thread spends scheduled */
25     BENCHMARK_IDLE_LOCALCPU_UTILISATION,
26     BENCHMARK_IDLE_TCBCPU_UTILISATION,
27     /* Number of times idle thread is scheduled */
28     BENCHMARK_IDLE_NUMBER_SCHEDULES,
29     /* Number of cycles idle thread spends in kernel */
30     BENCHMARK_IDLE_KERNEL_UTILISATION,
31     /* Number of times idle thread enters kernel */
32     BENCHMARK_IDLE_NUMBER_KERNEL_ENTRIES,
33 
34     /* Totals for the current core */
35     /* Total cycles used by the core for the period */
36     BENCHMARK_TOTAL_UTILISATION,
37     /* Total number of times the core schedules a different thread */
38     BENCHMARK_TOTAL_NUMBER_SCHEDULES,
39     /* Total cycles spent inside the kernel by the core for the period */
40     BENCHMARK_TOTAL_KERNEL_UTILISATION,
41     /* Total number of times the kernel is entered on the current core */
42     BENCHMARK_TOTAL_NUMBER_KERNEL_ENTRIES,
43 };
44 
45 #endif /* CONFIG_BENCHMARK_TRACK_UTILISATION */
46