diff options
author | Leo Liou <leoliou@google.com> | 2018-11-13 20:24:53 +0800 |
---|---|---|
committer | Leo Liou <leoliou@google.com> | 2018-11-14 07:28:04 +0000 |
commit | 1e3c20b7e56d35600eb4352297bf8ec7af036801 (patch) | |
tree | fadbea4cb56f93c9324b94625abfb5b89adef8db | |
parent | 3ea8b17bf622a10125fc94fe251da789976931a2 (diff) | |
download | bonito-1e3c20b7e56d35600eb4352297bf8ec7af036801.tar.gz |
bonito: dumpstate: update slowio dump
The patch will dump emmc slow io information when bugreport is triggered.
Bug: 116186522
Test: check dumpstate_board.txt when bugreport is triggered
Change-Id: I3ad1196e65a7412ad7a466b2ab8fa7231a943439
-rwxr-xr-x | dumpstate/DumpstateDevice.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp index 46541194..d0413f46 100755 --- a/dumpstate/DumpstateDevice.cpp +++ b/dumpstate/DumpstateDevice.cpp @@ -236,8 +236,18 @@ static void DumpeMMC(int fd) { DumpFileToFd(fd, "eMMC ext_csd", "/sys/kernel/debug/mmc0/mmc0:0001/ext_csd"); DumpFileToFd(fd, "eMMC err_stats", "/sys/kernel/debug/mmc0/err_stats"); DumpFileToFd(fd, "eMMC ring_buffer", "/sys/kernel/debug/mmc0/ring_buffer"); - DumpFileToFd(fd, "eMMC pre_eol_info", "/sys/devices/platform/soc/7c4000.sdhci/mmc_host/mmc0/mmc0:0001/pre_eol_info"); - DumpFileToFd(fd, "eMMC life_time", "/sys/devices/platform/soc/7c4000.sdhci/mmc_host/mmc0/mmc0:0001/life_time"); + + std::string bootdev = android::base::GetProperty(EMMC_BOOTDEVICE, ""); + if (!bootdev.empty()) { + DumpFileToFd(fd, "eMMC pre_eol_info", "/sys/devices/platform/soc/" + bootdev + "/mmc_host/mmc0/mmc0:0001/pre_eol_info"); + DumpFileToFd(fd, "eMMC life_time", "/sys/devices/platform/soc/" + bootdev + "/mmc_host/mmc0/mmc0:0001/life_time"); + DumpFileToFd(fd, "eMMC Slow IO Read", "/sys/devices/platform/soc/" + bootdev + "/mmc_host/mmc0/slowio_read_cnt"); + DumpFileToFd(fd, "eMMC Slow IO Write", "/sys/devices/platform/soc/" + bootdev + "/mmc_host/mmc0/slowio_write_cnt"); + DumpFileToFd(fd, "eMMC Slow IO Urgent Read", "/sys/devices/platform/soc/" + bootdev + "/mmc_host/mmc0/slowio_urgent_read_cnt"); + DumpFileToFd(fd, "eMMC Slow IO Urgent Write", "/sys/devices/platform/soc/" + bootdev + "/mmc_host/mmc0/slowio_urgent_write_cnt"); + DumpFileToFd(fd, "eMMC Slow IO Discard", "/sys/devices/platform/soc/" + bootdev + "/mmc_host/mmc0/slowio_discard_cnt"); + DumpFileToFd(fd, "eMMC Slow IO Flush", "/sys/devices/platform/soc/" + bootdev + "/mmc_host/mmc0/slowio_flush_cnt"); + } } // Methods from ::android::hardware::dumpstate::V1_0::IDumpstateDevice follow. |