* [PATCH v1 1/2] perf build: Allow C++ demangle without libelf
@ 2023-04-03 21:10 Ian Rogers
2023-04-03 21:10 ` [PATCH v1 2/2] perf build: Warn for BPF skeletons if endian mismatches Ian Rogers
2023-04-03 21:49 ` [PATCH v1 1/2] perf build: Allow C++ demangle without libelf Arnaldo Carvalho de Melo
0 siblings, 2 replies; 3+ messages in thread
From: Ian Rogers @ 2023-04-03 21:10 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
Ian Rogers, Adrian Hunter, linux-perf-users, linux-kernel,
Andrii Nakryiko
The cxa demangle support isn't dependent on libelf and so we no longer
need to disable demangling if libelf isn't present.
Signed-off-by: Ian Rogers <irogers@google.com>
---
tools/perf/Makefile.config | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 236d763181c5..dd203f0a2b7e 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -412,7 +412,6 @@ endif
ifdef NO_LIBELF
NO_DWARF := 1
- NO_DEMANGLE := 1
NO_LIBUNWIND := 1
NO_LIBDW_DWARF_UNWIND := 1
NO_LIBBPF := 1
--
2.40.0.348.gf938b09366-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v1 2/2] perf build: Warn for BPF skeletons if endian mismatches
2023-04-03 21:10 [PATCH v1 1/2] perf build: Allow C++ demangle without libelf Ian Rogers
@ 2023-04-03 21:10 ` Ian Rogers
2023-04-03 21:49 ` [PATCH v1 1/2] perf build: Allow C++ demangle without libelf Arnaldo Carvalho de Melo
1 sibling, 0 replies; 3+ messages in thread
From: Ian Rogers @ 2023-04-03 21:10 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
Ian Rogers, Adrian Hunter, linux-perf-users, linux-kernel,
Andrii Nakryiko
Done as a warning as I'm not fully confident of the test's robustness
of comparing the macro definition of __BYTE_ORDER__.
Signed-off-by: Ian Rogers <irogers@google.com>
---
tools/perf/Makefile.config | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index dd203f0a2b7e..4be817ea4a59 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -659,14 +659,17 @@ ifndef NO_BPF_SKEL
$(call feature_check,clang-bpf-co-re)
ifeq ($(feature-clang-bpf-co-re), 0)
dummy := $(error: ERROR: BPF skeletons unsupported. clang too old/not installed or build with NO_BPF_SKEL=1.)
- else
- ifeq ($(filter -DHAVE_LIBBPF_SUPPORT, $(CFLAGS)),)
- dummy := $(error: ERROR: BPF skeletons unsupported. BPF skeleton support requires libbpf or build with NO_BPF_SKEL=1.)
- else
- $(call detected,CONFIG_PERF_BPF_SKEL)
- CFLAGS += -DHAVE_BPF_SKEL
- endif
endif
+ ifeq ($(filter -DHAVE_LIBBPF_SUPPORT, $(CFLAGS)),)
+ dummy := $(error: ERROR: BPF skeletons unsupported. BPF skeleton support requires libbpf or build with NO_BPF_SKEL=1.)
+ endif
+ host_byte_order=$(echo ""|$(HOSTCC) -dM -E -|grep __BYTE_ORDER__)
+ target_byte_order=$(echo ""|$(CC) -dM -E -|grep __BYTE_ORDER__)
+ ifneq ($(host_byte_order), $(target_byte_order))
+ $(warning Possibly mismatched host and target endianness may break BPF skeletons)
+ endif
+ $(call detected,CONFIG_PERF_BPF_SKEL)
+ CFLAGS += -DHAVE_BPF_SKEL
endif
dwarf-post-unwind := 1
--
2.40.0.348.gf938b09366-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v1 1/2] perf build: Allow C++ demangle without libelf
2023-04-03 21:10 [PATCH v1 1/2] perf build: Allow C++ demangle without libelf Ian Rogers
2023-04-03 21:10 ` [PATCH v1 2/2] perf build: Warn for BPF skeletons if endian mismatches Ian Rogers
@ 2023-04-03 21:49 ` Arnaldo Carvalho de Melo
1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-04-03 21:49 UTC (permalink / raw)
To: Ian Rogers
Cc: Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
Jiri Olsa, Namhyung Kim, Adrian Hunter, linux-perf-users,
linux-kernel, Andrii Nakryiko
Em Mon, Apr 03, 2023 at 02:10:20PM -0700, Ian Rogers escreveu:
> The cxa demangle support isn't dependent on libelf and so we no longer
> need to disable demangling if libelf isn't present.
Thanks, applied.
- Arnaldo
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
> tools/perf/Makefile.config | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index 236d763181c5..dd203f0a2b7e 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -412,7 +412,6 @@ endif
>
> ifdef NO_LIBELF
> NO_DWARF := 1
> - NO_DEMANGLE := 1
> NO_LIBUNWIND := 1
> NO_LIBDW_DWARF_UNWIND := 1
> NO_LIBBPF := 1
> --
> 2.40.0.348.gf938b09366-goog
>
--
- Arnaldo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-04-03 21:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-03 21:10 [PATCH v1 1/2] perf build: Allow C++ demangle without libelf Ian Rogers
2023-04-03 21:10 ` [PATCH v1 2/2] perf build: Warn for BPF skeletons if endian mismatches Ian Rogers
2023-04-03 21:49 ` [PATCH v1 1/2] perf build: Allow C++ demangle without libelf Arnaldo Carvalho de Melo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.