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>
This commit is contained in:
parent
dffac4331d
commit
5f32222576
4 changed files with 141 additions and 2 deletions
|
@ -51,6 +51,9 @@ class DvfsStateResidencyDataProvider : public PowerStats::IStateResidencyDataPro
|
|||
*/
|
||||
std::unordered_map<std::string, std::vector<State>> getInfo() override;
|
||||
|
||||
protected:
|
||||
std::vector<Config> mPowerEntities;
|
||||
|
||||
private:
|
||||
int32_t matchEntity(char const *line);
|
||||
int32_t matchState(char const *line, const Config& powerEntity);
|
||||
|
@ -58,7 +61,6 @@ class DvfsStateResidencyDataProvider : public PowerStats::IStateResidencyDataPro
|
|||
|
||||
const std::string mPath;
|
||||
const uint64_t mClockRate;
|
||||
std::vector<Config> mPowerEntities;
|
||||
};
|
||||
|
||||
} // namespace stats
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue