Skip to content

perf build: fix "argument list too long" in second location

Markus Mayer linux-perf-users lkml 1 version Applied

Status from this message: Applied to perf-tools-next, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 8 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/1perf build: fix "argument list too long" in second locationtools/perf/pmu-events/Build+2 -28 replies

Reviews trailers per patch

The patch has a Reviewed-by or Acked-by.

PatchJames Clark
1/1R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/1] perf build: fix "argument list too long" in second location

Hi all,

My apologies for not catching this one sooner. Using xargs in the actual build recipe worked, but it turns out echoing $^ in quiet_cmd_rm also offends the shell. Somehow, it didn't show up during my tests before submitting the previous fix[1] for this issue or I would have addressed both together.

But then it did start to show up. Like this:

GEN linux/tools/perf/pmu-events/arch/arm64/arm/neoverse-v3/extra-metricgroups.json
TEST linux/tools/perf/pmu-events/metric_test.log
make[5]: /bin/sh: Argument list too long
make[5]: *** [pmu-events/Build:220: prune_orphans] Error 127

This was a bit of a head-scratcher before I realized that this came from
quiet_cmd_rm = RM $^
and that no attempt of putting quotes around $^ would help.

With change proposed here, it'll look like this instead:

  GEN     linux/tools/perf/pmu-events/arch/arm64/arm/neoverse-v3/extra-metricgroups.json
  TEST    linux/tools/perf/pmu-events/metric_test.log
  RM      ...634 orphan file(s)...
  LD      linux/tools/perf/util/perf-util-in.o

This is probably a good thing, regardless of the shell complaining, since listing 634 files in a so-called "quiet" message is probably not very fitting.

I don't know why my build has 634 orphans every single time it runs (straight-up cross-build on x86_64 for ARM64) or if that is a lot. I do get the impression that it is probably rather unusual. Not really doing anything special, though.

Also, the build machines are running Ubuntu 24.04. As such, /bin/sh is provided by /bin/dash. This may also factor into why I might be seeing this issue while others may not.

Again, sorry for the churn. Hopefully this is it now on the orphan front.

Regards,
-Markus

[1] https://lore.kernel.org/linux-perf-users/[email protected]/

Markus Mayer (1):
perf build: fix "argument list too long" in second location

 tools/perf/pmu-events/Build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.53.0