lkml.org 
[lkml]   [2013]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] perf tools: Speed up git-version test on re-make
Date
On Wed, 2 Oct 2013 08:50:42 +0200, Ingo Molnar wrote:
> * Namhyung Kim <namhyung@kernel.org> wrote:
>
>> On Tue, 1 Oct 2013 16:46:18 +0200, Ingo Molnar wrote:
>>
>> [SNIP]
>> >
>> > -$(OUTPUT)PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE
>> > +$(OUTPUT)PERF-VERSION-FILE: ../../.git/HEAD
>> > @$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT)
>> > + @touch $(OUTPUT)PERF-VERSION-FILE
>> >
>> > CC = $(CROSS_COMPILE)gcc
>> > AR = $(CROSS_COMPILE)ar
>> > @@ -813,7 +814,17 @@ clean: $(LIBTRACEEVENT)-clean $(LIBLK)-c
>> > $(RM) $(OUTPUT)util/*-flex*
>> > $(python-clean)
>> >
>> > +#
>> > +# Trick: if ../../.git does not exist - we are building out of tree for example,
>> > +# then force version regeneration:
>> > +#
>> > +ifeq ($(wildcard ../../.git/HEAD),)
>> > + GIT-HEAD-PHONY = ../../.git/HEAD
>> > +else
>> > + GIT-HEAD-PHONY =
>> > +endif
>> > +
>> > .PHONY: all install clean strip $(LIBTRACEEVENT) $(LIBLK)
>> > .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
>> > -.PHONY: .FORCE-PERF-VERSION-FILE TAGS tags cscope .FORCE-PERF-CFLAGS
>> > +.PHONY: $(GIT-HEAD-PHONY) TAGS tags cscope .FORCE-PERF-CFLAGS
>> >
>>
>> I found an unrelated bug. When I tried to build perf out of tree after
>> 'make perf-targz-src-pkg' it cannot get any version number.
>>
>> GEN common-cmds.h
>> * new build flags or prefix
>> make[1]: *** No rule to make target `kernelversion'. Stop.
>> PERF_VERSION =
>> ...
>> AR libperf.a
>> LINK perf
>>
>> $ ./perf --version
>> perf version
>
> Is this unrelated to my patches?

Yes, I can reproduce it without your patch.

>
>> It looks like we should save and pass the result of 'make kernelversion'
>> to the tarball.
>
> Or we could simply generate PERF-VERSION-FILE and save it into the
> tarball?
>
> Then it will be the most accurate version we can determine at the point
> when the tarball is generated.

Hmm.. I tried to do it, but it's not that simple than I thought. With
your patch, the PERF-VERSION-FILE is regenerated everytime if it can't
find .git/HEAD so saving the file didn't help since it'll be
overwritten. Anyway, it also cannot be used with 'make O=...' build.

Thanks,
Namhyung


\
 
 \ /
  Last update: 2013-10-02 10:21    [W:0.100 / U:3.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site