[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6a31e9e4-653a-4a8d-af91-4325b37535c7@linaro.org>
Date: Wed, 14 Jan 2026 15:58:59 +0000
From: James Clark <james.clark@...aro.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
Namhyung Kim <namhyung@...nel.org>, Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Suzuki K Poulose <suzuki.poulose@....com>, Mike Leach
<mike.leach@...aro.org>, John Garry <john.g.garry@...cle.com>,
Will Deacon <will@...nel.org>, Leo Yan <leo.yan@...ux.dev>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
coresight@...ts.linaro.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v4 02/14] perf evsel: Refactor
evsel__set_config_if_unset() arguments
On 14/01/2026 3:47 pm, Arnaldo Carvalho de Melo wrote:
> On Wed, Jan 14, 2026 at 12:14:43PM +0000, James Clark wrote:
>> On 13/01/2026 10:13 pm, Arnaldo Carvalho de Melo wrote:
>>> On Mon, Dec 22, 2025 at 03:14:27PM +0000, James Clark wrote:
>>>> Make the evsel argument first to match the other evsel__* functions
>>>> and remove the redundant pmu argument, which can be accessed via evsel.
>
>>> I haven't checked if this is the exactly where this takes place but
>>> should be in this series, 32-bit build is broken:
>
>>> 3: almalinux:9-i386WARNING: image platform (linux/386) does not match the expected platform (linux/amd64)
>>> WARNING: image platform (linux/386) does not match the expected platform (linux/amd64)
>>> 21.72 almalinux:9-i386 : FAIL gcc version 11.4.1 20231218 (Red Hat 11.4.1-3) (GCC)
>>> 1378 | perf_pmu__format_pack(&bits, val, vp, /*zero=*/true);
>>> | ^~~~~
>>> | |
>>> | u64 * {aka long long unsigned int *}
>>> In file included from util/evsel.h:14,
>>> from util/evsel.c:38:
>>> util/pmu.h:282:43: note: expected ‘long unsigned int *’ but argument is of type ‘u64 *’ {aka ‘long long unsigned int *’}
>>> 282 | void perf_pmu__format_pack(unsigned long *format, __u64 value, __u64 *v,
>>> | ~~~~~~~~~~~~~~~^~~~~~
>
>>> What I have is in perf-tools-next/tmp.perf-tools-next BTW, I'll try and
>>> fix this tomorrow if you don't do it first. :-)
>
>> Taking a look, but I'm wondering if this is already not working properly.
>> There are existing "unsigned long"s in pmu.c that operate on the config bits
>> which is what I copied.
>
>> On this target an unsigned long is 32bits but struct
>> perf_event_attr->configs are __u64. So it looks like it might leave the top
>> bits unset sometimes.
>
>> I'll look at a fix for that which should fix the compilation error at the
>> same time.
>
>> Another question is, do we actually care about this platform?
>
> It failed for other 32-bit platforms too, so the question is if we care
> about 32-bit at all.
>
> - Arnaldo
I suppose the answer is we still do then.
I sent another version. A couple of patches were changed a bit where I
used more bitfields instead of converting to u64s which was probably the
right thing to do regardless of the build issue.
Powered by blists - more mailing lists