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

From: Song Liu
Date: Wed Dec 09 2020 - 18:33:05 EST




> On Dec 9, 2020, at 9:03 AM, Jiri Olsa <jolsa@xxxxxxxxxx> wrote:
>
> On Tue, Dec 08, 2020 at 10:16:45AM -0800, Song Liu wrote:
>> BPF programs are useful in perf to profile BPF programs. BPF skeleton is
>> by far the easiest way to write BPF tools. Enable building BPF skeletons
>> in util/bpf_skel. A dummy bpf skeleton is added. More bpf skeletons will
>> be added for different use cases.
>>
>> Signed-off-by: Song Liu <songliubraving@xxxxxx>
>
> one nit below, but other than that:
>
> Acked-by: Jiri Olsa <jolsa@xxxxxxxxxx>

Thanks!

[...]

>>
>> +ifdef BUILD_BPF_SKEL
>> + $(call feature_check,clang-bpf-co-re)
>> + ifeq ($(feature-clang-bpf-co-re), 0)
>> + dummy := $(error Error: clang too old. Please install recent clang)
>> + endif
>> + $(call detected,CONFIG_PERF_BPF_SKEL)
>> + CFLAGS += -DBUILD_BPF_SKEL
>
> sorry I did not notice before, but we use HAVE_* name style for these C macros
>
> HAVE_BPF_SKEL should fit

I will fix this in v4.