util: kernel: Add cpu utilization helper function 10/271210/9
authorChanwoo Choi <cw00.choi@samsung.com>
Wed, 16 Feb 2022 07:51:54 +0000 (16:51 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Fri, 18 Feb 2022 07:51:07 +0000 (16:51 +0900)
commit0ab5562bf286bf1862c747e5a1c660d270db7886
tree02b643774204820eed47b0f83248d09b86e0efea
parentd9f2fd24a3ddd7e994df1418ccb2a0895c9aaf5e
util: kernel: Add cpu utilization helper function

Add cpu utilization helper function as following:

[Detailed description of cpu utilization helper function]
int kernel_get_avg_cpu_util(struct cpu_util_data *avg_cpu)
: Store the average cpu utilization of all cpus to 'avg_cpu'

int kernel_get_per_cpu_util(struct cpu_util_data *cpus, int num_possible_cpus,
    int *num_online_cpus);
: Store the per-cpu utilization datas to 'cpus' and store the number of
online to 'num_online_cpus'

Change-Id: I1594dc656759194ffa9468ed6eebbc159a47e5fd
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
include/util/kernel.h
src/util/kernel.c