Merge "extract misc section from dumpstate"

This commit is contained in:
Adam Shih 2023-02-13 03:24:47 +00:00 committed by Android (Google) Code Review
commit e3aae9ad7d
3 changed files with 2 additions and 20 deletions

View file

@ -24,6 +24,7 @@ include device/google/gs-common/trusty/trusty.mk
include device/google/gs-common/pcie/pcie.mk
include device/google/gs-common/storage/storage.mk
include device/google/gs-common/thermal/thermal.mk
include device/google/gs-common/performance/perf.mk
include device/google/zuma/dumpstate/item.mk

View file

@ -208,23 +208,11 @@ void endSection(int fd, const std::string &sectionName, timepoint_t startTime) {
"\n", fd);
}
// If you are adding a single RunCommandToFd() or DumpFileToFd() call, please
// add it to dumpMiscSection(). But if you are adding multiple items that are
// related to each other - for instance, for a Foo peripheral - please add them
// to a new dump function and include it in this table so it can be accessed from the
// command line, e.g.:
// dumpsys android.hardware.dumpstate.IDumpstateDevice/default foo
//
// However, if your addition generates attachments and/or binary data for the
// bugreport (i.e. if it requires two file descriptors to execute), it must not be
// added to this table and should instead be added to dumpstateBoard() below.
Dumpstate::Dumpstate()
: mTextSections{
{ "memory", [this](int fd) { dumpMemorySection(fd); } },
{ "Devfreq", [this](int fd) { dumpDevfreqSection(fd); } },
{ "display", [this](int fd) { dumpDisplaySection(fd); } },
{ "misc", [this](int fd) { dumpMiscSection(fd); } },
{ "led", [this](int fd) { dumpLEDSection(fd); } },
},
mLogSections{
@ -280,6 +268,7 @@ void Dumpstate::dumpTextSection(int fd, const std::string &sectionName) {
}
if (dumpAll) {
RunCommandToFd(fd, "VENDOR PROPERTIES", {"/vendor/bin/getprop"});
return;
}
@ -381,12 +370,6 @@ void Dumpstate::dumpDisplaySection(int fd) {
}
}
// Dump items that don't fit well into any other section
void Dumpstate::dumpMiscSection(int fd) {
RunCommandToFd(fd, "VENDOR PROPERTIES", {"/vendor/bin/getprop"});
DumpFileToFd(fd, "VENDOR PROC DUMP", "/proc/vendor_sched/dump_task");
}
// Dump items related to LED
void Dumpstate::dumpLEDSection(int fd) {
struct stat buffer;

View file

@ -52,11 +52,9 @@ class Dumpstate : public BnDumpstateDevice {
// Text sections that can be dumped individually on the command line in
// addition to being included in full dumps
void dumpPowerSection(int fd);
void dumpDevfreqSection(int fd);
void dumpMemorySection(int fd);
void dumpDisplaySection(int fd);
void dumpMiscSection(int fd);
void dumpLEDSection(int fd);
void dumpLogSection(int fd, int fdModem);