From: John Garry <john.garry@huawei.com>
To: <peterz@infradead.org>, <mingo@redhat.com>, <acme@kernel.org>,
<mark.rutland@arm.com>, <alexander.shishkin@linux.intel.com>,
<jolsa@redhat.com>, <namhyung@kernel.org>
Cc: <linux-perf-users@vger.kernel.org>, <irogers@google.com>,
<olsajiri@gmail.com>, <rric@kernel.org>, <ak@linux.intel.com>,
John Garry <john.garry@huawei.com>
Subject: [PATCH v2 1/2] perf: Fix dependency for version file creation
Date: Mon, 21 Feb 2022 21:16:48 +0800 [thread overview]
Message-ID: <1645449409-158238-2-git-send-email-john.garry@huawei.com> (raw)
In-Reply-To: <1645449409-158238-1-git-send-email-john.garry@huawei.com>
The version generated by perf may not be correct by just changing the
head commit, like this:
$git log --pretty=format:"%H" -n 1
b5d9d4708a24ac1889a30e9aedf8af8d73102139
$perf -v
perf version 5.16.gb5d9d4708a24
$git reset --hard HEAD^
HEAD is now at 629f520b265f
$make
...
$./perf -v
perf version 5.16.gb5d9d4708a24
The dependency to building PERF-VERSION-FILE should also include ORIG_HEAD,
as this changes when changing the head commit (while HEAD does not).
Signed-off-by: John Garry <john.garry@huawei.com>
---
tools/perf/Makefile.perf | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index ac861e42c8f7..9c935f86d172 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -691,7 +691,7 @@ $(OUTPUT)common-cmds.h: $(wildcard Documentation/perf-*.txt)
$(SCRIPTS) : % : %.sh
$(QUIET_GEN)$(INSTALL) '$@.sh' '$(OUTPUT)$@'
-$(OUTPUT)PERF-VERSION-FILE: ../../.git/HEAD
+$(OUTPUT)PERF-VERSION-FILE: ../../.git/HEAD ../../.git/ORIG_HEAD
$(Q)$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT)
$(Q)touch $(OUTPUT)PERF-VERSION-FILE
@@ -1144,7 +1144,7 @@ endif
# then force version regeneration:
#
ifeq ($(wildcard ../../.git/HEAD),)
- GIT-HEAD-PHONY = ../../.git/HEAD
+ GIT-HEAD-PHONY = ../../.git/HEAD ../../.git/ORIG_HEAD
else
GIT-HEAD-PHONY =
endif
--
2.26.2
next prev parent reply other threads:[~2022-02-21 13:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-21 13:16 [PATCH v2 0/2] perf tool versioning fixes John Garry
2022-02-21 13:16 ` John Garry [this message]
2022-02-21 13:16 ` [PATCH v2 2/2] perf: Fix version kernel tag John Garry
[not found] ` <CAP-5=fXT3VYB2uBXmihuruq==FENLFcFSHMLY0Fk29pRvU-wag@mail.gmail.com>
2022-03-11 8:27 ` John Garry
2022-03-14 22:12 ` Ian Rogers
2022-03-15 11:31 ` John Garry
2022-02-25 19:37 ` [PATCH v2 0/2] perf tool versioning fixes John Garry
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=1645449409-158238-2-git-send-email-john.garry@huawei.com \
--to=john.garry@huawei.com \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=jolsa@redhat.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=olsajiri@gmail.com \
--cc=peterz@infradead.org \
--cc=rric@kernel.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).