Re: [RFC 2/2] perf-stat: enable counting events for BPF programs

From: Jiri Olsa
Date: Wed Nov 25 2020 - 11:42:48 EST


On Tue, Nov 24, 2020 at 11:31:49PM +0000, Song Liu wrote:
>
>
> > On Nov 23, 2020, at 3:47 PM, Jiri Olsa <jolsa@xxxxxxxxxx> wrote:
>
> [...]
>
> >
> > I still need to review this deeply, but so far I'm getting this error:
> >
> > # ./perf stat -b 40
> > libbpf: elf: skipping unrecognized data section(9) .eh_frame
> > libbpf: elf: skipping relo section(15) .rel.eh_frame for section(9) .eh_frame
> > libbpf: XXX is not found in vmlinux BTF
> > libbpf: failed to load object 'bpf_prog_profiler_bpf'
> > libbpf: failed to load BPF skeleton 'bpf_prog_profiler_bpf': -2
> > libbpf: elf: skipping unrecognized data section(9) .eh_frame
> > libbpf: elf: skipping relo section(15) .rel.eh_frame for section(9) .eh_frame
> > libbpf: XXX is not found in vmlinux BTF
> > libbpf: failed to load object 'bpf_prog_profiler_bpf'
> > libbpf: failed to load BPF skeleton 'bpf_prog_profiler_bpf': -2
> > libbpf: elf: skipping unrecognized data section(9) .eh_frame
> > libbpf: elf: skipping relo section(15) .rel.eh_frame for section(9) .eh_frame
> > libbpf: XXX is not found in vmlinux BTF
> > libbpf: failed to load object 'bpf_prog_profiler_bpf'
> > libbpf: failed to load BPF skeleton 'bpf_prog_profiler_bpf': -2
> > libbpf: elf: skipping unrecognized data section(9) .eh_frame
> > libbpf: elf: skipping relo section(15) .rel.eh_frame for section(9) .eh_frame
> > libbpf: XXX is not found in vmlinux BTF
> > libbpf: failed to load object 'bpf_prog_profiler_bpf'
> > libbpf: failed to load BPF skeleton 'bpf_prog_profiler_bpf': -2
> > libbpf: elf: skipping unrecognized data section(9) .eh_frame
> > libbpf: elf: skipping relo section(15) .rel.eh_frame for section(9) .eh_frame
> > libbpf: XXX is not found in vmlinux BTF
> > libbpf: failed to load object 'bpf_prog_profiler_bpf'
> > libbpf: failed to load BPF skeleton 'bpf_prog_profiler_bpf': -2
> > libbpf: elf: skipping unrecognized data section(9) .eh_frame
> > libbpf: elf: skipping relo section(15) .rel.eh_frame for section(9) .eh_frame
> > libbpf: XXX is not found in vmlinux BTF
> > libbpf: failed to load object 'bpf_prog_profiler_bpf'
> > libbpf: failed to load BPF skeleton 'bpf_prog_profiler_bpf': -2
> > libbpf: elf: skipping unrecognized data section(9) .eh_frame
> > libbpf: elf: skipping relo section(15) .rel.eh_frame for section(9) .eh_frame
> > libbpf: XXX is not found in vmlinux BTF
> > libbpf: failed to load object 'bpf_prog_profiler_bpf'
> > libbpf: failed to load BPF skeleton 'bpf_prog_profiler_bpf': -2
> > libbpf: elf: skipping unrecognized data section(9) .eh_frame
> > libbpf: elf: skipping relo section(15) .rel.eh_frame for section(9) .eh_frame
> > libbpf: XXX is not found in vmlinux BTF
> > libbpf: failed to load object 'bpf_prog_profiler_bpf'
> > libbpf: failed to load BPF skeleton 'bpf_prog_profiler_bpf': -2
> > libbpf: Can't get the 0th fd from program fentry_XXX: only -1 instances
> > libbpf: prog 'fentry_XXX': can't attach before loaded
> > libbpf: failed to auto-attach program 'fentry_XXX': -22
>
> I cannot reproduce this. Is 40 a valid BPF program ID? Could you please share
> more information about it with "bpftool prog show id 40"?

it was bpftrace kfunc program, I'll try again and get back with
more details if there's still the problem

jirka