Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Charlie Jenkins and committed by
Namhyung Kim
f2868b1a e9cbc854

+37 -22
-20
tools/build/Makefile.build
··· 12 12 PHONY := __build 13 13 __build: 14 14 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 - 35 15 build-dir := $(srctree)/tools/build 36 16 37 17 # Define $(fixdep) for dep-cmd function
+36 -1
tools/perf/Makefile.perf
··· 161 161 SOURCE := $(shell ln -sf $(srctree)/tools/perf $(OUTPUT)/source) 162 162 endif 163 163 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 + 164 183 ifeq ($(V),1) 184 + quiet = 165 185 Q = 166 186 else 167 - Q = @ 187 + quiet=quiet_ 188 + Q=@ 168 189 endif 190 + 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 169 204 170 205 # Do not use make's built-in rules 171 206 # (this improves performance and avoids hard-to-debug behaviour);
+1 -1
tools/perf/tests/shell/coresight/Makefile
··· 24 24 25 25 clean: $(CLEANDIRS) 26 26 $(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 28 28 29 29 .PHONY: all clean $(SUBDIRS) $(CLEANDIRS) $(INSTALLDIRS)