summaryrefslogtreecommitdiff
path: root/dumpstate
diff options
context:
space:
mode:
authorLeo Liou <leoliou@google.com>2018-11-14 02:34:51 -0800
committerandroid-build-merger <android-build-merger@google.com>2018-11-14 02:34:51 -0800
commit96d27b525cfb770587b276a29d6cfb8de01738b2 (patch)
tree0f646601d104061855a4c52d3250ae02f8cecac4 /dumpstate
parentb42a96f6bb70fa2e5d95c8cf2f4931d833c75524 (diff)
parent71b223efa35e66ca58c0f5e5ff3176a9dad07729 (diff)
downloadbonito-96d27b525cfb770587b276a29d6cfb8de01738b2.tar.gz
bonito: dumpstate: update slowio dump am: 1e3c20b7e5
am: 71b223efa3 Change-Id: Id7bc6f73d627b139e548e9235be42e7b04c17d96
Diffstat (limited to 'dumpstate')
-rwxr-xr-xdumpstate/DumpstateDevice.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp
index 7bc2cfe3..9a0907cd 100755
--- a/dumpstate/DumpstateDevice.cpp
+++ b/dumpstate/DumpstateDevice.cpp
@@ -253,8 +253,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.