summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSreelakshmi Konamki <skonam@codeaurora.org>2016-11-29 19:45:05 +0530
committerqcabuildsw <qcabuildsw@localhost>2016-12-01 10:13:10 -0800
commitc7a0859e062457173a195198e49fee6cc0841db4 (patch)
tree1732bcbc9d5f54a3f23606e1403b48977a6e714b
parent374ad6991cea651e42ede3a911aeb8d719a15082 (diff)
qcacld-3.0: Add hr:min:sec:usec timeformat along with QTIMER
Driver logs prints QTIMER ticks and it's difficult to co-relate with logcat timestamp. Add logcat timestamp so that driver and logcat logs can be co-related. Change-Id: If770d4a9b48301adc3deb8f4c1d16099dfa8dd8d CRs-Fixed: 1095195
-rw-r--r--core/utils/logging/src/wlan_logging_sock_svc.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/core/utils/logging/src/wlan_logging_sock_svc.c b/core/utils/logging/src/wlan_logging_sock_svc.c
index d2f74c578c06..3661674befb1 100644
--- a/core/utils/logging/src/wlan_logging_sock_svc.c
+++ b/core/utils/logging/src/wlan_logging_sock_svc.c
@@ -284,7 +284,8 @@ static int wlan_queue_logmsg_for_app(void)
#ifdef QCA_WIFI_3_0_ADRASTEA
/**
- * wlan_add_user_log_radio_time_stamp() - add radio and time stamp in log buffer
+ * wlan_add_user_log_radio_time_stamp() - add radio, firmware timestamp and
+ * time stamp in log buffer
* @tbuf: Pointer to time stamp buffer
* @tbuf_sz: Time buffer size
* @ts: Time stamp value
@@ -294,6 +295,8 @@ static int wlan_queue_logmsg_for_app(void)
* to convert it into user visible time stamp. In adrstea FW also uses QTIMER
* raw ticks which is needed to synchronize host and fw log time stamps
*
+ * Also add logcat timestamp so that driver logs and
+ * logcat logs can be co-related
*
* For discrete solution e.g rome use system tick and convert it into
* seconds.milli seconds
@@ -305,11 +308,14 @@ static int wlan_add_user_log_radio_time_stamp(char *tbuf, size_t tbuf_sz,
uint64_t ts, int radio)
{
int tlen;
+ char time_buf[20];
+
+ qdf_get_time_of_the_day_in_hr_min_sec_usec(time_buf, sizeof(time_buf));
- tlen = scnprintf(tbuf, tbuf_sz, "R%d: [%s][%llu] ", radio,
+ tlen = scnprintf(tbuf, tbuf_sz, "R%d: [%.6s][%llu] %s ", radio,
((in_irq() ? "irq" : in_softirq() ? "soft_irq" :
current->comm)),
- ts);
+ ts, time_buf);
return tlen;
}
#else