bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: 王贇 <yun.wang@linux.alibaba.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>, Andrii Nakryiko <andriin@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@chromium.org>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:BPF (Safe dynamic programs and tools)" 
	<netdev@vger.kernel.org>,
	"open list:BPF (Safe dynamic programs and tools)" 
	<bpf@vger.kernel.org>
Subject: Re: [RFC PATCH] samples:bpf: introduce task detector
Date: Fri, 29 May 2020 10:24:45 +0800	[thread overview]
Message-ID: <0c8ec8d5-22df-8380-1ebf-e7f124dbe801@linux.alibaba.com> (raw)
In-Reply-To: <CAEf4BzYHFAbOeVbs8Y2j5HjYOavDC+M+HtOst69Qtm2h5A3M=A@mail.gmail.com>



On 2020/5/29 上午2:34, Andrii Nakryiko wrote:
[snip]
>>>
>>> With CO-RE, it also will allow to compile this tool once and run it on
>>> many different kernels without recompilation. Please do take a look
>>> and submit a PR there, it will be a good addition to the toolkit (and
>>> will force you write a bit of README explaining use of this tool as
>>> well ;).
>>
>> Aha, I used to think bcc only support python and cpp :-P
>>
> 
> libbpf-tools don't use BCC at all, they are just co-located with BCC
> and BCC tools in the same repository and are lightweight alternatives
> to BCC-based tools. But it needs kernel with BTF built-in, which is
> the only (temporary) downside.

I see, thanks for the explain :-)

We prefer libbpf since we feel it's more friendly for kernel folks to
do develop, less suspects when meet any BUG, while BCC is a good way
to package and distribute, glad to know that we can have them in one
piece now.

Regards,
Michael Wang

> 
>> I'll try to rework it and submit PR, I'm glad to know that you think
>> this tool as a helpful one, we do solved some tough issue with it
>> already.
>>
>>>
>>> As for the code itself, I haven't gone through it much, but please
>>> convert map definition syntax to BTF-defined one. The one you are
>>> using is a legacy one. Thanks!
>>>
>>>   [0] https://github.com/iovisor/bcc/tree/master/libbpf-tools
>>
>> Will check the example there :-)
>>
>> Regards,
>> Michael Wang
>>
>>>
>>>>  samples/bpf/Makefile             |   3 +
>>>>  samples/bpf/task_detector.h      | 382 +++++++++++++++++++++++++++++++++++++++
>>>>  samples/bpf/task_detector_kern.c | 329 +++++++++++++++++++++++++++++++++
>>>>  samples/bpf/task_detector_user.c | 314 ++++++++++++++++++++++++++++++++
>>>>  4 files changed, 1028 insertions(+)
>>>>  create mode 100644 samples/bpf/task_detector.h
>>>>  create mode 100644 samples/bpf/task_detector_kern.c
>>>>  create mode 100644 samples/bpf/task_detector_user.c
>>>>
>>>
>>> [...]
>>>

      reply	other threads:[~2020-05-29  2:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28  2:53 [RFC PATCH] samples:bpf: introduce task detector 王贇
2020-05-28  6:36 ` Andrii Nakryiko
2020-05-28  8:14   ` 王贇
2020-05-28 18:34     ` Andrii Nakryiko
2020-05-29  2:24       ` 王贇 [this message]

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=0c8ec8d5-22df-8380-1ebf-e7f124dbe801@linux.alibaba.com \
    --to=yun.wang@linux.alibaba.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.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;
as well as URLs for NNTP newsgroup(s).