dumpstate: change HWC fence & error logs to be per display

hwc_error_log.txt and hwc_fence_state.txt files will be changed to be
per display. Those files could also be divided into at most 2 files,
i.e.
- hwc_error_log.txt will be renamed to
  {DisplayName}_hwc_error_log{index}.txt where {index} is 0 or 1.
- hwc_fence_state.txt will be renamed to
  {DisplayName}_hwc_fence_state{index}.txt where {index} is 0 or 1.

Bug: 245511651
Test: adb bugreport
Change-Id: I08fbc4faf5fea72cbbca007f43ccedd22d1e0aca
This commit is contained in:
Wiwit Rifa'i 2022-12-12 14:58:18 +08:00 committed by TreeHugger Robot
parent 321d6339d7
commit 73e95ea084

View file

@ -590,8 +590,14 @@ void Dumpstate::dumpDisplaySection(int fd) {
DumpFileToFd(fd, "Primary panel extra info", "/sys/devices/platform/exynos-drm/primary-panel/panel_extinfo"); DumpFileToFd(fd, "Primary panel extra info", "/sys/devices/platform/exynos-drm/primary-panel/panel_extinfo");
DumpFileToFd(fd, "secondary panel extra info", "/sys/devices/platform/exynos-drm/secondary-panel/panel_extinfo"); DumpFileToFd(fd, "secondary panel extra info", "/sys/devices/platform/exynos-drm/secondary-panel/panel_extinfo");
if (!PropertiesHelper::IsUserBuild()) { if (!PropertiesHelper::IsUserBuild()) {
DumpFileToFd(fd, "HWC Fence State", "/data/vendor/log/hwc/hwc_fence_state.txt"); RunCommandToFd(fd, "HWC Fence States", {"/vendor/bin/sh", "-c",
DumpFileToFd(fd, "HWC Error Log", "/data/vendor/log/hwc/hwc_error_log.txt"); "for f in $(ls /data/vendor/log/hwc/*_hwc_fence_state*.txt); do "
"echo $f ; cat $f ; done"},
CommandOptions::WithTimeout(2).Build());
RunCommandToFd(fd, "HWC Error Logs", {"/vendor/bin/sh", "-c",
"for f in $(ls /data/vendor/log/hwc/*_hwc_error_log*.txt); do "
"echo $f ; cat $f ; done"},
CommandOptions::WithTimeout(2).Build());
RunCommandToFd(fd, "HWC Debug Dumps", {"/vendor/bin/sh", "-c", RunCommandToFd(fd, "HWC Debug Dumps", {"/vendor/bin/sh", "-c",
"for f in $(ls /data/vendor/log/hwc/*_hwc_debug*.dump); do " "for f in $(ls /data/vendor/log/hwc/*_hwc_debug*.dump); do "
"echo $f ; cat $f ; done"}, "echo $f ; cat $f ; done"},