Messages in this thread | | | Date | Wed, 19 Aug 2009 09:32:20 +0800 | From | Li Zefan <> | Subject | Re: [PATCH] tracing: Create generic syscall TRACE_EVENTs |
| |
Josh Stone wrote: > This converts the syscall_enter/exit tracepoints into TRACE_EVENTs, so > you can have generic ftrace events that capture all system calls with > arguments and return values. > > The existing event_syscall_enter/exit trace_event structs are renamed to > event_sys_enter/exit, so they don't conflict with the names generated > automatically by ftrace. >
It would be much better to see a sample output of these TRACE_EVENTs,
...
> +TRACE_EVENT_WITH_CALLBACK(syscall_enter, > + > + TP_PROTO(struct pt_regs *regs, long id), > + > + TP_ARGS(regs, id), > + > + TP_STRUCT__entry( > + __field( long, id ) > + __array( long, args, 6 ) > + ), > + > + TP_fast_assign( > + __entry->id = id; > + syscall_get_arguments(current, regs, 0, 6, __entry->args); > + ), > + > + TP_printk("NR %ld (%ld, %ld, %ld, %ld, %ld, %ld)", > + __entry->id, > + __entry->args[0], __entry->args[1], __entry->args[2], > + __entry->args[3], __entry->args[4], __entry->args[5]), > +
so we'll see the what's the output if a syscall has less than 6 args.
And I guess it should be "(%lx, %lx, ..., %lx)"? Otherwise I think we'll see some negative values.
> + syscall_regfunc, syscall_unregfunc > +);
| |