Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1255708
| From | "Wangnan (F)" <wangnan0@huawei.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 05/31] perf record: Load eBPF object into kernel |
| Date | 2015-10-26 08:20 +0100 |
| Message-ID | <qnKet-5ir-9@gated-at.bofh.it> (permalink) |
| References | <qjtFf-7cv-3@gated-at.bofh.it> <qjtOY-7od-35@gated-at.bofh.it> <qmNR9-7hz-43@gated-at.bofh.it> <qmUSB-GO-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Arnaldo,
On 2015/10/24 8:27, Arnaldo Carvalho de Melo wrote:
> libbpf: load bpf program failed: Invalid argument
> libbpf: -- BEGIN DUMP LOG ---
> libbpf:
>
> libbpf: -- END LOG --
> libbpf: failed to load program 'fork=_do_fork'
> libbpf: failed to load object '/tmp/foo.o'
> bpf: load objects failed
> event syntax error: '/tmp/foo.o'
> \___ Invalid argument: Are you root and runing a CONFIG_BPF_SYSCALL kernel?
>
> (add -v to see detail)
> Run 'perf list' for a list of valid events
>
> Usage: perf record [<options>] [<command>]
> or: perf record [<options>] -- <command> [<options>]
>
> -e, --event <event> event selector. use 'perf list' to list available events
> Opening /sys/kernel/debug/tracing//kprobe_events write=1
> Opening /sys/kernel/debug/tracing//uprobe_events write=1
> Parsing probe_events: p:perf_bpf_probe/fork _text+638512
> Group:perf_bpf_probe Event:fork probe:p
> Writing event: -:perf_bpf_probe/fork
> [acme@felicio linux]$ uname -a
> Linux felicio.ghostprotocols.net 4.3.0-rc6+ #1 SMP Fri Oct 23 16:40:25 BRT 2015 x86_64 x86_64 x86_64 GNU/Linux
> [acme@felicio linux]$
>
Please have a look at patch [1]. With that patch kernel will dump
something into
log buffer. In your case, you will see:
root@sandybridge:~# /tmp/perf record -e /tmp/test_config_base.o ls
libbpf: load bpf program failed: Invalid argument
libbpf: -- BEGIN DUMP LOG ---
libbpf:
Kernel version mismatch: 0x40400 != 0x40300
libbpf: -- END LOG --
libbpf: failed to load program 'func_write=sys_write'
libbpf: failed to load object '/tmp/test_config_base.o'
event syntax error: '/tmp/test_config_base.o'
\___ Invalid argument: Are you root and runing a
CONFIG_BPF_SYSCALL kernel?
(add -v to see detail)
Run 'perf list' for a list of valid events
...
And I'd like to improve the error message output by perf.
Do you want me to send a patch for fixing this problem or modifying
existing patches
in my git tree?
Thank you.
[1]
http://lkml.kernel.org/r/1445843588-143137-1-git-send-email-wangnan0@huawei.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH 05/31] perf record: Load eBPF object into kernel Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-23 19:00 +0200
Re: [PATCH 05/31] perf record: Load eBPF object into kernel Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-24 02:30 +0200
Re: [PATCH 05/31] perf record: Load eBPF object into kernel "Wangnan (F)" <wangnan0@huawei.com> - 2015-10-26 08:20 +0100
Re: [PATCH 05/31] perf record: Load eBPF object into kernel pi3orama <pi3orama@163.com> - 2015-10-24 03:30 +0200
csiph-web