powerstats: introduce AdaptiveDvfsStateResidency data provider
This is a new data provider to get state residency from fvp_stats,
which is similar with DVFS data provider. But the difference is that
CPU frequency table is read from cpufreq sysfs and not predefined in
the config.
Bug: 272642210
Bug: 267638537
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I22451b55dee5dfb0a1b36497533c2063984d5483
Signed-off-by: Darren Hsu <darrenhsu@google.com>
diff --git a/powerstats/DvfsStateResidencyDataProvider.cpp b/powerstats/DvfsStateResidencyDataProvider.cpp
index 511159e..c7561d6 100644
--- a/powerstats/DvfsStateResidencyDataProvider.cpp
+++ b/powerstats/DvfsStateResidencyDataProvider.cpp
@@ -37,7 +37,7 @@
DvfsStateResidencyDataProvider::DvfsStateResidencyDataProvider(std::string path, uint64_t clockRate,
std::vector<Config> cfgs)
- : mPath(std::move(path)), mClockRate(clockRate), mPowerEntities(std::move(cfgs)) {}
+ : mPowerEntities(std::move(cfgs)), mPath(std::move(path)), mClockRate(clockRate) {}
int32_t DvfsStateResidencyDataProvider::matchEntity(char const *line) {
for (int32_t i = 0; i < mPowerEntities.size(); i++) {