Re: [PATCH v5 2/4] perf: support build BPF skeletons with perf

From: Song Liu
Date: Mon Dec 28 2020 - 12:34:24 EST




> On Dec 28, 2020, at 4:55 AM, Jiri Olsa <jolsa@xxxxxxxxxx> wrote:
>
> On Tue, Dec 15, 2020 at 10:14:10AM -0800, Song Liu wrote:
>
> SNIP
>
>> HOSTCC ?= gcc
>> HOSTLD ?= ld
>> HOSTAR ?= ar
>> +CLANG ?= clang
>> +LLVM_STRIP ?= llvm-strip
>>
>> PKG_CONFIG = $(CROSS_COMPILE)pkg-config
>> LLVM_CONFIG ?= llvm-config
>> @@ -735,7 +739,8 @@ prepare: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h archheaders $(drm_ioc
>> $(x86_arch_prctl_code_array) \
>> $(rename_flags_array) \
>> $(arch_errno_name_array) \
>> - $(sync_file_range_arrays)
>> + $(sync_file_range_arrays) \
>> + bpf-skel
>>
>> $(OUTPUT)%.o: %.c prepare FORCE
>> $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@
>> @@ -1008,7 +1013,43 @@ config-clean:
>> python-clean:
>> $(python-clean)
>>
>> -clean:: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean $(LIBBPF)-clean $(LIBSUBCMD)-clean $(LIBPERF)-clean config-clean fixdep-clean python-clean
>> +SKEL_OUT := $(abspath $(OUTPUT)util/bpf_skel)
>> +SKEL_TMP_OUT := $(abspath $(SKEL_OUT)/.tmp)
>> +SKELETONS :=
>> +
>> +ifdef BUILD_BPF_SKEL
>> +BPFTOOL := $(SKEL_TMP_OUT)/bpftool-bootstrap
>
> I think this needs to be:
>
> BPFTOOL := $(SKEL_TMP_OUT)/bootstrap/bpftool
>
> otherwise it won't compile for me

Yeah, we need the new name. When I sent v5, the patch that renamed the bootstrap
bpftool was in bpf-next, but not in Arnaldo's perf/core.

I will send v6 with this change included.

Thanks,
Song