Re: [RFC 1/2] perf: support build BPF skeletons with perf

From: Song Liu
Date: Tue Nov 24 2020 - 18:54:52 EST




> On Nov 24, 2020, at 11:51 AM, Jiri Olsa <jolsa@xxxxxxxxxx> wrote:
>
> On Wed, Nov 18, 2020 at 08:50:45PM -0800, Song Liu wrote:
>
> SNIP
>
>> + $(Q)$(BPFTOOL) gen skeleton $< > $@
>> +
>> +$(TMP_OUTPUT)/%.bpf.o: %.bpf.c $(TMP_OUTPUT)/vmlinux.h $(BPFOBJ) | $(TMP_OUTPUT)
>> + $(call msg,BPF,$@)
>> + $(Q)$(CLANG) -g -O2 -target bpf $(INCLUDES) \
>> + -c $(filter %.c,$^) -o $@ && \
>> + $(LLVM_STRIP) -g $@
>> +
>> +$(TMP_OUTPUT):
>> + $(call msg,MKDIR,$@)
>> + $(Q)mkdir -p $(TMP_OUTPUT)
>> +
>> +$(TMP_OUTPUT)/vmlinux.h: $(VMLINUX_BTF_PATH) | $(TMP_OUTPUT) $(BPFTOOL)
>
> please add support to specify VMLINUX_H as it is in selftests
> or bpftool, we will need it in out building setup
>
> thanks,
> jirka

Let me try that.

Thanks,
Song