summaryrefslogtreecommitdiff
path: root/dumpstate
diff options
context:
space:
mode:
authorAdam Shih <adamshih@google.com>2023-03-09 06:00:37 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-03-09 06:00:37 +0000
commitdb2f65327e84a22d8db43d4357e4e8db33f7967a (patch)
tree0833428007179ca7ab94a6b7b5eec902a131b4ba /dumpstate
parent045391fafc8ebd6aa3095cd0f1f3f884a979c0a2 (diff)
parentea136aebf3ba1ea59909fa26957d2fdac4c866d6 (diff)
downloadzuma-db2f65327e84a22d8db43d4357e4e8db33f7967a.tar.gz
Merge "remove dump text section" into udc-dev am: b90aaae77b am: ea136aebf3
Original change: https://googleplex-android-review.googlesource.com/c/device/google/zuma/+/21806765 Change-Id: I7125361d8bc05ed522453a97906de891777756f7 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'dumpstate')
-rw-r--r--dumpstate/Dumpstate.cpp30
-rw-r--r--dumpstate/Dumpstate.h6
2 files changed, 2 insertions, 34 deletions
diff --git a/dumpstate/Dumpstate.cpp b/dumpstate/Dumpstate.cpp
index a2ddf50..8e0a09a 100644
--- a/dumpstate/Dumpstate.cpp
+++ b/dumpstate/Dumpstate.cpp
@@ -188,10 +188,7 @@ void endSection(int fd, const std::string &sectionName, 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); } },
} {
}
@@ -202,18 +199,6 @@ void Dumpstate::dumpTextSection(int fd, const std::string &sectionName) {
bool dumpAll = (sectionName == kAllSections);
std::string dumpFiles;
- for (const auto &section : 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, decltype(&closedir)> dir(opendir("/vendor/bin/dump"), closedir);
if (!dir) {
@@ -247,22 +232,11 @@ void Dumpstate::dumpTextSection(int fd, const std::string &sectionName) {
// 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 &section : 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 8ecdf8f..8804120 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<std::pair<std::string, std::function<void(int)>>> mTextSections;
std::vector<std::pair<std::string, std::function<void(int, const std::string &)>>> 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