diff options
| author | Konstantin Dorfman <kdorfman@codeaurora.org> | 2015-02-12 13:37:56 +0200 |
|---|---|---|
| committer | Subhash Jadavani <subhashj@codeaurora.org> | 2016-05-31 15:26:17 -0700 |
| commit | 26f1875126f874580c8ef227547cff96185d0eb7 (patch) | |
| tree | 8ea8db4d8d11d8a3d5a4a22e093f3929eb4f1086 /include | |
| parent | 12c38797eac328a4881d719e83476da83f49d75e (diff) | |
mmc: core: Add tracepoints to enhance pm debugging
Instrument the mmc core layer with tracepoints to aid in
debugging issues and identifying latencies in the following
paths:
* System suspend/resume
* Runtime suspend/resume
Change-Id: I1e0fa7d3f8b54c102b4055f910b58a42412748da
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/trace/events/mmc.h | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/include/trace/events/mmc.h b/include/trace/events/mmc.h index 9606997a8f2e..98a12711b572 100644 --- a/include/trace/events/mmc.h +++ b/include/trace/events/mmc.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2013 Google, Inc. - * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and @@ -176,6 +176,47 @@ TRACE_EVENT(mmc_clk, ) ); +DECLARE_EVENT_CLASS(mmc_pm_template, + TP_PROTO(const char *dev_name, int err, s64 usecs), + + TP_ARGS(dev_name, err, usecs), + + TP_STRUCT__entry( + __field(s64, usecs) + __field(int, err) + __string(dev_name, dev_name) + ), + + TP_fast_assign( + __entry->usecs = usecs; + __entry->err = err; + __assign_str(dev_name, dev_name); + ), + + TP_printk( + "took %lld usecs, %s err %d", + __entry->usecs, + __get_str(dev_name), + __entry->err + ) +); + +DEFINE_EVENT(mmc_pm_template, mmc_runtime_suspend, + TP_PROTO(const char *dev_name, int err, s64 usecs), + TP_ARGS(dev_name, err, usecs)); + +DEFINE_EVENT(mmc_pm_template, mmc_runtime_resume, + TP_PROTO(const char *dev_name, int err, s64 usecs), + TP_ARGS(dev_name, err, usecs)); + +DEFINE_EVENT(mmc_pm_template, mmc_suspend, + TP_PROTO(const char *dev_name, int err, s64 usecs), + TP_ARGS(dev_name, err, usecs)); + +DEFINE_EVENT(mmc_pm_template, mmc_resume, + TP_PROTO(const char *dev_name, int err, s64 usecs), + TP_ARGS(dev_name, err, usecs)); + #endif /* if !defined(_TRACE_MMC_H) || defined(TRACE_HEADER_MULTI_READ) */ /* This part must be outside protection */ |
