From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Matthieu Baerts <matthieu.baerts@tessares.net>
Cc: John Garry <john.garry@huawei.com>,
peterz@infradead.org, mingo@redhat.com, mark.rutland@arm.com,
alexander.shishkin@linux.intel.com, jolsa@kernel.org,
namhyung@kernel.org, irogers@google.com,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf tools: Stop depending on .git files for building PERF-VERSION-FILE
Date: Wed, 30 Mar 2022 11:12:54 -0300 [thread overview]
Message-ID: <YkRlZhaEgmJ5Q4k/@kernel.org> (raw)
In-Reply-To: <3a72702f-6cf9-2b6e-0f9c-bf6857ab7ed2@tessares.net>
Em Wed, Mar 30, 2022 at 03:22:37PM +0200, Matthieu Baerts escreveu:
> Hi John,
>
> On 30/03/2022 12:22, John Garry wrote:
> > This essentially reverts commit c72e3f04b45fb2e50cdd81a50c3778c6a57251d8
> > and commit 4e666cdb06eede2069a7b1a96a1359d1c441a3eb.
> >
> > In commit c72e3f04b45f ("tools/perf/build: Speed up git-version test on
> > re-make"), a makefile dependency on .git/HEAD was added. The background is
> > that running PERF-VERSION-FILE is relatively slow, and commands like
> > "git describe" are particularly slow.
> >
> > In commit 4e666cdb06ee ("perf tools: Fix dependency for version file
> > creation"), an additional dependency on .git/ORIG_HEAD was added, as
> > .git/HEAD may not change for "git reset --hard HEAD^" command. However,
> > depending on whether we're on a branch or not, a "git cherry-pick" may
> > not lead to the version being updated.
> >
> > As discussed with the git community in [0], using git internal files for
> > dependencies is not reliable. Commit 4e666cdb06ee also breaks some build
> > scenarios [1].
> >
> > As mentioned, c72e3f04b45f was added to speed up the build. However in
> > commit 7572733b8499 ("perf tools: Fix version kernel tag") we removed the
> > call to "git describe", so just revert Makefile.perf back to same as pre
> > c72e3f04b45f and the build should not be so slow, as below:
> >
> > Pre 7572733b8499:
> > $> time util/PERF-VERSION-GEN
> > PERF_VERSION = 5.17.rc8.g4e666cdb06ee
> >
> > real 0m0.110s
> > user 0m0.091s
> > sys 0m0.019s
> >
> > Post 7572733b8499:
> > $> time util/PERF-VERSION-GEN
> > PERF_VERSION = 5.17.rc8.g7572733b8499
> >
> > real 0m0.039s
> > user 0m0.036s
> > sys 0m0.007s
> >
> > [0] https://lore.kernel.org/git/87wngkpddp.fsf@igel.home/T/#m4a4dd6de52fdbe21179306cd57b3761eb07f45f8
> > [1] https://lore.kernel.org/linux-perf-users/20220329093120.4173283-1-matthieu.baerts@tessares.net/T/#u
> >
> > Fixes: 4e666cdb06ee ("perf tools: Fix dependency for version file creation")
> > Reported-by: Matthieu Baerts <matthieu.baerts@tessares.net>
> > Signed-off-by: John Garry <john.garry@huawei.com>
>
> Thank you for your patch, I just tested it and it also fixes the issue I
> reported!
I'm taking this as a:
Tested-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Ok?
- Arnaldo
next prev parent reply other threads:[~2022-03-30 14:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-30 10:22 [PATCH] perf tools: Stop depending on .git files for building PERF-VERSION-FILE John Garry
2022-03-30 13:22 ` Matthieu Baerts
2022-03-30 14:12 ` Arnaldo Carvalho de Melo [this message]
2022-03-30 14:22 ` Matthieu Baerts
2022-03-30 14:28 ` Arnaldo Carvalho de Melo
2022-03-30 14:30 ` Arnaldo Carvalho de Melo
2022-03-30 14:36 ` Matthieu Baerts
2022-03-30 16:30 ` Arnaldo Carvalho de Melo
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=YkRlZhaEgmJ5Q4k/@kernel.org \
--to=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=john.garry@huawei.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=matthieu.baerts@tessares.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).