lkml.org 
[lkml]   [2009]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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
> +);




\
 
 \ /
  Last update: 2009-08-19 03:37    [W:0.204 / U:1.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site