summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSajid Dalvi <sdalvi@google.com>2023-01-24 12:22:08 -0600
committerSajid Dalvi <sdalvi@google.com>2023-02-02 21:30:23 +0000
commitfd2a8ca06b7fd36da9c87a1425b3ea33c162abc6 (patch)
tree669f42005c398fa9240ea325ac14096fe34761c9
parente05f4413af5f7623d86737497e79305c56a2fd91 (diff)
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>
-rw-r--r--conf/init.gs201.rc2
-rw-r--r--dumpstate/Dumpstate.cpp6
-rw-r--r--dumpstate/Dumpstate.h1
3 files changed, 9 insertions, 0 deletions
diff --git a/conf/init.gs201.rc b/conf/init.gs201.rc
index af2dac6b..2e6ca3c0 100644
--- a/conf/init.gs201.rc
+++ b/conf/init.gs201.rc
@@ -482,6 +482,8 @@ on early-boot
chown system system /dev/logbuffer_cpm
chown system system /dev/logbuffer_bd
chown system system /dev/logbuffer_dual_batt
+ chown system system /dev/logbuffer_pcie0
+ chown system system /dev/logbuffer_pcie1
on boot
diff --git a/dumpstate/Dumpstate.cpp b/dumpstate/Dumpstate.cpp
index 41292eab..65f774aa 100644
--- a/dumpstate/Dumpstate.cpp
+++ b/dumpstate/Dumpstate.cpp
@@ -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",
diff --git a/dumpstate/Dumpstate.h b/dumpstate/Dumpstate.h
index 805c1cbd..b13061fa 100644
--- a/dumpstate/Dumpstate.h
+++ b/dumpstate/Dumpstate.h
@@ -72,6 +72,7 @@ class Dumpstate : public BnDumpstateDevice {
void dumpLEDSection(int fd);
void dumpPixelTraceSection(int fd);
void dumpPerfMetricsSection(int fd);
+ void dumpPCIeSection(int fd);
void dumpLogSection(int fd, int fdModem);