Re: [PATCH 08/12] add trace events for each syscall entry/exit

From: Ingo Molnar
Date: Tue Aug 11 2009 - 09:54:02 EST



* Frederic Weisbecker <fweisbec@xxxxxxxxx> wrote:

> > +struct trace_event event_syscall_enter = {
> > + .trace = print_syscall_enter,
> > + .type = TRACE_SYSCALL_ENTER
> > +};
> > +
> > +struct trace_event event_syscall_exit = {
> > + .trace = print_syscall_exit,
> > + .type = TRACE_SYSCALL_EXIT
> > +};
> > --
> > 1.6.2.5
> >
>
> Nice.
>
> It's a bit too bad that enter and exit must be that separated
> whereas their callbacks are pretty the same.
>
> But I guess if we want to nicely decouple both, we don't have the
> choice.

Yeah - and enter and exit are different, in terms of state.

One thing that would be nice in the future (as an add-on - this
patch-set looks useful already) is to allow the sampling of user
register state as well via these tracepoints. That way we'd have a
much faster (and completely transparent) implementation of strace in
essence, with unique features such as system-wide or per cpu
strace-ing.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/