Messages in this thread | | | Date | Tue, 11 Aug 2009 14:01:36 +0200 | From | Frederic Weisbecker <> | Subject | Re: [PATCH 08/12] add trace events for each syscall entry/exit |
| |
On Tue, Aug 11, 2009 at 01:45:12PM +0200, Ingo Molnar wrote: > > * Frederic Weisbecker <fweisbec@gmail.com> 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
Indeed, a missing piece is the syscall record sampling with registers. Actually, IMO the registers themselves are not the right piece to export to perfcounter. It's too low-level.
What we need are the fetched arguments, because a lot of them are adresses (even user adresses), pretty useless for perf tools.
We can already and easily implement that simple args, like we do for ftrace. That's pretty trivial.
| |