From 1e3c20b7e56d35600eb4352297bf8ec7af036801 Mon Sep 17 00:00:00 2001 From: Leo Liou Date: Tue, 13 Nov 2018 20:24:53 +0800 Subject: 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 --- dumpstate/DumpstateDevice.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'dumpstate') 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. -- cgit v1.2.3