summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsashwinbalaji <sashwinbalaji@google.com>2022-09-13 18:34:17 +0800
committerS Ashwin Balaji <sashwinbalaji@google.com>2022-09-14 02:26:27 +0000
commitd9cf38a854a661c258c070d5e0055c51c8887e0a (patch)
tree6f2a3555a72ad0a2a5e1303cccc63010c2cbc6fb
parent7b9a57837717fc341509a4a3e6cb447edd163727 (diff)
thermal: in lshal-debug make headings camelCase and ending with colon
-Make all entries have same format headerTitle: content1 content2 Bug: 246489316 Test: adb shell lshal debug android.hardware.thermal@2.0::IThermal/default Change-Id: Ia0fcda5eda89d999730db1754cdb68f2de217876
-rw-r--r--thermal/Thermal.cpp28
-rw-r--r--thermal/pid_1_0/Thermal.cpp28
2 files changed, 30 insertions, 26 deletions
diff --git a/thermal/Thermal.cpp b/thermal/Thermal.cpp
index 4b9e5cf..d3dc032 100644
--- a/thermal/Thermal.cpp
+++ b/thermal/Thermal.cpp
@@ -282,7 +282,7 @@ void Thermal::sendThermalChangedCallback(const Temperature_2_0 &t) {
}
void Thermal::dumpVirtualSensorInfo(std::ostringstream *dump_buf) {
- *dump_buf << "VirtualSensorInfo:" << std::endl;
+ *dump_buf << "getVirtualSensorInfo:" << std::endl;
const auto &map = thermal_helper_.GetSensorInfoMap();
for (const auto &sensor_info_pair : map) {
if (sensor_info_pair.second.virtual_sensor_info != nullptr) {
@@ -337,7 +337,7 @@ void Thermal::dumpVirtualSensorInfo(std::ostringstream *dump_buf) {
}
void Thermal::dumpThrottlingInfo(std::ostringstream *dump_buf) {
- *dump_buf << "Throttling Info:" << std::endl;
+ *dump_buf << "getThrottlingInfo:" << std::endl;
const auto &map = thermal_helper_.GetSensorInfoMap();
const auto &thermal_throttling_status_map = thermal_helper_.GetThermalThrottlingStatusMap();
for (const auto &name_info_pair : map) {
@@ -464,7 +464,7 @@ void Thermal::dumpThrottlingRequestStatus(std::ostringstream *dump_buf) {
if (!thermal_throttling_status_map.size()) {
return;
}
- *dump_buf << "Throttling Request Status " << std::endl;
+ *dump_buf << "getThrottlingRequestStatus:" << std::endl;
for (const auto &thermal_throttling_status_pair : thermal_throttling_status_map) {
*dump_buf << " Name: " << thermal_throttling_status_pair.first << std::endl;
if (thermal_throttling_status_pair.second.pid_power_budget_map.size()) {
@@ -513,7 +513,7 @@ void Thermal::dumpPowerRailInfo(std::ostringstream *dump_buf) {
const auto &power_rail_info_map = thermal_helper_.GetPowerRailInfoMap();
const auto &power_status_map = thermal_helper_.GetPowerStatusMap();
- *dump_buf << "Power Rail Info " << std::endl;
+ *dump_buf << "getPowerRailInfo:" << std::endl;
for (const auto &power_rail_pair : power_rail_info_map) {
*dump_buf << " Power Rail: " << power_rail_pair.first << std::endl;
*dump_buf << " Power Sample Count: " << power_rail_pair.second.power_sample_count
@@ -583,7 +583,7 @@ Return<void> Thermal::debug(const hidl_handle &handle, const hidl_vec<hidl_strin
hidl_vec<CpuUsage> cpu_usages;
dump_buf << "getCpuUsages:" << std::endl;
if (!thermal_helper_.fillCpuUsages(&cpu_usages)) {
- dump_buf << "Failed to get CPU usages." << std::endl;
+ dump_buf << " Failed to get CPU usages." << std::endl;
}
for (const auto &usage : cpu_usages) {
@@ -679,7 +679,7 @@ Return<void> Thermal::debug(const hidl_handle &handle, const hidl_vec<hidl_strin
hidl_vec<CoolingDevice_2_0> cooling_devices;
if (!thermal_helper_.fillCurrentCoolingDevices(false, CoolingType::CPU,
&cooling_devices)) {
- dump_buf << "Failed to getCurrentCoolingDevices." << std::endl;
+ dump_buf << " Failed to getCurrentCoolingDevices." << std::endl;
}
for (const auto &c : cooling_devices) {
@@ -688,7 +688,8 @@ Return<void> Thermal::debug(const hidl_handle &handle, const hidl_vec<hidl_strin
}
}
{
- dump_buf << "Callbacks: Total " << callbacks_.size() << std::endl;
+ dump_buf << "getCallbacks:" << std::endl;
+ dump_buf << " Total: " << callbacks_.size() << std::endl;
for (const auto &c : callbacks_) {
dump_buf << " IsFilter: " << c.is_filter_type
<< " Type: " << android::hardware::thermal::V2_0::toString(c.type)
@@ -696,7 +697,7 @@ Return<void> Thermal::debug(const hidl_handle &handle, const hidl_vec<hidl_strin
}
}
{
- dump_buf << "SendCallback" << std::endl;
+ dump_buf << "sendCallback:" << std::endl;
dump_buf << " Enabled List: ";
const auto &map = thermal_helper_.GetSensorInfoMap();
for (const auto &name_info_pair : map) {
@@ -707,7 +708,7 @@ Return<void> Thermal::debug(const hidl_handle &handle, const hidl_vec<hidl_strin
dump_buf << std::endl;
}
{
- dump_buf << "SendPowerHint" << std::endl;
+ dump_buf << "sendPowerHint:" << std::endl;
dump_buf << " Enabled List: ";
const auto &map = thermal_helper_.GetSensorInfoMap();
for (const auto &name_info_pair : map) {
@@ -722,11 +723,12 @@ Return<void> Thermal::debug(const hidl_handle &handle, const hidl_vec<hidl_strin
dumpThrottlingRequestStatus(&dump_buf);
dumpPowerRailInfo(&dump_buf);
{
- dump_buf << "AIDL Power Hal exist: " << std::boolalpha
- << thermal_helper_.isAidlPowerHalExist() << std::endl;
- dump_buf << "AIDL Power Hal connected: " << std::boolalpha
+ dump_buf << "getAIDLPowerHalInfo:" << std::endl;
+ dump_buf << " Exist: " << std::boolalpha << thermal_helper_.isAidlPowerHalExist()
+ << std::endl;
+ dump_buf << " Connected: " << std::boolalpha
<< thermal_helper_.isPowerHalConnected() << std::endl;
- dump_buf << "AIDL Power Hal Ext connected: " << std::boolalpha
+ dump_buf << " Ext connected: " << std::boolalpha
<< thermal_helper_.isPowerHalExtConnected() << std::endl;
}
}
diff --git a/thermal/pid_1_0/Thermal.cpp b/thermal/pid_1_0/Thermal.cpp
index 2f41445..7e6f7c0 100644
--- a/thermal/pid_1_0/Thermal.cpp
+++ b/thermal/pid_1_0/Thermal.cpp
@@ -282,7 +282,7 @@ void Thermal::sendThermalChangedCallback(const Temperature_2_0 &t) {
}
void Thermal::dumpVirtualSensorInfo(std::ostringstream *dump_buf) {
- *dump_buf << "VirtualSensorInfo:" << std::endl;
+ *dump_buf << "getVirtualSensorInfo:" << std::endl;
const auto &map = thermal_helper_.GetSensorInfoMap();
for (const auto &sensor_info_pair : map) {
if (sensor_info_pair.second.virtual_sensor_info != nullptr) {
@@ -331,7 +331,7 @@ void Thermal::dumpVirtualSensorInfo(std::ostringstream *dump_buf) {
}
void Thermal::dumpThrottlingInfo(std::ostringstream *dump_buf) {
- *dump_buf << "Throttling Info:" << std::endl;
+ *dump_buf << "getThrottlingInfo:" << std::endl;
const auto &map = thermal_helper_.GetSensorInfoMap();
const auto &thermal_throttling_status_map = thermal_helper_.GetThermalThrottlingStatusMap();
for (const auto &name_info_pair : map) {
@@ -458,7 +458,7 @@ void Thermal::dumpThrottlingRequestStatus(std::ostringstream *dump_buf) {
if (!thermal_throttling_status_map.size()) {
return;
}
- *dump_buf << "Throttling Request Status " << std::endl;
+ *dump_buf << "getThrottlingRequestStatus:" << std::endl;
for (const auto &thermal_throttling_status_pair : thermal_throttling_status_map) {
*dump_buf << " Name: " << thermal_throttling_status_pair.first << std::endl;
if (thermal_throttling_status_pair.second.pid_power_budget_map.size()) {
@@ -507,7 +507,7 @@ void Thermal::dumpPowerRailInfo(std::ostringstream *dump_buf) {
const auto &power_rail_info_map = thermal_helper_.GetPowerRailInfoMap();
const auto &power_status_map = thermal_helper_.GetPowerStatusMap();
- *dump_buf << "Power Rail Info " << std::endl;
+ *dump_buf << "getPowerRailInfo:" << std::endl;
for (const auto &power_rail_pair : power_rail_info_map) {
*dump_buf << " Power Rail: " << power_rail_pair.first << std::endl;
*dump_buf << " Power Sample Count: " << power_rail_pair.second.power_sample_count
@@ -577,7 +577,7 @@ Return<void> Thermal::debug(const hidl_handle &handle, const hidl_vec<hidl_strin
hidl_vec<CpuUsage> cpu_usages;
dump_buf << "getCpuUsages:" << std::endl;
if (!thermal_helper_.fillCpuUsages(&cpu_usages)) {
- dump_buf << "Failed to get CPU usages." << std::endl;
+ dump_buf << " Failed to get CPU usages." << std::endl;
}
for (const auto &usage : cpu_usages) {
@@ -673,7 +673,7 @@ Return<void> Thermal::debug(const hidl_handle &handle, const hidl_vec<hidl_strin
hidl_vec<CoolingDevice_2_0> cooling_devices;
if (!thermal_helper_.fillCurrentCoolingDevices(false, CoolingType::CPU,
&cooling_devices)) {
- dump_buf << "Failed to getCurrentCoolingDevices." << std::endl;
+ dump_buf << " Failed to getCurrentCoolingDevices." << std::endl;
}
for (const auto &c : cooling_devices) {
@@ -682,7 +682,8 @@ Return<void> Thermal::debug(const hidl_handle &handle, const hidl_vec<hidl_strin
}
}
{
- dump_buf << "Callbacks: Total " << callbacks_.size() << std::endl;
+ dump_buf << "getCallbacks:" << std::endl;
+ dump_buf << " Total: " << callbacks_.size() << std::endl;
for (const auto &c : callbacks_) {
dump_buf << " IsFilter: " << c.is_filter_type
<< " Type: " << android::hardware::thermal::V2_0::toString(c.type)
@@ -690,7 +691,7 @@ Return<void> Thermal::debug(const hidl_handle &handle, const hidl_vec<hidl_strin
}
}
{
- dump_buf << "SendCallback" << std::endl;
+ dump_buf << "sendCallback:" << std::endl;
dump_buf << " Enabled List: ";
const auto &map = thermal_helper_.GetSensorInfoMap();
for (const auto &name_info_pair : map) {
@@ -701,7 +702,7 @@ Return<void> Thermal::debug(const hidl_handle &handle, const hidl_vec<hidl_strin
dump_buf << std::endl;
}
{
- dump_buf << "SendPowerHint" << std::endl;
+ dump_buf << "sendPowerHint:" << std::endl;
dump_buf << " Enabled List: ";
const auto &map = thermal_helper_.GetSensorInfoMap();
for (const auto &name_info_pair : map) {
@@ -716,11 +717,12 @@ Return<void> Thermal::debug(const hidl_handle &handle, const hidl_vec<hidl_strin
dumpThrottlingRequestStatus(&dump_buf);
dumpPowerRailInfo(&dump_buf);
{
- dump_buf << "AIDL Power Hal exist: " << std::boolalpha
- << thermal_helper_.isAidlPowerHalExist() << std::endl;
- dump_buf << "AIDL Power Hal connected: " << std::boolalpha
+ dump_buf << "getAIDLPowerHalInfo:" << std::endl;
+ dump_buf << " Exist: " << std::boolalpha << thermal_helper_.isAidlPowerHalExist()
+ << std::endl;
+ dump_buf << " Connected: " << std::boolalpha
<< thermal_helper_.isPowerHalConnected() << std::endl;
- dump_buf << "AIDL Power Hal Ext connected: " << std::boolalpha
+ dump_buf << " Ext connected: " << std::boolalpha
<< thermal_helper_.isPowerHalExtConnected() << std::endl;
}
}