From 0f618d04ba4734411cebfdf2f3f2dbcb47326e0c Mon Sep 17 00:00:00 2001 From: Aparna Mallavarapu Date: Fri, 11 Jun 2010 18:13:05 +0530 Subject: mmc: Add profiling code to measure performance at MMC layers. Profiling code is added to measure read, write times for the MMC requests at various MMC layers. Profiling is done at the MMC queue and at the driver level. This information can be viewed through a sysfs entry called perf. Change-Id: I7c65bfe25a1f7774e3a9abf1f9539e690b3718ec Signed-off-by: Aparna Mallavarapu Signed-off-by: Venkat Gopalakrishnan [subhashj@codeaurora.org: fixed trivial merge conflict] Signed-off-by: Subhash Jadavani --- include/linux/mmc/host.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include') diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 01ae900ef4bf..30d33363079b 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -428,6 +428,22 @@ struct mmc_host { * actually disabling the clock from it's source. */ bool card_clock_off; + +#ifdef CONFIG_MMC_PERF_PROFILING + struct { + + unsigned long rbytes_mmcq; /* Rd bytes MMC queue */ + unsigned long wbytes_mmcq; /* Wr bytes MMC queue */ + unsigned long rbytes_drv; /* Rd bytes MMC Host */ + unsigned long wbytes_drv; /* Wr bytes MMC Host */ + ktime_t rtime_mmcq; /* Rd time MMC queue */ + ktime_t wtime_mmcq; /* Wr time MMC queue */ + ktime_t rtime_drv; /* Rd time MMC Host */ + ktime_t wtime_drv; /* Wr time MMC Host */ + ktime_t start; + } perf; +#endif + unsigned long private[0] ____cacheline_aligned; }; -- cgit v1.2.3