linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Song Liu <songliubraving@fb.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: open list <linux-kernel@vger.kernel.org>,
	Kernel Team <Kernel-team@fb.com>,
	Peter Ziljstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	"namhyung@kernel.org" <namhyung@kernel.org>
Subject: Re: [RFC 1/2] perf: support build BPF skeletons with perf
Date: Tue, 24 Nov 2020 23:47:05 +0000	[thread overview]
Message-ID: <0E8E3EDE-5BF4-4D34-A728-2AA935B29050@fb.com> (raw)
In-Reply-To: <20201122232742.GB1902740@krava>



> On Nov 22, 2020, at 3:27 PM, Jiri Olsa <jolsa@redhat.com> wrote:
> 
> On Wed, Nov 18, 2020 at 08:50:45PM -0800, Song Liu wrote:
> 
> SNIP
> 
>> # FEATURE_TESTS_BASIC + FEATURE_TESTS_EXTRA is the complete list
>> # of all feature tests
>> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
>> index ce8516e4de34f..1c2c0f4badd85 100644
>> --- a/tools/perf/Makefile.config
>> +++ b/tools/perf/Makefile.config
>> @@ -619,6 +619,13 @@ ifndef NO_LIBBPF
>>     msg := $(warning BPF API too old. Please install recent kernel headers. BPF support in 'perf record' is disabled.)
>>     NO_LIBBPF := 1
>>   endif
>> +
>> +  ifndef NO_BPF_SKEL
>> +    ifeq ($(feature-clang-bpf-co-re), 1)
>> +      BUILD_BPF_SKEL := 1
>> +      $(call detected,CONFIG_PERF_BPF_SKEL)
>> +    endif
>> +  endif
>> endif
>> 
>> dwarf-post-unwind := 1
>> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
>> index 7ce3f2e8b9c74..9a9fc71e2ffa4 100644
>> --- a/tools/perf/Makefile.perf
>> +++ b/tools/perf/Makefile.perf
>> @@ -126,6 +126,8 @@ include ../scripts/utilities.mak
>> #
>> # Define NO_LIBDEBUGINFOD if you do not want support debuginfod
>> #
>> +# Define NO_BPF_SKEL if you do not want build BPF skeletons
> 
> we will need to make this the other way round and disable it
> by default before we figure out al lthe dependencies,
> my build's failing on:
> 
> 	[jolsa@krava perf]$ make JOBS=1
> 	  BUILD:   Doing 'make -j1' parallel build
> 	  CC       /home/jolsa/kernel/linux-perf/tools/perf/util/bpf_skel/.tmp/prog.o
> 	  CLANG    /home/jolsa/kernel/linux-perf/tools/perf/util/bpf_skel/.tmp/pid_iter.bpf.o
> 	In file included from skeleton/pid_iter.bpf.c:4:
> 	In file included from /home/jolsa/kernel/linux-perf/tools/lib/bpf/bpf_helpers.h:11:
> 	/home/jolsa/kernel/linux-perf/tools/lib/bpf/bpf_helper_defs.h:3560:57: warning: declaration of 'struct bpf_redir_neigh' will not be visible outside of this function [-Wvisibility]
> 	static long (*bpf_redirect_neigh)(__u32 ifindex, struct bpf_redir_neigh *params, int plen, __u64 flags) = (void *) 152;
> 								^
> 	skeleton/pid_iter.bpf.c:35:48: error: no member named 'id' in 'struct bpf_link'
> 			return BPF_CORE_READ((struct bpf_link *)ent, id);
> 			       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
> 	/home/jolsa/kernel/linux-perf/tools/lib/bpf/bpf_core_read.h:339:18: note: expanded from macro 'BPF_CORE_READ'
> 			___type((src), a, ##__VA_ARGS__) __r;                       \
> 	...

I guess this was caused by older vmlinux.h. Could you please try build 
vmlinux first? 

Thanks,
Song

  reply	other threads:[~2020-11-24 23:48 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19  4:50 [RFC 0/2] Introduce perf-stat -b for BPF programs Song Liu
2020-11-19  4:50 ` [RFC 1/2] perf: support build BPF skeletons with perf Song Liu
2020-11-22 23:27   ` Jiri Olsa
2020-11-24 23:47     ` Song Liu [this message]
2020-11-25 16:38       ` Jiri Olsa
2020-11-22 23:32   ` Jiri Olsa
2020-11-24 23:51     ` Song Liu
2020-11-22 23:35   ` Jiri Olsa
2020-11-24 23:52     ` Song Liu
2020-11-25 16:40       ` Jiri Olsa
2020-11-24 19:51   ` Jiri Olsa
2020-11-24 23:59     ` Song Liu
2020-11-24 19:51   ` Jiri Olsa
2020-11-24 23:53     ` Song Liu
2020-11-19  4:50 ` [RFC 2/2] perf-stat: enable counting events for BPF programs Song Liu
2020-11-23 23:47   ` Jiri Olsa
2020-11-24 23:31     ` Song Liu
2020-11-25 16:42       ` Jiri Olsa
2020-11-24 19:51   ` Jiri Olsa
2020-11-24 23:43     ` Song Liu
2020-11-25  0:02       ` Song Liu
2020-11-25 16:43         ` Jiri Olsa
2020-11-19 14:52 ` [RFC 0/2] Introduce perf-stat -b " Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0E8E3EDE-5BF4-4D34-A728-2AA935B29050@fb.com \
    --to=songliubraving@fb.com \
    --cc=Kernel-team@fb.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).