On Thu, 2010-04-29 at 09:32 -0400, Mathieu Desnoyers wrote:
I'm a little confused by your example, but perhaps you are describing
what we already have.
All syscall_entrys have the same class, and all syscall_exits have their
own too.
What each syscall has separate is a meta-data, which is unique to
syscalls, and normal TRACE_EVENT()s do not have them. It is put in the
call->private field.
So what we have is:
struct ftrace_event_class event_class_syscall_enter;
This handles the printing of most of the data. What it does not cover is
how to print the parameters of the syscall itself. The meta-data is
created per syscall that specifies the syscalls parameters.
And the same metadata is used by both the syscall enter and exit events.
The meta data is described in include/trace/syscalls.h
struct syscall_metadata {
cost char *name;
int syscall_nr;
int nb_args;
const char **types;
const char **args;
struct ftrace_event_call *enter_event;
struct ftrace_event_call *exit_event;
};
Here the description is how to print the syscall parameters.
I don't see how we can group it any better, without manually doing it.
Hope this explains things better.
-- Steve
--