2021-03-04 23:27:13

by Gonsolo

[permalink] [raw]
Subject: [PATCH 1/2] Perf: Clean generated directory, other archs.

---
tools/perf/arch/arm64/Makefile | 5 +++--
tools/perf/arch/powerpc/Makefile | 5 +++--
tools/perf/arch/s390/Makefile | 5 +++--
3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/tools/perf/arch/arm64/Makefile b/tools/perf/arch/arm64/Makefile
index fab3095fb5d0..426aecdd0b71 100644
--- a/tools/perf/arch/arm64/Makefile
+++ b/tools/perf/arch/arm64/Makefile
@@ -10,7 +10,8 @@ HAVE_KVM_STAT_SUPPORT := 1
# Syscall table generation for perf
#

-out := $(OUTPUT)arch/arm64/include/generated/asm
+generated := $(OUTPUT)arch/arm64/include/generated
+out := $(generated)/asm
header := $(out)/syscalls.c
incpath := $(srctree)/tools
sysdef := $(srctree)/tools/arch/arm64/include/uapi/asm/unistd.h
@@ -24,6 +25,6 @@ $(header): $(sysdef) $(systbl)
$(Q)$(SHELL) '$(systbl)' '$(CC)' '$(HOSTCC)' $(incpath) $(sysdef) > $@

clean::
- $(call QUIET_CLEAN, arm64) $(RM) $(header)
+ $(call QUIET_CLEAN, arm64) $(RM) -r $(header) $(generated)

archheaders: $(header)
diff --git a/tools/perf/arch/powerpc/Makefile b/tools/perf/arch/powerpc/Makefile
index 840ea0e59287..979c2bebc167 100644
--- a/tools/perf/arch/powerpc/Makefile
+++ b/tools/perf/arch/powerpc/Makefile
@@ -11,7 +11,8 @@ PERF_HAVE_JITDUMP := 1
# Syscall table generation for perf
#

-out := $(OUTPUT)arch/powerpc/include/generated/asm
+generated := $(OUTPUT)arch/powerpc/include/generated
+out := $(generated)/asm
header32 := $(out)/syscalls_32.c
header64 := $(out)/syscalls_64.c
sysprf := $(srctree)/tools/perf/arch/powerpc/entry/syscalls
@@ -28,6 +29,6 @@ $(header32): $(sysdef) $(systbl)
$(Q)$(SHELL) '$(systbl)' '32' $(sysdef) > $@

clean::
- $(call QUIET_CLEAN, powerpc) $(RM) $(header32) $(header64)
+ $(call QUIET_CLEAN, powerpc) $(RM) -r $(header32) $(header64) $(generated)

archheaders: $(header32) $(header64)
diff --git a/tools/perf/arch/s390/Makefile b/tools/perf/arch/s390/Makefile
index 74bffbea03e2..27cf67f1cc78 100644
--- a/tools/perf/arch/s390/Makefile
+++ b/tools/perf/arch/s390/Makefile
@@ -10,7 +10,8 @@ PERF_HAVE_JITDUMP := 1
# Syscall table generation for perf
#

-out := $(OUTPUT)arch/s390/include/generated/asm
+generated := $(OUTPUT)arch/s390/include/generated
+out := $(generated)/asm
header := $(out)/syscalls_64.c
sysprf := $(srctree)/tools/perf/arch/s390/entry/syscalls
sysdef := $(sysprf)/syscall.tbl
@@ -23,6 +24,6 @@ $(header): $(sysdef) $(systbl)
$(Q)$(SHELL) '$(systbl)' $(sysdef) > $@

clean::
- $(call QUIET_CLEAN, s390) $(RM) $(header)
+ $(call QUIET_CLEAN, s390) $(RM) -r $(header) $(generted)

archheaders: $(header)
--
2.27.0


2021-03-04 23:28:42

by Gonsolo

[permalink] [raw]
Subject: [PATCH 2/2] Perf: Clean beauty directory.

---
tools/perf/Makefile.perf | 1 +
1 file changed, 1 insertion(+)

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 5345ac70cd83..293e297f719d 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -1087,6 +1087,7 @@ clean:: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean $(LIBBPF)-clean $(LIBSUBCMD)-clea
$(OUTPUT)$(sync_file_range_arrays)
$(call QUIET_CLEAN, Documentation) \
$(MAKE) -C $(DOC_DIR) O=$(OUTPUT) clean >/dev/null
+ $(call QUIET_CLEAN, beauty) $(RM) -r $(beauty_outdir)

#
# To provide FEATURE-DUMP into $(FEATURE_DUMP_COPY)
--
2.27.0

2021-03-06 19:38:13

by Arnaldo Carvalho de Melo

[permalink] [raw]
Subject: Re: [PATCH 1/2] Perf: Clean generated directory, other archs.

Em Wed, Mar 03, 2021 at 07:32:46PM +0100, Gon Solo escreveu:


You forgot to add an explanation here and to add your:

Signed-off-by: Gon Solo <[email protected]>

In this case a:

Suggested-by: Arnaldo Carvalho de Melo <[email protected]>

Is also appropriate, since I pointed you in this direction.

Please take a look at:

Documentation/process/submitting-patches.rst

Direct link for your convenience:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst

Thanks for working on this!

- Arnaldo

> ---
> tools/perf/arch/arm64/Makefile | 5 +++--
> tools/perf/arch/powerpc/Makefile | 5 +++--
> tools/perf/arch/s390/Makefile | 5 +++--
> 3 files changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/tools/perf/arch/arm64/Makefile b/tools/perf/arch/arm64/Makefile
> index fab3095fb5d0..426aecdd0b71 100644
> --- a/tools/perf/arch/arm64/Makefile
> +++ b/tools/perf/arch/arm64/Makefile
> @@ -10,7 +10,8 @@ HAVE_KVM_STAT_SUPPORT := 1
> # Syscall table generation for perf
> #
>
> -out := $(OUTPUT)arch/arm64/include/generated/asm
> +generated := $(OUTPUT)arch/arm64/include/generated
> +out := $(generated)/asm
> header := $(out)/syscalls.c
> incpath := $(srctree)/tools
> sysdef := $(srctree)/tools/arch/arm64/include/uapi/asm/unistd.h
> @@ -24,6 +25,6 @@ $(header): $(sysdef) $(systbl)
> $(Q)$(SHELL) '$(systbl)' '$(CC)' '$(HOSTCC)' $(incpath) $(sysdef) > $@
>
> clean::
> - $(call QUIET_CLEAN, arm64) $(RM) $(header)
> + $(call QUIET_CLEAN, arm64) $(RM) -r $(header) $(generated)
>
> archheaders: $(header)
> diff --git a/tools/perf/arch/powerpc/Makefile b/tools/perf/arch/powerpc/Makefile
> index 840ea0e59287..979c2bebc167 100644
> --- a/tools/perf/arch/powerpc/Makefile
> +++ b/tools/perf/arch/powerpc/Makefile
> @@ -11,7 +11,8 @@ PERF_HAVE_JITDUMP := 1
> # Syscall table generation for perf
> #
>
> -out := $(OUTPUT)arch/powerpc/include/generated/asm
> +generated := $(OUTPUT)arch/powerpc/include/generated
> +out := $(generated)/asm
> header32 := $(out)/syscalls_32.c
> header64 := $(out)/syscalls_64.c
> sysprf := $(srctree)/tools/perf/arch/powerpc/entry/syscalls
> @@ -28,6 +29,6 @@ $(header32): $(sysdef) $(systbl)
> $(Q)$(SHELL) '$(systbl)' '32' $(sysdef) > $@
>
> clean::
> - $(call QUIET_CLEAN, powerpc) $(RM) $(header32) $(header64)
> + $(call QUIET_CLEAN, powerpc) $(RM) -r $(header32) $(header64) $(generated)
>
> archheaders: $(header32) $(header64)
> diff --git a/tools/perf/arch/s390/Makefile b/tools/perf/arch/s390/Makefile
> index 74bffbea03e2..27cf67f1cc78 100644
> --- a/tools/perf/arch/s390/Makefile
> +++ b/tools/perf/arch/s390/Makefile
> @@ -10,7 +10,8 @@ PERF_HAVE_JITDUMP := 1
> # Syscall table generation for perf
> #
>
> -out := $(OUTPUT)arch/s390/include/generated/asm
> +generated := $(OUTPUT)arch/s390/include/generated
> +out := $(generated)/asm
> header := $(out)/syscalls_64.c
> sysprf := $(srctree)/tools/perf/arch/s390/entry/syscalls
> sysdef := $(sysprf)/syscall.tbl
> @@ -23,6 +24,6 @@ $(header): $(sysdef) $(systbl)
> $(Q)$(SHELL) '$(systbl)' $(sysdef) > $@
>
> clean::
> - $(call QUIET_CLEAN, s390) $(RM) $(header)
> + $(call QUIET_CLEAN, s390) $(RM) -r $(header) $(generted)
>
> archheaders: $(header)
> --
> 2.27.0
>

--

- Arnaldo