[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YzU/o3kxS/BYpJhn@leoy-yangtze.lan>
Date: Thu, 29 Sep 2022 14:48:03 +0800
From: Leo Yan <leo.yan@...aro.org>
To: Rob Herring <robh@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Ingo Molnar <mingo@...hat.com>,
Mark Rutland <mark.rutland@....com>,
Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
linux-perf-users@...r.kernel.org,
James Clark <james.clark@....com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/3] perf: Skip and warn on unknown format 'configN'
attrs
Hi Rob,
On Wed, Sep 14, 2022 at 03:08:34PM -0500, Rob Herring wrote:
[...]
> +void perf_pmu__warn_invalid_formats(struct perf_pmu *pmu)
> +{
> + struct perf_pmu_format *format;
> +
> + list_for_each_entry(format, &pmu->format, list)
> + if (format->value >= PERF_PMU_FORMAT_VALUE_CONFIG_END) {
> + pr_warning("WARNING: '%s' format '%s' requires 'perf_event_attr::config%d'"
> + "which is not supported by this version of perf!\n",
> + pmu->name, format->name, format->value);
> + return;
> + }
> +}
Though I saw you and Namhyung have discussion in underway, this patch
set is fine for me. I validated the patches at my side (with a bit
hacking in Arm SPE driver for faking invert filter). You could add my
tested tag for this patch set:
Tested-by: Leo Yan <leo.yan@...aro.org>
But I want to remind two things after I used "perf test" to validate
this patch set:
$ ./perf test list
6: Parse event definition strings
6:1: Test event parsing
6:2: Test parsing of "hybrid" CPU events
6:3: Parsing of all PMU events from sysfs
6:4: Parsing of given PMU events from sysfs
6:5: Parsing of aliased events from sysfs
6:6: Parsing of aliased events
6:7: Parsing of terms (event modifiers)
$ ./perf test -v 6
The first one is this patch set introduces segmentation fault for the
case "Parsing of aliased events" (See tests/parse-events.c). But the
issue is caused by the test case itself; we need to add below line into
test_event_fake_pmu() for initialisation list header.
INIT_LIST_HEAD(&perf_pmu__fake.format);
The second question is for testing config3 in "perf test". You could
see the file tests/parse-events.c has included several test cases for
config/config1/config2. It's good to add the same testing for config3
as well, please see test__checkevent_pmu() and test__checkterms_simple()
for relevant code.
Thanks,
Leo
Powered by blists - more mailing lists