Skip to contentSkip to conversation

perf make: Move DEBUG initialization into Makefile.perf

PATCH In review Jiri Olsa 2 participants 3 messages Oct 13, 2013 – Oct 14, 2013 perf events

lore
Share & tools
lore

Jiri Olsa

author
#0 lore raw

PATCH 1/1 perf make: Move DEBUG initialization into Makefile.perf

Adding new top level Makefile invalidated the DEBUG variable check for "command line" origin.

Moving this check into Makefile.perf.

Cc Corey Ashford <[email protected]>
Cc David Ahern <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
---
 tools/perf/Makefile        | 6 +++++-
 tools/perf/config/Makefile | 3 ---
 2 files changed, 5 insertions(+), 4 deletions(-)
tools/perf/Makefile +5 -1
index 5aa3d04..db21dad 100644
@@ -37,12 +37,16 @@ ifneq ($(O),)
   FULL_O := $(shell readlink -f $(O))
 endif
 
+ifeq ("$(origin DEBUG)", "command line")
+  D = $(DEBUG)
+endif
+
 define print_msg
   @printf '  BUILD:   Doing '\''make \033[33m-j'$(JOBS)'\033[m'\'' parallel build\n'
 endef
 
 define make
-  @$(MAKE) -f Makefile.perf --no-print-directory -j$(JOBS) O=$(FULL_O) $@
+  @$(MAKE) -f Makefile.perf --no-print-directory -j$(JOBS) O=$(FULL_O) PERF_DEBUG=$(D) $@
 endef
 
 #
tools/perf/config/Makefile +0 -3
index 9680424..912026a 100644
@@ -66,9 +66,6 @@ ifneq ($(WERROR),0)
   CFLAGS += -Werror
 endif
 
-ifeq ("$(origin DEBUG)", "command line")
-  PERF_DEBUG = $(DEBUG)
-endif
 ifndef PERF_DEBUG
   CFLAGS += -O6
 endif
Signature · 1 line
1.7.11.7
#1 lore raw
Quoted 4 lines · Jiri Olsa

Adding new top level Makefile invalidated the
DEBUG variable check for "command line" origin.

Moving this check into Makefile.perf.

This ought to be fixed in my latest tip:tmp.perf branch. The fix commit in particular is:

91a7b6db20ae tools/perf/build: Pass through DEBUG parameter

I'm waiting for Arnaldo to send an updated perf/core and then I will double check whether any of the fixes is missing.

Thanks,

Ingo

author
#2 lore raw
Quoted 8 lines · Ingo Molnar
Quoted 4 lines · Jiri Olsa

Adding new top level Makefile invalidated the
DEBUG variable check for "command line" origin.

Moving this check into Makefile.perf.

Quoted 7 lines

This ought to be fixed in my latest tip:tmp.perf branch. The fix commit in particular is:

91a7b6db20ae tools/perf/build: Pass through DEBUG parameter

I'm waiting for Arnaldo to send an updated perf/core and then I will double check whether any of the fixes is missing.

ook, thanks

jirka