From: Ian Rogers <irogers@google.com>
To: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
James Clark <james.clark@linaro.org>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
Ian Rogers <irogers@google.com>
Subject: [PATCH 6/8] perf build: Run pmu-events tests in parallel with jevents.py
Date: Sat, 5 Dec 2026 18:11:45 -0800 [thread overview]
Message-ID: <20261206021147.3036701-7-irogers@google.com> (raw)
In-Reply-To: <20261206021147.3036701-1-irogers@google.com>
Currently $(EMPTY_PMU_EVENTS_TEST_LOG) and $(METRIC_TEST_LOG) are
prerequisites of $(PMU_EVENTS_C), forcing jevents.py (and subsequent C
compilation of pmu-events.c and pmu-events-string.c) to wait for the
test-empty-pmu-events.c generation and diff check to complete first.
Move $(EMPTY_PMU_EVENTS_TEST_LOG) and $(METRIC_TEST_LOG) onto
$(OUTPUT)pmu-events/pmu-events-in.o instead so the tests run in parallel
with jevents.py and C compilation while still gating the pmu-events
link step.
Signed-off-by: Ian Rogers <irogers@google.com>
---
tools/perf/pmu-events/Build | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/tools/perf/pmu-events/Build b/tools/perf/pmu-events/Build
index c0f6855a17c9..1bcb88e8b0e5 100644
--- a/tools/perf/pmu-events/Build
+++ b/tools/perf/pmu-events/Build
@@ -220,13 +220,14 @@ $(EMPTY_PMU_EVENTS_TEST_LOG): $(EMPTY_PMU_EVENTS_C) $(TEST_EMPTY_PMU_EVENTS_C)
$(call rule_mkdir)
$(Q)$(call echo-cmd,test)diff -u $^ 2> $@ || (cat $@ && false)
-# Dependencies for jevents.py
+# Dependencies for jevents.py. Test logs run in parallel with jevents.py and
+# C compilation, gating pmu-events-in.o instead of pmu-events.c.
JEVENTS_DEPS := $(SRC_JSON) $(GEN_JSON) $(JEVENTS_SRC_MANIFEST) $(JEVENTS_GEN_MANIFEST) \
- $(JEVENTS_PY) $(METRIC_PY) $(EMPTY_PMU_EVENTS_TEST_LOG) $(METRIC_TEST_LOG) \
- $(JEVENTS_FLAGS_FILE)
+ $(JEVENTS_PY) $(METRIC_PY) $(JEVENTS_FLAGS_FILE)
-# Finally, the rule to build pmu-events.c using jevents.py. All test
-# and inputs are dependencies.
+$(OUTPUT)pmu-events/pmu-events-in.o: $(EMPTY_PMU_EVENTS_TEST_LOG) $(METRIC_TEST_LOG)
+
+# Finally, the rule to build pmu-events.c using jevents.py.
$(PMU_EVENTS_C): $(JEVENTS_DEPS)
$(call rule_mkdir)
$(Q)$(call echo-cmd,gen)$(PYTHON) $(JEVENTS_PY) --compress=$(JEVENTS_COMPRESS_ARG) \
--
2.56.1.915.g69d5ec7298-goog
next prev parent reply other threads:[~2026-12-06 2:12 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-06 2:11 [PATCH 0/8] perf build: Avoid pmu-events copies and improve build parallelism Ian Rogers
2026-12-06 2:11 ` [PATCH 1/8] perf pmu-events: Ignore backup and non-event JSON files in metric.py Ian Rogers
2026-12-06 2:22 ` sashiko-bot
2026-12-06 2:11 ` [PATCH 2/8] perf jevents: Support --gen-dir/--gen-manifest overlay and ignore backups Ian Rogers
2026-12-06 2:23 ` sashiko-bot
2026-12-06 2:11 ` [PATCH 3/8] perf build: Avoid copying pmu-events JSON files into OUTPUT Ian Rogers
2026-12-06 2:26 ` sashiko-bot
2026-12-06 2:11 ` [PATCH 4/8] perf pmu-events: Batch metric generation and scope via mapfile.csv Ian Rogers
2026-12-06 2:28 ` sashiko-bot
2026-12-06 2:11 ` [PATCH 5/8] perf build: Batch metric JSON generation in pmu-events/Build Ian Rogers
2026-12-06 2:26 ` sashiko-bot
2026-12-06 2:11 ` Ian Rogers [this message]
2026-12-06 2:11 ` [PATCH 7/8] perf build: Depend on lib*-headers instead of archives in prepare Ian Rogers
2026-12-06 2:11 ` [PATCH 8/8] perf tests make: Only run shellcheck, mypy and pylint in pure builds Ian Rogers
2026-12-06 2:22 ` sashiko-bot
2026-12-06 2:28 ` [PATCH 0/8] perf build: Avoid pmu-events copies and improve build parallelism sashiko-bot
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=20261206021147.3036701-7-irogers@google.com \
--to=irogers@google.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--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.