diff options
author | Leo Liou <leoliou@google.com> | 2019-11-04 00:18:48 +0800 |
---|---|---|
committer | Cyan_Hsieh <cyanhsieh@google.com> | 2020-06-08 17:19:28 +0800 |
commit | 363bcf7857f96be0cc5c2f7b161ed032e69a4182 (patch) | |
tree | 174a112f6a0ec89fd7da949b0f2b3517c7d4cd71 /dumpstate | |
parent | bbd22edaf185db757b30551eb0f64506d1af6d1e (diff) | |
download | redfin-363bcf7857f96be0cc5c2f7b161ed032e69a4182.tar.gz |
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>
Diffstat (limited to 'dumpstate')
-rwxr-xr-x | dumpstate/DumpstateDevice.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp index f014f6b..1a47127 100755 --- a/dumpstate/DumpstateDevice.cpp +++ b/dumpstate/DumpstateDevice.cpp @@ -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\" " |