[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87o6rqkste.fsf@gentoo.org>
Date: Thu, 04 Sep 2025 18:53:33 +0100
From: Sam James <sam@...too.org>
To: Ian Rogers <irogers@...gle.com>, Andi Kleen <ak@...ux.intel.com>,
amadio@...too.org, dlan@...too.org
Cc: James Clark <james.clark@...aro.org>, Peter Zijlstra
<peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>, Arnaldo Carvalho
de Melo <acme@...nel.org>, Namhyung Kim <namhyung@...nel.org>, Mark
Rutland <mark.rutland@....com>, Alexander Shishkin
<alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>, Leo Yan <leo.yan@....com>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] perf symbols: Fix HAVE_LIBBFD_BUILDID_SUPPORT build
Ian Rogers <irogers@...gle.com> writes:
> On Wed, Sep 3, 2025 at 8:15 AM James Clark <james.clark@...aro.org> wrote:
>>
>> read_build_id() now has a blocking argument, but libbfd uses fopen()
>> internally which doesn't support O_NONBLOCK. Fix the build by adding the
>> argument and ignoring it:
>>
>> util/symbol-elf.c:964:8: error: too many arguments to function ‘read_build_id’
>> 964 | err = read_build_id(filename, bid, block);
>>
>> Fixes: 2c369d91d093 ("perf symbol: Add blocking argument to filename__read_build_id")
>> Signed-off-by: James Clark <james.clark@...aro.org>
>
> Libbfd should go away:
> https://lore.kernel.org/lkml/20250823003216.733941-14-irogers@google.com/
> but I can imagine that currently this is hit in a build test - sorry
> for missing that and thanks for the fix!
>
> We should probably honor the blocking argument (use fdopen) as the
> probe perf tests will invoke perf record system wide with data pages
> and predictably hang on this for files like mmap-ed in sound devices.
> That said, maybe this hanging will serve as an indication not to use
> the deprecated libbfd code. From the sounds of things this will break
> gentoo :-(
> https://lore.kernel.org/lkml/87ldnacz33.fsf@gentoo.org/
Just want to say I haven't forgot about this, I need to find a moment to
compare the bfd and nonbfd builds to see if everything works OK
now. Will try do that in the next few days.
The disassembler/objdump use was definitely the biggest problem so if
support for binutils is here to say there, that puts my mind at ease.
Has Andi mentioned what issue he had? amadio/dlan, can you weigh in as well?
>
> Thanks,
> Ian
>
>> ---
>> tools/perf/util/symbol-elf.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
>> index 033c79231a54..e0d6ff7d0acf 100644
>> --- a/tools/perf/util/symbol-elf.c
>> +++ b/tools/perf/util/symbol-elf.c
>> @@ -873,7 +873,8 @@ static int elf_read_build_id(Elf *elf, void *bf, size_t size)
>>
>> #ifdef HAVE_LIBBFD_BUILDID_SUPPORT
>>
>> -static int read_build_id(const char *filename, struct build_id *bid)
>> +static int read_build_id(const char *filename, struct build_id *bid,
>> + bool block __maybe_unused)
>> {
>> size_t size = sizeof(bid->data);
>> int err = -1;
>>
>> --
>> 2.34.1
>>
Powered by blists - more mailing lists