summaryrefslogtreecommitdiff
path: root/include/trace/events/ufs.h
diff options
context:
space:
mode:
authorsubhashj@codeaurora.org <subhashj@codeaurora.org>2016-12-23 05:41:48 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2017-01-06 02:10:04 +0300
commit911a0771b6fa7bac5eae753c17c87ecb77c77283 (patch)
treebebe4b62a4d2177a1bfb1844924e08d02d968d31 /include/trace/events/ufs.h
parentd2aebb9b269b3e094b2d2d03121c3863b683a25b (diff)
downloadlinux-911a0771b6fa7bac5eae753c17c87ecb77c77283.tar.xz
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. Reviewed-by: Venkat Gopalakrishnan <venkatg@codeaurora.org> Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/trace/events/ufs.h')
-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 57743b6ed0b0..e9634dff51a8 100644
--- a/include/trace/events/ufs.h
+++ b/include/trace/events/ufs.h
@@ -123,6 +123,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,
int dev_state, int link_state),