Snap for 11253496 from e3e46d4de9 to 24Q2-release

Change-Id: I5d65c439db503caf0063f112d38b12d678731ab9
This commit is contained in:
Android Build Coastguard Worker 2023-12-26 00:02:21 +00:00
commit d7c8ae097e

View file

@ -62,6 +62,14 @@ AdaptiveDvfsStateResidencyDataProvider::AdaptiveDvfsStateResidencyDataProvider(
} }
} }
// Cpufreq data is sorted in ascending order, but power stats are sorted
// in descending order. Reverse sorting to maintain consistency with
// other power stats.
if (states.size() > 1 &&
std::atoll(states[0].second.c_str()) < std::atoll(states[1].second.c_str())) {
std::reverse(states.begin(), states.end());
}
mPowerEntities.push_back({powerEntities[i].first, std::move(states)}); mPowerEntities.push_back({powerEntities[i].first, std::move(states)});
} }