create cma dump

Bug: 240530709
Test: adb bugreport
Change-Id: Iadac309611bc6dd27615b087f159234d6f1b655c
This commit is contained in:
Adam Shih 2023-02-15 12:42:16 +08:00
parent 8eb00e662f
commit 5f802b7e13
5 changed files with 18 additions and 13 deletions

View file

@ -210,7 +210,6 @@ void endSection(int fd, const std::string &sectionName, timepoint_t startTime) {
Dumpstate::Dumpstate()
: mTextSections{
{ "memory", [this](int fd) { dumpMemorySection(fd); } },
{ "display", [this](int fd) { dumpDisplaySection(fd); } },
},
mLogSections{
@ -281,17 +280,6 @@ void Dumpstate::dumpTextSection(int fd, const std::string &sectionName) {
"not avalable from the command line.\n", fd);
}
// 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"});
}
// Dump items related to display
void Dumpstate::dumpDisplaySection(int fd) {
// Dump counters for decon drivers