linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Clark <james.clark@arm.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: linux-perf-users@vger.kernel.org, irogers@google.com,
	john.g.garry@oracle.com, renyu.zj@linux.alibaba.com,
	Will Deacon <will@kernel.org>, Mike Leach <mike.leach@linaro.org>,
	Leo Yan <leo.yan@linaro.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Kan Liang <kan.liang@linux.intel.com>,
	Haixin Yu <yuhaixin.yhx@linux.alibaba.com>,
	Nick Forrington <nick.forrington@arm.com>,
	Kajol Jain <kjain@linux.ibm.com>,
	Eduard Zingerman <eddyz87@gmail.com>,
	Sohom Datta <sohomdatta1@gmail.com>,
	Rob Herring <robh@kernel.org>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v6 2/6] perf test: Add a test for the new Arm CPU ID comparison behavior
Date: Thu, 17 Aug 2023 10:02:08 +0100	[thread overview]
Message-ID: <fecfd732-df85-1bb9-f3d2-c1e12ca2db2e@arm.com> (raw)
In-Reply-To: <ZNz1KNaNhct35bzd@kernel.org>



On 16/08/2023 17:11, Arnaldo Carvalho de Melo wrote:
> Em Wed, Aug 16, 2023 at 12:47:44PM +0100, James Clark escreveu:
>> +++ b/tools/perf/arch/arm64/tests/cpuid-match.c
>> @@ -0,0 +1,38 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +#include <linux/compiler.h>
>> +
>> +#include "arch-tests.h"
>> +#include "tests/tests.h"
>> +#include "util/header.h"
>> +
>> +int test__cpuid_match(struct test_suite *test __maybe_unused,
>> +			     int subtest __maybe_unused)
>> +{
>> +	/* midr with no leading zeros matches */
>> +	if (strcmp_cpuid_str("0x410fd0c0", "0x00000000410fd0c0"))
>> +		return -1;
>> +	/* Upper case matches */
>> +	if (strcmp_cpuid_str("0x410fd0c0", "0x00000000410FD0C0"))
>> +		return -1;
>> +	/* r0p0 = r0p0 matches */
>> +	if (strcmp_cpuid_str("0x00000000410fd480", "0x00000000410fd480"))
>> +		return -1;
>> +	/* r0p1 > r0p0 matches */
>> +	if (strcmp_cpuid_str("0x00000000410fd480", "0x00000000410fd481"))
>> +		return -1;
>> +	/* r1p0 > r0p0 matches*/
>> +	if (strcmp_cpuid_str("0x00000000410fd480", "0x00000000411fd480"))
>> +		return -1;
>> +	/* r0p0 < r0p1 doesn't match */
>> +	if (!strcmp_cpuid_str("0x00000000410fd481", "0x00000000410fd480"))
>> +		return -1;
>> +	/* r0p0 < r1p0 doesn't match */
>> +	if (!strcmp_cpuid_str("0x00000000411fd480", "0x00000000410fd480"))
>> +		return -1;
>> +	/* Different CPU doesn't match */
>> +	if (!strcmp_cpuid_str("0x00000000410fd4c0", "0x00000000430f0af0"))
>> +		return -1;
>> +
>> +	return 0;
>> +}
>> +
>> -- 
>> 2.34.1
>>
> ⬢[acme@toolbox perf-tools-next]$        git am ./v6_20230816_james_clark_perf_vendor_events_arm64_update_n2_and_v2_metrics_and_events_using_arm_telem.mbx
> Applying: perf test: Add a test for the new Arm CPU ID comparison behavior
> .git/rebase-apply/patch:93: new blank line at EOF.
> +
> warning: 1 line adds whitespace errors.
> ⬢[acme@toolbox perf-tools-next]$
> 
> I'm removing it

Interesting that checkpatch.pl doesn't see that. Thanks for the fix.


  reply	other threads:[~2023-08-17  9:03 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-16 11:47 [PATCH v6 0/6] perf vendor events arm64: Update N2 and V2 metrics and events using Arm telemetry repo James Clark
2023-08-16 11:47 ` [PATCH v6 1/6] perf arm64: Allow version comparisons of CPU IDs James Clark
2023-08-17  9:51   ` John Garry
2023-08-16 11:47 ` [PATCH v6 2/6] perf test: Add a test for the new Arm CPU ID comparison behavior James Clark
2023-08-16 16:11   ` Arnaldo Carvalho de Melo
2023-08-17  9:02     ` James Clark [this message]
2023-08-16 11:47 ` [PATCH v6 3/6] perf vendor events arm64: Update scale units and descriptions of common topdown metrics James Clark
2023-08-16 16:15   ` Arnaldo Carvalho de Melo
2023-08-16 11:47 ` [PATCH v6 4/6] perf jevents: Add a new expression builtin strcmp_cpuid_str() James Clark
2023-08-17  9:53   ` John Garry
2023-08-29 23:46   ` Ian Rogers
2023-08-30 17:14     ` James Clark
2023-08-30 17:59       ` Ian Rogers
2023-08-16 11:47 ` [PATCH v6 5/6] perf vendor events arm64: Update stall_slot workaround for N2 r0p3 James Clark
2023-08-17 11:08   ` John Garry
2023-08-16 11:47 ` [PATCH v6 6/6] perf vendor events arm64: Update N2 and V2 metrics and events using Arm telemetry repo James Clark
2023-08-17 11:09   ` John Garry
2023-08-17 14:41     ` James Clark
2023-08-17 17:13       ` Arnaldo Carvalho de Melo

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=fecfd732-df85-1bb9-f3d2-c1e12ca2db2e@arm.com \
    --to=james.clark@arm.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eddyz87@gmail.com \
    --cc=irogers@google.com \
    --cc=john.g.garry@oracle.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=kjain@linux.ibm.com \
    --cc=leo.yan@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mike.leach@linaro.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=nick.forrington@arm.com \
    --cc=peterz@infradead.org \
    --cc=renyu.zj@linux.alibaba.com \
    --cc=robh@kernel.org \
    --cc=sohomdatta1@gmail.com \
    --cc=will@kernel.org \
    --cc=yuhaixin.yhx@linux.alibaba.com \
    /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;
as well as URLs for NNTP newsgroup(s).