Browse Source

qcacmn: Add timestamp in serialisation history for debuggability

Add timestamp in serialisation history for debuggability

Change-Id: I6ea5019f9c4501512877a67bc01caf7c428cc893
CRs-Fixed: 3275070
Himanshu Batra 2 years ago
parent
commit
31864b63ee

+ 4 - 1
umac/cmn_services/serialization/src/wlan_serialization_debug.c

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -148,7 +149,8 @@ static void wlan_ser_print_all_history(
 				continue;
 		}
 		ser_err_no_fl(
-			"%8d|%6d|%7d|%8d|%8d|%6s|%7s|%17s|",
+			"|0x%016llx|%8d|%6d|%7d|%8d|%8d|%6s|%7s|%17s|",
+			data->time,
 			data->cmd_type,
 			data->cmd_id,
 			data->vdev_id,
@@ -248,6 +250,7 @@ void wlan_ser_update_cmd_history(
 	ser_data_info->ser_reason = ser_reason;
 	ser_data_info->vdev_id = wlan_vdev_get_id(cmd->vdev);
 	ser_data_info->data_updated = true;
+	ser_data_info->time = qdf_get_log_timestamp();
 
 	ser_history_info->index++;
 }

+ 3 - 1
umac/cmn_services/serialization/src/wlan_serialization_debug_i.h

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -31,7 +32,7 @@
 #define WLAN_SER_LINE "--------------------"\
 		      "--------------------"
 
-#define WLAN_SER_HISTORY_HEADER "CMD_TYPE|CMD_ID|VDEV_ID|"\
+#define WLAN_SER_HISTORY_HEADER "               TIME|CMD_TYPE|CMD_ID|VDEV_ID|"\
 				"BLOCKING|PRIORITY|ACTION|"\
 				"  QUEUE|           REASON|"
 
@@ -60,6 +61,7 @@ struct ser_data {
 		ser_reason:5;
 
 		uint16_t vdev_id;
+		uint64_t time;
 };
 
 struct ser_history {