Переглянути джерело

qcacld-3.0: Change system power debugging time stamp to microseconds

Time stamp for profiling system level power issues is currently using
qdf_get_system_timestamp(), which measures in milliseconds. To get more
fine granular data, use qdf_get_log_timestamp_usecs() to measure in
microseconds instead.

Change-Id: I920d0ec7c90ab602cbdc0d1efdb6061d6a72c122
CRs-Fixed: 2520939
Alan Chen 5 роки тому
батько
коміт
f8a46d501f

+ 15 - 12
components/pmo/core/src/wlan_pmo_suspend_resume.c

@@ -929,13 +929,14 @@ QDF_STATUS pmo_core_psoc_bus_suspend_req(struct wlan_objmgr_psoc *psoc,
 	wow_mode_selected = pmo_core_is_wow_enabled(psoc_ctx);
 	pmo_debug("wow mode selected %d", wow_mode_selected);
 
-	begin = qdf_get_system_timestamp();
+	begin = qdf_get_log_timestamp_usecs();
 	if (wow_mode_selected)
 		status = pmo_core_enable_wow_in_fw(psoc, psoc_ctx, wow_params);
 	else
 		status = pmo_core_psoc_suspend_target(psoc, 0);
-	end = qdf_get_system_timestamp();
-	pmo_debug("fw took total time %lu ms to enable wow", end - begin);
+	end = qdf_get_log_timestamp_usecs();
+	pmo_debug("fw took total time %lu microseconds to enable wow",
+		  end - begin);
 
 	pmo_psoc_put_ref(psoc);
 out:
@@ -1021,10 +1022,10 @@ QDF_STATUS pmo_core_psoc_bus_runtime_suspend(struct wlan_objmgr_psoc *psoc,
 	}
 
 	if (pld_cb) {
-		begin = qdf_get_system_timestamp();
+		begin = qdf_get_log_timestamp_usecs();
 		ret = pld_cb();
-		end = qdf_get_system_timestamp();
-		pmo_debug("runtime pci bus suspend took total time %lu ms",
+		end = qdf_get_log_timestamp_usecs();
+		pmo_debug("runtime pci bus suspend took total time %lu microseconds",
 			  end - begin);
 
 		if (ret) {
@@ -1108,10 +1109,11 @@ QDF_STATUS pmo_core_psoc_bus_runtime_resume(struct wlan_objmgr_psoc *psoc,
 
 	hif_pre_runtime_resume(hif_ctx);
 	if (pld_cb) {
-		begin = qdf_get_system_timestamp();
+		begin = qdf_get_log_timestamp_usecs();
 		ret = pld_cb();
-		end = qdf_get_system_timestamp();
-		pmo_debug("pci bus resume took total time %lu ms", end - begin);
+		end = qdf_get_log_timestamp_usecs();
+		pmo_debug("pci bus resume took total time %lu microseconds",
+			  end - begin);
 		if (ret) {
 			status = QDF_STATUS_E_FAILURE;
 			goto fail;
@@ -1312,13 +1314,14 @@ QDF_STATUS pmo_core_psoc_bus_resume_req(struct wlan_objmgr_psoc *psoc,
 		goto out;
 	}
 
-	begin = qdf_get_system_timestamp();
+	begin = qdf_get_log_timestamp_usecs();
 	if (wow_mode)
 		status = pmo_core_psoc_disable_wow_in_fw(psoc, psoc_ctx);
 	else
 		status = pmo_core_psoc_resume_target(psoc, psoc_ctx);
-	end = qdf_get_system_timestamp();
-	pmo_debug("fw took total time %lu ms to disable wow", end - begin);
+	end = qdf_get_log_timestamp_usecs();
+	pmo_debug("fw took total time %lu microseconds to disable wow",
+		  end - begin);
 
 	pmo_psoc_put_ref(psoc);
 

+ 6 - 4
core/hdd/src/wlan_hdd_driver_ops.c

@@ -1323,13 +1323,14 @@ static int wlan_hdd_runtime_suspend(struct device *dev)
 						   hdd_pld_runtime_suspend_cb);
 	err = qdf_status_to_os_return(status);
 
-	hdd_ctx->runtime_suspend_done_time_stamp = qdf_get_system_timestamp();
+	hdd_ctx->runtime_suspend_done_time_stamp =
+						qdf_get_log_timestamp_usecs();
 	delta = hdd_ctx->runtime_suspend_done_time_stamp -
 		hdd_ctx->runtime_resume_start_time_stamp;
 
 	if (hdd_ctx->runtime_suspend_done_time_stamp >
 	   hdd_ctx->runtime_resume_start_time_stamp)
-		hdd_debug("Runtime suspend done result: %d total cxpc up time %lu ms",
+		hdd_debug("Runtime suspend done result: %d total cxpc up time %lu microseconds",
 			  err, delta);
 
 	return err;
@@ -1367,10 +1368,11 @@ static int wlan_hdd_runtime_resume(struct device *dev)
 	qdf_time_t delta;
 
 	hdd_debug("Starting runtime resume");
-	hdd_ctx->runtime_resume_start_time_stamp = qdf_get_system_timestamp();
+	hdd_ctx->runtime_resume_start_time_stamp =
+						qdf_get_log_timestamp_usecs();
 	delta = hdd_ctx->runtime_resume_start_time_stamp -
 		hdd_ctx->runtime_suspend_done_time_stamp;
-	hdd_debug("Starting runtime resume total cxpc down time %lu ms",
+	hdd_debug("Starting runtime resume total cxpc down time %lu microseconds",
 		  delta);
 
 	if (wlan_hdd_validate_context(hdd_ctx))