dumpstate: Add logbuffer support for pcie driver [DO NOT MERGE]

Add logbuffer support to pcie driver to reduce dmesg spam.

Bug: 267495494
Change-Id: Ic70dfd696d084c1ab7f55872b69ca86856720592
Signed-off-by: Sajid Dalvi <sdalvi@google.com>
This commit is contained in:
Sajid Dalvi 2023-01-24 12:22:08 -06:00
parent e05f4413af
commit fd2a8ca06b
3 changed files with 9 additions and 0 deletions

View file

@ -244,6 +244,7 @@ Dumpstate::Dumpstate()
{ "led", [this](int fd) { dumpLEDSection(fd); } },
{ "pixel-trace", [this](int fd) { dumpPixelTraceSection(fd); } },
{ "perf-metrics", [this](int fd) { dumpPerfMetricsSection(fd); } },
{ "pcie", [this](int fd) { dumpPCIeSection(fd); } },
},
mLogSections{
{ "modem", [this](int fd, const std::string &destDir) { dumpModemLogs(fd, destDir); } },
@ -1197,6 +1198,11 @@ void Dumpstate::dumpLEDSection(int fd) {
}
}
void Dumpstate::dumpPCIeSection(int fd) {
DumpFileToFd(fd, "PCIe0 Logs", "/dev/logbuffer_pcie0");
DumpFileToFd(fd, "PCIe1 Logs", "/dev/logbuffer_pcie1");
}
void Dumpstate::dumpModemSection(int fd) {
DumpFileToFd(fd, "Modem Stat", "/data/vendor/modem_stat/debug.txt");
RunCommandToFd(fd, "Modem SSR history", {"/vendor/bin/sh", "-c",