From: Leo Yan <leo.yan@arm.com>
To: James Clark <james.clark@linaro.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] perf jevents: Fix build when there are other json files in the tree
Date: Mon, 20 Oct 2025 17:38:35 +0100 [thread overview]
Message-ID: <20251020163835.GI281971@e132581.arm.com> (raw)
In-Reply-To: <20251020-james-perf-fix-json-find-v1-1-627b938ccf0d@linaro.org>
On Mon, Oct 20, 2025 at 05:08:26PM +0100, James Clark wrote:
> The unquoted glob *.json will expand to a real file if, for example,
> there is any file in the Perf source ending in .json. This can happen
> when using tools like Bear and clangd which generate a
> compile_commands.json file. With the glob already expanded by the shell,
> the find command will fail to wildcard any real json events files.
>
> Fix it by wrapping the star in quotes so it's passed to find rather than
> the shell.
>
> This fixes the following build error (most of the diff output omitted):
>
> $ make V=1 -C tools/perf O=/tmp/perf_build_with_json
>
> TEST /tmp/perf_build_with_json/pmu-events/empty-pmu-events.log
> ...
> /* offset=121053 */ "node-access\000legacy cache\000Local memory read accesses\000legacy-cache-config=6\000\00010\000\000\000\000\000"
> /* offset=121135 */ "node-misses\000legacy cache\000Local memory read misses\000legacy-cache-config=0x10006\000\00010\000\000\000\000\000"
> /* offset=121221 */ "node-miss\000legacy cache\000Local memory read misses\000legacy-cache-config=0x10006\000\00010\000\000\000\000\000"
> ...
> - {
> .event_table = { 0, 0 },
> .metric_table = { 0, 0 },
> },
> make[3]: *** [pmu-events/Build:54: /tmp/perf_build_with_json/pmu-events/empty-pmu-events.log] Error 1
>
> Fixes: 4bb55de4ff03 ("perf jevents: Support copying the source json files to OUTPUT")
> Signed-off-by: James Clark <james.clark@linaro.org>
Searched a bit, if without quotes, the wildcard will be expanded by make
but not by shell. It makes sense for me to fix it with quotes.
Reviewed-by: Leo Yan <leo.yan@arm.com>
next prev parent reply other threads:[~2025-10-20 16:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-20 16:08 [PATCH 0/3] perf jevents: Fix build when there are other json files in the tree James Clark
2025-10-20 16:08 ` [PATCH 1/3] " James Clark
2025-10-20 16:38 ` Leo Yan [this message]
2025-10-21 8:28 ` James Clark
2025-10-20 16:08 ` [PATCH 2/3] perf jevents: Remove unused makefile variable James Clark
2025-10-20 16:08 ` [PATCH 3/3] perf jevents: Suppress circular dependency warnings James Clark
2025-10-21 4:09 ` Namhyung Kim
2025-10-20 16:48 ` [PATCH 0/3] perf jevents: Fix build when there are other json files in the tree Leo Yan
2025-10-22 0:39 ` Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251020163835.GI281971@e132581.arm.com \
--to=leo.yan@arm.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.