Skip to content

Commit f2868b1

Browse files
charlie-rivosnamhyung
authored andcommitted
perf tools: Expose quiet/verbose variables in Makefile.perf
The variables to make builds silent/verbose live inside tools/build/Makefile.build. Move those variables to the top-level Makefile.perf to be generally available. Committer testing: See the SYSCALL lines, now they are consistent with the other operations in other lines: SYSTBL /tmp/build/perf-tools-next/arch/x86/include/generated/asm/syscalls_32.h SYSTBL /tmp/build/perf-tools-next/arch/x86/include/generated/asm/syscalls_64.h GEN /tmp/build/perf-tools-next/common-cmds.h GEN /tmp/build/perf-tools-next/arch/arm64/include/generated/asm/sysreg-defs.h PERF_VERSION = 6.13.rc2.g3d94bb6ed1d0 GEN perf-archive MKDIR /tmp/build/perf-tools-next/jvmti/ MKDIR /tmp/build/perf-tools-next/jvmti/ MKDIR /tmp/build/perf-tools-next/jvmti/ MKDIR /tmp/build/perf-tools-next/jvmti/ GEN perf-iostat CC /tmp/build/perf-tools-next/jvmti/libjvmti.o Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Suzuki K Poulose <suzuki.poulose@arm.com> Cc: James Clark <james.clark@linaro.org> Cc: Mike Leach <mike.leach@linaro.org> Cc: linux-arm-kernel@lists.infradead.org Cc: coresight@lists.linaro.org Link: https://lore.kernel.org/r/20250114-perf_make_test-v1-1-decc1c517b11@rivosinc.com Signed-off-by: Namhyung Kim <namhyung@kernel.org>
1 parent e9cbc85 commit f2868b1

File tree

3 files changed

+37
-22
lines changed

3 files changed

+37
-22
lines changed

tools/build/Makefile.build

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,6 @@
1212
PHONY := __build
1313
__build:
1414

15-
ifeq ($(V),1)
16-
quiet =
17-
Q =
18-
else
19-
quiet=quiet_
20-
Q=@
21-
endif
22-
23-
# If the user is running make -s (silent mode), suppress echoing of commands
24-
# make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
25-
ifeq ($(filter 3.%,$(MAKE_VERSION)),)
26-
short-opts := $(firstword -$(MAKEFLAGS))
27-
else
28-
short-opts := $(filter-out --%,$(MAKEFLAGS))
29-
endif
30-
31-
ifneq ($(findstring s,$(short-opts)),)
32-
quiet=silent_
33-
endif
34-
3515
build-dir := $(srctree)/tools/build
3616

3717
# Define $(fixdep) for dep-cmd function

tools/perf/Makefile.perf

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,47 @@ export VPATH
161161
SOURCE := $(shell ln -sf $(srctree)/tools/perf $(OUTPUT)/source)
162162
endif
163163

164+
# Beautify output
165+
# ---------------------------------------------------------------------------
166+
#
167+
# Most of build commands in Kbuild start with "cmd_". You can optionally define
168+
# "quiet_cmd_*". If defined, the short log is printed. Otherwise, no log from
169+
# that command is printed by default.
170+
#
171+
# e.g.)
172+
# quiet_cmd_depmod = DEPMOD $(MODLIB)
173+
# cmd_depmod = $(srctree)/scripts/depmod.sh $(DEPMOD) $(KERNELRELEASE)
174+
#
175+
# A simple variant is to prefix commands with $(Q) - that's useful
176+
# for commands that shall be hidden in non-verbose mode.
177+
#
178+
# $(Q)$(MAKE) $(build)=scripts/basic
179+
#
180+
# To put more focus on warnings, be less verbose as default
181+
# Use 'make V=1' to see the full commands
182+
164183
ifeq ($(V),1)
184+
quiet =
165185
Q =
166186
else
167-
Q = @
187+
quiet=quiet_
188+
Q=@
168189
endif
169190

191+
# If the user is running make -s (silent mode), suppress echoing of commands
192+
# make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
193+
ifeq ($(filter 3.%,$(MAKE_VERSION)),)
194+
short-opts := $(firstword -$(MAKEFLAGS))
195+
else
196+
short-opts := $(filter-out --%,$(MAKEFLAGS))
197+
endif
198+
199+
ifneq ($(findstring s,$(short-opts)),)
200+
quiet=silent_
201+
endif
202+
203+
export quiet Q
204+
170205
# Do not use make's built-in rules
171206
# (this improves performance and avoids hard-to-debug behaviour);
172207
MAKEFLAGS += -r

tools/perf/tests/shell/coresight/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ CLEANDIRS = $(SUBDIRS:%=clean-%)
2424

2525
clean: $(CLEANDIRS)
2626
$(CLEANDIRS):
27-
$(call QUIET_CLEAN, test-$(@:clean-%=%)) $(Q)$(MAKE) -C $(@:clean-%=%) clean >/dev/null
27+
$(call QUIET_CLEAN, test-$(@:clean-%=%)) $(MAKE) -C $(@:clean-%=%) clean >/dev/null
2828

2929
.PHONY: all clean $(SUBDIRS) $(CLEANDIRS) $(INSTALLDIRS)

0 commit comments

Comments
 (0)