From: Frederic Weisbecker <fweisbec@gmail.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
Lai Jiangshan <laijs@cn.fujitsu.com>,
Steven Rostedt <rostedt@goodmis.org>,
Peter Zijlstra <peterz@infradead.org>,
Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>,
Jiaying Zhang <jiayingz@google.com>,
Martin Bligh <mbligh@google.com>
Subject: Re: [RFC][PATCH 0/2] Syscalls tracing
Date: Sat, 7 Mar 2009 22:53:04 +0100 [thread overview]
Message-ID: <20090307215303.GB5869@nowhere> (raw)
In-Reply-To: <y0mbpsdqdti.fsf@ton.toronto.redhat.com>
On Sat, Mar 07, 2009 at 03:26:49PM -0500, Frank Ch. Eigler wrote:
> Frederic Weisbecker <fweisbec@gmail.com> writes:
>
> > Here is a first attempt, quick one-shot, to provide a syscall tracing
> > infrastructure on ftrace.
>
> Please see also the utrace-based thread syscall/signal/lifecycle.
> tracer I posted a few times, and is just about to be reposted as a
> part of the larger utrace submission.
Yes I've looked at it and as I will explain below, I don't have
any bad feelings against utrace.
> System call metadata (name, argument count, and getting fancier from
> there) would be nice to have for other clients too, such as the audit
> subsystem.
>
> The main drawback of this general approach however is the notion that
> ftrace is the solitary user of system call tracing, thus dedicating
> that new task flag to this purpose. Therefore, your code has nothing
> like reference counting or sharing; nothing yet to avoid overhead on
> threads that need no tracing, nor to allow more than one tracing
> widget to consume events. These are the sorts of services that utrace
> provides.
>
> - FChE
Yes. But it was a first attempt scribbled in one day. I already knew
that a fair amount of bits coming along these patches started on the wrong
way. But that doesn't matter, I just wanted to test the feelings of anyone
interested about the main axis inside:
- having a O(1) access table which stores the number of parameters for each
syscalls, so that the traced path can be very fast and efficient:
we know what to save quickly and we only save the relevant bits from
the path, that said, 1 syscall number (which behaves here as a unique
identifier key) and its parameters values.
- provide a good way to extract the results. It needs a better and larger work
on the syscalls metadata. Ie: the string mask is a bit ridiculous, as well as
the individual callback to display a syscall (because it implies too much work
and code that can be a lot factorized) but I expect that a discussion about a
good to produce efficient metadata could born after it.
For example we could have an array of char where the types are encoding using
an enum which describes the types of the parameters.
Depending of these parameters, we can have one callback for each type to display
them. We can also export these metadatas to userspace so that the users are able
to only extract the binary traces and format and give some sense by formatting it
later using the metadas.
Anyway, since this is a first scribbling, there is neither reference count nor
per task tracing granularity :-)
But, that's said, I already expressed my feelings about utrace by the past.
It's a good library, seems easy to use and powerful and I would like to see
it merged.
I don't know what other people think about it. But IMHO, I think it would be good
if you could, for now, make an attempt to sort the only relevant bits to provide
syscalls tracing and submit it.
It would exclude a large part that concerns the signals/fork/exec tracing
which will probably be needed later.
prev parent reply other threads:[~2009-03-07 21:53 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-07 4:52 [RFC][PATCH 0/2] Syscalls tracing Frederic Weisbecker
2009-03-07 4:52 ` [RFC][PATCH 1/2] tracing/ftrace: syscall tracing infrastructure Frederic Weisbecker
2009-03-07 7:49 ` Frederic Weisbecker
2009-03-09 13:52 ` Steven Rostedt
2009-03-09 20:47 ` Frederic Weisbecker
2009-03-10 0:52 ` Steven Rostedt
2009-03-10 10:08 ` Frederic Weisbecker
2009-03-08 16:24 ` Ingo Molnar
2009-03-09 20:40 ` Frederic Weisbecker
2009-03-09 13:44 ` Steven Rostedt
2009-03-09 20:42 ` Frederic Weisbecker
2009-03-13 4:27 ` [tip:tracing/syscalls] tracing/ftrace: syscall tracing infrastructure, basics Frederic Weisbecker
2009-03-16 19:36 ` [RFC][PATCH 1/2] tracing/ftrace: syscall tracing infrastructure Masami Hiramatsu
2009-03-16 20:15 ` Frederic Weisbecker
2009-03-16 20:38 ` Masami Hiramatsu
2009-03-16 21:45 ` Mathieu Desnoyers
2009-03-16 22:18 ` Frank Ch. Eigler
2009-03-16 23:46 ` Frederic Weisbecker
2009-03-23 16:42 ` Mathieu Desnoyers
2009-03-23 16:52 ` Frank Ch. Eigler
2009-03-23 17:03 ` Mathieu Desnoyers
2009-03-17 5:24 ` Oleg Nesterov
2009-03-17 16:00 ` Mathieu Desnoyers
2009-03-19 10:34 ` Roland McGrath
2009-03-23 17:33 ` Mathieu Desnoyers
2009-03-07 4:53 ` [RFC][PATCH 2/2] tracing/x86: basic implementation of syscall tracing for x86-64 Frederic Weisbecker
2009-03-13 4:27 ` [tip:tracing/syscalls] tracing/x86: basic implementation of syscall tracing for x86 Frederic Weisbecker
2009-03-13 16:09 ` [tip:tracing/syscalls] tracing/syscalls: support for syscalls tracing on x86, fix Ingo Molnar
2009-03-13 16:32 ` [RFC][PATCH 2/2] tracing/x86: basic implementation of syscall tracing for x86-64 Mathieu Desnoyers
2009-03-13 16:37 ` Ingo Molnar
2009-03-13 16:50 ` Mathieu Desnoyers
2009-03-15 4:44 ` Ingo Molnar
2009-03-15 15:16 ` Frederic Weisbecker
2009-03-15 19:22 ` Mathieu Desnoyers
2009-03-07 12:15 ` [RFC][PATCH 0/2] Syscalls tracing Peter Zijlstra
2009-03-07 16:02 ` Frederic Weisbecker
2009-03-08 11:24 ` Frederic Weisbecker
2009-03-08 11:28 ` Frederic Weisbecker
2009-03-07 20:26 ` Frank Ch. Eigler
2009-03-07 21:53 ` Frederic Weisbecker [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=20090307215303.GB5869@nowhere \
--to=fweisbec@gmail.com \
--cc=fche@redhat.com \
--cc=jiayingz@google.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=mbligh@google.com \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
/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