powerstats: introduce Modem PCIe GEN state residency
This is a feature request from Modem team to add new state residency stats for Modem PCIe GEN speed. Bug: 338278462 Test: dumpsys android.hardware.power.stats.IPowerStats/default Change-Id: I909d7ac7b42d0b91633796f7a868fa525891e719 Signed-off-by: Darren Hsu <darrenhsu@google.com>
This commit is contained in:
parent
ce5d8d3c0e
commit
debc35444a
1 changed files with 18 additions and 0 deletions
|
@ -475,6 +475,24 @@ void addPCIe(std::shared_ptr<PowerStats> p) {
|
|||
|
||||
p->addStateResidencyDataProvider(std::make_unique<GenericStateResidencyDataProvider>(
|
||||
"/sys/devices/platform/13120000.pcie/power_stats", pcieWifiCfgs));
|
||||
|
||||
// Add PCIe Modem GEN
|
||||
const GenericStateResidencyDataProvider::StateResidencyConfig modemGenStateConfig = {
|
||||
.entryCountSupported = true,
|
||||
.entryCountPrefix = "count:",
|
||||
.totalTimeSupported = true,
|
||||
.totalTimePrefix = "duration msec:",
|
||||
};
|
||||
const std::vector<std::pair<std::string, std::string>> modemGenStateHeaders = {
|
||||
std::make_pair("GEN1", "Gen1:"),
|
||||
std::make_pair("GEN3", "Gen3:"),
|
||||
};
|
||||
const std::vector<GenericStateResidencyDataProvider::PowerEntityConfig> modemGenCfgs = {
|
||||
{generateGenericStateResidencyConfigs(modemGenStateConfig, modemGenStateHeaders),
|
||||
"PCIe-Modem-GEN", "link_speed:"}
|
||||
};
|
||||
p->addStateResidencyDataProvider(std::make_unique<GenericStateResidencyDataProvider>(
|
||||
"/sys/devices/platform/12100000.pcie/link_duration", modemGenCfgs));
|
||||
}
|
||||
|
||||
void addWifi(std::shared_ptr<PowerStats> p) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue