redfin: dumpstate: add UFS err_stats dump

dumpstate_board.txt:
------ UFS err_stats (/vendor/bin/sh ... ------
err_clear_pend_xfer_tm:0
err_eh:0
err_hibern8_enter:0
err_hibern8_exit:0
err_int_fatal_error:0
err_int_uic_error:0
err_linkstartup:0
err_power_mode_change:0
err_resume:0
err_suspend:0
err_task_abort:0
err_vops_suspend:0

Bug: 137150088
Bug: 151790553
Test: run bugreport and capture dumpstate_board
Change-Id: I519d4d751028e127abffcd0230d0e7664aa13386
Signed-off-by: Leo Liou <leoliou@google.com>
This commit is contained in:
Leo Liou
2019-11-04 00:18:48 +08:00
committed by Cyan_Hsieh
parent bbd22edaf1
commit 363bcf7857

View File

@@ -519,6 +519,11 @@ static void DumpUFS(int fd) {
DumpFileToFd(fd, "UFS Slow IO Unmap", "/sys/devices/platform/soc/" + bootdev + "/slowio_unmap_cnt");
DumpFileToFd(fd, "UFS Slow IO Sync", "/sys/devices/platform/soc/" + bootdev + "/slowio_sync_cnt");
RunCommandToFd(fd, "UFS err_stats", {"/vendor/bin/sh", "-c",
"path=\"/sys/devices/platform/soc/" + bootdev + "/err_stats\"; "
"for node in `ls $path/err_*`; do "
"printf \"%s:%d\\n\" $(basename $node) $(cat $node); done;"});
RunCommandToFd(fd, "UFS io_stats", {"/vendor/bin/sh", "-c",
"path=\"/sys/devices/platform/soc/" + bootdev + "/io_stats\"; "
"printf \"\\t\\t%-10s %-10s %-10s %-10s %-10s %-10s\\n\" "