[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CE62CAE6-791D-4A96-A5AF-C981F89938E5@fb.com>
Date: Tue, 8 Dec 2020 00:59:32 +0000
From: Song Liu <songliubraving@...com>
To: Jiri Olsa <jolsa@...hat.com>
CC: lkml <linux-kernel@...r.kernel.org>,
Kernel Team <Kernel-team@...com>,
"peterz@...radead.org" <peterz@...radead.org>,
"mingo@...hat.com" <mingo@...hat.com>,
"acme@...nel.org" <acme@...nel.org>,
"mark.rutland@....com" <mark.rutland@....com>,
"alexander.shishkin@...ux.intel.com"
<alexander.shishkin@...ux.intel.com>,
"namhyung@...nel.org" <namhyung@...nel.org>
Subject: Re: [PATCH v2 1/2] perf: support build BPF skeletons with perf
> On Dec 7, 2020, at 12:25 PM, Jiri Olsa <jolsa@...hat.com> wrote:
>
> On Thu, Dec 03, 2020 at 10:13:09PM -0800, Song Liu wrote:
>
> SNIP
>
>> @@ -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,42 @@ 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
>> +LIBBPF_SRC := $(abspath ../lib/bpf)
>> +BPF_INCLUDE := -I$(SKEL_TMP_OUT)/..
>
> it looks good, but I still need to add following includes to compile
> for bpf_helper* headers
Thanks! I fixed this in the next version.
Song
>
> jirka
>
>
> ---
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index fb7de412152b..1f2fe339be85 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -1020,7 +1020,7 @@ SKELETONS := $(SKEL_OUT)/bpf_prog_profiler.skel.h
> ifdef BUILD_BPF_SKEL
> BPFTOOL := $(SKEL_TMP_OUT)/bpftool-bootstrap
> LIBBPF_SRC := $(abspath ../lib/bpf)
> -BPF_INCLUDE := -I$(SKEL_TMP_OUT)/..
> +BPF_INCLUDE := -I$(SKEL_TMP_OUT)/.. -I$(BPF_PATH) -I$(LIBBPF_SRC)/..
>
> $(SKEL_TMP_OUT):
> $(Q)$(MKDIR) -p $@
>
Powered by blists - more mailing lists