From b8ff3f3f68398734064609d0c024f7ecdcafe4e4 Mon Sep 17 00:00:00 2001 From: Doug Zobel Date: Tue, 7 Feb 2023 10:48:10 -0600 Subject: [PATCH] dumpstate: Collect PCIe link stats [DO NOT MERGE] Collect PCIe link statistics in dumpstate. DO NOT MERGE because the same functionality is already implemented in dump_pcie.sh in upstream branches. Test: adb bugreport && unzip bugreport*.zip && grep link_stats dumpstate_board.txt Bug: 266561593 Change-Id: I5b530b68f8c8cd6ed2bc5016d5aef55c3caafbd8 Signed-off-by: Doug Zobel --- dumpstate/Dumpstate.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dumpstate/Dumpstate.cpp b/dumpstate/Dumpstate.cpp index b85f12dc..98cfeb2c 100644 --- a/dumpstate/Dumpstate.cpp +++ b/dumpstate/Dumpstate.cpp @@ -1210,6 +1210,10 @@ void Dumpstate::dumpLEDSection(int fd) { void Dumpstate::dumpPCIeSection(int fd) { DumpFileToFd(fd, "PCIe0 Logs", "/dev/logbuffer_pcie0"); DumpFileToFd(fd, "PCIe1 Logs", "/dev/logbuffer_pcie1"); + RunCommandToFd(fd, "PCIe Link Statistics", {"/vendor/bin/sh", "-c", + "for f in ls /sys/devices/platform/14520000.pcie/link_stats/* " + " /sys/devices/platform/11920000.pcie/link_stats/*; do " + " echo \"$f: `cat $f`\"; done"}); } void Dumpstate::dumpModemSection(int fd) {