From: "Wangnan (F)" <wangnan0@huawei.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: <namhyung@kernel.org>, <lizefan@huawei.com>, <pi3orama@163.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 3/4] bpf tools: Improve libbpf error reporting
Date: Thu, 5 Nov 2015 10:07:47 +0800 [thread overview]
Message-ID: <563AB9F3.5060606@huawei.com> (raw)
In-Reply-To: <563AB553.8010300@huawei.com>
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.
next prev parent reply other threads:[~2015-11-05 2:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-04 2:25 [PATCH v2 0/4] perf bpf: Improve error code delivering and output Wang Nan
2015-11-04 2:25 ` [PATCH v2 1/4] perf test: Keep test result clean if '-v' not set Wang Nan
2015-11-04 2:25 ` [PATCH v2 2/4] perf tools: Mute libbpf when " Wang Nan
2015-11-04 2:25 ` [PATCH v2 3/4] bpf tools: Improve libbpf error reporting Wang Nan
2015-11-04 22:01 ` Arnaldo Carvalho de Melo
2015-11-05 1:48 ` Wangnan (F)
2015-11-05 2:07 ` Wangnan (F) [this message]
2015-11-04 2:25 ` [PATCH v2 4/4] perf tools: Improve BPF related error messages output Wang Nan
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=563AB9F3.5060606@huawei.com \
--to=wangnan0@huawei.com \
--cc=acme@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=namhyung@kernel.org \
--cc=pi3orama@163.com \
/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