[PATCH i-g-t] tests/intel/xe_pm_residency: Print execution and sleep times

Gupta, Anshuman anshuman.gupta at intel.com
Thu Sep 19 07:26:26 UTC 2024



> -----Original Message-----
> From: Poosa, Karthik <karthik.poosa at intel.com>
> Sent: Thursday, September 19, 2024 12:04 PM
> To: igt-dev at lists.freedesktop.org
> Cc: Gupta, Anshuman <anshuman.gupta at intel.com>; Nilawar, Badal
> <badal.nilawar at intel.com>; Tauro, Riana <riana.tauro at intel.com>; Poosa,
> Karthik <karthik.poosa at intel.com>
> Subject: [PATCH i-g-t] tests/intel/xe_pm_residency: Print execution and sleep
> times
> 
> Print the workload execution and sleep times of the test to help diagnose
> timeouts.
> This will show how long the workload ran and how long the test slept.
> 
> Signed-off-by: Karthik Poosa <karthik.poosa at intel.com>
> ---
>  tests/intel/xe_pm_residency.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/intel/xe_pm_residency.c b/tests/intel/xe_pm_residency.c index
> 0e687558b..3c3b33ab1 100644
> --- a/tests/intel/xe_pm_residency.c
> +++ b/tests/intel/xe_pm_residency.c
> @@ -139,7 +139,7 @@ static void exec_load(int fd, struct
> drm_xe_engine_class_instance *hwe, unsigned
>  		elapsed = igt_nsec_elapsed(&tv);
>  		igt_assert_eq(data->data, done[1]);
> 
> -		igt_debug("Execution took %.3fms (submit %.1fus, wait
> %.1fus)\n",
> +		igt_info("Execution took %.3fms (submit %.1fus, wait
> %.1fus)\n",
>  			  1e-6 * elapsed,
>  			  1e-3 * submit,
>  			  1e-3 * (elapsed - submit));
> @@ -150,6 +150,8 @@ static void exec_load(int fd, struct
> drm_xe_engine_class_instance *hwe, unsigned
>  		 * Execute the above workload for ~1% of the elapsed time and
> sleep for
>  		 * the rest of the time (~99%)
>  		 */
> +		igt_info("Sleeping for %ld ms\n", ((elapsed / 10)/1000));
what is the need of this print ? 'elapsed' is already printed.
> +
>  		usleep(elapsed / 10);
>  	} while (!READ_ONCE(*done));
> 
> --
> 2.25.1



More information about the igt-dev mailing list