Procházet zdrojové kódy

qcacld-3.0: Dump SWLM stats periodically

Add the support to dump software latency
manager statistics as a part of periodic
stats.

Change-Id: I22169979ecf3f78840086284432b94c5756edcf1
CRs-Fixed: 2769018
Rakesh Pillai před 4 roky
rodič
revize
0bc6e1b24f

+ 23 - 0
core/dp/txrx3.0/dp_swlm.c

@@ -116,6 +116,29 @@ coalescing_fail:
 	return 1;
 	return 1;
 }
 }
 
 
+QDF_STATUS dp_print_swlm_stats(struct dp_soc *soc)
+{
+	struct dp_swlm *swlm = &soc->swlm;
+
+	dp_info("TCL Coalescing stats:");
+	dp_info("Num coalesce success: %d", swlm->stats.tcl.coalesce_success);
+	dp_info("Num coalesce fail: %d", swlm->stats.tcl.coalesce_fail);
+	dp_info("Timer flush success: %d", swlm->stats.tcl.timer_flush_success);
+	dp_info("Timer flush fail: %d", swlm->stats.tcl.timer_flush_fail);
+	dp_info("Coalesce fail (TID): %d", swlm->stats.tcl.tid_fail);
+	dp_info("Coalesce fail (special frame): %d", swlm->stats.tcl.sp_frames);
+	dp_info("Coalesce fail (Low latency connection): %d",
+		swlm->stats.tcl.ll_connection);
+	dp_info("Coalesce fail (bytes thresh crossed): %d",
+		swlm->stats.tcl.bytes_thresh_reached);
+	dp_info("Coalesce fail (time thresh crossed): %d",
+		swlm->stats.tcl.time_thresh_reached);
+	dp_info("Coalesce fail (TPUT sampling fail): %d",
+		swlm->stats.tcl.tput_criteria_fail);
+
+	return QDF_STATUS_SUCCESS;
+}
+
 static struct dp_swlm_ops dp_latency_mgr_ops = {
 static struct dp_swlm_ops dp_latency_mgr_ops = {
 	.tcl_wr_coalesce_check = dp_swlm_can_tcl_wr_coalesce,
 	.tcl_wr_coalesce_check = dp_swlm_can_tcl_wr_coalesce,
 };
 };

+ 8 - 0
core/dp/txrx3.0/dp_swlm.h

@@ -163,6 +163,14 @@ QDF_STATUS dp_soc_swlm_attach(struct dp_soc *soc);
  */
  */
 QDF_STATUS dp_soc_swlm_detach(struct dp_soc *soc);
 QDF_STATUS dp_soc_swlm_detach(struct dp_soc *soc);
 
 
+/**
+ * dp_print_swlm_stats() - Print the SWLM stats
+ * @soc: Datapath soc handle
+ *
+ * Returns: QDF_STATUS
+ */
+QDF_STATUS dp_print_swlm_stats(struct dp_soc *soc);
+
 #endif /* WLAN_DP_FEATURE_SW_LATENCY_MGR */
 #endif /* WLAN_DP_FEATURE_SW_LATENCY_MGR */
 
 
 #endif
 #endif

+ 3 - 0
core/hdd/src/wlan_hdd_main.c

@@ -9378,6 +9378,9 @@ static void hdd_display_periodic_stats(struct hdd_context *hdd_ctx,
 			cdp_display_stats(soc,
 			cdp_display_stats(soc,
 					  CDP_DUMP_TX_FLOW_POOL_INFO,
 					  CDP_DUMP_TX_FLOW_POOL_INFO,
 					  QDF_STATS_VERBOSITY_LEVEL_LOW);
 					  QDF_STATS_VERBOSITY_LEVEL_LOW);
+			cdp_display_stats(soc,
+					  CDP_DP_SWLM_STATS,
+					  QDF_STATS_VERBOSITY_LEVEL_LOW);
 			wlan_hdd_display_netif_queue_history
 			wlan_hdd_display_netif_queue_history
 				(hdd_ctx, QDF_STATS_VERBOSITY_LEVEL_LOW);
 				(hdd_ctx, QDF_STATS_VERBOSITY_LEVEL_LOW);
 			qdf_dp_trace_dump_stats();
 			qdf_dp_trace_dump_stats();