* [PATCH FOR-NEXT] perf tools: Expose quiet/verbose variables in Makefile.perf
@ 2025-01-14 19:35 Charlie Jenkins
2025-01-15 2:23 ` Arnaldo Carvalho de Melo
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Charlie Jenkins @ 2025-01-14 19:35 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, Suzuki K Poulose, Mike Leach,
James Clark
Cc: linux-kernel, linux-perf-users, coresight, linux-arm-kernel,
Arnaldo Carvalho de Melo, Charlie Jenkins
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>
---
tools/build/Makefile.build | 20 -----------------
tools/perf/Makefile.perf | 37 ++++++++++++++++++++++++++++++-
tools/perf/tests/shell/coresight/Makefile | 2 +-
3 files changed, 37 insertions(+), 22 deletions(-)
diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build
index 5fb3fb3d97e0fd114e245805809e4fc926b4343e..e710ed67a1b49d9fda11db02821bbd8d36066b44 100644
--- a/tools/build/Makefile.build
+++ b/tools/build/Makefile.build
@@ -12,26 +12,6 @@
PHONY := __build
__build:
-ifeq ($(V),1)
- quiet =
- Q =
-else
- quiet=quiet_
- Q=@
-endif
-
-# If the user is running make -s (silent mode), suppress echoing of commands
-# make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
-ifeq ($(filter 3.%,$(MAKE_VERSION)),)
-short-opts := $(firstword -$(MAKEFLAGS))
-else
-short-opts := $(filter-out --%,$(MAKEFLAGS))
-endif
-
-ifneq ($(findstring s,$(short-opts)),)
- quiet=silent_
-endif
-
build-dir := $(srctree)/tools/build
# Define $(fixdep) for dep-cmd function
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index a449d0015536442273a9268b37be34e4757f577a..55d6ce9ea52fb2a57b8632cc6d0ddc501e29cbfc 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -161,12 +161,47 @@ export VPATH
SOURCE := $(shell ln -sf $(srctree)/tools/perf $(OUTPUT)/source)
endif
+# Beautify output
+# ---------------------------------------------------------------------------
+#
+# Most of build commands in Kbuild start with "cmd_". You can optionally define
+# "quiet_cmd_*". If defined, the short log is printed. Otherwise, no log from
+# that command is printed by default.
+#
+# e.g.)
+# quiet_cmd_depmod = DEPMOD $(MODLIB)
+# cmd_depmod = $(srctree)/scripts/depmod.sh $(DEPMOD) $(KERNELRELEASE)
+#
+# A simple variant is to prefix commands with $(Q) - that's useful
+# for commands that shall be hidden in non-verbose mode.
+#
+# $(Q)$(MAKE) $(build)=scripts/basic
+#
+# To put more focus on warnings, be less verbose as default
+# Use 'make V=1' to see the full commands
+
ifeq ($(V),1)
+ quiet =
Q =
else
- Q = @
+ quiet=quiet_
+ Q=@
endif
+# If the user is running make -s (silent mode), suppress echoing of commands
+# make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
+ifeq ($(filter 3.%,$(MAKE_VERSION)),)
+short-opts := $(firstword -$(MAKEFLAGS))
+else
+short-opts := $(filter-out --%,$(MAKEFLAGS))
+endif
+
+ifneq ($(findstring s,$(short-opts)),)
+ quiet=silent_
+endif
+
+export quiet Q
+
# Do not use make's built-in rules
# (this improves performance and avoids hard-to-debug behaviour);
MAKEFLAGS += -r
diff --git a/tools/perf/tests/shell/coresight/Makefile b/tools/perf/tests/shell/coresight/Makefile
index b070e779703e9fbd70f88c826172b2150ee3d302..fa08fd9a5991dd889583edc1afe8304e72278f64 100644
--- a/tools/perf/tests/shell/coresight/Makefile
+++ b/tools/perf/tests/shell/coresight/Makefile
@@ -24,6 +24,6 @@ CLEANDIRS = $(SUBDIRS:%=clean-%)
clean: $(CLEANDIRS)
$(CLEANDIRS):
- $(call QUIET_CLEAN, test-$(@:clean-%=%)) $(Q)$(MAKE) -C $(@:clean-%=%) clean >/dev/null
+ $(call QUIET_CLEAN, test-$(@:clean-%=%)) $(MAKE) -C $(@:clean-%=%) clean >/dev/null
.PHONY: all clean $(SUBDIRS) $(CLEANDIRS) $(INSTALLDIRS)
---
base-commit: e9cbc854d8b148e3491291fb615e94261970fb54
change-id: 20250114-perf_make_test-1141d4ad8877
--
- Charlie
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH FOR-NEXT] perf tools: Expose quiet/verbose variables in Makefile.perf
2025-01-14 19:35 [PATCH FOR-NEXT] perf tools: Expose quiet/verbose variables in Makefile.perf Charlie Jenkins
@ 2025-01-15 2:23 ` Arnaldo Carvalho de Melo
2025-01-17 17:54 ` Namhyung Kim
2025-02-03 9:29 ` Jiri Olsa
2 siblings, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2025-01-15 2:23 UTC (permalink / raw)
To: Charlie Jenkins
Cc: Peter Zijlstra, Ingo Molnar, Namhyung Kim, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Ian Rogers, Adrian Hunter,
Suzuki K Poulose, Mike Leach, James Clark, linux-kernel,
linux-perf-users, coresight, linux-arm-kernel,
Arnaldo Carvalho de Melo
On Tue, Jan 14, 2025 at 11:35:44AM -0800, Charlie Jenkins wrote:
> 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:
Re-tested, now the lines below continue to appear, and also the 'make -C
tools/perf build-test' that was failiong on the first patch submission
is now ok as well, so I re issue my:
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
At this point this will go thru Namhyung, that will process patches
while I'm in vacation for perf-tools-next as well, thanks!
- Arnaldo
> 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>
> ---
> tools/build/Makefile.build | 20 -----------------
> tools/perf/Makefile.perf | 37 ++++++++++++++++++++++++++++++-
> tools/perf/tests/shell/coresight/Makefile | 2 +-
> 3 files changed, 37 insertions(+), 22 deletions(-)
>
> diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build
> index 5fb3fb3d97e0fd114e245805809e4fc926b4343e..e710ed67a1b49d9fda11db02821bbd8d36066b44 100644
> --- a/tools/build/Makefile.build
> +++ b/tools/build/Makefile.build
> @@ -12,26 +12,6 @@
> PHONY := __build
> __build:
>
> -ifeq ($(V),1)
> - quiet =
> - Q =
> -else
> - quiet=quiet_
> - Q=@
> -endif
> -
> -# If the user is running make -s (silent mode), suppress echoing of commands
> -# make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
> -ifeq ($(filter 3.%,$(MAKE_VERSION)),)
> -short-opts := $(firstword -$(MAKEFLAGS))
> -else
> -short-opts := $(filter-out --%,$(MAKEFLAGS))
> -endif
> -
> -ifneq ($(findstring s,$(short-opts)),)
> - quiet=silent_
> -endif
> -
> build-dir := $(srctree)/tools/build
>
> # Define $(fixdep) for dep-cmd function
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index a449d0015536442273a9268b37be34e4757f577a..55d6ce9ea52fb2a57b8632cc6d0ddc501e29cbfc 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -161,12 +161,47 @@ export VPATH
> SOURCE := $(shell ln -sf $(srctree)/tools/perf $(OUTPUT)/source)
> endif
>
> +# Beautify output
> +# ---------------------------------------------------------------------------
> +#
> +# Most of build commands in Kbuild start with "cmd_". You can optionally define
> +# "quiet_cmd_*". If defined, the short log is printed. Otherwise, no log from
> +# that command is printed by default.
> +#
> +# e.g.)
> +# quiet_cmd_depmod = DEPMOD $(MODLIB)
> +# cmd_depmod = $(srctree)/scripts/depmod.sh $(DEPMOD) $(KERNELRELEASE)
> +#
> +# A simple variant is to prefix commands with $(Q) - that's useful
> +# for commands that shall be hidden in non-verbose mode.
> +#
> +# $(Q)$(MAKE) $(build)=scripts/basic
> +#
> +# To put more focus on warnings, be less verbose as default
> +# Use 'make V=1' to see the full commands
> +
> ifeq ($(V),1)
> + quiet =
> Q =
> else
> - Q = @
> + quiet=quiet_
> + Q=@
> endif
>
> +# If the user is running make -s (silent mode), suppress echoing of commands
> +# make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
> +ifeq ($(filter 3.%,$(MAKE_VERSION)),)
> +short-opts := $(firstword -$(MAKEFLAGS))
> +else
> +short-opts := $(filter-out --%,$(MAKEFLAGS))
> +endif
> +
> +ifneq ($(findstring s,$(short-opts)),)
> + quiet=silent_
> +endif
> +
> +export quiet Q
> +
> # Do not use make's built-in rules
> # (this improves performance and avoids hard-to-debug behaviour);
> MAKEFLAGS += -r
> diff --git a/tools/perf/tests/shell/coresight/Makefile b/tools/perf/tests/shell/coresight/Makefile
> index b070e779703e9fbd70f88c826172b2150ee3d302..fa08fd9a5991dd889583edc1afe8304e72278f64 100644
> --- a/tools/perf/tests/shell/coresight/Makefile
> +++ b/tools/perf/tests/shell/coresight/Makefile
> @@ -24,6 +24,6 @@ CLEANDIRS = $(SUBDIRS:%=clean-%)
>
> clean: $(CLEANDIRS)
> $(CLEANDIRS):
> - $(call QUIET_CLEAN, test-$(@:clean-%=%)) $(Q)$(MAKE) -C $(@:clean-%=%) clean >/dev/null
> + $(call QUIET_CLEAN, test-$(@:clean-%=%)) $(MAKE) -C $(@:clean-%=%) clean >/dev/null
>
> .PHONY: all clean $(SUBDIRS) $(CLEANDIRS) $(INSTALLDIRS)
>
> ---
> base-commit: e9cbc854d8b148e3491291fb615e94261970fb54
> change-id: 20250114-perf_make_test-1141d4ad8877
> --
> - Charlie
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH FOR-NEXT] perf tools: Expose quiet/verbose variables in Makefile.perf
2025-01-14 19:35 [PATCH FOR-NEXT] perf tools: Expose quiet/verbose variables in Makefile.perf Charlie Jenkins
2025-01-15 2:23 ` Arnaldo Carvalho de Melo
@ 2025-01-17 17:54 ` Namhyung Kim
2025-02-03 9:29 ` Jiri Olsa
2 siblings, 0 replies; 6+ messages in thread
From: Namhyung Kim @ 2025-01-17 17:54 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Mark Rutland, Alexander Shishkin, Jiri Olsa, Ian Rogers,
Adrian Hunter, Suzuki K Poulose, Mike Leach, James Clark,
Charlie Jenkins
Cc: linux-kernel, linux-perf-users, coresight, linux-arm-kernel,
Arnaldo Carvalho de Melo
On Tue, 14 Jan 2025 11:35:44 -0800, Charlie Jenkins wrote:
> 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
>
> [...]
Applied to perf-tools-next, thanks!
Best regards,
Namhyung
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH FOR-NEXT] perf tools: Expose quiet/verbose variables in Makefile.perf
2025-01-14 19:35 [PATCH FOR-NEXT] perf tools: Expose quiet/verbose variables in Makefile.perf Charlie Jenkins
2025-01-15 2:23 ` Arnaldo Carvalho de Melo
2025-01-17 17:54 ` Namhyung Kim
@ 2025-02-03 9:29 ` Jiri Olsa
2025-02-03 18:56 ` Charlie Jenkins
2 siblings, 1 reply; 6+ messages in thread
From: Jiri Olsa @ 2025-02-03 9:29 UTC (permalink / raw)
To: Charlie Jenkins
Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Ian Rogers,
Adrian Hunter, Suzuki K Poulose, Mike Leach, James Clark,
linux-kernel, linux-perf-users, coresight, linux-arm-kernel,
Arnaldo Carvalho de Melo, Daniel Xu
On Tue, Jan 14, 2025 at 11:35:44AM -0800, Charlie Jenkins wrote:
> 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>
> ---
> tools/build/Makefile.build | 20 -----------------
> tools/perf/Makefile.perf | 37 ++++++++++++++++++++++++++++++-
> tools/perf/tests/shell/coresight/Makefile | 2 +-
> 3 files changed, 37 insertions(+), 22 deletions(-)
>
> diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build
> index 5fb3fb3d97e0fd114e245805809e4fc926b4343e..e710ed67a1b49d9fda11db02821bbd8d36066b44 100644
> --- a/tools/build/Makefile.build
> +++ b/tools/build/Makefile.build
> @@ -12,26 +12,6 @@
> PHONY := __build
> __build:
>
> -ifeq ($(V),1)
> - quiet =
> - Q =
> -else
> - quiet=quiet_
> - Q=@
> -endif
> -
> -# If the user is running make -s (silent mode), suppress echoing of commands
> -# make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
> -ifeq ($(filter 3.%,$(MAKE_VERSION)),)
> -short-opts := $(firstword -$(MAKEFLAGS))
> -else
> -short-opts := $(filter-out --%,$(MAKEFLAGS))
> -endif
> -
> -ifneq ($(findstring s,$(short-opts)),)
> - quiet=silent_
> -endif
> -
> build-dir := $(srctree)/tools/build
hi,
if we move this out of here, we need to fix other tools that rely on that,
bpftool and resolve_btfids do not build quietly now
but not sure what was the reason of moving it out, the code in Makefile.perf
seems same as the one above
thanks,
jirka
>
> # Define $(fixdep) for dep-cmd function
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index a449d0015536442273a9268b37be34e4757f577a..55d6ce9ea52fb2a57b8632cc6d0ddc501e29cbfc 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -161,12 +161,47 @@ export VPATH
> SOURCE := $(shell ln -sf $(srctree)/tools/perf $(OUTPUT)/source)
> endif
>
> +# Beautify output
> +# ---------------------------------------------------------------------------
> +#
> +# Most of build commands in Kbuild start with "cmd_". You can optionally define
> +# "quiet_cmd_*". If defined, the short log is printed. Otherwise, no log from
> +# that command is printed by default.
> +#
> +# e.g.)
> +# quiet_cmd_depmod = DEPMOD $(MODLIB)
> +# cmd_depmod = $(srctree)/scripts/depmod.sh $(DEPMOD) $(KERNELRELEASE)
> +#
> +# A simple variant is to prefix commands with $(Q) - that's useful
> +# for commands that shall be hidden in non-verbose mode.
> +#
> +# $(Q)$(MAKE) $(build)=scripts/basic
> +#
> +# To put more focus on warnings, be less verbose as default
> +# Use 'make V=1' to see the full commands
> +
> ifeq ($(V),1)
> + quiet =
> Q =
> else
> - Q = @
> + quiet=quiet_
> + Q=@
> endif
>
> +# If the user is running make -s (silent mode), suppress echoing of commands
> +# make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
> +ifeq ($(filter 3.%,$(MAKE_VERSION)),)
> +short-opts := $(firstword -$(MAKEFLAGS))
> +else
> +short-opts := $(filter-out --%,$(MAKEFLAGS))
> +endif
> +
> +ifneq ($(findstring s,$(short-opts)),)
> + quiet=silent_
> +endif
> +
> +export quiet Q
> +
> # Do not use make's built-in rules
> # (this improves performance and avoids hard-to-debug behaviour);
> MAKEFLAGS += -r
> diff --git a/tools/perf/tests/shell/coresight/Makefile b/tools/perf/tests/shell/coresight/Makefile
> index b070e779703e9fbd70f88c826172b2150ee3d302..fa08fd9a5991dd889583edc1afe8304e72278f64 100644
> --- a/tools/perf/tests/shell/coresight/Makefile
> +++ b/tools/perf/tests/shell/coresight/Makefile
> @@ -24,6 +24,6 @@ CLEANDIRS = $(SUBDIRS:%=clean-%)
>
> clean: $(CLEANDIRS)
> $(CLEANDIRS):
> - $(call QUIET_CLEAN, test-$(@:clean-%=%)) $(Q)$(MAKE) -C $(@:clean-%=%) clean >/dev/null
> + $(call QUIET_CLEAN, test-$(@:clean-%=%)) $(MAKE) -C $(@:clean-%=%) clean >/dev/null
>
> .PHONY: all clean $(SUBDIRS) $(CLEANDIRS) $(INSTALLDIRS)
>
> ---
> base-commit: e9cbc854d8b148e3491291fb615e94261970fb54
> change-id: 20250114-perf_make_test-1141d4ad8877
> --
> - Charlie
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH FOR-NEXT] perf tools: Expose quiet/verbose variables in Makefile.perf
2025-02-03 9:29 ` Jiri Olsa
@ 2025-02-03 18:56 ` Charlie Jenkins
2025-02-03 22:19 ` Namhyung Kim
0 siblings, 1 reply; 6+ messages in thread
From: Charlie Jenkins @ 2025-02-03 18:56 UTC (permalink / raw)
To: Jiri Olsa
Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Ian Rogers,
Adrian Hunter, Suzuki K Poulose, Mike Leach, James Clark,
linux-kernel, linux-perf-users, coresight, linux-arm-kernel,
Arnaldo Carvalho de Melo, Daniel Xu
On Mon, Feb 03, 2025 at 10:29:39AM +0100, Jiri Olsa wrote:
> On Tue, Jan 14, 2025 at 11:35:44AM -0800, Charlie Jenkins wrote:
> > 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>
> > ---
> > tools/build/Makefile.build | 20 -----------------
> > tools/perf/Makefile.perf | 37 ++++++++++++++++++++++++++++++-
> > tools/perf/tests/shell/coresight/Makefile | 2 +-
> > 3 files changed, 37 insertions(+), 22 deletions(-)
> >
> > diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build
> > index 5fb3fb3d97e0fd114e245805809e4fc926b4343e..e710ed67a1b49d9fda11db02821bbd8d36066b44 100644
> > --- a/tools/build/Makefile.build
> > +++ b/tools/build/Makefile.build
> > @@ -12,26 +12,6 @@
> > PHONY := __build
> > __build:
> >
> > -ifeq ($(V),1)
> > - quiet =
> > - Q =
> > -else
> > - quiet=quiet_
> > - Q=@
> > -endif
> > -
> > -# If the user is running make -s (silent mode), suppress echoing of commands
> > -# make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
> > -ifeq ($(filter 3.%,$(MAKE_VERSION)),)
> > -short-opts := $(firstword -$(MAKEFLAGS))
> > -else
> > -short-opts := $(filter-out --%,$(MAKEFLAGS))
> > -endif
> > -
> > -ifneq ($(findstring s,$(short-opts)),)
> > - quiet=silent_
> > -endif
> > -
> > build-dir := $(srctree)/tools/build
>
> hi,
> if we move this out of here, we need to fix other tools that rely on that,
> bpftool and resolve_btfids do not build quietly now
>
> but not sure what was the reason of moving it out, the code in Makefile.perf
> seems same as the one above
perf/Makefile.syscalls wanted to support quiet building. Makefile.perf
imports both Makefile.syscalls and Makefile.build, so I moved this quiet
infrastructure into Makefile.perf so that both of these files could use
it.
I was trying to move the quiet infrastructure higher up in the callchain
so that the code did not need to be duplicated. Perhaps it is better to
move this into a separate file that exports "quiet" and "Q" and then can
be imported from bpf/Makefile, perf/Makefile.perf, and any other tool
that wants to have quiet builds?
- Charlie
>
> thanks,
> jirka
>
>
> >
> > # Define $(fixdep) for dep-cmd function
> > diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> > index a449d0015536442273a9268b37be34e4757f577a..55d6ce9ea52fb2a57b8632cc6d0ddc501e29cbfc 100644
> > --- a/tools/perf/Makefile.perf
> > +++ b/tools/perf/Makefile.perf
> > @@ -161,12 +161,47 @@ export VPATH
> > SOURCE := $(shell ln -sf $(srctree)/tools/perf $(OUTPUT)/source)
> > endif
> >
> > +# Beautify output
> > +# ---------------------------------------------------------------------------
> > +#
> > +# Most of build commands in Kbuild start with "cmd_". You can optionally define
> > +# "quiet_cmd_*". If defined, the short log is printed. Otherwise, no log from
> > +# that command is printed by default.
> > +#
> > +# e.g.)
> > +# quiet_cmd_depmod = DEPMOD $(MODLIB)
> > +# cmd_depmod = $(srctree)/scripts/depmod.sh $(DEPMOD) $(KERNELRELEASE)
> > +#
> > +# A simple variant is to prefix commands with $(Q) - that's useful
> > +# for commands that shall be hidden in non-verbose mode.
> > +#
> > +# $(Q)$(MAKE) $(build)=scripts/basic
> > +#
> > +# To put more focus on warnings, be less verbose as default
> > +# Use 'make V=1' to see the full commands
> > +
> > ifeq ($(V),1)
> > + quiet =
> > Q =
> > else
> > - Q = @
> > + quiet=quiet_
> > + Q=@
> > endif
> >
> > +# If the user is running make -s (silent mode), suppress echoing of commands
> > +# make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
> > +ifeq ($(filter 3.%,$(MAKE_VERSION)),)
> > +short-opts := $(firstword -$(MAKEFLAGS))
> > +else
> > +short-opts := $(filter-out --%,$(MAKEFLAGS))
> > +endif
> > +
> > +ifneq ($(findstring s,$(short-opts)),)
> > + quiet=silent_
> > +endif
> > +
> > +export quiet Q
> > +
> > # Do not use make's built-in rules
> > # (this improves performance and avoids hard-to-debug behaviour);
> > MAKEFLAGS += -r
> > diff --git a/tools/perf/tests/shell/coresight/Makefile b/tools/perf/tests/shell/coresight/Makefile
> > index b070e779703e9fbd70f88c826172b2150ee3d302..fa08fd9a5991dd889583edc1afe8304e72278f64 100644
> > --- a/tools/perf/tests/shell/coresight/Makefile
> > +++ b/tools/perf/tests/shell/coresight/Makefile
> > @@ -24,6 +24,6 @@ CLEANDIRS = $(SUBDIRS:%=clean-%)
> >
> > clean: $(CLEANDIRS)
> > $(CLEANDIRS):
> > - $(call QUIET_CLEAN, test-$(@:clean-%=%)) $(Q)$(MAKE) -C $(@:clean-%=%) clean >/dev/null
> > + $(call QUIET_CLEAN, test-$(@:clean-%=%)) $(MAKE) -C $(@:clean-%=%) clean >/dev/null
> >
> > .PHONY: all clean $(SUBDIRS) $(CLEANDIRS) $(INSTALLDIRS)
> >
> > ---
> > base-commit: e9cbc854d8b148e3491291fb615e94261970fb54
> > change-id: 20250114-perf_make_test-1141d4ad8877
> > --
> > - Charlie
> >
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH FOR-NEXT] perf tools: Expose quiet/verbose variables in Makefile.perf
2025-02-03 18:56 ` Charlie Jenkins
@ 2025-02-03 22:19 ` Namhyung Kim
0 siblings, 0 replies; 6+ messages in thread
From: Namhyung Kim @ 2025-02-03 22:19 UTC (permalink / raw)
To: Charlie Jenkins
Cc: Jiri Olsa, Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Mark Rutland, Alexander Shishkin, Ian Rogers, Adrian Hunter,
Suzuki K Poulose, Mike Leach, James Clark, linux-kernel,
linux-perf-users, coresight, linux-arm-kernel,
Arnaldo Carvalho de Melo, Daniel Xu
Hello,
On Mon, Feb 03, 2025 at 10:56:48AM -0800, Charlie Jenkins wrote:
> On Mon, Feb 03, 2025 at 10:29:39AM +0100, Jiri Olsa wrote:
> > On Tue, Jan 14, 2025 at 11:35:44AM -0800, Charlie Jenkins wrote:
> > > 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>
> > > ---
> > > tools/build/Makefile.build | 20 -----------------
> > > tools/perf/Makefile.perf | 37 ++++++++++++++++++++++++++++++-
> > > tools/perf/tests/shell/coresight/Makefile | 2 +-
> > > 3 files changed, 37 insertions(+), 22 deletions(-)
> > >
> > > diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build
> > > index 5fb3fb3d97e0fd114e245805809e4fc926b4343e..e710ed67a1b49d9fda11db02821bbd8d36066b44 100644
> > > --- a/tools/build/Makefile.build
> > > +++ b/tools/build/Makefile.build
> > > @@ -12,26 +12,6 @@
> > > PHONY := __build
> > > __build:
> > >
> > > -ifeq ($(V),1)
> > > - quiet =
> > > - Q =
> > > -else
> > > - quiet=quiet_
> > > - Q=@
> > > -endif
> > > -
> > > -# If the user is running make -s (silent mode), suppress echoing of commands
> > > -# make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
> > > -ifeq ($(filter 3.%,$(MAKE_VERSION)),)
> > > -short-opts := $(firstword -$(MAKEFLAGS))
> > > -else
> > > -short-opts := $(filter-out --%,$(MAKEFLAGS))
> > > -endif
> > > -
> > > -ifneq ($(findstring s,$(short-opts)),)
> > > - quiet=silent_
> > > -endif
> > > -
> > > build-dir := $(srctree)/tools/build
> >
> > hi,
> > if we move this out of here, we need to fix other tools that rely on that,
> > bpftool and resolve_btfids do not build quietly now
Sorry about the trouble. I should've checked other builds.
> >
> > but not sure what was the reason of moving it out, the code in Makefile.perf
> > seems same as the one above
>
> perf/Makefile.syscalls wanted to support quiet building. Makefile.perf
> imports both Makefile.syscalls and Makefile.build, so I moved this quiet
> infrastructure into Makefile.perf so that both of these files could use
> it.
>
> I was trying to move the quiet infrastructure higher up in the callchain
> so that the code did not need to be duplicated. Perhaps it is better to
> move this into a separate file that exports "quiet" and "Q" and then can
> be imported from bpf/Makefile, perf/Makefile.perf, and any other tool
> that wants to have quiet builds?
Makes sense. Can you please send a patch for that?
Thanks,
Namhyung
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-02-03 22:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-14 19:35 [PATCH FOR-NEXT] perf tools: Expose quiet/verbose variables in Makefile.perf Charlie Jenkins
2025-01-15 2:23 ` Arnaldo Carvalho de Melo
2025-01-17 17:54 ` Namhyung Kim
2025-02-03 9:29 ` Jiri Olsa
2025-02-03 18:56 ` Charlie Jenkins
2025-02-03 22:19 ` Namhyung Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).