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>
This commit is contained in:

committed by
Martin K. Petersen

parent
d2aebb9b26
commit
911a0771b6
@@ -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),
|
||||
|
Reference in New Issue
Block a user