Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 8f296eb2 authored by Connor O'Brien's avatar Connor O'Brien
Browse files

libtimeinstate: add getCpuFreqs() function



Currently the KernelCpuUidFreqTimeReader reads the first line of
/proc/uid_time_in_state to determine a device's available CPU
frequencies, but libtimeinstate already reads this information from
sysfs files that are supported upstream. Add a function to provide
this information to libtimeinstate's users & eliminate the need to
read the proc file for this data.
Add a sanity check in libtimeinstate_test to confirm that
getCpuFreqs() and getUidCpuFreqTimes() report the same number of
frequencies for each cluster.

Bug: 138317993
Test: libtimeinstate_test passes
Change-Id: I3e8c632d14bbeb552d7e52bd83a9b4a64dec408d
Signed-off-by: default avatarConnor O'Brien <connoro@google.com>
parent 3fc2cb71
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment