* [PATCH 0/1] Fix perf tools/lib includes @ 2022-11-16 7:22 Ian Rogers 2022-11-16 7:22 ` [PATCH 1/1] perf build: Use tools/lib headers from install path Ian Rogers 2022-11-16 15:19 ` [PATCH 0/1] Fix perf tools/lib includes Arnaldo Carvalho de Melo 0 siblings, 2 replies; 8+ messages in thread From: Ian Rogers @ 2022-11-16 7:22 UTC (permalink / raw) To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo, Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim, Masahiro Yamada, Nicolas Schier, linux-kernel, linux-perf-users, bpf, Nick Desaulniers, Andrii Nakryiko Cc: Stephane Eranian, Ian Rogers This patch replaces the last on kernel/git/acme/linux.git branch perf/tools-libs-includes and fixes the race issue by using the prepare dependency. pmu-events.c needs this dependency too, as the header files it includes also include libperf - using perpare as a dependency rather than $(LIBPERF) is more consistent with the rest of the makefile. Ian Rogers (1): perf build: Use tools/lib headers from install path tools/perf/Makefile.config | 2 -- tools/perf/Makefile.perf | 14 +++++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) -- 2.38.1.431.g37b22c650d-goog ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/1] perf build: Use tools/lib headers from install path 2022-11-16 7:22 [PATCH 0/1] Fix perf tools/lib includes Ian Rogers @ 2022-11-16 7:22 ` Ian Rogers 2022-11-16 15:19 ` [PATCH 0/1] Fix perf tools/lib includes Arnaldo Carvalho de Melo 1 sibling, 0 replies; 8+ messages in thread From: Ian Rogers @ 2022-11-16 7:22 UTC (permalink / raw) To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo, Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim, Masahiro Yamada, Nicolas Schier, linux-kernel, linux-perf-users, bpf, Nick Desaulniers, Andrii Nakryiko Cc: Stephane Eranian, Ian Rogers, Arnaldo Carvalho de Melo Switch -I from tools/lib to the install path for the tools/lib libraries. Add the include_headers build targets to prepare target, as well as pmu-events.c compilation that dependes on libperf. Signed-off-by: Ian Rogers <irogers@google.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Nick Desaulniers <ndesaulniers@google.com> Cc: Nicolas Schier <nicolas@fjasle.eu> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20221109184914.1357295-15-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/Makefile.config | 2 -- tools/perf/Makefile.perf | 14 +++++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index a7f6c0669fae..9cc3c48f3288 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -349,7 +349,6 @@ ifeq ($(DEBUG),0) endif endif -INC_FLAGS += -I$(srctree)/tools/lib/perf/include INC_FLAGS += -I$(src-perf)/util/include INC_FLAGS += -I$(src-perf)/arch/$(SRCARCH)/include INC_FLAGS += -I$(srctree)/tools/include/ @@ -367,7 +366,6 @@ endif INC_FLAGS += -I$(src-perf)/util INC_FLAGS += -I$(src-perf) -INC_FLAGS += -I$(srctree)/tools/lib/ CORE_CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 6c1a2a3ccc38..dd096aba4430 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -305,6 +305,7 @@ LIBTRACEEVENT_INCLUDE = $(LIBTRACEEVENT_DESTDIR)/include LIBTRACEEVENT = $(LIBTRACEEVENT_OUTPUT)/libtraceevent.a export LIBTRACEEVENT LIBTRACEEVENT_DYNAMIC_LIST = $(LIBTRACEEVENT_PLUGINS_OUTPUT)/libtraceevent-dynamic-list +CFLAGS += -I$(LIBTRACEEVENT_OUTPUT)/include # # The static build has no dynsym table, so this does not work for @@ -322,6 +323,7 @@ LIBAPI_DESTDIR = $(LIBAPI_OUTPUT) LIBAPI_INCLUDE = $(LIBAPI_DESTDIR)/include LIBAPI = $(LIBAPI_OUTPUT)/libapi.a export LIBAPI +CFLAGS += -I$(LIBAPI_OUTPUT)/include ifneq ($(OUTPUT),) LIBBPF_OUTPUT = $(abspath $(OUTPUT))/libbpf @@ -331,6 +333,7 @@ endif LIBBPF_DESTDIR = $(LIBBPF_OUTPUT) LIBBPF_INCLUDE = $(LIBBPF_DESTDIR)/include LIBBPF = $(LIBBPF_OUTPUT)/libbpf.a +CFLAGS += -I$(LIBBPF_OUTPUT)/include ifneq ($(OUTPUT),) LIBSUBCMD_OUTPUT = $(abspath $(OUTPUT))/libsubcmd @@ -340,6 +343,7 @@ endif LIBSUBCMD_DESTDIR = $(LIBSUBCMD_OUTPUT) LIBSUBCMD_INCLUDE = $(LIBSUBCMD_DESTDIR)/include LIBSUBCMD = $(LIBSUBCMD_OUTPUT)/libsubcmd.a +CFLAGS += -I$(LIBSUBCMD_OUTPUT)/include ifneq ($(OUTPUT),) LIBSYMBOL_OUTPUT = $(abspath $(OUTPUT))/libsymbol @@ -349,6 +353,7 @@ endif LIBSYMBOL_DESTDIR = $(LIBSYMBOL_OUTPUT) LIBSYMBOL_INCLUDE = $(LIBSYMBOL_DESTDIR)/include LIBSYMBOL = $(LIBSYMBOL_OUTPUT)/libsymbol.a +CFLAGS += -I$(LIBSYMBOL_OUTPUT)/include ifneq ($(OUTPUT),) LIBPERF_OUTPUT = $(abspath $(OUTPUT))/libperf @@ -359,6 +364,7 @@ LIBPERF_DESTDIR = $(LIBPERF_OUTPUT) LIBPERF_INCLUDE = $(LIBPERF_DESTDIR)/include LIBPERF = $(LIBPERF_OUTPUT)/libperf.a export LIBPERF +CFLAGS += -I$(LIBPERF_OUTPUT)/include # python extension build directories PYTHON_EXTBUILD := $(OUTPUT)python_ext_build/ @@ -691,7 +697,7 @@ build := -f $(srctree)/tools/build/Makefile.build dir=. obj $(PERF_IN): prepare FORCE $(Q)$(MAKE) $(build)=perf -$(PMU_EVENTS_IN): FORCE +$(PMU_EVENTS_IN): FORCE prepare $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=pmu-events obj=pmu-events $(OUTPUT)perf: $(PERFLIBS) $(PERF_IN) $(PMU_EVENTS_IN) $(LIBTRACEEVENT_DYNAMIC_LIST) @@ -774,6 +780,12 @@ prepare: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h archheaders $(drm_ioc $(rename_flags_array) \ $(arch_errno_name_array) \ $(sync_file_range_arrays) \ + $(LIBAPI) \ + $(LIBBPF) \ + $(LIBPERF) \ + $(LIBSUBCMD) \ + $(LIBSYMBOL) \ + $(LIBTRACEEVENT) \ bpf-skel $(OUTPUT)%.o: %.c prepare FORCE -- 2.38.1.431.g37b22c650d-goog ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 0/1] Fix perf tools/lib includes 2022-11-16 7:22 [PATCH 0/1] Fix perf tools/lib includes Ian Rogers 2022-11-16 7:22 ` [PATCH 1/1] perf build: Use tools/lib headers from install path Ian Rogers @ 2022-11-16 15:19 ` Arnaldo Carvalho de Melo 2022-11-16 15:23 ` Arnaldo Carvalho de Melo 1 sibling, 1 reply; 8+ messages in thread From: Arnaldo Carvalho de Melo @ 2022-11-16 15:19 UTC (permalink / raw) To: Ian Rogers Cc: Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim, Masahiro Yamada, Nicolas Schier, linux-kernel, linux-perf-users, bpf, Nick Desaulniers, Andrii Nakryiko, Stephane Eranian Em Tue, Nov 15, 2022 at 11:22:10PM -0800, Ian Rogers escreveu: > This patch replaces the last on kernel/git/acme/linux.git branch > perf/tools-libs-includes and fixes the race issue by using the prepare > dependency. pmu-events.c needs this dependency too, as the header > files it includes also include libperf - using perpare as a dependency > rather than $(LIBPERF) is more consistent with the rest of the makefile. > > Ian Rogers (1): > perf build: Use tools/lib headers from install path Testing. > tools/perf/Makefile.config | 2 -- > tools/perf/Makefile.perf | 14 +++++++++++++- > 2 files changed, 13 insertions(+), 3 deletions(-) > > -- > 2.38.1.431.g37b22c650d-goog -- - Arnaldo ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/1] Fix perf tools/lib includes 2022-11-16 15:19 ` [PATCH 0/1] Fix perf tools/lib includes Arnaldo Carvalho de Melo @ 2022-11-16 15:23 ` Arnaldo Carvalho de Melo 2022-11-16 16:45 ` Ian Rogers 0 siblings, 1 reply; 8+ messages in thread From: Arnaldo Carvalho de Melo @ 2022-11-16 15:23 UTC (permalink / raw) To: Ian Rogers Cc: Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim, Masahiro Yamada, Nicolas Schier, linux-kernel, linux-perf-users, bpf, Nick Desaulniers, Andrii Nakryiko, Stephane Eranian Em Wed, Nov 16, 2022 at 12:19:27PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Nov 15, 2022 at 11:22:10PM -0800, Ian Rogers escreveu: > > This patch replaces the last on kernel/git/acme/linux.git branch > > perf/tools-libs-includes and fixes the race issue by using the prepare > > dependency. pmu-events.c needs this dependency too, as the header > > files it includes also include libperf - using perpare as a dependency > > rather than $(LIBPERF) is more consistent with the rest of the makefile. > > > > Ian Rogers (1): > > perf build: Use tools/lib headers from install path > > Testing. ⬢[acme@toolbox perf]$ git log acme/perf/core.. --oneline 0a1e208afdccce71 (HEAD -> perf/tools-libs-includes) perf build: Use tools/lib headers from install path 17ca352f2aff834e perf cpumap: Tidy libperf includes fd3f518fc1140622 perf thread_map: Reduce exposure of libperf internal API bd560973c5d3b2a3 perf expr: Tidy hashmap dependency 84bec6f0b31fb2ac perf build: Install libsymbol locally when building 160be157eaba2a37 tool lib symbol: Add Makefile/Build a6e8caf5db2e1db8 tools lib perf: Add missing install headers 8d1f68bd76a6517c tools lib api: Add missing install headers ef019df01e207971 perf build: Install libtraceevent locally when building 91009a3a9913f275 perf build: Install libperf locally when building 00314c9bca8faad4 perf build: Install libapi locally when building 911920b06e6be3fa perf build: Install libsubcmd locally when building 630ae80ea1dd2536 tools lib subcmd: Add install target a6efaa2c89bf35c3 tools lib api: Add install target ⬢[acme@toolbox perf]$ ⬢[acme@toolbox perf]$ git show commit 0a1e208afdccce7193cbe4031dfd255c89c425d6 Author: Ian Rogers <irogers@google.com> Date: Tue Nov 15 23:22:11 2022 -0800 perf build: Use tools/lib headers from install path Switch -I from tools/lib to the install path for the tools/lib libraries. Add the include_headers build targets to prepare target, as well as pmu-events.c compilation that dependes on libperf. Signed-off-by: Ian Rogers <irogers@google.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Nick Desaulniers <ndesaulniers@google.com> Cc: Nicolas Schier <nicolas@fjasle.eu> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20221109184914.1357295-15-irogers@google.com Link: http://lore.kernel.org/lkml/20221116072211.2837834-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index a7f6c0669fae4d24..9cc3c48f32881c8b 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -349,7 +349,6 @@ ifeq ($(DEBUG),0) endif endif -INC_FLAGS += -I$(srctree)/tools/lib/perf/include INC_FLAGS += -I$(src-perf)/util/include INC_FLAGS += -I$(src-perf)/arch/$(SRCARCH)/include INC_FLAGS += -I$(srctree)/tools/include/ @@ -367,7 +366,6 @@ endif INC_FLAGS += -I$(src-perf)/util INC_FLAGS += -I$(src-perf) -INC_FLAGS += -I$(srctree)/tools/lib/ CORE_CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 6c1a2a3ccc38195f..dd096aba4430e3e4 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -305,6 +305,7 @@ LIBTRACEEVENT_INCLUDE = $(LIBTRACEEVENT_DESTDIR)/include LIBTRACEEVENT = $(LIBTRACEEVENT_OUTPUT)/libtraceevent.a export LIBTRACEEVENT LIBTRACEEVENT_DYNAMIC_LIST = $(LIBTRACEEVENT_PLUGINS_OUTPUT)/libtraceevent-dynamic-list +CFLAGS += -I$(LIBTRACEEVENT_OUTPUT)/include # # The static build has no dynsym table, so this does not work for @@ -322,6 +323,7 @@ LIBAPI_DESTDIR = $(LIBAPI_OUTPUT) LIBAPI_INCLUDE = $(LIBAPI_DESTDIR)/include LIBAPI = $(LIBAPI_OUTPUT)/libapi.a export LIBAPI +CFLAGS += -I$(LIBAPI_OUTPUT)/include ifneq ($(OUTPUT),) LIBBPF_OUTPUT = $(abspath $(OUTPUT))/libbpf @@ -331,6 +333,7 @@ endif LIBBPF_DESTDIR = $(LIBBPF_OUTPUT) LIBBPF_INCLUDE = $(LIBBPF_DESTDIR)/include LIBBPF = $(LIBBPF_OUTPUT)/libbpf.a +CFLAGS += -I$(LIBBPF_OUTPUT)/include ifneq ($(OUTPUT),) LIBSUBCMD_OUTPUT = $(abspath $(OUTPUT))/libsubcmd @@ -340,6 +343,7 @@ endif LIBSUBCMD_DESTDIR = $(LIBSUBCMD_OUTPUT) LIBSUBCMD_INCLUDE = $(LIBSUBCMD_DESTDIR)/include LIBSUBCMD = $(LIBSUBCMD_OUTPUT)/libsubcmd.a +CFLAGS += -I$(LIBSUBCMD_OUTPUT)/include ifneq ($(OUTPUT),) LIBSYMBOL_OUTPUT = $(abspath $(OUTPUT))/libsymbol @@ -349,6 +353,7 @@ endif LIBSYMBOL_DESTDIR = $(LIBSYMBOL_OUTPUT) LIBSYMBOL_INCLUDE = $(LIBSYMBOL_DESTDIR)/include LIBSYMBOL = $(LIBSYMBOL_OUTPUT)/libsymbol.a +CFLAGS += -I$(LIBSYMBOL_OUTPUT)/include ifneq ($(OUTPUT),) LIBPERF_OUTPUT = $(abspath $(OUTPUT))/libperf @@ -359,6 +364,7 @@ LIBPERF_DESTDIR = $(LIBPERF_OUTPUT) LIBPERF_INCLUDE = $(LIBPERF_DESTDIR)/include LIBPERF = $(LIBPERF_OUTPUT)/libperf.a export LIBPERF +CFLAGS += -I$(LIBPERF_OUTPUT)/include # python extension build directories PYTHON_EXTBUILD := $(OUTPUT)python_ext_build/ @@ -691,7 +697,7 @@ build := -f $(srctree)/tools/build/Makefile.build dir=. obj $(PERF_IN): prepare FORCE $(Q)$(MAKE) $(build)=perf -$(PMU_EVENTS_IN): FORCE +$(PMU_EVENTS_IN): FORCE prepare $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=pmu-events obj=pmu-events $(OUTPUT)perf: $(PERFLIBS) $(PERF_IN) $(PMU_EVENTS_IN) $(LIBTRACEEVENT_DYNAMIC_LIST) @@ -774,6 +780,12 @@ prepare: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h archheaders $(drm_ioc $(rename_flags_array) \ $(arch_errno_name_array) \ $(sync_file_range_arrays) \ + $(LIBAPI) \ + $(LIBBPF) \ + $(LIBPERF) \ + $(LIBSUBCMD) \ + $(LIBSYMBOL) \ + $(LIBTRACEEVENT) \ bpf-skel $(OUTPUT)%.o: %.c prepare FORCE ⬢[acme@toolbox perf]$ git log --oneline -1 ; time make -C tools/perf build-test 0a1e208afdccce71 (HEAD -> perf/tools-libs-includes) perf build: Use tools/lib headers from install path make: Entering directory '/var/home/acme/git/perf/tools/perf' - tarpkg: ./tests/perf-targz-src-pkg . make_static: cd . && make LDFLAGS=-static NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 NO_JVMTI=1 -j32 DESTDIR=/tmp/tmp.YueDE1rSyh make_with_gtk2: cd . && make GTK2=1 -j32 DESTDIR=/tmp/tmp.YuHTyobvdL cd . && make GTK2=1 -j32 DESTDIR=/tmp/tmp.YuHTyobvdL BUILD: Doing 'make -j32' parallel build HOSTCC fixdep.o HOSTLD fixdep-in.o LINK fixdep Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/perf_regs.h' differs from latest version at 'arch/arm64/include/uapi/asm/perf_regs.h' diff -u tools/arch/arm64/include/uapi/asm/perf_regs.h arch/arm64/include/uapi/asm/perf_regs.h Warning: Kernel ABI header at 'tools/arch/arm64/include/asm/cputype.h' differs from latest version at 'arch/arm64/include/asm/cputype.h' diff -u tools/arch/arm64/include/asm/cputype.h arch/arm64/include/asm/cputype.h Warning: Kernel ABI header at 'tools/perf/arch/powerpc/entry/syscalls/syscall.tbl' differs from latest version at 'arch/powerpc/kernel/syscalls/syscall.tbl' diff -u tools/perf/arch/powerpc/entry/syscalls/syscall.tbl arch/powerpc/kernel/syscalls/syscall.tbl Auto-detecting system features: ... dwarf: [ on ] ... dwarf_getlocations: [ on ] ... glibc: [ on ] ... libbfd: [ on ] ... libbfd-buildid: [ on ] ... libcap: [ on ] ... libelf: [ on ] ... libnuma: [ on ] ... numa_num_possible_cpus: [ on ] ... libperl: [ on ] ... libpython: [ on ] ... libcrypto: [ on ] ... libunwind: [ on ] ... libdw-dwarf-unwind: [ on ] ... zlib: [ on ] ... lzma: [ on ] ... get_cpuid: [ on ] ... bpf: [ on ] ... libaio: [ on ] ... libzstd: [ on ] GEN common-cmds.h CC perf-read-vdso32 CC dlfilters/dlfilter-test-api-v0.o CC dlfilters/dlfilter-show-cycles.o CC jvmti/libjvmti.o CC jvmti/jvmti_agent.o CC jvmti/libstring.o CC jvmti/libctype.o CC ui/gtk/browser.o CC ui/gtk/hists.o CC ui/gtk/setup.o CC ui/gtk/util.o CC ui/gtk/helpline.o CC ui/gtk/progress.o CC ui/gtk/annotate.o LINK dlfilters/dlfilter-show-cycles.so CC ui/gtk/zalloc.o LINK dlfilters/dlfilter-test-api-v0.so INSTALL headers CC /var/home/acme/git/perf/tools/perf/libsubcmd/exec-cmd.o CC /var/home/acme/git/perf/tools/perf/libsubcmd/help.o CC /var/home/acme/git/perf/tools/perf/libsubcmd/pager.o CC /var/home/acme/git/perf/tools/perf/libsubcmd/parse-options.o CC /var/home/acme/git/perf/tools/perf/libsubcmd/run-command.o CC /var/home/acme/git/perf/tools/perf/libsubcmd/sigchain.o CC /var/home/acme/git/perf/tools/perf/libsubcmd/subcmd-config.o LD jvmti/jvmti-in.o INSTALL headers In file included from ui/gtk/hists.c:2: /var/home/acme/git/perf/tools/perf/util/include/../evlist.h:9:10: fatal error: api/fd/array.h: No such file or directory 9 | #include <api/fd/array.h> | ^~~~~~~~~~~~~~~~ compilation terminated. make[6]: *** [/var/home/acme/git/perf/tools/build/Makefile.build:97: ui/gtk/hists.o] Error 1 make[6]: *** Waiting for unfinished jobs.... In file included from ui/gtk/browser.c:2: /var/home/acme/git/perf/tools/perf/util/include/../evsel.h:10:10: fatal error: internal/evsel.h: No such file or directory 10 | #include <internal/evsel.h> | ^~~~~~~~~~~~~~~~~~ compilation terminated. make[6]: *** [/var/home/acme/git/perf/tools/build/Makefile.build:97: ui/gtk/browser.o] Error 1 make -f /var/home/acme/git/perf/tools/build/Makefile.build dir=. obj=libsymbol V=1 CC /var/home/acme/git/perf/tools/perf/libtraceevent/event-parse.o CC /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_jbd2.o CC /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_hrtimer.o INSTALL headers CC /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_kmem.o CC /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_kvm.o CC /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_mac80211.o CC /var/home/acme/git/perf/tools/perf/libperf/core.o CC /var/home/acme/git/perf/tools/perf/libperf/cpumap.o CC /var/home/acme/git/perf/tools/perf/libperf/threadmap.o INSTALL headers gcc -Wp,-MD,/var/home/acme/git/perf/tools/perf/libsymbol/.kallsyms.o.d -Wp,-MT,/var/home/acme/git/perf/tools/perf/libsymbol/kallsyms.o -Wbad-function-cast -Wdeclaration-after-statement -Wformat-security -Wformat-y2k -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-system-headers -Wold-style-definition -Wpacked -Wredundant-decls -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wwrite-strings -Wformat -Wno-type-limits -Wstrict-aliasing=3 -Wshadow -ggdb3 -Wall -Wextra -std=gnu11 -U_FORTIFY_SOURCE -fPIC -Werror -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/var/home/acme/git/perf/tools/lib -I/var/home/acme/git/perf/tools/include -D"BUILD_STR(s)=#s" -c -o /var/home/acme/git/perf/tools/perf/libsymbol/kallsyms.o kallsyms.c CC /var/home/acme/git/perf/tools/perf/libperf/evsel.o LINK libperf-jvmti.so CC /var/home/acme/git/perf/tools/perf/libperf/evlist.o CC /var/home/acme/git/perf/tools/perf/libperf/mmap.o MKDIR /var/home/acme/git/perf/tools/perf/libapi/fd/ LD /var/home/acme/git/perf/tools/perf/libsubcmd/libsubcmd-in.o PERF_VERSION = 6.1.rc5.g0a1e208afdcc CC /var/home/acme/git/perf/tools/perf/libperf/zalloc.o LD /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_jbd2-in.o CC /var/home/acme/git/perf/tools/perf/libperf/xyarray.o LD /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_hrtimer-in.o CC /var/home/acme/git/perf/tools/perf/libapi/fd/array.o GEN /var/home/acme/git/perf/tools/perf/libbpf/bpf_helper_defs.h LD /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_kmem-in.o LD /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_mac80211-in.o LD /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_kvm-in.o INSTALL /var/home/acme/git/perf/tools/perf/libbpf/include/bpf/bpf.h ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 0/1] Fix perf tools/lib includes 2022-11-16 15:23 ` Arnaldo Carvalho de Melo @ 2022-11-16 16:45 ` Ian Rogers 2022-11-16 16:47 ` Ian Rogers 0 siblings, 1 reply; 8+ messages in thread From: Ian Rogers @ 2022-11-16 16:45 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim, Masahiro Yamada, Nicolas Schier, linux-kernel, linux-perf-users, bpf, Nick Desaulniers, Andrii Nakryiko, Stephane Eranian On Wed, Nov 16, 2022 at 7:23 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote: > > Em Wed, Nov 16, 2022 at 12:19:27PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Tue, Nov 15, 2022 at 11:22:10PM -0800, Ian Rogers escreveu: > > > This patch replaces the last on kernel/git/acme/linux.git branch > > > perf/tools-libs-includes and fixes the race issue by using the prepare > > > dependency. pmu-events.c needs this dependency too, as the header > > > files it includes also include libperf - using perpare as a dependency > > > rather than $(LIBPERF) is more consistent with the rest of the makefile. > > > > > > Ian Rogers (1): > > > perf build: Use tools/lib headers from install path > > > > Testing. > > ⬢[acme@toolbox perf]$ git log acme/perf/core.. --oneline > 0a1e208afdccce71 (HEAD -> perf/tools-libs-includes) perf build: Use tools/lib headers from install path > 17ca352f2aff834e perf cpumap: Tidy libperf includes > fd3f518fc1140622 perf thread_map: Reduce exposure of libperf internal API > bd560973c5d3b2a3 perf expr: Tidy hashmap dependency > 84bec6f0b31fb2ac perf build: Install libsymbol locally when building > 160be157eaba2a37 tool lib symbol: Add Makefile/Build > a6e8caf5db2e1db8 tools lib perf: Add missing install headers > 8d1f68bd76a6517c tools lib api: Add missing install headers > ef019df01e207971 perf build: Install libtraceevent locally when building > 91009a3a9913f275 perf build: Install libperf locally when building > 00314c9bca8faad4 perf build: Install libapi locally when building > 911920b06e6be3fa perf build: Install libsubcmd locally when building > 630ae80ea1dd2536 tools lib subcmd: Add install target > a6efaa2c89bf35c3 tools lib api: Add install target > ⬢[acme@toolbox perf]$ > > ⬢[acme@toolbox perf]$ git show > commit 0a1e208afdccce7193cbe4031dfd255c89c425d6 > Author: Ian Rogers <irogers@google.com> > Date: Tue Nov 15 23:22:11 2022 -0800 > > perf build: Use tools/lib headers from install path > > Switch -I from tools/lib to the install path for the tools/lib > libraries. Add the include_headers build targets to prepare target, as > well as pmu-events.c compilation that dependes on libperf. > > Signed-off-by: Ian Rogers <irogers@google.com> > Acked-by: Namhyung Kim <namhyung@kernel.org> > Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> > Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com> > Cc: Jiri Olsa <jolsa@kernel.org> > Cc: Mark Rutland <mark.rutland@arm.com> > Cc: Masahiro Yamada <masahiroy@kernel.org> > Cc: Nick Desaulniers <ndesaulniers@google.com> > Cc: Nicolas Schier <nicolas@fjasle.eu> > Cc: Peter Zijlstra <peterz@infradead.org> > Cc: Stephane Eranian <eranian@google.com> > Cc: bpf@vger.kernel.org > Link: http://lore.kernel.org/lkml/20221109184914.1357295-15-irogers@google.com > Link: http://lore.kernel.org/lkml/20221116072211.2837834-2-irogers@google.com > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> > > diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config > index a7f6c0669fae4d24..9cc3c48f32881c8b 100644 > --- a/tools/perf/Makefile.config > +++ b/tools/perf/Makefile.config > @@ -349,7 +349,6 @@ ifeq ($(DEBUG),0) > endif > endif > > -INC_FLAGS += -I$(srctree)/tools/lib/perf/include > INC_FLAGS += -I$(src-perf)/util/include > INC_FLAGS += -I$(src-perf)/arch/$(SRCARCH)/include > INC_FLAGS += -I$(srctree)/tools/include/ > @@ -367,7 +366,6 @@ endif > > INC_FLAGS += -I$(src-perf)/util > INC_FLAGS += -I$(src-perf) > -INC_FLAGS += -I$(srctree)/tools/lib/ > > CORE_CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE > > diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf > index 6c1a2a3ccc38195f..dd096aba4430e3e4 100644 > --- a/tools/perf/Makefile.perf > +++ b/tools/perf/Makefile.perf > @@ -305,6 +305,7 @@ LIBTRACEEVENT_INCLUDE = $(LIBTRACEEVENT_DESTDIR)/include > LIBTRACEEVENT = $(LIBTRACEEVENT_OUTPUT)/libtraceevent.a > export LIBTRACEEVENT > LIBTRACEEVENT_DYNAMIC_LIST = $(LIBTRACEEVENT_PLUGINS_OUTPUT)/libtraceevent-dynamic-list > +CFLAGS += -I$(LIBTRACEEVENT_OUTPUT)/include > > # > # The static build has no dynsym table, so this does not work for > @@ -322,6 +323,7 @@ LIBAPI_DESTDIR = $(LIBAPI_OUTPUT) > LIBAPI_INCLUDE = $(LIBAPI_DESTDIR)/include > LIBAPI = $(LIBAPI_OUTPUT)/libapi.a > export LIBAPI > +CFLAGS += -I$(LIBAPI_OUTPUT)/include > > ifneq ($(OUTPUT),) > LIBBPF_OUTPUT = $(abspath $(OUTPUT))/libbpf > @@ -331,6 +333,7 @@ endif > LIBBPF_DESTDIR = $(LIBBPF_OUTPUT) > LIBBPF_INCLUDE = $(LIBBPF_DESTDIR)/include > LIBBPF = $(LIBBPF_OUTPUT)/libbpf.a > +CFLAGS += -I$(LIBBPF_OUTPUT)/include > > ifneq ($(OUTPUT),) > LIBSUBCMD_OUTPUT = $(abspath $(OUTPUT))/libsubcmd > @@ -340,6 +343,7 @@ endif > LIBSUBCMD_DESTDIR = $(LIBSUBCMD_OUTPUT) > LIBSUBCMD_INCLUDE = $(LIBSUBCMD_DESTDIR)/include > LIBSUBCMD = $(LIBSUBCMD_OUTPUT)/libsubcmd.a > +CFLAGS += -I$(LIBSUBCMD_OUTPUT)/include > > ifneq ($(OUTPUT),) > LIBSYMBOL_OUTPUT = $(abspath $(OUTPUT))/libsymbol > @@ -349,6 +353,7 @@ endif > LIBSYMBOL_DESTDIR = $(LIBSYMBOL_OUTPUT) > LIBSYMBOL_INCLUDE = $(LIBSYMBOL_DESTDIR)/include > LIBSYMBOL = $(LIBSYMBOL_OUTPUT)/libsymbol.a > +CFLAGS += -I$(LIBSYMBOL_OUTPUT)/include > > ifneq ($(OUTPUT),) > LIBPERF_OUTPUT = $(abspath $(OUTPUT))/libperf > @@ -359,6 +364,7 @@ LIBPERF_DESTDIR = $(LIBPERF_OUTPUT) > LIBPERF_INCLUDE = $(LIBPERF_DESTDIR)/include > LIBPERF = $(LIBPERF_OUTPUT)/libperf.a > export LIBPERF > +CFLAGS += -I$(LIBPERF_OUTPUT)/include > > # python extension build directories > PYTHON_EXTBUILD := $(OUTPUT)python_ext_build/ > @@ -691,7 +697,7 @@ build := -f $(srctree)/tools/build/Makefile.build dir=. obj > $(PERF_IN): prepare FORCE > $(Q)$(MAKE) $(build)=perf > > -$(PMU_EVENTS_IN): FORCE > +$(PMU_EVENTS_IN): FORCE prepare > $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=pmu-events obj=pmu-events > > $(OUTPUT)perf: $(PERFLIBS) $(PERF_IN) $(PMU_EVENTS_IN) $(LIBTRACEEVENT_DYNAMIC_LIST) > @@ -774,6 +780,12 @@ prepare: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h archheaders $(drm_ioc > $(rename_flags_array) \ > $(arch_errno_name_array) \ > $(sync_file_range_arrays) \ > + $(LIBAPI) \ > + $(LIBBPF) \ > + $(LIBPERF) \ > + $(LIBSUBCMD) \ > + $(LIBSYMBOL) \ > + $(LIBTRACEEVENT) \ > bpf-skel > > $(OUTPUT)%.o: %.c prepare FORCE > > ⬢[acme@toolbox perf]$ git log --oneline -1 ; time make -C tools/perf build-test > 0a1e208afdccce71 (HEAD -> perf/tools-libs-includes) perf build: Use tools/lib headers from install path > make: Entering directory '/var/home/acme/git/perf/tools/perf' > - tarpkg: ./tests/perf-targz-src-pkg . > make_static: cd . && make LDFLAGS=-static NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 NO_JVMTI=1 -j32 DESTDIR=/tmp/tmp.YueDE1rSyh > make_with_gtk2: cd . && make GTK2=1 -j32 DESTDIR=/tmp/tmp.YuHTyobvdL > cd . && make GTK2=1 -j32 DESTDIR=/tmp/tmp.YuHTyobvdL > BUILD: Doing 'make -j32' parallel build > HOSTCC fixdep.o > HOSTLD fixdep-in.o > LINK fixdep > Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/perf_regs.h' differs from latest version at 'arch/arm64/include/uapi/asm/perf_regs.h' > diff -u tools/arch/arm64/include/uapi/asm/perf_regs.h arch/arm64/include/uapi/asm/perf_regs.h > Warning: Kernel ABI header at 'tools/arch/arm64/include/asm/cputype.h' differs from latest version at 'arch/arm64/include/asm/cputype.h' > diff -u tools/arch/arm64/include/asm/cputype.h arch/arm64/include/asm/cputype.h > Warning: Kernel ABI header at 'tools/perf/arch/powerpc/entry/syscalls/syscall.tbl' differs from latest version at 'arch/powerpc/kernel/syscalls/syscall.tbl' > diff -u tools/perf/arch/powerpc/entry/syscalls/syscall.tbl arch/powerpc/kernel/syscalls/syscall.tbl > > Auto-detecting system features: > ... dwarf: [ on ] > ... dwarf_getlocations: [ on ] > ... glibc: [ on ] > ... libbfd: [ on ] > ... libbfd-buildid: [ on ] > ... libcap: [ on ] > ... libelf: [ on ] > ... libnuma: [ on ] > ... numa_num_possible_cpus: [ on ] > ... libperl: [ on ] > ... libpython: [ on ] > ... libcrypto: [ on ] > ... libunwind: [ on ] > ... libdw-dwarf-unwind: [ on ] > ... zlib: [ on ] > ... lzma: [ on ] > ... get_cpuid: [ on ] > ... bpf: [ on ] > ... libaio: [ on ] > ... libzstd: [ on ] > > GEN common-cmds.h > CC perf-read-vdso32 > CC dlfilters/dlfilter-test-api-v0.o > CC dlfilters/dlfilter-show-cycles.o > CC jvmti/libjvmti.o > CC jvmti/jvmti_agent.o > CC jvmti/libstring.o > CC jvmti/libctype.o > CC ui/gtk/browser.o > CC ui/gtk/hists.o > CC ui/gtk/setup.o > CC ui/gtk/util.o > CC ui/gtk/helpline.o > CC ui/gtk/progress.o > CC ui/gtk/annotate.o > LINK dlfilters/dlfilter-show-cycles.so > CC ui/gtk/zalloc.o > LINK dlfilters/dlfilter-test-api-v0.so > INSTALL headers > CC /var/home/acme/git/perf/tools/perf/libsubcmd/exec-cmd.o > CC /var/home/acme/git/perf/tools/perf/libsubcmd/help.o > CC /var/home/acme/git/perf/tools/perf/libsubcmd/pager.o > CC /var/home/acme/git/perf/tools/perf/libsubcmd/parse-options.o > CC /var/home/acme/git/perf/tools/perf/libsubcmd/run-command.o > CC /var/home/acme/git/perf/tools/perf/libsubcmd/sigchain.o > CC /var/home/acme/git/perf/tools/perf/libsubcmd/subcmd-config.o > LD jvmti/jvmti-in.o > INSTALL headers > In file included from ui/gtk/hists.c:2: > /var/home/acme/git/perf/tools/perf/util/include/../evlist.h:9:10: fatal error: api/fd/array.h: No such file or directory > 9 | #include <api/fd/array.h> > | ^~~~~~~~~~~~~~~~ > compilation terminated. > make[6]: *** [/var/home/acme/git/perf/tools/build/Makefile.build:97: ui/gtk/hists.o] Error 1 > make[6]: *** Waiting for unfinished jobs.... > In file included from ui/gtk/browser.c:2: > /var/home/acme/git/perf/tools/perf/util/include/../evsel.h:10:10: fatal error: internal/evsel.h: No such file or directory > 10 | #include <internal/evsel.h> > | ^~~~~~~~~~~~~~~~~~ > compilation terminated. > make[6]: *** [/var/home/acme/git/perf/tools/build/Makefile.build:97: ui/gtk/browser.o] Error 1 > make -f /var/home/acme/git/perf/tools/build/Makefile.build dir=. obj=libsymbol V=1 > CC /var/home/acme/git/perf/tools/perf/libtraceevent/event-parse.o > CC /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_jbd2.o > CC /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_hrtimer.o > INSTALL headers > CC /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_kmem.o > CC /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_kvm.o > CC /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_mac80211.o > CC /var/home/acme/git/perf/tools/perf/libperf/core.o > CC /var/home/acme/git/perf/tools/perf/libperf/cpumap.o > CC /var/home/acme/git/perf/tools/perf/libperf/threadmap.o > INSTALL headers > gcc -Wp,-MD,/var/home/acme/git/perf/tools/perf/libsymbol/.kallsyms.o.d -Wp,-MT,/var/home/acme/git/perf/tools/perf/libsymbol/kallsyms.o -Wbad-function-cast -Wdeclaration-after-statement -Wformat-security -Wformat-y2k -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-system-headers -Wold-style-definition -Wpacked -Wredundant-decls -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wwrite-strings -Wformat -Wno-type-limits -Wstrict-aliasing=3 -Wshadow -ggdb3 -Wall -Wextra -std=gnu11 -U_FORTIFY_SOURCE -fPIC -Werror -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/var/home/acme/git/perf/tools/lib -I/var/home/acme/git/perf/tools/include -D"BUILD_STR(s)=#s" -c -o /var/home/acme/git/perf/tools/perf/libsymbol/kallsyms.o kallsyms.c > CC /var/home/acme/git/perf/tools/perf/libperf/evsel.o > LINK libperf-jvmti.so > CC /var/home/acme/git/perf/tools/perf/libperf/evlist.o > CC /var/home/acme/git/perf/tools/perf/libperf/mmap.o > MKDIR /var/home/acme/git/perf/tools/perf/libapi/fd/ > LD /var/home/acme/git/perf/tools/perf/libsubcmd/libsubcmd-in.o > PERF_VERSION = 6.1.rc5.g0a1e208afdcc > CC /var/home/acme/git/perf/tools/perf/libperf/zalloc.o > LD /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_jbd2-in.o > CC /var/home/acme/git/perf/tools/perf/libperf/xyarray.o > LD /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_hrtimer-in.o > CC /var/home/acme/git/perf/tools/perf/libapi/fd/array.o > GEN /var/home/acme/git/perf/tools/perf/libbpf/bpf_helper_defs.h > LD /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_kmem-in.o > LD /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_mac80211-in.o > LD /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_kvm-in.o > INSTALL /var/home/acme/git/perf/tools/perf/libbpf/include/bpf/bpf.h > Looks like the GTK part of the build isn't depending on the prepare step. I'll take a look. Thanks, Ian ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/1] Fix perf tools/lib includes 2022-11-16 16:45 ` Ian Rogers @ 2022-11-16 16:47 ` Ian Rogers 2022-11-16 17:21 ` Arnaldo Carvalho de Melo 2022-11-16 17:41 ` Arnaldo Carvalho de Melo 0 siblings, 2 replies; 8+ messages in thread From: Ian Rogers @ 2022-11-16 16:47 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim, Masahiro Yamada, Nicolas Schier, linux-kernel, linux-perf-users, bpf, Nick Desaulniers, Andrii Nakryiko, Stephane Eranian On Wed, Nov 16, 2022 at 8:45 AM Ian Rogers <irogers@google.com> wrote: > > On Wed, Nov 16, 2022 at 7:23 AM Arnaldo Carvalho de Melo > <acme@kernel.org> wrote: > > > > Em Wed, Nov 16, 2022 at 12:19:27PM -0300, Arnaldo Carvalho de Melo escreveu: > > > Em Tue, Nov 15, 2022 at 11:22:10PM -0800, Ian Rogers escreveu: > > > > This patch replaces the last on kernel/git/acme/linux.git branch > > > > perf/tools-libs-includes and fixes the race issue by using the prepare > > > > dependency. pmu-events.c needs this dependency too, as the header > > > > files it includes also include libperf - using perpare as a dependency > > > > rather than $(LIBPERF) is more consistent with the rest of the makefile. > > > > > > > > Ian Rogers (1): > > > > perf build: Use tools/lib headers from install path > > > > > > Testing. > > > > ⬢[acme@toolbox perf]$ git log acme/perf/core.. --oneline > > 0a1e208afdccce71 (HEAD -> perf/tools-libs-includes) perf build: Use tools/lib headers from install path > > 17ca352f2aff834e perf cpumap: Tidy libperf includes > > fd3f518fc1140622 perf thread_map: Reduce exposure of libperf internal API > > bd560973c5d3b2a3 perf expr: Tidy hashmap dependency > > 84bec6f0b31fb2ac perf build: Install libsymbol locally when building > > 160be157eaba2a37 tool lib symbol: Add Makefile/Build > > a6e8caf5db2e1db8 tools lib perf: Add missing install headers > > 8d1f68bd76a6517c tools lib api: Add missing install headers > > ef019df01e207971 perf build: Install libtraceevent locally when building > > 91009a3a9913f275 perf build: Install libperf locally when building > > 00314c9bca8faad4 perf build: Install libapi locally when building > > 911920b06e6be3fa perf build: Install libsubcmd locally when building > > 630ae80ea1dd2536 tools lib subcmd: Add install target > > a6efaa2c89bf35c3 tools lib api: Add install target > > ⬢[acme@toolbox perf]$ > > > > ⬢[acme@toolbox perf]$ git show > > commit 0a1e208afdccce7193cbe4031dfd255c89c425d6 > > Author: Ian Rogers <irogers@google.com> > > Date: Tue Nov 15 23:22:11 2022 -0800 > > > > perf build: Use tools/lib headers from install path > > > > Switch -I from tools/lib to the install path for the tools/lib > > libraries. Add the include_headers build targets to prepare target, as > > well as pmu-events.c compilation that dependes on libperf. > > > > Signed-off-by: Ian Rogers <irogers@google.com> > > Acked-by: Namhyung Kim <namhyung@kernel.org> > > Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> > > Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com> > > Cc: Jiri Olsa <jolsa@kernel.org> > > Cc: Mark Rutland <mark.rutland@arm.com> > > Cc: Masahiro Yamada <masahiroy@kernel.org> > > Cc: Nick Desaulniers <ndesaulniers@google.com> > > Cc: Nicolas Schier <nicolas@fjasle.eu> > > Cc: Peter Zijlstra <peterz@infradead.org> > > Cc: Stephane Eranian <eranian@google.com> > > Cc: bpf@vger.kernel.org > > Link: http://lore.kernel.org/lkml/20221109184914.1357295-15-irogers@google.com > > Link: http://lore.kernel.org/lkml/20221116072211.2837834-2-irogers@google.com > > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> > > > > diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config > > index a7f6c0669fae4d24..9cc3c48f32881c8b 100644 > > --- a/tools/perf/Makefile.config > > +++ b/tools/perf/Makefile.config > > @@ -349,7 +349,6 @@ ifeq ($(DEBUG),0) > > endif > > endif > > > > -INC_FLAGS += -I$(srctree)/tools/lib/perf/include > > INC_FLAGS += -I$(src-perf)/util/include > > INC_FLAGS += -I$(src-perf)/arch/$(SRCARCH)/include > > INC_FLAGS += -I$(srctree)/tools/include/ > > @@ -367,7 +366,6 @@ endif > > > > INC_FLAGS += -I$(src-perf)/util > > INC_FLAGS += -I$(src-perf) > > -INC_FLAGS += -I$(srctree)/tools/lib/ > > > > CORE_CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE > > > > diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf > > index 6c1a2a3ccc38195f..dd096aba4430e3e4 100644 > > --- a/tools/perf/Makefile.perf > > +++ b/tools/perf/Makefile.perf > > @@ -305,6 +305,7 @@ LIBTRACEEVENT_INCLUDE = $(LIBTRACEEVENT_DESTDIR)/include > > LIBTRACEEVENT = $(LIBTRACEEVENT_OUTPUT)/libtraceevent.a > > export LIBTRACEEVENT > > LIBTRACEEVENT_DYNAMIC_LIST = $(LIBTRACEEVENT_PLUGINS_OUTPUT)/libtraceevent-dynamic-list > > +CFLAGS += -I$(LIBTRACEEVENT_OUTPUT)/include > > > > # > > # The static build has no dynsym table, so this does not work for > > @@ -322,6 +323,7 @@ LIBAPI_DESTDIR = $(LIBAPI_OUTPUT) > > LIBAPI_INCLUDE = $(LIBAPI_DESTDIR)/include > > LIBAPI = $(LIBAPI_OUTPUT)/libapi.a > > export LIBAPI > > +CFLAGS += -I$(LIBAPI_OUTPUT)/include > > > > ifneq ($(OUTPUT),) > > LIBBPF_OUTPUT = $(abspath $(OUTPUT))/libbpf > > @@ -331,6 +333,7 @@ endif > > LIBBPF_DESTDIR = $(LIBBPF_OUTPUT) > > LIBBPF_INCLUDE = $(LIBBPF_DESTDIR)/include > > LIBBPF = $(LIBBPF_OUTPUT)/libbpf.a > > +CFLAGS += -I$(LIBBPF_OUTPUT)/include > > > > ifneq ($(OUTPUT),) > > LIBSUBCMD_OUTPUT = $(abspath $(OUTPUT))/libsubcmd > > @@ -340,6 +343,7 @@ endif > > LIBSUBCMD_DESTDIR = $(LIBSUBCMD_OUTPUT) > > LIBSUBCMD_INCLUDE = $(LIBSUBCMD_DESTDIR)/include > > LIBSUBCMD = $(LIBSUBCMD_OUTPUT)/libsubcmd.a > > +CFLAGS += -I$(LIBSUBCMD_OUTPUT)/include > > > > ifneq ($(OUTPUT),) > > LIBSYMBOL_OUTPUT = $(abspath $(OUTPUT))/libsymbol > > @@ -349,6 +353,7 @@ endif > > LIBSYMBOL_DESTDIR = $(LIBSYMBOL_OUTPUT) > > LIBSYMBOL_INCLUDE = $(LIBSYMBOL_DESTDIR)/include > > LIBSYMBOL = $(LIBSYMBOL_OUTPUT)/libsymbol.a > > +CFLAGS += -I$(LIBSYMBOL_OUTPUT)/include > > > > ifneq ($(OUTPUT),) > > LIBPERF_OUTPUT = $(abspath $(OUTPUT))/libperf > > @@ -359,6 +364,7 @@ LIBPERF_DESTDIR = $(LIBPERF_OUTPUT) > > LIBPERF_INCLUDE = $(LIBPERF_DESTDIR)/include > > LIBPERF = $(LIBPERF_OUTPUT)/libperf.a > > export LIBPERF > > +CFLAGS += -I$(LIBPERF_OUTPUT)/include > > > > # python extension build directories > > PYTHON_EXTBUILD := $(OUTPUT)python_ext_build/ > > @@ -691,7 +697,7 @@ build := -f $(srctree)/tools/build/Makefile.build dir=. obj > > $(PERF_IN): prepare FORCE > > $(Q)$(MAKE) $(build)=perf > > > > -$(PMU_EVENTS_IN): FORCE > > +$(PMU_EVENTS_IN): FORCE prepare > > $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=pmu-events obj=pmu-events > > > > $(OUTPUT)perf: $(PERFLIBS) $(PERF_IN) $(PMU_EVENTS_IN) $(LIBTRACEEVENT_DYNAMIC_LIST) > > @@ -774,6 +780,12 @@ prepare: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h archheaders $(drm_ioc > > $(rename_flags_array) \ > > $(arch_errno_name_array) \ > > $(sync_file_range_arrays) \ > > + $(LIBAPI) \ > > + $(LIBBPF) \ > > + $(LIBPERF) \ > > + $(LIBSUBCMD) \ > > + $(LIBSYMBOL) \ > > + $(LIBTRACEEVENT) \ > > bpf-skel > > > > $(OUTPUT)%.o: %.c prepare FORCE > > > > ⬢[acme@toolbox perf]$ git log --oneline -1 ; time make -C tools/perf build-test > > 0a1e208afdccce71 (HEAD -> perf/tools-libs-includes) perf build: Use tools/lib headers from install path > > make: Entering directory '/var/home/acme/git/perf/tools/perf' > > - tarpkg: ./tests/perf-targz-src-pkg . > > make_static: cd . && make LDFLAGS=-static NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 NO_JVMTI=1 -j32 DESTDIR=/tmp/tmp.YueDE1rSyh > > make_with_gtk2: cd . && make GTK2=1 -j32 DESTDIR=/tmp/tmp.YuHTyobvdL > > cd . && make GTK2=1 -j32 DESTDIR=/tmp/tmp.YuHTyobvdL > > BUILD: Doing 'make -j32' parallel build > > HOSTCC fixdep.o > > HOSTLD fixdep-in.o > > LINK fixdep > > Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/perf_regs.h' differs from latest version at 'arch/arm64/include/uapi/asm/perf_regs.h' > > diff -u tools/arch/arm64/include/uapi/asm/perf_regs.h arch/arm64/include/uapi/asm/perf_regs.h > > Warning: Kernel ABI header at 'tools/arch/arm64/include/asm/cputype.h' differs from latest version at 'arch/arm64/include/asm/cputype.h' > > diff -u tools/arch/arm64/include/asm/cputype.h arch/arm64/include/asm/cputype.h > > Warning: Kernel ABI header at 'tools/perf/arch/powerpc/entry/syscalls/syscall.tbl' differs from latest version at 'arch/powerpc/kernel/syscalls/syscall.tbl' > > diff -u tools/perf/arch/powerpc/entry/syscalls/syscall.tbl arch/powerpc/kernel/syscalls/syscall.tbl > > > > Auto-detecting system features: > > ... dwarf: [ on ] > > ... dwarf_getlocations: [ on ] > > ... glibc: [ on ] > > ... libbfd: [ on ] > > ... libbfd-buildid: [ on ] > > ... libcap: [ on ] > > ... libelf: [ on ] > > ... libnuma: [ on ] > > ... numa_num_possible_cpus: [ on ] > > ... libperl: [ on ] > > ... libpython: [ on ] > > ... libcrypto: [ on ] > > ... libunwind: [ on ] > > ... libdw-dwarf-unwind: [ on ] > > ... zlib: [ on ] > > ... lzma: [ on ] > > ... get_cpuid: [ on ] > > ... bpf: [ on ] > > ... libaio: [ on ] > > ... libzstd: [ on ] > > > > GEN common-cmds.h > > CC perf-read-vdso32 > > CC dlfilters/dlfilter-test-api-v0.o > > CC dlfilters/dlfilter-show-cycles.o > > CC jvmti/libjvmti.o > > CC jvmti/jvmti_agent.o > > CC jvmti/libstring.o > > CC jvmti/libctype.o > > CC ui/gtk/browser.o > > CC ui/gtk/hists.o > > CC ui/gtk/setup.o > > CC ui/gtk/util.o > > CC ui/gtk/helpline.o > > CC ui/gtk/progress.o > > CC ui/gtk/annotate.o > > LINK dlfilters/dlfilter-show-cycles.so > > CC ui/gtk/zalloc.o > > LINK dlfilters/dlfilter-test-api-v0.so > > INSTALL headers > > CC /var/home/acme/git/perf/tools/perf/libsubcmd/exec-cmd.o > > CC /var/home/acme/git/perf/tools/perf/libsubcmd/help.o > > CC /var/home/acme/git/perf/tools/perf/libsubcmd/pager.o > > CC /var/home/acme/git/perf/tools/perf/libsubcmd/parse-options.o > > CC /var/home/acme/git/perf/tools/perf/libsubcmd/run-command.o > > CC /var/home/acme/git/perf/tools/perf/libsubcmd/sigchain.o > > CC /var/home/acme/git/perf/tools/perf/libsubcmd/subcmd-config.o > > LD jvmti/jvmti-in.o > > INSTALL headers > > In file included from ui/gtk/hists.c:2: > > /var/home/acme/git/perf/tools/perf/util/include/../evlist.h:9:10: fatal error: api/fd/array.h: No such file or directory > > 9 | #include <api/fd/array.h> > > | ^~~~~~~~~~~~~~~~ > > compilation terminated. > > make[6]: *** [/var/home/acme/git/perf/tools/build/Makefile.build:97: ui/gtk/hists.o] Error 1 > > make[6]: *** Waiting for unfinished jobs.... > > In file included from ui/gtk/browser.c:2: > > /var/home/acme/git/perf/tools/perf/util/include/../evsel.h:10:10: fatal error: internal/evsel.h: No such file or directory > > 10 | #include <internal/evsel.h> > > | ^~~~~~~~~~~~~~~~~~ > > compilation terminated. > > make[6]: *** [/var/home/acme/git/perf/tools/build/Makefile.build:97: ui/gtk/browser.o] Error 1 > > make -f /var/home/acme/git/perf/tools/build/Makefile.build dir=. obj=libsymbol V=1 > > CC /var/home/acme/git/perf/tools/perf/libtraceevent/event-parse.o > > CC /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_jbd2.o > > CC /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_hrtimer.o > > INSTALL headers > > CC /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_kmem.o > > CC /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_kvm.o > > CC /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_mac80211.o > > CC /var/home/acme/git/perf/tools/perf/libperf/core.o > > CC /var/home/acme/git/perf/tools/perf/libperf/cpumap.o > > CC /var/home/acme/git/perf/tools/perf/libperf/threadmap.o > > INSTALL headers > > gcc -Wp,-MD,/var/home/acme/git/perf/tools/perf/libsymbol/.kallsyms.o.d -Wp,-MT,/var/home/acme/git/perf/tools/perf/libsymbol/kallsyms.o -Wbad-function-cast -Wdeclaration-after-statement -Wformat-security -Wformat-y2k -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-system-headers -Wold-style-definition -Wpacked -Wredundant-decls -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wwrite-strings -Wformat -Wno-type-limits -Wstrict-aliasing=3 -Wshadow -ggdb3 -Wall -Wextra -std=gnu11 -U_FORTIFY_SOURCE -fPIC -Werror -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/var/home/acme/git/perf/tools/lib -I/var/home/acme/git/perf/tools/include -D"BUILD_STR(s)=#s" -c -o /var/home/acme/git/perf/tools/perf/libsymbol/kallsyms.o kallsyms.c > > CC /var/home/acme/git/perf/tools/perf/libperf/evsel.o > > LINK libperf-jvmti.so > > CC /var/home/acme/git/perf/tools/perf/libperf/evlist.o > > CC /var/home/acme/git/perf/tools/perf/libperf/mmap.o > > MKDIR /var/home/acme/git/perf/tools/perf/libapi/fd/ > > LD /var/home/acme/git/perf/tools/perf/libsubcmd/libsubcmd-in.o > > PERF_VERSION = 6.1.rc5.g0a1e208afdcc > > CC /var/home/acme/git/perf/tools/perf/libperf/zalloc.o > > LD /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_jbd2-in.o > > CC /var/home/acme/git/perf/tools/perf/libperf/xyarray.o > > LD /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_hrtimer-in.o > > CC /var/home/acme/git/perf/tools/perf/libapi/fd/array.o > > GEN /var/home/acme/git/perf/tools/perf/libbpf/bpf_helper_defs.h > > LD /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_kmem-in.o > > LD /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_mac80211-in.o > > LD /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_kvm-in.o > > INSTALL /var/home/acme/git/perf/tools/perf/libbpf/include/bpf/bpf.h > > > > Looks like the GTK part of the build isn't depending on the prepare > step. I'll take a look. > > Thanks, > Ian Yep. The target: $(GTK_IN): FORCE should be: $(GTK_IN): FORCE prepare Could you try this, or do you want me to resend? Thanks, Ian ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/1] Fix perf tools/lib includes 2022-11-16 16:47 ` Ian Rogers @ 2022-11-16 17:21 ` Arnaldo Carvalho de Melo 2022-11-16 17:41 ` Arnaldo Carvalho de Melo 1 sibling, 0 replies; 8+ messages in thread From: Arnaldo Carvalho de Melo @ 2022-11-16 17:21 UTC (permalink / raw) To: Ian Rogers Cc: Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim, Masahiro Yamada, Nicolas Schier, linux-kernel, linux-perf-users, bpf, Nick Desaulniers, Andrii Nakryiko, Stephane Eranian Em Wed, Nov 16, 2022 at 08:47:51AM -0800, Ian Rogers escreveu: > On Wed, Nov 16, 2022 at 8:45 AM Ian Rogers <irogers@google.com> wrote: > > > > On Wed, Nov 16, 2022 at 7:23 AM Arnaldo Carvalho de Melo > > <acme@kernel.org> wrote: > > > > > > Em Wed, Nov 16, 2022 at 12:19:27PM -0300, Arnaldo Carvalho de Melo escreveu: > > > > Em Tue, Nov 15, 2022 at 11:22:10PM -0800, Ian Rogers escreveu: > > > > > This patch replaces the last on kernel/git/acme/linux.git branch > > > > > perf/tools-libs-includes and fixes the race issue by using the prepare > > > > > dependency. pmu-events.c needs this dependency too, as the header > > > > > files it includes also include libperf - using perpare as a dependency > > > > > rather than $(LIBPERF) is more consistent with the rest of the makefile. > > > > > > > > > > Ian Rogers (1): > > > > > perf build: Use tools/lib headers from install path > > > > > > > > Testing. > > > > > > ⬢[acme@toolbox perf]$ git log acme/perf/core.. --oneline > > > 0a1e208afdccce71 (HEAD -> perf/tools-libs-includes) perf build: Use tools/lib headers from install path > > > 17ca352f2aff834e perf cpumap: Tidy libperf includes > > > fd3f518fc1140622 perf thread_map: Reduce exposure of libperf internal API > > > bd560973c5d3b2a3 perf expr: Tidy hashmap dependency > > > 84bec6f0b31fb2ac perf build: Install libsymbol locally when building > > > 160be157eaba2a37 tool lib symbol: Add Makefile/Build > > > a6e8caf5db2e1db8 tools lib perf: Add missing install headers > > > 8d1f68bd76a6517c tools lib api: Add missing install headers > > > ef019df01e207971 perf build: Install libtraceevent locally when building > > > 91009a3a9913f275 perf build: Install libperf locally when building > > > 00314c9bca8faad4 perf build: Install libapi locally when building > > > 911920b06e6be3fa perf build: Install libsubcmd locally when building > > > 630ae80ea1dd2536 tools lib subcmd: Add install target > > > a6efaa2c89bf35c3 tools lib api: Add install target > > > ⬢[acme@toolbox perf]$ > > > > > > ⬢[acme@toolbox perf]$ git show > > > commit 0a1e208afdccce7193cbe4031dfd255c89c425d6 > > > Author: Ian Rogers <irogers@google.com> > > > Date: Tue Nov 15 23:22:11 2022 -0800 > > > > > > perf build: Use tools/lib headers from install path > > > > > > Switch -I from tools/lib to the install path for the tools/lib > > > libraries. Add the include_headers build targets to prepare target, as > > > well as pmu-events.c compilation that dependes on libperf. > > > > > > Signed-off-by: Ian Rogers <irogers@google.com> > > > Acked-by: Namhyung Kim <namhyung@kernel.org> > > > Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> > > > Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com> > > > Cc: Jiri Olsa <jolsa@kernel.org> > > > Cc: Mark Rutland <mark.rutland@arm.com> > > > Cc: Masahiro Yamada <masahiroy@kernel.org> > > > Cc: Nick Desaulniers <ndesaulniers@google.com> > > > Cc: Nicolas Schier <nicolas@fjasle.eu> > > > Cc: Peter Zijlstra <peterz@infradead.org> > > > Cc: Stephane Eranian <eranian@google.com> > > > Cc: bpf@vger.kernel.org > > > Link: http://lore.kernel.org/lkml/20221109184914.1357295-15-irogers@google.com > > > Link: http://lore.kernel.org/lkml/20221116072211.2837834-2-irogers@google.com > > > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> > > > > > > diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config > > > index a7f6c0669fae4d24..9cc3c48f32881c8b 100644 > > > --- a/tools/perf/Makefile.config > > > +++ b/tools/perf/Makefile.config > > > @@ -349,7 +349,6 @@ ifeq ($(DEBUG),0) > > > endif > > > endif > > > > > > -INC_FLAGS += -I$(srctree)/tools/lib/perf/include > > > INC_FLAGS += -I$(src-perf)/util/include > > > INC_FLAGS += -I$(src-perf)/arch/$(SRCARCH)/include > > > INC_FLAGS += -I$(srctree)/tools/include/ > > > @@ -367,7 +366,6 @@ endif > > > > > > INC_FLAGS += -I$(src-perf)/util > > > INC_FLAGS += -I$(src-perf) > > > -INC_FLAGS += -I$(srctree)/tools/lib/ > > > > > > CORE_CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE > > > > > > diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf > > > index 6c1a2a3ccc38195f..dd096aba4430e3e4 100644 > > > --- a/tools/perf/Makefile.perf > > > +++ b/tools/perf/Makefile.perf > > > @@ -305,6 +305,7 @@ LIBTRACEEVENT_INCLUDE = $(LIBTRACEEVENT_DESTDIR)/include > > > LIBTRACEEVENT = $(LIBTRACEEVENT_OUTPUT)/libtraceevent.a > > > export LIBTRACEEVENT > > > LIBTRACEEVENT_DYNAMIC_LIST = $(LIBTRACEEVENT_PLUGINS_OUTPUT)/libtraceevent-dynamic-list > > > +CFLAGS += -I$(LIBTRACEEVENT_OUTPUT)/include > > > > > > # > > > # The static build has no dynsym table, so this does not work for > > > @@ -322,6 +323,7 @@ LIBAPI_DESTDIR = $(LIBAPI_OUTPUT) > > > LIBAPI_INCLUDE = $(LIBAPI_DESTDIR)/include > > > LIBAPI = $(LIBAPI_OUTPUT)/libapi.a > > > export LIBAPI > > > +CFLAGS += -I$(LIBAPI_OUTPUT)/include > > > > > > ifneq ($(OUTPUT),) > > > LIBBPF_OUTPUT = $(abspath $(OUTPUT))/libbpf > > > @@ -331,6 +333,7 @@ endif > > > LIBBPF_DESTDIR = $(LIBBPF_OUTPUT) > > > LIBBPF_INCLUDE = $(LIBBPF_DESTDIR)/include > > > LIBBPF = $(LIBBPF_OUTPUT)/libbpf.a > > > +CFLAGS += -I$(LIBBPF_OUTPUT)/include > > > > > > ifneq ($(OUTPUT),) > > > LIBSUBCMD_OUTPUT = $(abspath $(OUTPUT))/libsubcmd > > > @@ -340,6 +343,7 @@ endif > > > LIBSUBCMD_DESTDIR = $(LIBSUBCMD_OUTPUT) > > > LIBSUBCMD_INCLUDE = $(LIBSUBCMD_DESTDIR)/include > > > LIBSUBCMD = $(LIBSUBCMD_OUTPUT)/libsubcmd.a > > > +CFLAGS += -I$(LIBSUBCMD_OUTPUT)/include > > > > > > ifneq ($(OUTPUT),) > > > LIBSYMBOL_OUTPUT = $(abspath $(OUTPUT))/libsymbol > > > @@ -349,6 +353,7 @@ endif > > > LIBSYMBOL_DESTDIR = $(LIBSYMBOL_OUTPUT) > > > LIBSYMBOL_INCLUDE = $(LIBSYMBOL_DESTDIR)/include > > > LIBSYMBOL = $(LIBSYMBOL_OUTPUT)/libsymbol.a > > > +CFLAGS += -I$(LIBSYMBOL_OUTPUT)/include > > > > > > ifneq ($(OUTPUT),) > > > LIBPERF_OUTPUT = $(abspath $(OUTPUT))/libperf > > > @@ -359,6 +364,7 @@ LIBPERF_DESTDIR = $(LIBPERF_OUTPUT) > > > LIBPERF_INCLUDE = $(LIBPERF_DESTDIR)/include > > > LIBPERF = $(LIBPERF_OUTPUT)/libperf.a > > > export LIBPERF > > > +CFLAGS += -I$(LIBPERF_OUTPUT)/include > > > > > > # python extension build directories > > > PYTHON_EXTBUILD := $(OUTPUT)python_ext_build/ > > > @@ -691,7 +697,7 @@ build := -f $(srctree)/tools/build/Makefile.build dir=. obj > > > $(PERF_IN): prepare FORCE > > > $(Q)$(MAKE) $(build)=perf > > > > > > -$(PMU_EVENTS_IN): FORCE > > > +$(PMU_EVENTS_IN): FORCE prepare > > > $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=pmu-events obj=pmu-events > > > > > > $(OUTPUT)perf: $(PERFLIBS) $(PERF_IN) $(PMU_EVENTS_IN) $(LIBTRACEEVENT_DYNAMIC_LIST) > > > @@ -774,6 +780,12 @@ prepare: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h archheaders $(drm_ioc > > > $(rename_flags_array) \ > > > $(arch_errno_name_array) \ > > > $(sync_file_range_arrays) \ > > > + $(LIBAPI) \ > > > + $(LIBBPF) \ > > > + $(LIBPERF) \ > > > + $(LIBSUBCMD) \ > > > + $(LIBSYMBOL) \ > > > + $(LIBTRACEEVENT) \ > > > bpf-skel > > > > > > $(OUTPUT)%.o: %.c prepare FORCE > > > > > > ⬢[acme@toolbox perf]$ git log --oneline -1 ; time make -C tools/perf build-test > > > 0a1e208afdccce71 (HEAD -> perf/tools-libs-includes) perf build: Use tools/lib headers from install path > > > make: Entering directory '/var/home/acme/git/perf/tools/perf' > > > - tarpkg: ./tests/perf-targz-src-pkg . > > > make_static: cd . && make LDFLAGS=-static NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 NO_JVMTI=1 -j32 DESTDIR=/tmp/tmp.YueDE1rSyh > > > make_with_gtk2: cd . && make GTK2=1 -j32 DESTDIR=/tmp/tmp.YuHTyobvdL > > > cd . && make GTK2=1 -j32 DESTDIR=/tmp/tmp.YuHTyobvdL > > > BUILD: Doing 'make -j32' parallel build > > > HOSTCC fixdep.o > > > HOSTLD fixdep-in.o > > > LINK fixdep > > > Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/perf_regs.h' differs from latest version at 'arch/arm64/include/uapi/asm/perf_regs.h' > > > diff -u tools/arch/arm64/include/uapi/asm/perf_regs.h arch/arm64/include/uapi/asm/perf_regs.h > > > Warning: Kernel ABI header at 'tools/arch/arm64/include/asm/cputype.h' differs from latest version at 'arch/arm64/include/asm/cputype.h' > > > diff -u tools/arch/arm64/include/asm/cputype.h arch/arm64/include/asm/cputype.h > > > Warning: Kernel ABI header at 'tools/perf/arch/powerpc/entry/syscalls/syscall.tbl' differs from latest version at 'arch/powerpc/kernel/syscalls/syscall.tbl' > > > diff -u tools/perf/arch/powerpc/entry/syscalls/syscall.tbl arch/powerpc/kernel/syscalls/syscall.tbl > > > > > > Auto-detecting system features: > > > ... dwarf: [ on ] > > > ... dwarf_getlocations: [ on ] > > > ... glibc: [ on ] > > > ... libbfd: [ on ] > > > ... libbfd-buildid: [ on ] > > > ... libcap: [ on ] > > > ... libelf: [ on ] > > > ... libnuma: [ on ] > > > ... numa_num_possible_cpus: [ on ] > > > ... libperl: [ on ] > > > ... libpython: [ on ] > > > ... libcrypto: [ on ] > > > ... libunwind: [ on ] > > > ... libdw-dwarf-unwind: [ on ] > > > ... zlib: [ on ] > > > ... lzma: [ on ] > > > ... get_cpuid: [ on ] > > > ... bpf: [ on ] > > > ... libaio: [ on ] > > > ... libzstd: [ on ] > > > > > > GEN common-cmds.h > > > CC perf-read-vdso32 > > > CC dlfilters/dlfilter-test-api-v0.o > > > CC dlfilters/dlfilter-show-cycles.o > > > CC jvmti/libjvmti.o > > > CC jvmti/jvmti_agent.o > > > CC jvmti/libstring.o > > > CC jvmti/libctype.o > > > CC ui/gtk/browser.o > > > CC ui/gtk/hists.o > > > CC ui/gtk/setup.o > > > CC ui/gtk/util.o > > > CC ui/gtk/helpline.o > > > CC ui/gtk/progress.o > > > CC ui/gtk/annotate.o > > > LINK dlfilters/dlfilter-show-cycles.so > > > CC ui/gtk/zalloc.o > > > LINK dlfilters/dlfilter-test-api-v0.so > > > INSTALL headers > > > CC /var/home/acme/git/perf/tools/perf/libsubcmd/exec-cmd.o > > > CC /var/home/acme/git/perf/tools/perf/libsubcmd/help.o > > > CC /var/home/acme/git/perf/tools/perf/libsubcmd/pager.o > > > CC /var/home/acme/git/perf/tools/perf/libsubcmd/parse-options.o > > > CC /var/home/acme/git/perf/tools/perf/libsubcmd/run-command.o > > > CC /var/home/acme/git/perf/tools/perf/libsubcmd/sigchain.o > > > CC /var/home/acme/git/perf/tools/perf/libsubcmd/subcmd-config.o > > > LD jvmti/jvmti-in.o > > > INSTALL headers > > > In file included from ui/gtk/hists.c:2: > > > /var/home/acme/git/perf/tools/perf/util/include/../evlist.h:9:10: fatal error: api/fd/array.h: No such file or directory > > > 9 | #include <api/fd/array.h> > > > | ^~~~~~~~~~~~~~~~ > > > compilation terminated. > > > make[6]: *** [/var/home/acme/git/perf/tools/build/Makefile.build:97: ui/gtk/hists.o] Error 1 > > > make[6]: *** Waiting for unfinished jobs.... > > > In file included from ui/gtk/browser.c:2: > > > /var/home/acme/git/perf/tools/perf/util/include/../evsel.h:10:10: fatal error: internal/evsel.h: No such file or directory > > > 10 | #include <internal/evsel.h> > > > | ^~~~~~~~~~~~~~~~~~ > > > compilation terminated. > > > make[6]: *** [/var/home/acme/git/perf/tools/build/Makefile.build:97: ui/gtk/browser.o] Error 1 > > > make -f /var/home/acme/git/perf/tools/build/Makefile.build dir=. obj=libsymbol V=1 > > > CC /var/home/acme/git/perf/tools/perf/libtraceevent/event-parse.o > > > CC /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_jbd2.o > > > CC /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_hrtimer.o > > > INSTALL headers > > > CC /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_kmem.o > > > CC /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_kvm.o > > > CC /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_mac80211.o > > > CC /var/home/acme/git/perf/tools/perf/libperf/core.o > > > CC /var/home/acme/git/perf/tools/perf/libperf/cpumap.o > > > CC /var/home/acme/git/perf/tools/perf/libperf/threadmap.o > > > INSTALL headers > > > gcc -Wp,-MD,/var/home/acme/git/perf/tools/perf/libsymbol/.kallsyms.o.d -Wp,-MT,/var/home/acme/git/perf/tools/perf/libsymbol/kallsyms.o -Wbad-function-cast -Wdeclaration-after-statement -Wformat-security -Wformat-y2k -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-system-headers -Wold-style-definition -Wpacked -Wredundant-decls -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wwrite-strings -Wformat -Wno-type-limits -Wstrict-aliasing=3 -Wshadow -ggdb3 -Wall -Wextra -std=gnu11 -U_FORTIFY_SOURCE -fPIC -Werror -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/var/home/acme/git/perf/tools/lib -I/var/home/acme/git/perf/tools/include -D"BUILD_STR(s)=#s" -c -o /var/home/acme/git/perf/tools/perf/libsymbol/kallsyms.o kallsyms.c > > > CC /var/home/acme/git/perf/tools/perf/libperf/evsel.o > > > LINK libperf-jvmti.so > > > CC /var/home/acme/git/perf/tools/perf/libperf/evlist.o > > > CC /var/home/acme/git/perf/tools/perf/libperf/mmap.o > > > MKDIR /var/home/acme/git/perf/tools/perf/libapi/fd/ > > > LD /var/home/acme/git/perf/tools/perf/libsubcmd/libsubcmd-in.o > > > PERF_VERSION = 6.1.rc5.g0a1e208afdcc > > > CC /var/home/acme/git/perf/tools/perf/libperf/zalloc.o > > > LD /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_jbd2-in.o > > > CC /var/home/acme/git/perf/tools/perf/libperf/xyarray.o > > > LD /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_hrtimer-in.o > > > CC /var/home/acme/git/perf/tools/perf/libapi/fd/array.o > > > GEN /var/home/acme/git/perf/tools/perf/libbpf/bpf_helper_defs.h > > > LD /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_kmem-in.o > > > LD /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_mac80211-in.o > > > LD /var/home/acme/git/perf/tools/perf/libtraceevent_plugins/plugin_kvm-in.o > > > INSTALL /var/home/acme/git/perf/tools/perf/libbpf/include/bpf/bpf.h > > > > > > > Looks like the GTK part of the build isn't depending on the prepare > > step. I'll take a look. > > > > Thanks, > > Ian > > Yep. The target: > > $(GTK_IN): FORCE > > should be: > > $(GTK_IN): FORCE prepare > > Could you try this, or do you want me to resend? I'll try it, thanks - Arnaldo ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/1] Fix perf tools/lib includes 2022-11-16 16:47 ` Ian Rogers 2022-11-16 17:21 ` Arnaldo Carvalho de Melo @ 2022-11-16 17:41 ` Arnaldo Carvalho de Melo 1 sibling, 0 replies; 8+ messages in thread From: Arnaldo Carvalho de Melo @ 2022-11-16 17:41 UTC (permalink / raw) To: Ian Rogers Cc: Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim, Masahiro Yamada, Nicolas Schier, linux-kernel, linux-perf-users, bpf, Nick Desaulniers, Andrii Nakryiko, Stephane Eranian Em Wed, Nov 16, 2022 at 08:47:51AM -0800, Ian Rogers escreveu: > On Wed, Nov 16, 2022 at 8:45 AM Ian Rogers <irogers@google.com> wrote: > > Looks like the GTK part of the build isn't depending on the prepare > > step. I'll take a look. > Yep. The target: > $(GTK_IN): FORCE > should be: > $(GTK_IN): FORCE prepare > Could you try this, or do you want me to resend? Trying it, so far so good: [perfbuilder@five ~]$ export BUILD_TARBALL=http://192.168.86.14/perf/perf-6.1.0-rc5.tar.xz [perfbuilder@five ~]$ time dm 1 197.40 almalinux:8 : Ok gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-4) , clang version 12.0.1 (Red Hat 12.0.1-4.module_el8.5.0+1025+93159d6c) 2 195.05 almalinux:9 : Ok gcc (GCC) 11.2.1 20220127 (Red Hat 11.2.1-9) , clang version 13.0.1 (Red Hat 13.0.1-1.el9) 3 160.09 alpine:3.12 : Ok gcc (Alpine 9.3.0) 9.3.0 , Alpine clang version 10.0.0 (https://gitlab.alpinelinux.org/alpine/aports.git 7445adce501f8473efdb93b17b5eaf2f1445ed4c) 4 151.66 alpine:3.13 : Ok gcc (Alpine 10.2.1_pre1) 10.2.1 20201203 , Alpine clang version 10.0.1 5 151.66 alpine:3.14 : Ok gcc (Alpine 10.3.1_git20210424) 10.3.1 20210424 , Alpine clang version 11.1.0 [perfbuilder@pumpkin ~]$ export BUILD_TARBALL=http://192.168.86.14/perf/perf-6.1.0-rc5.tar.xz [perfbuilder@pumpkin ~]$ time dm from fedora:24 22 40.30 fedora:24 : Ok gcc (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1) 23 2.64 fedora:24-x-ARC-uClibc : FAIL gcc version 7.1.1 20170710 (ARCompact ISA Linux uClibc toolchain 2017.09-rc2) libbpf.c:46:10: fatal error: libelf.h: No such file or directory #include <libelf.h> ^~~~~~~~~~ compilation terminated. 24 40.29 fedora:25 : Ok gcc (GCC) 6.4.1 20170727 (Red Hat 6.4.1-1) 25 42.61 fedora:26 : Ok gcc (GCC) 7.3.1 20180130 (Red Hat 7.3.1-2) 26 41.70 fedora:27 : Ok gcc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-6) 27 44.11 fedora:28 : Ok gcc (GCC) 8.3.1 20190223 (Red Hat 8.3.1-2) 28 46.22 fedora:29 : Ok gcc (GCC) 8.3.1 20190223 (Red Hat 8.3.1-2) 29 45.02 fedora:30 : Ok gcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2) 30 178.98 fedora:31 : Ok gcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2) , clang version 9.0.1 (Fedora 9.0.1-4.fc31) 31 159.04 fedora:32 : Ok gcc (GCC) 10.3.1 20210422 (Red Hat 10.3.1-1) , clang version 10.0.1 (Fedora 10.0.1-3.fc32) 32 178.60 fedora:33 : Ok gcc (GCC) 10.3.1 20210422 (Red Hat 10.3.1-1) , clang version 11.0.0 (Fedora 11.0.0-3.fc33) 33: fedora:34 ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-11-16 17:41 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-11-16 7:22 [PATCH 0/1] Fix perf tools/lib includes Ian Rogers 2022-11-16 7:22 ` [PATCH 1/1] perf build: Use tools/lib headers from install path Ian Rogers 2022-11-16 15:19 ` [PATCH 0/1] Fix perf tools/lib includes Arnaldo Carvalho de Melo 2022-11-16 15:23 ` Arnaldo Carvalho de Melo 2022-11-16 16:45 ` Ian Rogers 2022-11-16 16:47 ` Ian Rogers 2022-11-16 17:21 ` Arnaldo Carvalho de Melo 2022-11-16 17:41 ` Arnaldo Carvalho de Melo
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).