summaryrefslogtreecommitdiff
path: root/include/trace
diff options
context:
space:
mode:
authorSubhash Jadavani <subhashj@codeaurora.org>2014-10-19 01:35:36 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 10:57:42 -0700
commit1eabea8b95a17de147a8713ba00facce52cc89af (patch)
tree52e2ca69588ebdb71cb6d55b861f46d6ba1139b1 /include/trace
parentd4f8a9304bf38011c0d414502d3de2b3f2d50c82 (diff)
scsi: ufs: add time profiling support
This patch adds the profiling support for some of the time critical operations like hibern8 enter/exit, clock gating & clock scaling. Change-Id: I4dde1078dcd2af47f051639b03c44c423ee344fa Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/ufs.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/include/trace/events/ufs.h b/include/trace/events/ufs.h
index 13bf97b19a71..b239bbb43b62 100644
--- a/include/trace/events/ufs.h
+++ b/include/trace/events/ufs.h
@@ -107,6 +107,46 @@ TRACE_EVENT(ufshcd_auto_bkops_state,
__get_str(dev_name), __get_str(state))
);
+DECLARE_EVENT_CLASS(ufshcd_profiling_template,
+ TP_PROTO(const char *dev_name, const char *profile_info, s64 time_us,
+ int err),
+
+ TP_ARGS(dev_name, profile_info, time_us, err),
+
+ TP_STRUCT__entry(
+ __string(dev_name, dev_name)
+ __string(profile_info, profile_info)
+ __field(s64, time_us)
+ __field(int, err)
+ ),
+
+ TP_fast_assign(
+ __assign_str(dev_name, dev_name);
+ __assign_str(profile_info, profile_info);
+ __entry->time_us = time_us;
+ __entry->err = err;
+ ),
+
+ TP_printk("%s: %s: took %lld usecs, err %d",
+ __get_str(dev_name), __get_str(profile_info),
+ __entry->time_us, __entry->err)
+);
+
+DEFINE_EVENT(ufshcd_profiling_template, ufshcd_profile_hibern8,
+ TP_PROTO(const char *dev_name, const char *profile_info, s64 time_us,
+ int err),
+ TP_ARGS(dev_name, profile_info, time_us, err));
+
+DEFINE_EVENT(ufshcd_profiling_template, ufshcd_profile_clk_gating,
+ TP_PROTO(const char *dev_name, const char *profile_info, s64 time_us,
+ int err),
+ TP_ARGS(dev_name, profile_info, time_us, err));
+
+DEFINE_EVENT(ufshcd_profiling_template, ufshcd_profile_clk_scaling,
+ TP_PROTO(const char *dev_name, const char *profile_info, s64 time_us,
+ int err),
+ TP_ARGS(dev_name, profile_info, time_us, err));
+
DECLARE_EVENT_CLASS(ufshcd_template,
TP_PROTO(const char *dev_name, int err, s64 usecs,
const char *dev_state, const char *link_state),