use gs-common soc dump

Bug: 273380509
Test: adb bugreport
Change-Id: Icb6eb7b67a3d258c2a6bc72368df92c7fbdb2f66
This commit is contained in:
Adam Shih 2023-03-14 10:52:43 +08:00
parent 970c538cc6
commit 256fe971e4
3 changed files with 2 additions and 47 deletions

View file

@ -18,6 +18,7 @@ include device/google/gs-common/device.mk
include device/google/gs-common/gs_watchdogd/watchdog.mk
include device/google/gs-common/ramdump/ramdump.mk
include device/google/gs-common/soc/soc.mk
include device/google/gs-common/soc/freq.mk
include device/google/gs-common/modem/modem.mk
include device/google/gs-common/aoc/aoc.mk
include device/google/gs-common/thermal/thermal.mk

View file

@ -193,8 +193,6 @@ void endSection(int fd, const std::string &sectionName, timepoint_t startTime) {
Dumpstate::Dumpstate()
: mTextSections{
{ "wlan", [this](int fd) { dumpWlanSection(fd); } },
{ "memory", [this](int fd) { dumpMemorySection(fd); } },
{ "Devfreq", [this](int fd) { dumpDevfreqSection(fd); } },
{ "power", [this](int fd) { dumpPowerSection(fd); } },
{ "pixel-trace", [this](int fd) { dumpPixelTraceSection(fd); } },
},
@ -474,38 +472,6 @@ void Dumpstate::dumpPowerSection(int fd) {
}
// Dump items related to Devfreq & BTS
void Dumpstate::dumpDevfreqSection(int fd) {
DumpFileToFd(fd, "MIF DVFS",
"/sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/time_in_state");
DumpFileToFd(fd, "INT DVFS",
"/sys/devices/platform/17000020.devfreq_int/devfreq/17000020.devfreq_int/time_in_state");
DumpFileToFd(fd, "INTCAM DVFS",
"/sys/devices/platform/17000030.devfreq_intcam/devfreq/17000030.devfreq_intcam/time_in_state");
DumpFileToFd(fd, "DISP DVFS",
"/sys/devices/platform/17000040.devfreq_disp/devfreq/17000040.devfreq_disp/time_in_state");
DumpFileToFd(fd, "CAM DVFS",
"/sys/devices/platform/17000050.devfreq_cam/devfreq/17000050.devfreq_cam/time_in_state");
DumpFileToFd(fd, "TNR DVFS",
"/sys/devices/platform/17000060.devfreq_tnr/devfreq/17000060.devfreq_tnr/time_in_state");
DumpFileToFd(fd, "MFC DVFS",
"/sys/devices/platform/17000070.devfreq_mfc/devfreq/17000070.devfreq_mfc/time_in_state");
DumpFileToFd(fd, "BO DVFS",
"/sys/devices/platform/17000080.devfreq_bo/devfreq/17000080.devfreq_bo/time_in_state");
DumpFileToFd(fd, "BTS stats", "/sys/devices/platform/exynos-bts/bts_stats");
}
// Dump items related to memory
void Dumpstate::dumpMemorySection(int fd) {
RunCommandToFd(fd, "CMA info", {"/vendor/bin/sh", "-c",
"for d in $(ls -d /d/cma/*); do "
"echo --- $d;"
"echo --- count; cat $d/count; "
"echo --- used; cat $d/used; "
"echo --- bitmap; cat $d/bitmap; "
"done"});
}
void Dumpstate::dumpRadioLogs(int fd, const std::string &destDir) {
std::string tcpdumpLogDir = TCPDUMP_LOG_DIRECTORY;
bool tcpdumpEnabled = ::android::base::GetBoolProperty(TCPDUMP_PERSIST_PROPERTY, false);
@ -632,6 +598,7 @@ ndk::ScopedAStatus Dumpstate::dumpstateBoard(const std::vector<::ndk::ScopedFile
ATRACE_BEGIN("dumpstateBoard");
// Unused arguments.
(void) in_timeoutMillis;
(void) in_mode;
if (in_fds.size() < 1) {
ALOGE("no FDs\n");
@ -646,17 +613,6 @@ ndk::ScopedAStatus Dumpstate::dumpstateBoard(const std::vector<::ndk::ScopedFile
"Invalid file descriptor");
}
if (in_mode == IDumpstateDevice::DumpstateMode::WEAR) {
// We aren't a Wear device.
ALOGE("Unsupported mode: %d\n", in_mode);
return ndk::ScopedAStatus::fromServiceSpecificErrorWithMessage(ERROR_UNSUPPORTED_MODE,
"Unsupported mode");
} else if (in_mode < IDumpstateDevice::DumpstateMode::FULL || in_mode > IDumpstateDevice::DumpstateMode::PROTO) {
ALOGE("Invalid mode: %d\n", in_mode);
return ndk::ScopedAStatus::fromExceptionCodeWithMessage(EX_ILLEGAL_ARGUMENT,
"Invalid mode");
}
if (in_fds.size() < 2) {
ALOGE("no FD for dumpstate_board binary\n");
} else {

View file

@ -54,8 +54,6 @@ class Dumpstate : public BnDumpstateDevice {
// addition to being included in full dumps
void dumpWlanSection(int fd);
void dumpPowerSection(int fd);
void dumpDevfreqSection(int fd);
void dumpMemorySection(int fd);
void dumpPixelTraceSection(int fd);
void dumpLogSection(int fd, int fdModem);