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) {
|
||||
// Add gpu energy consumer
|
||||
std::map<std::string, int32_t> stateCoeffs;
|
||||
std::string path = "/sys/devices/platform/1f000000.mali";
|
||||
|
||||
// TODO (b/197721618): Measuring the GPU power numbers
|
||||
stateCoeffs = {
|
||||
|
@ -385,11 +386,11 @@ void addGPU(std::shared_ptr<PowerStats> p) {
|
|||
|
||||
p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterAndAttrConsumer(p,
|
||||
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));
|
||||
|
||||
p->addStateResidencyDataProvider(std::make_unique<DevfreqStateResidencyDataProvider>("GPU",
|
||||
"/sys/devices/platform/28000000.mali"));
|
||||
path));
|
||||
}
|
||||
|
||||
void addMobileRadio(std::shared_ptr<PowerStats> p)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue