powerstats: update GPU sysfs path for state residency
Bug: 244520099 Bug: 243096772 Test: dumpsys android.hardware.power.stats.IPowerStats/default Change-Id: If801c99b3eeeb9ca4a396612bd59f7dbebf17cc9 Signed-off-by: Darren Hsu <darrenhsu@google.com>
This commit is contained in:
parent
309d915204
commit
d45112c2e2
1 changed files with 3 additions and 2 deletions
|
@ -367,6 +367,7 @@ void addCPUclusters(std::shared_ptr<PowerStats> p) {
|
||||||
void addGPU(std::shared_ptr<PowerStats> p) {
|
void addGPU(std::shared_ptr<PowerStats> p) {
|
||||||
// Add gpu energy consumer
|
// Add gpu energy consumer
|
||||||
std::map<std::string, int32_t> stateCoeffs;
|
std::map<std::string, int32_t> stateCoeffs;
|
||||||
|
std::string path = "/sys/devices/platform/1f000000.mali";
|
||||||
|
|
||||||
// TODO (b/197721618): Measuring the GPU power numbers
|
// TODO (b/197721618): Measuring the GPU power numbers
|
||||||
stateCoeffs = {
|
stateCoeffs = {
|
||||||
|
@ -385,11 +386,11 @@ void addGPU(std::shared_ptr<PowerStats> p) {
|
||||||
|
|
||||||
p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterAndAttrConsumer(p,
|
p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterAndAttrConsumer(p,
|
||||||
EnergyConsumerType::OTHER, "GPU", {"S8S_VDD_G3D_L2"},
|
EnergyConsumerType::OTHER, "GPU", {"S8S_VDD_G3D_L2"},
|
||||||
{{UID_TIME_IN_STATE, "/sys/devices/platform/1f000000.mali/uid_time_in_state"}},
|
{{UID_TIME_IN_STATE, path + "/uid_time_in_state"}},
|
||||||
stateCoeffs));
|
stateCoeffs));
|
||||||
|
|
||||||
p->addStateResidencyDataProvider(std::make_unique<DevfreqStateResidencyDataProvider>("GPU",
|
p->addStateResidencyDataProvider(std::make_unique<DevfreqStateResidencyDataProvider>("GPU",
|
||||||
"/sys/devices/platform/28000000.mali"));
|
path));
|
||||||
}
|
}
|
||||||
|
|
||||||
void addMobileRadio(std::shared_ptr<PowerStats> p)
|
void addMobileRadio(std::shared_ptr<PowerStats> p)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue