summaryrefslogtreecommitdiff
path: root/include/linux/mmc
diff options
context:
space:
mode:
authorAparna Mallavarapu <aparnam@codeaurora.org>2010-06-11 18:13:05 +0530
committerSubhash Jadavani <subhashj@codeaurora.org>2016-05-31 15:25:30 -0700
commit0f618d04ba4734411cebfdf2f3f2dbcb47326e0c (patch)
tree2ab20bcaf1e80b9665799dc59557957692ab4a2e /include/linux/mmc
parente3b5cec78913a9f23776364eb7c6a28923bd279c (diff)
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 <aparnam@codeaurora.org> Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org> [subhashj@codeaurora.org: fixed trivial merge conflict] Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Diffstat (limited to 'include/linux/mmc')
-rw-r--r--include/linux/mmc/host.h16
1 files changed, 16 insertions, 0 deletions
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;
};