linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] perf bpf: Clean up the generated/copied vmlinux.h
@ 2024-02-02 14:32 Arnaldo Carvalho de Melo
  2024-02-02 15:40 ` Ian Rogers
  2024-02-06  0:19 ` Namhyung Kim
  0 siblings, 2 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2024-02-02 14:32 UTC (permalink / raw)
  To: Namhyung Kim, Ian Rogers
  Cc: Adrian Hunter, Alexander Shishkin, Andrii Nakryiko, bpf,
	Ingo Molnar, James Clark, Jiri Olsa, Mark Rutland,
	Peter Zijlstra, Tiezhu Yang, Yang Jihong, linux-kernel,
	linux-perf-users

When building perf with BPF skels we either copy the minimalistic
tools/perf/util/bpf_skel/vmlinux/vmlinux.h or use bpftool to generate a
vmlinux from BTF, storing the result in $(SKEL_OUT)/vmlinux.h.

We need to remove that when doing a 'make -C tools/perf clean', fix it.

Fixes: b7a2d774c9c5a9a3 ("perf build: Add ability to build with a generated vmlinux.h")
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: bpf@vger.kernel.org
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: Yang Jihong <yangjihong1@huawei.com>
Link: https://lore.kernel.org/lkml/
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Makefile.perf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 27e7c478880fdecd..51ac396ed9f641af 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -1157,7 +1157,7 @@ bpf-skel:
 endif # CONFIG_PERF_BPF_SKEL
 
 bpf-skel-clean:
-	$(call QUIET_CLEAN, bpf-skel) $(RM) -r $(SKEL_TMP_OUT) $(SKELETONS)
+	$(call QUIET_CLEAN, bpf-skel) $(RM) -r $(SKEL_TMP_OUT) $(SKELETONS) $(SKEL_OUT)/vmlinux.h
 
 clean:: $(LIBAPI)-clean $(LIBBPF)-clean $(LIBSUBCMD)-clean $(LIBSYMBOL)-clean $(LIBPERF)-clean arm64-sysreg-defs-clean fixdep-clean python-clean bpf-skel-clean tests-coresight-targets-clean
 	$(call QUIET_CLEAN, core-objs)  $(RM) $(LIBPERF_A) $(OUTPUT)perf-archive $(OUTPUT)perf-iostat $(LANG_BINDINGS)
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] perf bpf: Clean up the generated/copied vmlinux.h
  2024-02-02 14:32 [PATCH 1/1] perf bpf: Clean up the generated/copied vmlinux.h Arnaldo Carvalho de Melo
@ 2024-02-02 15:40 ` Ian Rogers
  2024-02-06  0:19 ` Namhyung Kim
  1 sibling, 0 replies; 3+ messages in thread
From: Ian Rogers @ 2024-02-02 15:40 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Namhyung Kim, Adrian Hunter, Alexander Shishkin, Andrii Nakryiko,
	bpf, Ingo Molnar, James Clark, Jiri Olsa, Mark Rutland,
	Peter Zijlstra, Tiezhu Yang, Yang Jihong, linux-kernel,
	linux-perf-users

On Fri, Feb 2, 2024 at 6:32 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
>
> When building perf with BPF skels we either copy the minimalistic
> tools/perf/util/bpf_skel/vmlinux/vmlinux.h or use bpftool to generate a
> vmlinux from BTF, storing the result in $(SKEL_OUT)/vmlinux.h.
>
> We need to remove that when doing a 'make -C tools/perf clean', fix it.
>
> Fixes: b7a2d774c9c5a9a3 ("perf build: Add ability to build with a generated vmlinux.h")
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> Cc: Andrii Nakryiko <andrii@kernel.org>
> Cc: bpf@vger.kernel.org
> Cc: Ian Rogers <irogers@google.com>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: James Clark <james.clark@arm.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Tiezhu Yang <yangtiezhu@loongson.cn>
> Cc: Yang Jihong <yangjihong1@huawei.com>
> Link: https://lore.kernel.org/lkml/
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

Reviewed-by: Ian Rogers <irogers@google.com>

Thanks,
Ian

> ---
>  tools/perf/Makefile.perf | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index 27e7c478880fdecd..51ac396ed9f641af 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -1157,7 +1157,7 @@ bpf-skel:
>  endif # CONFIG_PERF_BPF_SKEL
>
>  bpf-skel-clean:
> -       $(call QUIET_CLEAN, bpf-skel) $(RM) -r $(SKEL_TMP_OUT) $(SKELETONS)
> +       $(call QUIET_CLEAN, bpf-skel) $(RM) -r $(SKEL_TMP_OUT) $(SKELETONS) $(SKEL_OUT)/vmlinux.h
>
>  clean:: $(LIBAPI)-clean $(LIBBPF)-clean $(LIBSUBCMD)-clean $(LIBSYMBOL)-clean $(LIBPERF)-clean arm64-sysreg-defs-clean fixdep-clean python-clean bpf-skel-clean tests-coresight-targets-clean
>         $(call QUIET_CLEAN, core-objs)  $(RM) $(LIBPERF_A) $(OUTPUT)perf-archive $(OUTPUT)perf-iostat $(LANG_BINDINGS)
> --
> 2.43.0
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] perf bpf: Clean up the generated/copied vmlinux.h
  2024-02-02 14:32 [PATCH 1/1] perf bpf: Clean up the generated/copied vmlinux.h Arnaldo Carvalho de Melo
  2024-02-02 15:40 ` Ian Rogers
@ 2024-02-06  0:19 ` Namhyung Kim
  1 sibling, 0 replies; 3+ messages in thread
From: Namhyung Kim @ 2024-02-06  0:19 UTC (permalink / raw)
  To: Ian Rogers, Arnaldo Carvalho de Melo
  Cc: Andrii Nakryiko, bpf, linux-kernel, Yang Jihong, Adrian Hunter,
	James Clark, Mark Rutland, linux-perf-users, Jiri Olsa,
	Peter Zijlstra, Ingo Molnar, Alexander Shishkin, Tiezhu Yang

On Fri, 2 Feb 2024 11:32:20 -0300, Arnaldo Carvalho de Melo wrote:
> When building perf with BPF skels we either copy the minimalistic
> tools/perf/util/bpf_skel/vmlinux/vmlinux.h or use bpftool to generate a
> vmlinux from BTF, storing the result in $(SKEL_OUT)/vmlinux.h.
> 
> We need to remove that when doing a 'make -C tools/perf clean', fix it.
> 
> 
> [...]

Applied to perf-tools-next, thanks!

Best regards,
-- 
Namhyung Kim <namhyung@kernel.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-06  0:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-02 14:32 [PATCH 1/1] perf bpf: Clean up the generated/copied vmlinux.h Arnaldo Carvalho de Melo
2024-02-02 15:40 ` Ian Rogers
2024-02-06  0: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).