From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Jovi Zhangwei <jovi.zhangwei@gmail.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
"H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Tom Zanussi <tom.zanussi@linux.intel.com>,
Eric Dumazet <edumazet@google.com>,
LKML <linux-kernel@vger.kernel.org>,
"yrl.pp-manager.tt@hitachi.com" <yrl.pp-manager.tt@hitachi.com>
Subject: Re: [RFC PATCH tip 4/5] use BPF in tracing filters
Date: Sat, 07 Dec 2013 08:48:56 +0900 [thread overview]
Message-ID: <52A26268.5070403@hitachi.com> (raw)
In-Reply-To: <CAGdX0WGK13RVo6dgNbMKm81gy4GLZUBFEhmYfHj6tjz33FpmnQ@mail.gmail.com>
(2013/12/06 19:05), Jovi Zhangwei wrote:
> On Fri, Dec 6, 2013 at 4:43 PM, Masami Hiramatsu
> <masami.hiramatsu.pt@hitachi.com> wrote:
>> (2013/12/05 14:11), Alexei Starovoitov wrote:
>>> On Wed, Dec 4, 2013 at 4:05 PM, Masami Hiramatsu
>>> <masami.hiramatsu.pt@hitachi.com> wrote:
>>>> (2013/12/04 10:11), Steven Rostedt wrote:
>>>>> On Wed, 04 Dec 2013 09:48:44 +0900
>>>>> Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> wrote:
>>>>>
>>>>>> fetch functions and actions. In that case, we can continue
>>>>>> to use current interface but much faster to trace.
>>>>>> Also, we can see what filter/arguments/actions are set
>>>>>> on each event.
>>>>>
>>>>> There's also the problem that the current filters work with the results
>>>>> of what is written to the buffer, not what is passed in by the trace
>>>>> point, as that isn't even displayed to the user.
>>>>
>>>> Agreed, so I've said I doubt this implementation is a good
>>>> shape to integrate. Ktap style is better, since it just gets
>>>> parameters from perf buffer entry (using event format).
>>>
>>> Are you saying always store all arguments into ring buffer and let
>>> filter run on it?
>>
>> Yes, it is what ftrace does. I doubt your way fits all of the existing
>> trace-event macros. However, I think just for dynamic events, you can
>> integrating the argument fetching and filtering.
>>
> Does this will affect the user interface of perf-probe argument fetching?
>
> I mean if use bpf backend, do we must need gcc to compile bpf source
> for perf-probe argument fetching? as we known, current argument
> fetching is go through kprobe_events/uprobe_events debugfs file, and
> ktap is based on this behavior.
No, I don't want to do that. Feeding binary code into the kernel is
not trusted nor controllable. I'd just like to see the code which
optimizing current fetching/filtering methods, and that is possible.
Anyway, as far as I can see, there looks be two different models of
tracing in our mind.
A) Fixed event based tracing: In this model, there are several fixed
"events" which well defined with fixed arguments. tracer handles these
events and only use limited arguments. It's like a packet stream
processing. ftrace, perf etc. are used this model.
B) Flexible event-point tracing: In this model, each tracer(or even
trace user) can freely define their own event, there will be some fixed
tracing points defined, but arguments are defined by users. It's like a
debugger's breakpoint debugging. systemtap, ktap etc. are used this model.
Of course, both have pros/cons, and can share some fundamental features.
e.g. B model has a good flexibility and A model is easy to use for beginners.
I think we'd better not integrate these two, but find the better way
to share each functionality.
Thank you,
--
Masami HIRAMATSU
IT Management Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com
next prev parent reply other threads:[~2013-12-06 23:49 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-03 4:28 [RFC PATCH tip 0/5] tracing filters with BPF Alexei Starovoitov
2013-12-03 4:28 ` [RFC PATCH tip 1/5] Extended BPF core framework Alexei Starovoitov
2013-12-03 4:28 ` [RFC PATCH tip 2/5] Extended BPF JIT for x86-64 Alexei Starovoitov
2013-12-03 4:28 ` [RFC PATCH tip 3/5] Extended BPF (64-bit BPF) design document Alexei Starovoitov
2013-12-03 17:01 ` H. Peter Anvin
2013-12-03 19:59 ` Alexei Starovoitov
2013-12-03 20:41 ` Frank Ch. Eigler
2013-12-03 21:31 ` Alexei Starovoitov
2013-12-04 9:24 ` Ingo Molnar
2013-12-03 4:28 ` [RFC PATCH tip 4/5] use BPF in tracing filters Alexei Starovoitov
2013-12-04 0:48 ` Masami Hiramatsu
2013-12-04 1:11 ` Steven Rostedt
2013-12-05 0:05 ` Masami Hiramatsu
2013-12-05 5:11 ` Alexei Starovoitov
2013-12-06 8:43 ` Masami Hiramatsu
2013-12-06 10:05 ` Jovi Zhangwei
2013-12-06 23:48 ` Masami Hiramatsu [this message]
2013-12-08 18:22 ` Frank Ch. Eigler
2013-12-09 10:12 ` Masami Hiramatsu
2013-12-03 4:28 ` [RFC PATCH tip 5/5] tracing filter examples in BPF Alexei Starovoitov
2013-12-04 0:35 ` Jonathan Corbet
2013-12-04 1:21 ` Alexei Starovoitov
2013-12-03 9:16 ` [RFC PATCH tip 0/5] tracing filters with BPF Ingo Molnar
2013-12-03 15:33 ` Steven Rostedt
2013-12-03 18:26 ` Alexei Starovoitov
2013-12-04 1:13 ` Masami Hiramatsu
2013-12-09 7:29 ` Namhyung Kim
2013-12-09 9:51 ` Masami Hiramatsu
2013-12-03 18:06 ` Alexei Starovoitov
2013-12-04 9:34 ` Ingo Molnar
2013-12-04 17:36 ` Alexei Starovoitov
2013-12-05 10:38 ` Ingo Molnar
2013-12-06 5:43 ` Alexei Starovoitov
2013-12-03 10:34 ` Masami Hiramatsu
2013-12-04 0:01 ` Andi Kleen
2013-12-04 3:09 ` Alexei Starovoitov
2013-12-05 4:40 ` Alexei Starovoitov
2013-12-05 10:41 ` Ingo Molnar
2013-12-05 13:46 ` Steven Rostedt
2013-12-05 22:36 ` Alexei Starovoitov
2013-12-05 23:37 ` Steven Rostedt
2013-12-06 4:49 ` Alexei Starovoitov
2013-12-10 15:47 ` Ingo Molnar
2013-12-11 2:32 ` Alexei Starovoitov
2013-12-11 3:35 ` Masami Hiramatsu
2013-12-12 2:48 ` Alexei Starovoitov
2013-12-05 16:11 ` Frank Ch. Eigler
2013-12-05 19:43 ` Alexei Starovoitov
2013-12-06 0:14 ` Andi Kleen
2013-12-06 1:10 ` H. Peter Anvin
2013-12-06 1:20 ` Andi Kleen
2013-12-06 1:28 ` H. Peter Anvin
2013-12-06 21:43 ` Frank Ch. Eigler
2013-12-06 5:16 ` Alexei Starovoitov
2013-12-06 23:54 ` Masami Hiramatsu
2013-12-07 1:01 ` Alexei Starovoitov
2013-12-06 5:46 ` Jovi Zhangwei
2013-12-07 1:12 ` Alexei Starovoitov
2013-12-07 16:53 ` Jovi Zhangwei
2013-12-06 5:19 ` Jovi Zhangwei
2013-12-06 23:58 ` Masami Hiramatsu
2013-12-07 16:21 ` Jovi Zhangwei
2013-12-09 4:59 ` Masami Hiramatsu
2013-12-06 6:17 ` Jovi Zhangwei
2013-12-05 16:31 ` Frank Ch. Eigler
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=52A26268.5070403@hitachi.com \
--to=masami.hiramatsu.pt@hitachi.com \
--cc=a.p.zijlstra@chello.nl \
--cc=ast@plumgrid.com \
--cc=edumazet@google.com \
--cc=hpa@zytor.com \
--cc=jovi.zhangwei@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=tom.zanussi@linux.intel.com \
--cc=yrl.pp-manager.tt@hitachi.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