Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
To: Ashutosh Dixit <ashutosh.dixit@intel.com>
Cc: <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t 6/6] tests/intel/xe_oa: Drop pec_sanity_check_one
Date: Fri, 2 May 2025 15:08:25 -0700	[thread overview]
Message-ID: <aBVCWUceBIjPFhVR@unerlige-desk.amr.corp.intel.com> (raw)
In-Reply-To: <20250422193458.1467567-7-ashutosh.dixit@intel.com>

On Tue, Apr 22, 2025 at 12:34:58PM -0700, Ashutosh Dixit wrote:
>We only care about delta between two reports, so pec_sanity_check_one() is
>not needed, only retain pec_sanity_check_two.
>
>Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>

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

Thanks,
Umesh
>---
> tests/intel/xe_oa.c | 40 +++-------------------------------------
> 1 file changed, 3 insertions(+), 37 deletions(-)
>
>diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
>index c01adbad34..5324595995 100644
>--- a/tests/intel/xe_oa.c
>+++ b/tests/intel/xe_oa.c
>@@ -994,40 +994,8 @@ accumulator_print(struct accumulator *accumulator, const char *title)
>  * These equations are not exact due to fluctuations, but are precise when
>  * averaged over long periods.
>  */
>-static void pec_sanity_check_one(const u32 *report)
>-{
>-	int xecore_idx[] = {3, 4, 5, 6, 21, 22, 23, 24};
>-	u64 first, *pec = (u64 *)(report + 8);
>-
>-	igt_debug("\ttest_event1_cycles: %#lx\n", pec[2]);
>-	for (int i = 0; i < ARRAY_SIZE(xecore_idx); i++)
>-		igt_debug("\ttest_event1_cycles_xecore %d: %#lx\n", i, pec[xecore_idx[i]]);
>-
>-	/* Compare against the first non-zero test_event1_cycles_xecore* */
>-	for (int i = 0; i < ARRAY_SIZE(xecore_idx); i++) {
>-		first = pec[xecore_idx[i]];
>-		if (first)
>-			break;
>-	}
>-
>-	/* test_event1_cycles_xecore* should be within an epsilon of each other */
>-	for (int i = 0; i < ARRAY_SIZE(xecore_idx); i++) {
>-		int n = xecore_idx[i];
>-
>-		igt_debug("n %d: pec[n] %#lx, first %#lx\n", n, pec[n], first);
>-		/* 0 value for pec[xecore_idx[i]] indicates missing xecore */
>-		if (pec[n])
>-			assert_within_epsilon(pec[n], first, 0.1);
>-	}
>-
>-	igt_debug("first * num_xecores: %#lx, pec[2] %#lx\n",
>-		  first * intel_xe_perf->devinfo.n_eu_sub_slices, pec[2]);
>-	/* test_event1_cycles should be close to (test_event1_cycles_xecore* * num_xecores) */
>-	assert_within_epsilon(first * intel_xe_perf->devinfo.n_eu_sub_slices, pec[2], 0.1);
>-}
>-
>-static void pec_sanity_check_two(const u32 *report0, const u32 *report1,
>-				 struct intel_xe_perf_metric_set *set)
>+static void pec_sanity_check(const u32 *report0, const u32 *report1,
>+			     struct intel_xe_perf_metric_set *set)
> {
> 	u64 tick_delta = oa_tick_delta(report1, report0, set->perf_oa_format);
> 	int xecore_idx[] = {3, 4, 5, 6, 21, 22, 23, 24};
>@@ -1087,9 +1055,7 @@ static void pec_sanity_check_reports(const u32 *report0, const u32 *report1,
> 	dump_report(report0, set->perf_raw_size, "pec_report0");
> 	dump_report(report1, set->perf_raw_size, "pec_report1");
>
>-	pec_sanity_check_one(report0);
>-	pec_sanity_check_one(report1);
>-	pec_sanity_check_two(report0, report1, set);
>+	pec_sanity_check(report0, report1, set);
> }
>
> /* The TestOa metric set is designed so */
>-- 
>2.48.1
>

  reply	other threads:[~2025-05-02 22:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-22 19:34 [PATCH i-g-t 0/6] Sanity check Xe2 PEC OA reports Ashutosh Dixit
2025-04-22 19:34 ` [PATCH i-g-t 1/6] tests/intel/xe_oa: Rename check_reports to mmap_check_reports Ashutosh Dixit
2025-04-22 19:34 ` [PATCH i-g-t 2/6] tests/intel/xe_oa: Fix oa_tick_delta Ashutosh Dixit
2025-04-22 19:34 ` [PATCH i-g-t 3/6] tests/intel/xe_oa: Sanity check PEC report data for TestOa metric set Ashutosh Dixit
2025-05-02 22:00   ` Umesh Nerlige Ramappa
2025-04-22 19:34 ` [PATCH i-g-t 4/6] tests/intel/xe_oa: Only sanity check timer PEC reports Ashutosh Dixit
2025-04-22 19:34 ` [PATCH i-g-t 5/6] tests/intel/xe_oa: Reduce test_non_zero_reason execution time Ashutosh Dixit
2025-05-02 22:07   ` Umesh Nerlige Ramappa
2025-04-22 19:34 ` [PATCH i-g-t 6/6] tests/intel/xe_oa: Drop pec_sanity_check_one Ashutosh Dixit
2025-05-02 22:08   ` Umesh Nerlige Ramappa [this message]
2025-04-23  0:17 ` ✓ i915.CI.BAT: success for Sanity check Xe2 PEC OA reports (rev2) Patchwork
2025-04-23  8:01 ` ✗ Xe.CI.Full: failure " Patchwork
2025-04-23  8:56 ` ✓ i915.CI.Full: success " Patchwork
2025-04-23 17:09 ` ✗ Xe.CI.Full: failure " Patchwork
2025-04-24  0:01 ` ✓ Xe.CI.BAT: success " Patchwork
2025-04-24 14:21 ` ✗ Xe.CI.Full: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aBVCWUceBIjPFhVR@unerlige-desk.amr.corp.intel.com \
    --to=umesh.nerlige.ramappa@intel.com \
    --cc=ashutosh.dixit@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox