]> Git Repo - linux.git/commit
perf tools: Fix version kernel tag
authorJohn Garry <[email protected]>
Mon, 21 Feb 2022 13:16:49 +0000 (21:16 +0800)
committerArnaldo Carvalho de Melo <[email protected]>
Tue, 22 Mar 2022 20:12:40 +0000 (17:12 -0300)
commit7572733b84997d23077ebd852703055034b7a1d2
tree559af44615a68fb1537701ef8f4e48f565f9ea8f
parent4e666cdb06eede2069a7b1a96a1359d1c441a3eb
perf tools: Fix version kernel tag

Generating the version kernel tag relies on "git describe" command to
get the latest Linus kernel tag.

However, when working from clones of Linus' git we may not have the latest
tag. For example, when working on Arnaldo's acme.git, we can have this:

  $ git branch
  perf/core
  $ head -n 5 ../../Makefile  | tail -n 4
  VERSION = 5
  PATCHLEVEL = 17
  SUBLEVEL = 0
  EXTRAVERSION = -rc3
  $ git describe --abbrev=0 --match "v[0-9].[0-9]*"
  v4.13-rc5

Indeed using tags is a problem as it relies on tags being pulled from
Linus' git (and pushed to the clone).

In commit a4147f0f91386540 ("perf tools: Fix perf version generation")
Robert introduced a change to use the kernelversion rule to generate the
kernel tag when no git tags are available.

However, as mentioned above, the tag we generate may be incorrect, so
just always use kernelversion to get the tag (apart from building perf
out of tree).

Signed-off-by: John Garry <[email protected]>
Tested-by: Arnaldo Carvalho de Melo <[email protected]>
Acked-by: Ian Rogers <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Robert Richter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/util/PERF-VERSION-GEN
This page took 0.048336 seconds and 4 git commands to generate.