[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131009064205.GG7664@gmail.com>
Date: Wed, 9 Oct 2013 08:42:05 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Jiri Olsa <jolsa@...hat.com>
Cc: linux-kernel@...r.kernel.org,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
David Ahern <dsahern@...il.com>
Subject: [PATCH 53/52] tools/perf/build: Clean up feature_print_code()
* Jiri Olsa <jolsa@...hat.com> wrote:
> On Tue, Oct 08, 2013 at 10:46:10AM +0200, Ingo Molnar wrote:
>
> SNIP
>
> > So, this is a bit of a GNU Make mystery to me. If I have a failure for at
> > least one of the features, and if I leave out that DUMMY then I get this
> > printout:
> >
> > ... libperl: [ OFF ]
> > ... libpython: [ on ]
> > ... libpython-version: [ on ]
> > ... libslang: [ on ]
> > ... libunwind: [ on ]
> > ... on-exit: [ on ]
> > ... stackprotector: [ on ]
> > ... stackprotector-all: [ on ]
> >
> > GEN python/perf.so
> >
> > Note how the last entry is missing: volatile-register-var.
> >
> > If I add the DUMMY I get the full printout:
> >
> > ... libperl: [ OFF ]
> > ... libpython: [ on ]
> > ... libpython-version: [ on ]
> > ... libslang: [ on ]
> > ... libunwind: [ on ]
> > ... on-exit: [ on ]
> > ... stackprotector: [ on ]
> > ... stackprotector-all: [ on ]
> > ... volatile-register-var: [ on ]
> >
> > GEN python/perf.so
> >
> > Somehow GNU Make appears to be eating terminal ouput - or I might have
> > misunderstood something.
> >
> > I hope it's the latter - but if it's the former then the DUMMY entry is
> > needed :-/
> >
> > Thanks,
> >
> > Ingo
>
> I think the issue might be in the eval handling the $(info $(MSG)).
> With following change on top of your v2 patchset it works for me.
Indeed - and that works here too. Initially I was trying to solve it by
forcing expansion:
MSG := ...
but I forgot that expansion does not necessarily force evaluation of the
expression and that Make can still optimize such assignments away if their
result is not used by a target, correct?
I've applied your cleanup patch below and added your signoff - is that
fine with you?
Thanks,
Ingo
=====================>
Subject: tools/perf/build: Clean up feature_print_code()
From: Jiri Olsa <jolsa@...hat.com>
Date: Tue, 8 Oct 2013 17:51:10 +0200
Remove DUMMY by making sure 'feature_print' is evaluated and thus
all messages are printed.
Signed-off-by: Jiri Olsa <jolsa@...hat.com>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: David Ahern <dsahern@...il.com>
Link: http://lkml.kernel.org/r/20131008155110.GA15558@krava.redhat.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
tools/perf/config/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: tip/tools/perf/config/Makefile
===================================================================
--- tip.orig/tools/perf/config/Makefile
+++ tip/tools/perf/config/Makefile
@@ -180,21 +180,21 @@ endif
#
# Print the result of the feature test:
#
-feature_print = $(eval $(feature_print_code))
+feature_print = $(eval $(feature_print_code)) $(info $(MSG))
+
define feature_print_code
ifeq ($(feature-$(1)), 1)
MSG = $(shell printf '...%30s: [ \033[32mon\033[m ]' $(1))
else
MSG = $(shell printf '...%30s: [ \033[31mOFF\033[m ]' $(1))
endif
- $(info $(MSG))
endef
#
# Only print out our features if we rebuilt the testcases or if a test failed:
#
ifeq ($(test-all-failed), 1)
- $(foreach feat,$(CORE_FEATURE_TESTS) DUMMY,$(call feature_print,$(feat)))
+ $(foreach feat,$(CORE_FEATURE_TESTS),$(call feature_print,$(feat)))
$(info )
endif
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists