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

Skip to content
Commit cc844ea5 authored by Lakshman Annadorai's avatar Lakshman Annadorai
Browse files

Report CPU online status & avg time in state freq.

- CpuInfoReader must verify all frequency policy directories for the
  presence of time_in_state file before marking it as missing because
  this file might be missing when all cores on a policy are offline.
  Thus, check all policies.
- Split the CPU info cache into static and dynamic CPU info stats. This
  helps preseves all the information read from the sysfs interface.
  With the previous implementation, some critical information required
  to make certain decision (later in the implementation) were lost.
  - For instance, the related & affected CPU cores information are
    required to decide whether a CPU core is online or offline.
  - The current & max CPU frequency should come from the same source -
    either both from the frequency reported by the CPU hardware or
    the frequency determined by the scaling governor.
- Handle the case where a CPU core is offline and the latest CPU usage
  stats are missing. This will be useful when collection bugreport dump.
- Fix the return types to avoid boxing/unboxing ints/longs.

Test: atest CpuInfoReaderTest
Bug: 242722241

Change-Id: I5c51ac8b699ffe616b64de279ebab12968723160
parent f1707975
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment