[igt-dev] [PATCH i-g-t v6 24/36] tools/i915-perf: make timestamp range easier to compare

Umesh Nerlige Ramappa umesh.nerlige.ramappa at intel.com
Mon Oct 10 22:54:50 UTC 2022


On Mon, Oct 10, 2022 at 09:42:03PM +0000, Umesh Nerlige Ramappa wrote:
>From: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
>
>With timestamp bit shifting stuff, aligning values in the console is
>useful to compare them.
>
>Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>

>---
> tools/i915-perf/i915_perf_reader.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
>diff --git a/tools/i915-perf/i915_perf_reader.c b/tools/i915-perf/i915_perf_reader.c
>index 4a2e3df4..92e43c19 100644
>--- a/tools/i915-perf/i915_perf_reader.c
>+++ b/tools/i915-perf/i915_perf_reader.c
>@@ -235,14 +235,17 @@ main(int argc, char *argv[])
> 		return EXIT_FAILURE;
> 	}
>
>-	fprintf(stdout, "Timestamp correlation CPU range: 0x%016"PRIx64"-0x%016"PRIx64"\n",
>+	fprintf(stdout, "Timestamp correlation CPU range:       0x%016"PRIx64"-0x%016"PRIx64"\n",
> 		reader.correlations[0]->cpu_timestamp,
> 		reader.correlations[reader.n_correlations - 1]->cpu_timestamp);
>-	fprintf(stdout, "Timestamp correlation GPU range: 0x%016"PRIx64"-0x%016"PRIx64"\n",
>+	fprintf(stdout, "Timestamp correlation GPU range (64b): 0x%016"PRIx64"-0x%016"PRIx64"\n",
> 		reader.correlations[0]->gpu_timestamp,
> 		reader.correlations[reader.n_correlations - 1]->gpu_timestamp);
>+	fprintf(stdout, "Timestamp correlation GPU range (32b): 0x%016"PRIx64"-0x%016"PRIx64"\n",
>+		reader.correlations[0]->gpu_timestamp & 0xffffffff,
>+		reader.correlations[reader.n_correlations - 1]->gpu_timestamp & 0xffffffff);
>
>-	fprintf(stdout, "OA data timestamp range: 0x%016"PRIx64"-0x%016"PRIx64"\n",
>+	fprintf(stdout, "OA data timestamp range:               0x%016"PRIx64"-0x%016"PRIx64"\n",
> 		intel_perf_read_record_timestamp(reader.perf,
> 						 reader.metric_set,
> 						 reader.records[0]),
>-- 
>2.25.1
>


More information about the igt-dev mailing list