Skip to content

Commit 9f5270d

Browse files
committed
Merge tag 'perf-tools-fixes-for-v6.14-2-2025-02-25' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools
Pull perf tools fixes from Arnaldo Carvalho de Melo: - Fix tools/ quiet build Makefile infrastructure that was broken when working on tools/perf/ without testing on other tools/ living utilities. * tag 'perf-tools-fixes-for-v6.14-2-2025-02-25' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: tools: Remove redundant quiet setup tools: Unify top-level quiet infrastructure
2 parents cc8a093 + 42367ec commit 9f5270d

File tree

19 files changed

+32
-162
lines changed

19 files changed

+32
-162
lines changed

tools/arch/arm64/tools/Makefile

-6
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ AWK ?= awk
1313
MKDIR ?= mkdir
1414
RM ?= rm
1515

16-
ifeq ($(V),1)
17-
Q =
18-
else
19-
Q = @
20-
endif
21-
2216
arm64_tools_dir = $(top_srcdir)/arch/arm64/tools
2317
arm64_sysreg_tbl = $(arm64_tools_dir)/sysreg
2418
arm64_gen_sysreg = $(arm64_tools_dir)/gen-sysreg.awk

tools/bpf/Makefile

-6
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@ srctree := $(patsubst %/,%,$(dir $(CURDIR)))
2727
srctree := $(patsubst %/,%,$(dir $(srctree)))
2828
endif
2929

30-
ifeq ($(V),1)
31-
Q =
32-
else
33-
Q = @
34-
endif
35-
3630
FEATURE_USER = .bpf
3731
FEATURE_TESTS = libbfd disassembler-four-args disassembler-init-styled
3832
FEATURE_DISPLAY = libbfd

tools/bpf/bpftool/Documentation/Makefile

-6
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ INSTALL ?= install
55
RM ?= rm -f
66
RMDIR ?= rmdir --ignore-fail-on-non-empty
77

8-
ifeq ($(V),1)
9-
Q =
10-
else
11-
Q = @
12-
endif
13-
148
prefix ?= /usr/local
159
mandir ?= $(prefix)/man
1610
man8dir = $(mandir)/man8

tools/bpf/bpftool/Makefile

-6
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@ srctree := $(patsubst %/,%,$(dir $(srctree)))
77
srctree := $(patsubst %/,%,$(dir $(srctree)))
88
endif
99

10-
ifeq ($(V),1)
11-
Q =
12-
else
13-
Q = @
14-
endif
15-
1610
BPF_DIR = $(srctree)/tools/lib/bpf
1711

1812
ifneq ($(OUTPUT),)

tools/bpf/resolve_btfids/Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ include ../../scripts/Makefile.arch
55
srctree := $(abspath $(CURDIR)/../../../)
66

77
ifeq ($(V),1)
8-
Q =
98
msg =
109
else
11-
Q = @
1210
ifeq ($(silent),1)
1311
msg =
1412
else

tools/bpf/runqslower/Makefile

+1-4
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ VMLINUX_BTF_PATHS := $(if $(O),$(O)/vmlinux) \
2626
VMLINUX_BTF_PATH := $(or $(VMLINUX_BTF),$(firstword \
2727
$(wildcard $(VMLINUX_BTF_PATHS))))
2828

29-
ifeq ($(V),1)
30-
Q =
31-
else
32-
Q = @
29+
ifneq ($(V),1)
3330
MAKEFLAGS += --no-print-directory
3431
submake_extras := feature_display=0
3532
endif

tools/build/Makefile

+1-7
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,7 @@ $(call allow-override,LD,$(CROSS_COMPILE)ld)
1717

1818
export HOSTCC HOSTLD HOSTAR
1919

20-
ifeq ($(V),1)
21-
Q =
22-
else
23-
Q = @
24-
endif
25-
26-
export Q srctree CC LD
20+
export srctree CC LD
2721

2822
MAKEFLAGS := --no-print-directory
2923
build := -f $(srctree)/tools/build/Makefile.build dir=. obj

tools/lib/bpf/Makefile

-13
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,6 @@ include $(srctree)/tools/scripts/Makefile.include
5353

5454
# copy a bit from Linux kbuild
5555

56-
ifeq ("$(origin V)", "command line")
57-
VERBOSE = $(V)
58-
endif
59-
ifndef VERBOSE
60-
VERBOSE = 0
61-
endif
62-
6356
INCLUDES = -I$(or $(OUTPUT),.) \
6457
-I$(srctree)/tools/include -I$(srctree)/tools/include/uapi \
6558
-I$(srctree)/tools/arch/$(SRCARCH)/include
@@ -96,12 +89,6 @@ override CFLAGS += $(CLANG_CROSS_FLAGS)
9689
# flags specific for shared library
9790
SHLIB_FLAGS := -DSHARED -fPIC
9891

99-
ifeq ($(VERBOSE),1)
100-
Q =
101-
else
102-
Q = @
103-
endif
104-
10592
# Disable command line variables (CFLAGS) override from top
10693
# level Makefile (perf), otherwise build Makefile will get
10794
# the same command line setup.

tools/lib/perf/Makefile

-13
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,6 @@ libdir = $(prefix)/$(libdir_relative)
3939
libdir_SQ = $(subst ','\'',$(libdir))
4040
libdir_relative_SQ = $(subst ','\'',$(libdir_relative))
4141

42-
ifeq ("$(origin V)", "command line")
43-
VERBOSE = $(V)
44-
endif
45-
ifndef VERBOSE
46-
VERBOSE = 0
47-
endif
48-
49-
ifeq ($(VERBOSE),1)
50-
Q =
51-
else
52-
Q = @
53-
endif
54-
5542
TEST_ARGS := $(if $(V),-v)
5643

5744
# Set compile option CFLAGS

tools/lib/thermal/Makefile

-13
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,6 @@ libdir = $(prefix)/$(libdir_relative)
3939
libdir_SQ = $(subst ','\'',$(libdir))
4040
libdir_relative_SQ = $(subst ','\'',$(libdir_relative))
4141

42-
ifeq ("$(origin V)", "command line")
43-
VERBOSE = $(V)
44-
endif
45-
ifndef VERBOSE
46-
VERBOSE = 0
47-
endif
48-
49-
ifeq ($(VERBOSE),1)
50-
Q =
51-
else
52-
Q = @
53-
endif
54-
5542
# Set compile option CFLAGS
5643
ifdef EXTRA_CFLAGS
5744
CFLAGS := $(EXTRA_CFLAGS)

tools/objtool/Makefile

-6
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@ HOST_OVERRIDES := CC="$(HOSTCC)" LD="$(HOSTLD)" AR="$(HOSTAR)"
4646
AWK = awk
4747
MKDIR = mkdir
4848

49-
ifeq ($(V),1)
50-
Q =
51-
else
52-
Q = @
53-
endif
54-
5549
BUILD_ORC := n
5650

5751
ifeq ($(SRCARCH),x86)

tools/perf/Makefile.perf

-41
Original file line numberDiff line numberDiff line change
@@ -161,47 +161,6 @@ 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-
183-
ifeq ($(V),1)
184-
quiet =
185-
Q =
186-
else
187-
quiet=quiet_
188-
Q=@
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
204-
205164
# Do not use make's built-in rules
206165
# (this improves performance and avoids hard-to-debug behaviour);
207166
MAKEFLAGS += -r

tools/scripts/Makefile.include

+30
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,33 @@ else
136136
NO_SUBDIR = :
137137
endif
138138

139+
# Beautify output
140+
# ---------------------------------------------------------------------------
141+
#
142+
# Most of build commands in Kbuild start with "cmd_". You can optionally define
143+
# "quiet_cmd_*". If defined, the short log is printed. Otherwise, no log from
144+
# that command is printed by default.
145+
#
146+
# e.g.)
147+
# quiet_cmd_depmod = DEPMOD $(MODLIB)
148+
# cmd_depmod = $(srctree)/scripts/depmod.sh $(DEPMOD) $(KERNELRELEASE)
149+
#
150+
# A simple variant is to prefix commands with $(Q) - that's useful
151+
# for commands that shall be hidden in non-verbose mode.
152+
#
153+
# $(Q)$(MAKE) $(build)=scripts/basic
154+
#
155+
# To put more focus on warnings, be less verbose as default
156+
# Use 'make V=1' to see the full commands
157+
158+
ifeq ($(V),1)
159+
quiet =
160+
Q =
161+
else
162+
quiet = quiet_
163+
Q = @
164+
endif
165+
139166
# If the user is running make -s (silent mode), suppress echoing of commands
140167
# make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
141168
ifeq ($(filter 3.%,$(MAKE_VERSION)),)
@@ -146,8 +173,11 @@ endif
146173

147174
ifneq ($(findstring s,$(short-opts)),)
148175
silent=1
176+
quiet=silent_
149177
endif
150178

179+
export quiet Q
180+
151181
#
152182
# Define a callable command for descending to a new directory
153183
#

tools/testing/selftests/bpf/Makefile.docs

-6
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@ INSTALL ?= install
77
RM ?= rm -f
88
RMDIR ?= rmdir --ignore-fail-on-non-empty
99

10-
ifeq ($(V),1)
11-
Q =
12-
else
13-
Q = @
14-
endif
15-
1610
prefix ?= /usr/local
1711
mandir ?= $(prefix)/man
1812
man2dir = $(mandir)/man2

tools/testing/selftests/hid/Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,8 @@ TEST_GEN_PROGS = hid_bpf hidraw
4343
# $3 - target (assumed to be file); only file name will be emitted;
4444
# $4 - optional extra arg, emitted as-is, if provided.
4545
ifeq ($(V),1)
46-
Q =
4746
msg =
4847
else
49-
Q = @
5048
msg = @printf ' %-8s%s %s%s\n' "$(1)" "$(if $(2), [$(2)])" "$(notdir $(3))" "$(if $(4), $(4))";
5149
MAKEFLAGS += --no-print-directory
5250
submake_extras := feature_display=0

tools/thermal/lib/Makefile

-13
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,6 @@ libdir = $(prefix)/$(libdir_relative)
3939
libdir_SQ = $(subst ','\'',$(libdir))
4040
libdir_relative_SQ = $(subst ','\'',$(libdir_relative))
4141

42-
ifeq ("$(origin V)", "command line")
43-
VERBOSE = $(V)
44-
endif
45-
ifndef VERBOSE
46-
VERBOSE = 0
47-
endif
48-
49-
ifeq ($(VERBOSE),1)
50-
Q =
51-
else
52-
Q = @
53-
endif
54-
5542
# Set compile option CFLAGS
5643
ifdef EXTRA_CFLAGS
5744
CFLAGS := $(EXTRA_CFLAGS)

tools/tracing/latency/Makefile

-6
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,6 @@ FEATURE_TESTS += libtracefs
3737
FEATURE_DISPLAY := libtraceevent
3838
FEATURE_DISPLAY += libtracefs
3939

40-
ifeq ($(V),1)
41-
Q =
42-
else
43-
Q = @
44-
endif
45-
4640
all: $(LATENCY-COLLECTOR)
4741

4842
include $(srctree)/tools/build/Makefile.include

tools/tracing/rtla/Makefile

-6
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,6 @@ FEATURE_DISPLAY := libtraceevent
3737
FEATURE_DISPLAY += libtracefs
3838
FEATURE_DISPLAY += libcpupower
3939

40-
ifeq ($(V),1)
41-
Q =
42-
else
43-
Q = @
44-
endif
45-
4640
all: $(RTLA)
4741

4842
include $(srctree)/tools/build/Makefile.include

tools/verification/rv/Makefile

-6
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ FEATURE_TESTS += libtracefs
3535
FEATURE_DISPLAY := libtraceevent
3636
FEATURE_DISPLAY += libtracefs
3737

38-
ifeq ($(V),1)
39-
Q =
40-
else
41-
Q = @
42-
endif
43-
4438
all: $(RV)
4539

4640
include $(srctree)/tools/build/Makefile.include

0 commit comments

Comments
 (0)