qcacmn: Change time format of MTRACE logs
qcacld-2.0 to qcacld-3.0 propagation MTRACE logs timestamp format is different from logcat logs, and it's difficult to correlate with other logs. This fix changes the timeformat of MTRACE logs from qtimer ticks to hr:min:sec:msec Change-Id: I45e5d28fbeccd757648f05ce4e593d8ca4fe7804 CRS-Fixed: 1049125
This commit is contained in:

committed by
qcabuildsw

parent
3f82a0e32d
commit
e2e313532a
@@ -702,3 +702,20 @@ void qdf_timer_module_deinit(void)
|
||||
qdf_mutex_destroy(&persistent_timer_count_lock);
|
||||
}
|
||||
EXPORT_SYMBOL(qdf_timer_module_deinit);
|
||||
|
||||
void qdf_get_time_of_the_day_in_hr_min_sec_usec(char *tbuf, int len)
|
||||
{
|
||||
struct timeval tv;
|
||||
struct rtc_time tm;
|
||||
unsigned long local_time;
|
||||
|
||||
/* Format the Log time R#: [hr:min:sec.microsec] */
|
||||
do_gettimeofday(&tv);
|
||||
/* Convert rtc to local time */
|
||||
local_time = (u32)(tv.tv_sec - (sys_tz.tz_minuteswest * 60));
|
||||
rtc_time_to_tm(local_time, &tm);
|
||||
scnprintf(tbuf, len,
|
||||
"[%02d:%02d:%02d.%06lu]",
|
||||
tm.tm_hour, tm.tm_min, tm.tm_sec, tv.tv_usec);
|
||||
}
|
||||
EXPORT_SYMBOL(qdf_get_time_of_the_day_in_hr_min_sec_usec);
|
||||
|
Reference in New Issue
Block a user