Re: [PATCH] perf build: prevent "argument list too long" error
From: Markus Mayer
Date: Tue Mar 03 2026 - 17:47:36 EST
On Tue, 3 Mar 2026 at 14:35, Ian Rogers <irogers@xxxxxxxxxx> wrote:
>
> On Tue, Mar 3, 2026 at 1:16 PM Markus Mayer <mmayer@xxxxxxxxxxxx> wrote:
> >
> > TEST [...]/arm64/build/linux-custom/tools/perf/pmu-events/metric_test.log
> > make[5]: /bin/sh: Argument list too long
> > make[5]: *** [pmu-events/Build:217: prune_orphans] Error 127
> > make[5]: *** Waiting for unfinished jobs....
> > make[4]: *** [Makefile.perf:773: [...]/tools/perf/pmu-events/pmu-events-in.o] Error 2
> > make[4]: *** Waiting for unfinished jobs....
> > make[3]: *** [Makefile.perf:289: sub-make] Error 2
>
> As with:
> https://lore.kernel.org/lkml/20250728093153.2330009-1-changqing.li@xxxxxxxxxxxxx/
> I'm not able to reproduce the problem but the change makes sense.
>
> Reviewed-by: Ian Rogers <irogers@xxxxxxxxxx>
Thanks for the review. Not sure what makes my setup different from
yours. FWIW, it's an ARM64 cross-compile. I had the build system dump
the contents of $(ORPHAN_FILES) into a file for me. This is how many
files it was trying to pass via the shell:
$ wc -l json_files.txt
634 json_files.txt
Maybe you have fewer orphans to prune or your shell has a higher the
argument limit. Whatever the case, both our automated nightly builds
and manual builds have been running into this issue.
Regards,
-Markus