Messages in this thread | | | Date | Thu, 5 Nov 2015 10:07:47 +0800 | From | "Wangnan (F)" <> | Subject | Re: [PATCH v2 3/4] bpf tools: Improve libbpf error reporting |
| |
On 2015/11/5 9:48, Wangnan (F) wrote: > > > On 2015/11/5 6:01, Arnaldo Carvalho de Melo wrote: >> Em Wed, Nov 04, 2015 at 02:25:58AM +0000, Wang Nan escreveu: >>> In this patch, a series libbpf specific error numbers and >>> libbpf_strerror() are created to help reporting error to caller. >>> Functions are updated to pass correct error number through macro >>> CHECK_ERR(). >>> >>> All users of bpf_object__open{_buffer}() and bpf_program__title() >>> in perf are modified accordingly. >> So, before I get: >> >> [root@zoo ~]# perf record -e /tmp/foo.o sleep 1 >> 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 >> >> >> And now: >> >> [root@zoo ~]# perf record -e /tmp/foo.o sleep 1 >> event syntax error: '/tmp/foo.o' >> \___ Unknown error 4006 >> >> (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 >> [root@zoo ~]# >> >> Can you please fix this? The relevant strerror() routine should know >> about the >> errors it handles and produce an informative message. >> >> - Arnaldo >> > > An libbpf related patches are losted because yesterday I didn't know > your head. >
Nothing losted...
You won't see this after 4/4. However, I can fix this "Unknown error 4006" reporting in this patch.
Thank you.
| |