From bdb4b8f669c94904dd4a09a64aa192e716ee9326 Mon Sep 17 00:00:00 2001 From: Adam Shih Date: Tue, 7 Mar 2023 10:54:07 +0800 Subject: remove dump text section Bug: 269212897 Test: adb bugreport Change-Id: I73d005268bd3964477a8af776362ec57f969cc0d --- dumpstate/Dumpstate.cpp | 30 ++---------------------------- dumpstate/Dumpstate.h | 6 ------ 2 files changed, 2 insertions(+), 34 deletions(-) (limited to 'dumpstate') diff --git a/dumpstate/Dumpstate.cpp b/dumpstate/Dumpstate.cpp index 0c06f78..4ce19b7 100644 --- a/dumpstate/Dumpstate.cpp +++ b/dumpstate/Dumpstate.cpp @@ -188,10 +188,7 @@ void endSection(int fd, const std::string §ionName, timepoint_t startTime) { } Dumpstate::Dumpstate() - : mTextSections{ - { "display", [this](int fd) { dumpDisplaySection(fd); } }, - }, - mLogSections{ + : mLogSections{ { "radio", [this](int fd, const std::string &destDir) { dumpRadioLogs(fd, destDir); } }, { "camera", [this](int fd, const std::string &destDir) { dumpCameraLogs(fd, destDir); } }, } { @@ -203,18 +200,6 @@ void Dumpstate::dumpTextSection(int fd, const std::string §ionName) { bool dumpAll = (sectionName == kAllSections); std::string dumpFiles; - for (const auto §ion : mTextSections) { - if (dumpAll || sectionName == section.first) { - auto startTime = startSection(fd, section.first); - section.second(fd); - endSection(fd, section.first, startTime); - - if (!dumpAll) { - return; - } - } - } - // Execute all or designated programs under vendor/bin/dump/ std::unique_ptr dir(opendir("/vendor/bin/dump"), closedir); if (!dir) { @@ -248,22 +233,11 @@ void Dumpstate::dumpTextSection(int fd, const std::string §ionName) { // An unsupported section was requested on the command line ::android::base::WriteStringToFd("Unrecognized text section: " + sectionName + "\n", fd); ::android::base::WriteStringToFd("Try \"" + kAllSections + "\" or one of the following:", fd); - for (const auto §ion : mTextSections) { - ::android::base::WriteStringToFd(" " + section.first, fd); - } ::android::base::WriteStringToFd(dumpFiles, fd); - ::android::base::WriteStringToFd("\nNote: sections with attachments (e.g. modem) are" + ::android::base::WriteStringToFd("\nNote: sections with attachments (e.g. dump_soc) are" "not avalable from the command line.\n", fd); } -// Dump items related to display -void Dumpstate::dumpDisplaySection(int fd) { - DumpFileToFd(fd, "DECON-1 counters /sys/class/drm/card0/device/decon1/counters", "/sys/class/drm/card0/device/decon1/counters"); - DumpFileToFd(fd, "CRTC-1 event log", "/sys/kernel/debug/dri/0/crtc-1/event"); - DumpFileToFd(fd, "Secondary panel name", "/sys/devices/platform/exynos-drm/secondary-panel/panel_name"); - DumpFileToFd(fd, "Secondary panel extra info", "/sys/devices/platform/exynos-drm/secondary-panel/panel_extinfo"); -} - void Dumpstate::dumpRadioLogs(int fd, const std::string &destDir) { std::string tcpdumpLogDir = TCPDUMP_LOG_DIRECTORY; bool tcpdumpEnabled = ::android::base::GetBoolProperty(TCPDUMP_PERSIST_PROPERTY, false); diff --git a/dumpstate/Dumpstate.h b/dumpstate/Dumpstate.h index d3596ba..e3637fd 100644 --- a/dumpstate/Dumpstate.h +++ b/dumpstate/Dumpstate.h @@ -42,18 +42,12 @@ class Dumpstate : public BnDumpstateDevice { private: const std::string kAllSections = "all"; - std::vector>> mTextSections; std::vector>> mLogSections; void dumpLogs(int fd, std::string srcDir, std::string destDir, int maxFileNum, const char *logPrefix); void dumpTextSection(int fd, std::string const& sectionName); - - // Text sections that can be dumped individually on the command line in - // addition to being included in full dumps - void dumpDisplaySection(int fd); - void dumpLogSection(int fd, int fdModem); // Log sections to be dumped individually into dumpstate_board.bin -- cgit v1.2.3